Răsfoiți Sursa

frame modify

zhangjie 2 ani în urmă
părinte
comite
5f9b024e35
100 a modificat fișierele cu 45 adăugiri și 16789 ștergeri
  1. 9 4
      README.md
  2. 4 3
      package.json
  3. 30 0
      pnpm-lock.yaml
  4. 0 71
      src/components/base/CardRuleSelect.vue
  5. 0 63
      src/components/base/FacultySelect.vue
  6. 0 67
      src/components/base/PaperNumberSelect.vue
  7. 0 73
      src/components/base/PrintPlanSelect.vue
  8. 0 65
      src/components/base/PrintRoomSelect.vue
  9. 0 82
      src/components/base/QuestionTeacherSelect.vue
  10. 0 74
      src/components/base/QuestionTeacherUserSelect.vue
  11. 0 71
      src/components/base/RoomSelect.vue
  12. 0 47
      src/components/common/CascaderSplit/CascaderSplit.vue
  13. 0 90
      src/components/common/CascaderSplit/LevelOne.vue
  14. 0 102
      src/components/common/CascaderSplit/LevelTwo.vue
  15. 0 18
      src/components/common/CascaderSplit/com-func.js
  16. 0 101
      src/components/common/DimensionTreeTable/DimensionTreeTable.vue
  17. 0 2
      src/components/common/DimensionTreeTable/index.js
  18. 0 92
      src/components/common/DimensionTreeTable/intro.md
  19. 0 418
      src/components/common/ImageEditUpload/ImageEditUpload.vue
  20. 0 2
      src/components/common/ImageEditUpload/index.js
  21. 0 55
      src/components/common/ImageEditUpload/intro.md
  22. BIN
      src/components/common/ImageEditUpload/temp-img.png
  23. 0 322
      src/components/common/ImageListUpload/ImageListUpload.vue
  24. 0 2
      src/components/common/ImageListUpload/index.js
  25. 0 47
      src/components/common/ImageListUpload/intro.md
  26. 0 312
      src/components/common/ImagePreview/ImagePreview.vue
  27. 0 2
      src/components/common/ImagePreview/index.js
  28. 0 51
      src/components/common/ImagePreview/move-ele.js
  29. 0 72
      src/components/common/LabelFilter/LabelFilter.vue
  30. 0 205
      src/components/common/LabelFilter/LabelSelect.vue
  31. 0 283
      src/components/common/RichTextEditor/RichTextEditor.vue
  32. 0 2
      src/components/common/RichTextEditor/index.js
  33. 0 104
      src/components/common/RichTextEditor/intro.md
  34. 0 28
      src/components/common/StepsProgress/StepFour.vue
  35. 0 28
      src/components/common/StepsProgress/StepOne.vue
  36. 0 28
      src/components/common/StepsProgress/StepThree.vue
  37. 0 28
      src/components/common/StepsProgress/StepTwo.vue
  38. 0 126
      src/components/common/StepsProgress/StepsProgress.vue
  39. 0 82
      src/components/common/utils/ajax.js
  40. 1 1
      src/constants/app.js
  41. 0 150
      src/constants/printTemplateData.js
  42. 0 1
      src/main.js
  43. 0 92
      src/modules/analysis/api.js
  44. 0 132
      src/modules/analysis/components/ModifyAnalysisBatch.vue
  45. 0 244
      src/modules/analysis/components/ModifyAnalysisBatchPaper.vue
  46. 0 215
      src/modules/analysis/components/ModifyBaseConfig.vue
  47. 0 331
      src/modules/analysis/components/SelectAnalysisPaper.vue
  48. 0 290
      src/modules/analysis/components/baseConfig/BlueprintConfig.vue
  49. 0 118
      src/modules/analysis/components/baseConfig/CommentAbility.vue
  50. 0 255
      src/modules/analysis/components/baseConfig/CommentConfig.vue
  51. 0 118
      src/modules/analysis/components/baseConfig/CommentKnowledge.vue
  52. 0 277
      src/modules/analysis/components/baseConfig/DiagnoseConfig.vue
  53. 0 223
      src/modules/analysis/components/baseConfig/DimensionAbilityList.vue
  54. 0 120
      src/modules/analysis/components/baseConfig/DimensionConfig.vue
  55. 0 258
      src/modules/analysis/components/baseConfig/DimensionKnowledgeList.vue
  56. 0 140
      src/modules/analysis/components/baseConfig/ModifyAbilityComment.vue
  57. 0 209
      src/modules/analysis/components/baseConfig/ModifyAbilityDim.vue
  58. 0 143
      src/modules/analysis/components/baseConfig/ModifyKnowledgeComment.vue
  59. 0 342
      src/modules/analysis/components/baseConfig/ModifyKnowledgeDim.vue
  60. 0 109
      src/modules/analysis/components/baseConfig/ProficiencyEdit.vue
  61. 0 88
      src/modules/analysis/components/baseConfig/baseConfigsStore.js
  62. 0 103
      src/modules/analysis/components/baseConfig/defaultComment.js
  63. 0 22
      src/modules/analysis/router.js
  64. 0 357
      src/modules/analysis/views/AnalysisBatchManage.vue
  65. 0 66
      src/modules/analysis/views/AnalysisReportView.vue
  66. 0 157
      src/modules/analysis/views/DataInitManage.vue
  67. 0 138
      src/modules/base/components/CardTitleRuleEdit.vue
  68. 0 217
      src/modules/base/components/MergePushDialog.vue
  69. 0 241
      src/modules/base/components/ModifyCardInfo.vue
  70. 0 386
      src/modules/base/components/ModifyCardRule.vue
  71. 0 136
      src/modules/base/components/ModifyClazz.vue
  72. 0 150
      src/modules/base/components/ModifyClazzSimple.vue
  73. 0 207
      src/modules/base/components/ModifyClazzSimpleStudent.vue
  74. 0 155
      src/modules/base/components/ModifyCourseSimple.vue
  75. 0 185
      src/modules/base/components/ModifyExam.vue
  76. 0 253
      src/modules/base/components/ModifyExamConfig.vue
  77. 0 694
      src/modules/base/components/ModifyExamConfigDetail.vue
  78. 0 100
      src/modules/base/components/ModifyField.vue
  79. 0 152
      src/modules/base/components/ModifyFlow.vue
  80. 0 736
      src/modules/base/components/ModifyFlowDetail.vue
  81. 0 301
      src/modules/base/components/ModifyPrintTemplate.vue
  82. 0 240
      src/modules/base/components/ModifyStudentSimple.vue
  83. 0 145
      src/modules/base/components/RegistFlowDialog.vue
  84. 0 188
      src/modules/base/components/RuleExam.vue
  85. 0 158
      src/modules/base/components/SelectClassStudent.vue
  86. 0 1969
      src/modules/base/components/privilege/navs.json
  87. 1 83
      src/modules/base/router.js
  88. 0 230
      src/modules/base/views/ApproveRecordManage.vue
  89. 0 268
      src/modules/base/views/CardManage.vue
  90. 0 316
      src/modules/base/views/CardRuleManage.vue
  91. 0 187
      src/modules/base/views/ClazzManage.vue
  92. 0 212
      src/modules/base/views/ClazzSimpleManage.vue
  93. 0 17
      src/modules/base/views/CommonCardTemplate.vue
  94. 0 17
      src/modules/base/views/CommonPrintTemplate.vue
  95. 0 43
      src/modules/base/views/CommonRule.vue
  96. 0 160
      src/modules/base/views/CourseSimpleManage.vue
  97. 0 236
      src/modules/base/views/ExamManage.vue
  98. 0 175
      src/modules/base/views/FlowManage.vue
  99. 0 17
      src/modules/base/views/ParamPrintTemplate.vue
  100. 0 294
      src/modules/base/views/PrintPlanPushManage.vue

+ 9 - 4
README.md

@@ -7,28 +7,33 @@
 #### 项目安装
 
 ```
+npm install
+or
 yarn install
+or
+pnpm install
 ```
 
+> 推荐使用`pnmp`,安装 pnpm:`npm install -g pnpm`,安装依赖包:`pnpm install`
+
 #### 开发模式
 
 ```
-yarn run serve
+npm start
 ```
 
 #### 项目打包
 
 ```
-yarn run build
+npm run build
 ```
 
 #### lint 项目文件,并修正格式
 
 ```
-yarn run lint
+npm run lint
 ```
 
 #### 自定义配置
 
 查看 [配置文档](https://cli.vuejs.org/config/).
-

+ 4 - 3
package.json

@@ -10,9 +10,9 @@
   },
   "dependencies": {
     "axios": "^0.18.0",
+    "core-js": "^3.6.5",
     "cropperjs": "^1.5.1",
     "crypto-js": "^4.0.0",
-    "core-js": "^3.6.5",
     "deepmerge": "^4.2.2",
     "element-ui": "^2.14.1",
     "js-md5": "^0.7.3",
@@ -37,8 +37,9 @@
     "prettier": "^1.19.1",
     "sass": "^1.26.5",
     "sass-loader": "^8.0.2",
-    "vue-template-compiler": "^2.6.11",
-    "terser-webpack-plugin": "^1.2.3"
+    "terser-webpack-plugin": "^1.2.3",
+    "url-loader": "^4.1.1",
+    "vue-template-compiler": "^2.6.11"
   },
   "gitHooks": {
     "pre-commit": "lint-staged"

+ 30 - 0
pnpm-lock.yaml

@@ -24,6 +24,7 @@ specifiers:
   sass: ^1.26.5
   sass-loader: ^8.0.2
   terser-webpack-plugin: ^1.2.3
+  url-loader: ^4.1.1
   vue: ^2.6.11
   vue-ls: ^3.2.2
   vue-router: ^3.2.0
@@ -60,6 +61,7 @@ devDependencies:
   sass: registry.npmmirror.com/sass/1.55.0
   sass-loader: registry.npmmirror.com/sass-loader/8.0.2_sass@1.55.0
   terser-webpack-plugin: registry.npmmirror.com/terser-webpack-plugin/1.4.5
+  url-loader: registry.npmmirror.com/url-loader/4.1.1
   vue-template-compiler: registry.npmmirror.com/vue-template-compiler/2.7.10
 
 packages:
@@ -10852,6 +10854,17 @@ packages:
       ajv-keywords: registry.npmmirror.com/ajv-keywords/3.5.2_ajv@6.12.6
     dev: true
 
+  registry.npmmirror.com/schema-utils/3.1.1:
+    resolution: {integrity: sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/schema-utils/-/schema-utils-3.1.1.tgz}
+    name: schema-utils
+    version: 3.1.1
+    engines: {node: '>= 10.13.0'}
+    dependencies:
+      '@types/json-schema': registry.npmmirror.com/@types/json-schema/7.0.11
+      ajv: registry.npmmirror.com/ajv/6.12.6
+      ajv-keywords: registry.npmmirror.com/ajv-keywords/3.5.2_ajv@6.12.6
+    dev: true
+
   registry.npmmirror.com/select-hose/2.0.0:
     resolution: {integrity: sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/select-hose/-/select-hose-2.0.0.tgz}
     name: select-hose
@@ -12250,6 +12263,23 @@ packages:
       webpack: registry.npmmirror.com/webpack/4.46.0
     dev: true
 
+  registry.npmmirror.com/url-loader/4.1.1:
+    resolution: {integrity: sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/url-loader/-/url-loader-4.1.1.tgz}
+    name: url-loader
+    version: 4.1.1
+    engines: {node: '>= 10.13.0'}
+    peerDependencies:
+      file-loader: '*'
+      webpack: ^4.0.0 || ^5.0.0
+    peerDependenciesMeta:
+      file-loader:
+        optional: true
+    dependencies:
+      loader-utils: registry.npmmirror.com/loader-utils/2.0.2
+      mime-types: registry.npmmirror.com/mime-types/2.1.35
+      schema-utils: registry.npmmirror.com/schema-utils/3.1.1
+    dev: true
+
   registry.npmmirror.com/url-parse/1.5.10:
     resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/url-parse/-/url-parse-1.5.10.tgz}
     name: url-parse

+ 0 - 71
src/components/base/CardRuleSelect.vue

@@ -1,71 +0,0 @@
-<template>
-  <el-select
-    v-model="selected"
-    class="card-rule-select"
-    :placeholder="placeholder"
-    filterable
-    :clearable="clearable"
-    :disabled="disabled"
-    @change="select"
-  >
-    <el-option
-      v-for="item in optionList"
-      :key="item.id"
-      :value="item.id"
-      :label="item.name"
-    >
-      <span>{{ item.name }}</span>
-    </el-option>
-  </el-select>
-</template>
-
-<script>
-import { cardRuleQuery } from "../../modules/base/api";
-import { COMMON_CARD_RULE_ID } from "@/constants/enumerate";
-
-export default {
-  name: "card-rule-select",
-  props: {
-    disabled: { type: Boolean, default: false },
-    placeholder: { type: String, default: "请选择" },
-    value: { type: [Number, String], default: "" },
-    clearable: { type: Boolean, default: true },
-    showCommonCard: { type: Boolean, default: true }
-  },
-  data() {
-    return {
-      optionList: [],
-      selected: ""
-    };
-  },
-  watch: {
-    value: {
-      immediate: true,
-      handler(val) {
-        this.selected = val;
-      }
-    }
-  },
-  async created() {
-    this.search();
-  },
-  methods: {
-    async search(query) {
-      const res = await cardRuleQuery(query);
-      this.optionList = res;
-      if (this.showCommonCard)
-        this.optionList.unshift({
-          id: COMMON_CARD_RULE_ID,
-          name: "全部通卡"
-        });
-    },
-    select() {
-      this.$emit("input", this.selected);
-      this.$emit(
-        "change",
-        this.optionList.find(item => item.id === this.selected)
-      );
-    }
-  }
-};
-</script>

+ 0 - 63
src/components/base/FacultySelect.vue

@@ -1,63 +0,0 @@
-<template>
-  <el-select
-    v-model="selected"
-    class="faculty-select"
-    :placeholder="placeholder"
-    filterable
-    :clearable="clearable"
-    :disabled="disabled"
-    @change="select"
-  >
-    <el-option
-      v-for="item in optionList"
-      :key="item.id"
-      :value="item.id"
-      :label="item.name"
-    >
-    </el-option>
-  </el-select>
-</template>
-
-<script>
-import { organizationFindByTypeList } from "../../modules/base/api";
-
-export default {
-  name: "faculty-select",
-  props: {
-    disabled: { type: Boolean, default: false },
-    placeholder: { type: String, default: "请选择" },
-    value: { type: [Number, String], default: "" },
-    clearable: { type: Boolean, default: true }
-  },
-  data() {
-    return {
-      optionList: [],
-      selected: ""
-    };
-  },
-  watch: {
-    value: {
-      immediate: true,
-      handler(val) {
-        this.selected = val;
-      }
-    }
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    async search() {
-      const res = await organizationFindByTypeList({ orgType: "FACULTY" });
-      this.optionList = res;
-    },
-    select() {
-      this.$emit("input", this.selected);
-      this.$emit(
-        "change",
-        this.optionList.find(item => item.id === this.selected)
-      );
-    }
-  }
-};
-</script>

+ 0 - 67
src/components/base/PaperNumberSelect.vue

@@ -1,67 +0,0 @@
-<template>
-  <el-select
-    v-model="selected"
-    class="paper-number-select"
-    :placeholder="placeholder"
-    filterable
-    :clearable="clearable"
-    :disabled="disabled"
-    @change="select"
-  >
-    <el-option v-for="(item, index) in optionList" :key="index" :value="item">
-      <span>{{ item }}</span>
-    </el-option>
-  </el-select>
-</template>
-
-<script>
-import { pageNumberQuery } from "../../modules/exam/api";
-
-export default {
-  name: "paper-number-select",
-  props: {
-    disabled: { type: Boolean, default: false },
-    placeholder: { type: String, default: "请选择" },
-    value: { type: [Number, String], default: "" },
-    clearable: { type: Boolean, default: true },
-    printPlanId: { type: [String, Array], default: "" }
-  },
-  data() {
-    return {
-      optionList: [],
-      selected: ""
-    };
-  },
-  watch: {
-    value: {
-      immediate: true,
-      handler(val) {
-        this.selected = val;
-      }
-    },
-    printPlanId(val, oldval) {
-      if (val !== oldval) {
-        this.search("");
-        this.$emit("input", "");
-        this.$emit("change", {});
-      }
-    }
-  },
-  async created() {
-    this.search();
-  },
-  methods: {
-    async search(query) {
-      const res = await pageNumberQuery({
-        param: query,
-        printPlanId: this.printPlanId
-      });
-      this.optionList = res;
-    },
-    select() {
-      this.$emit("input", this.selected);
-      this.$emit("change", this.selected);
-    }
-  }
-};
-</script>

+ 0 - 73
src/components/base/PrintPlanSelect.vue

@@ -1,73 +0,0 @@
-<template>
-  <el-select
-    v-model="selected"
-    class="print-plan-select"
-    :placeholder="placeholder"
-    filterable
-    :multiple="multiple"
-    :clearable="clearable"
-    :disabled="disabled"
-    @change="select"
-  >
-    <el-option
-      v-for="item in optionList"
-      :key="item.id"
-      :value="item.id"
-      :label="item.name"
-    >
-    </el-option>
-  </el-select>
-</template>
-
-<script>
-import { printPlanQuery } from "../../modules/print/api";
-
-export default {
-  name: "print-plan-select",
-  props: {
-    disabled: { type: Boolean, default: false },
-    placeholder: { type: String, default: "请选择" },
-    value: { type: [Number, String, Array], default: "" },
-    clearable: { type: Boolean, default: true },
-    multiple: { type: Boolean, default: false }
-  },
-  data() {
-    return {
-      optionList: [],
-      selected: ""
-    };
-  },
-  watch: {
-    value: {
-      immediate: true,
-      handler(val) {
-        this.selected = val;
-      }
-    }
-  },
-  async created() {
-    this.search();
-  },
-  methods: {
-    async search(query) {
-      const res = await printPlanQuery(query);
-      this.optionList = res;
-    },
-    select() {
-      this.$emit("input", this.selected);
-
-      if (this.multiple) {
-        this.$emit(
-          "change",
-          this.optionList.filter(item => this.selected.includes(item.id))
-        );
-      } else {
-        this.$emit(
-          "change",
-          this.optionList.find(item => item.id === this.selected)
-        );
-      }
-    }
-  }
-};
-</script>

+ 0 - 65
src/components/base/PrintRoomSelect.vue

@@ -1,65 +0,0 @@
-<template>
-  <el-select
-    v-model="selected"
-    class="print-room-select"
-    :placeholder="placeholder"
-    filterable
-    :clearable="clearable"
-    :disabled="disabled"
-    @change="select"
-  >
-    <el-option
-      v-for="item in optionList"
-      :key="item.id"
-      :value="item.id"
-      :label="item.name"
-    >
-    </el-option>
-  </el-select>
-</template>
-
-<script>
-import { organizationFindByTypeList } from "../../modules/base/api";
-
-export default {
-  name: "print-room-select",
-  props: {
-    disabled: { type: Boolean, default: false },
-    placeholder: { type: String, default: "请选择" },
-    value: { type: [Number, String], default: "" },
-    clearable: { type: Boolean, default: true }
-  },
-  data() {
-    return {
-      optionList: [],
-      selected: ""
-    };
-  },
-  watch: {
-    value: {
-      immediate: true,
-      handler(val) {
-        this.selected = val;
-      }
-    }
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    async search() {
-      const res = await organizationFindByTypeList({
-        orgType: "PRINTING_HOUSE"
-      });
-      this.optionList = res;
-    },
-    select() {
-      this.$emit("input", this.selected);
-      this.$emit(
-        "change",
-        this.optionList.find(item => item.id === this.selected)
-      );
-    }
-  }
-};
-</script>

+ 0 - 82
src/components/base/QuestionTeacherSelect.vue

@@ -1,82 +0,0 @@
-<template>
-  <el-select
-    v-model="selected"
-    class="question-teacher-select"
-    :placeholder="placeholder"
-    filterable
-    :clearable="clearable"
-    :disabled="disabled"
-    @change="select"
-  >
-    <el-option
-      v-for="item in optionList"
-      :key="item.id"
-      :value="item.id"
-      :label="item.name"
-    ></el-option>
-  </el-select>
-</template>
-
-<script>
-import { questionTeatherQuery } from "../../modules/exam/api";
-
-export default {
-  name: "question-teacher-select",
-  props: {
-    disabled: { type: Boolean, default: false },
-    placeholder: { type: String, default: "请选择" },
-    value: { type: [Number, String], default: "" },
-    clearable: { type: Boolean, default: true },
-    courseCode: { type: String, default: "" },
-    schoolId: { type: String, default: "" }
-  },
-  data() {
-    return {
-      optionList: [],
-      selected: ""
-    };
-  },
-  watch: {
-    value: {
-      immediate: true,
-      handler(val) {
-        this.selected = val;
-      }
-    },
-    courseCode(val, oldval) {
-      if (val !== oldval) {
-        this.search("");
-        this.$emit("input", "");
-        this.$emit("change", {});
-      }
-    },
-    schoolId(val, oldval) {
-      if (val !== oldval) {
-        this.search("");
-        this.$emit("input", "");
-        this.$emit("change", {});
-      }
-    }
-  },
-  async created() {
-    this.search();
-  },
-  methods: {
-    async search(query) {
-      const res = await questionTeatherQuery({
-        param: query,
-        courseCode: this.courseCode,
-        schoolId: this.schoolId
-      });
-      this.optionList = res;
-    },
-    select() {
-      this.$emit("input", this.selected);
-      this.$emit(
-        "change",
-        this.optionList.find(item => item.id === this.selected)
-      );
-    }
-  }
-};
-</script>

+ 0 - 74
src/components/base/QuestionTeacherUserSelect.vue

@@ -1,74 +0,0 @@
-<template>
-  <el-select
-    v-model="selected"
-    class="question-teacher-user-select"
-    :placeholder="placeholder"
-    filterable
-    :clearable="clearable"
-    :disabled="disabled"
-    @change="select"
-  >
-    <el-option
-      v-for="item in optionList"
-      :key="item.id"
-      :value="item.id"
-      :label="item.name"
-    ></el-option>
-  </el-select>
-</template>
-
-<script>
-import { questionTeatherUserQuery } from "../../modules/base/api";
-
-export default {
-  name: "question-teacher-user-select",
-  props: {
-    disabled: { type: Boolean, default: false },
-    placeholder: { type: String, default: "请选择" },
-    value: { type: [Number, String], default: "" },
-    clearable: { type: Boolean, default: true },
-    courseCode: { type: String, default: "" }
-  },
-  data() {
-    return {
-      optionList: [],
-      selected: ""
-    };
-  },
-  watch: {
-    value: {
-      immediate: true,
-      handler(val) {
-        this.selected = val;
-      }
-    },
-    courseCode(val, oldval) {
-      if (val !== oldval) {
-        this.search("");
-        this.$emit("input", "");
-        this.$emit("change", {});
-      }
-    }
-  },
-  async created() {
-    this.search();
-  },
-  methods: {
-    async search(query) {
-      if (!this.courseCode) return;
-      const res = await questionTeatherUserQuery({
-        param: query,
-        courseCode: this.courseCode
-      });
-      this.optionList = res;
-    },
-    select() {
-      this.$emit("input", this.selected);
-      this.$emit(
-        "change",
-        this.optionList.find(item => item.id === this.selected)
-      );
-    }
-  }
-};
-</script>

+ 0 - 71
src/components/base/RoomSelect.vue

@@ -1,71 +0,0 @@
-<template>
-  <el-select
-    v-model="selected"
-    class="room-select"
-    :placeholder="placeholder"
-    filterable
-    :clearable="clearable"
-    :disabled="disabled"
-    @change="select"
-  >
-    <el-option
-      v-for="(item, index) in optionList"
-      :key="index"
-      :value="item"
-      :label="item"
-    >
-    </el-option>
-  </el-select>
-</template>
-
-<script>
-import { roomQuery } from "../../modules/print/api";
-
-export default {
-  name: "room-select",
-  props: {
-    disabled: { type: Boolean, default: false },
-    placeholder: { type: String, default: "请选择" },
-    value: { type: [Number, String], default: "" },
-    clearable: { type: Boolean, default: true },
-    printPlanId: { type: [String, Array], default: "" }
-  },
-  data() {
-    return {
-      optionList: [],
-      selected: ""
-    };
-  },
-  watch: {
-    value: {
-      immediate: true,
-      handler(val) {
-        this.selected = val;
-      }
-    },
-    printPlanId(val, oldval) {
-      if (val !== oldval) {
-        this.search("");
-        this.$emit("input", "");
-        this.$emit("change", {});
-      }
-    }
-  },
-  async created() {
-    this.search();
-  },
-  methods: {
-    async search(query) {
-      const res = await roomQuery({
-        param: query,
-        printPlanId: this.printPlanId
-      });
-      this.optionList = res;
-    },
-    select() {
-      this.$emit("input", this.selected);
-      this.$emit("change", this.selected);
-    }
-  }
-};
-</script>

+ 0 - 47
src/components/common/CascaderSplit/CascaderSplit.vue

@@ -1,47 +0,0 @@
-<template>
-  <div class="cascader-split">
-    <el-form ref="FilterForm" label-position="left" label-width="80px" inline>
-      <el-form-item label="levelOne">
-        <level-one
-          v-model="modalForm.levelOne"
-          set-default
-          @on-change="selectChange"
-        ></level-one>
-      </el-form-item>
-      <el-form-item label="levelTwo">
-        <level-two
-          v-model="modalForm.levelTwo"
-          :level-one-model="modalForm.levelOne"
-          @on-change="selectChange"
-          set-default
-        ></level-two>
-      </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-import LevelOne from "./LevelOne";
-import LevelTwo from "./LevelTwo";
-
-export default {
-  name: "cascader-split",
-  components: {
-    LevelOne,
-    LevelTwo
-  },
-  data() {
-    return {
-      modalForm: {
-        levelOne: "",
-        levelTwo: ""
-      }
-    };
-  },
-  methods: {
-    selectChange() {
-      console.log(this.modalForm);
-    }
-  }
-};
-</script>

+ 0 - 90
src/components/common/CascaderSplit/LevelOne.vue

@@ -1,90 +0,0 @@
-<template>
-  <el-select
-    class="level-one"
-    v-model="levelModel"
-    style="width: 200px;"
-    @change="selected"
-    :placeholder="placeholder"
-    :clearable="clearable"
-    :disabled="disabled"
-  >
-    <el-option
-      v-for="item in dataList"
-      :key="item.id"
-      :value="item.id"
-      :label="item.name"
-    >
-    </el-option>
-  </el-select>
-</template>
-
-<script>
-import { getData } from "./com-func";
-
-export default {
-  name: "level-one",
-  props: {
-    value: {
-      type: [String, Number]
-    },
-    setDefault: {
-      type: Boolean,
-      default: false
-    },
-    placeholder: {
-      type: String,
-      default: "请选择选项"
-    },
-    clearable: {
-      type: Boolean,
-      default: false
-    },
-    disabled: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {
-      dataList: []
-    };
-  },
-  computed: {
-    levelModel: {
-      get() {
-        return this.value;
-      },
-      set(selectId) {
-        this.$emit("input", selectId);
-      }
-    }
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    async search() {
-      const data = await getData("level-one");
-      this.dataList = data.map(item => {
-        return {
-          id: item.id,
-          name: item.name
-        };
-      });
-
-      if (this.setDefault) {
-        this.levelModel = this.dataList[0] && this.dataList[0].id;
-        const val = {
-          value: this.dataList[0].id || "",
-          label: this.dataList[0].name || ""
-        };
-        this.$emit("on-change", val);
-        this.$emit("on-set");
-      }
-    },
-    selected(val) {
-      this.$emit("on-change", val);
-    }
-  }
-};
-</script>

+ 0 - 102
src/components/common/CascaderSplit/LevelTwo.vue

@@ -1,102 +0,0 @@
-<template>
-  <el-select
-    class="level-two"
-    v-model="levelModel"
-    style="width: 200px;"
-    @change="selected"
-    :placeholder="placeholder"
-    :clearable="clearable"
-    :disabled="disabled"
-  >
-    <el-option
-      v-for="item in dataList"
-      :key="item.id"
-      :value="item.id"
-      :label="item.name"
-    >
-    </el-option>
-  </el-select>
-</template>
-
-<script>
-import { getData } from "./com-func";
-
-export default {
-  name: "level-two",
-  props: {
-    value: {
-      type: [String, Number]
-    },
-    setDefault: {
-      type: Boolean,
-      default: false
-    },
-    levelOneModel: {
-      type: [String, Number],
-      required: true
-    },
-    placeholder: {
-      type: String,
-      default: "请选择考试"
-    },
-    clearable: {
-      type: Boolean,
-      default: false
-    },
-    disabled: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {
-      dataList: []
-    };
-  },
-  computed: {
-    levelModel: {
-      get() {
-        return this.value;
-      },
-      set(selectId) {
-        this.$emit("input", selectId);
-      }
-    }
-  },
-  watch: {
-    levelOneModel() {
-      this.search();
-    }
-  },
-  methods: {
-    async search() {
-      if (!this.levelOneModel) {
-        this.dataList = [];
-        this.levelModel = "";
-        return;
-      }
-
-      const data = await getData("level-two");
-      this.dataList = data.map(item => {
-        return {
-          id: item.id,
-          name: item.name
-        };
-      });
-
-      if (this.setDefault) {
-        this.levelModel = this.dataList[0] && this.dataList[0].id;
-        const val = {
-          value: this.dataList[0].id || "",
-          label: this.dataList[0].name || ""
-        };
-        this.$emit("on-change", val);
-        this.$emit("on-set");
-      }
-    },
-    selected(val) {
-      this.$emit("on-change", val);
-    }
-  }
-};
-</script>

+ 0 - 18
src/components/common/CascaderSplit/com-func.js

@@ -1,18 +0,0 @@
-export const getData = (nameKey = "name") => {
-  return new Promise((resolve, reject) => {
-    setTimeout(() => {
-      const dataList = "#"
-        .repeat(8)
-        .split("")
-        .map((item, index) => {
-          return {
-            id: index + 1,
-            name: `${nameKey}-${Math.random()
-              .toString(32)
-              .slice(-5)}-${index + 1}`
-          };
-        });
-      resolve(dataList);
-    }, 300);
-  });
-};

+ 0 - 101
src/components/common/DimensionTreeTable/DimensionTreeTable.vue

@@ -1,101 +0,0 @@
-<template>
-  <div class="dimension-tree-table">
-    <table class="table">
-      <tr
-        v-for="(tr, trind) in tableTreeList"
-        :key="trind"
-        :data-names="tr.names"
-        :data-ids="tr.ids"
-      >
-        <td v-for="(td, tdind) in tr.tdList" :key="tdind" :rowspan="td.rowspan">
-          <span>{{ td.name }}</span>
-        </td>
-        <td>
-          <slot :trItem="tr">
-            default slot name
-          </slot>
-        </td>
-      </tr>
-    </table>
-  </div>
-</template>
-
-<script>
-import { deepCopy } from "@/plugins/utils";
-
-export default {
-  name: "dimension-tree-table",
-  props: {
-    data: {
-      type: Array,
-      default() {
-        return [];
-      }
-    }
-  },
-  data() {
-    return {
-      dataList: [],
-      dataListNums: [],
-      tableTreeList: []
-    };
-  },
-  watch: {
-    data: {
-      immediate: true,
-      handler(val) {
-        this.dataList = deepCopy(val);
-        this.getDataListNums();
-        this.serilizeTableList();
-      }
-    }
-  },
-  methods: {
-    getDataListNums() {
-      this.dataListNums = this.dataList.map(item => item.length);
-    },
-    getRowSpan(curIndex) {
-      const listNums = this.dataListNums.slice(curIndex + 1);
-      return listNums.reduce((sum, item) => sum * item, 1);
-    },
-    getNextList(curIndex) {
-      if (curIndex + 1 >= this.dataList.length) return;
-      return this.dataList[curIndex + 1];
-    },
-    serilizeTableList() {
-      if (!this.dataList.length) {
-        this.tableTreeList = [];
-        this.dataListNums = [];
-        return;
-      }
-
-      let tableList = [];
-      const serilize = (parentList, allParentList, curList, curIndex) => {
-        const rowspan = this.getRowSpan(curIndex);
-        const nextList = this.getNextList(curIndex);
-        curList.map((item, index) => {
-          const newParentList = index ? [] : deepCopy(parentList);
-          const curItem = { ...item, rowspan };
-          const newAllParentList = [...deepCopy(allParentList), curItem];
-          const curRow = [...newParentList, curItem];
-          if (nextList) {
-            serilize(curRow, newAllParentList, nextList, curIndex + 1);
-          } else {
-            tableList.push({ tdList: curRow, allList: newAllParentList });
-          }
-        });
-      };
-      serilize([], [], this.getNextList(-1), 0);
-
-      this.tableTreeList = tableList.map(item => {
-        return {
-          ...item,
-          ids: item.allList.map(elem => elem.id).join("_"),
-          names: item.allList.map(elem => elem.name).join("_")
-        };
-      });
-      console.log(this.tableTreeList);
-    }
-  }
-};
-</script>

+ 0 - 2
src/components/common/DimensionTreeTable/index.js

@@ -1,2 +0,0 @@
-import DimensionTreeTable from "./DimensionTreeTable.vue";
-export default DimensionTreeTable;

+ 0 - 92
src/components/common/DimensionTreeTable/intro.md

@@ -1,92 +0,0 @@
-# DimensionTreeTable api
-
-## 实例
-
-```html
-<template>
-  <div class="demo">
-    <dimension-tree-table :data="selectedData" #default="{trItem}">
-      <span>{{ trItem.names }}</span>
-    </dimension-tree-table>
-  </div>
-</template>
-
-<script>
-  import DimensionTreeTable from "@/components/common/DimensionTreeTable";
-
-  export default {
-    name: "demo",
-    components: {
-      DimensionTreeTable
-    },
-    data() {
-      return {
-        selectedData: [[{"id":1,"name":"颜色1"}],[{"id":11,"name":"尺码1"},{"id":12,"name":"尺码2"}]],
-      };
-    },
-    methods: {
-    }
-  };
-</script>
-```
-
-## props
-
-| 属性 | 说明               | 类型  | 默认值 |
-| ---- | ------------------ | ----- | ------ |
-| data | 生成表格的二维数组 | Aarry | []     |
-
-
-## Scoped Slot
-
-| name | 说明                                  |
-| ---- | ------------------------------------- |
-| -    | 自定义表格行的内容,参数为 { trItem } |
-
-**说明:** 实例中采用vue2.6以上slot新语法编写,查看[具体文档](https://cn.vuejs.org/v2/guide/components-slots.html)
-
-
-## trItem说明
-
-| 字段    | 说明               |
-| ------- | ------------------ |
-| tdList  | 表格单行渲染的数组 |
-| allList | 表格单行完整数组   |
-| ids     | 单行条目的id       |
-| names   | 单行条目的名称     |
-
-### example
-```json
-{
-    "tdList": [
-        {
-            "id": 1112,
-            "name": "来源2",
-            "selected": true,
-            "rowspan": 1
-        }
-    ],
-    "allList": [
-        {
-            "id": 11,
-            "name": "尺码1",
-            "selected": true,
-            "rowspan": 4
-        },
-        {
-            "id": 111,
-            "name": "材质1",
-            "selected": true,
-            "rowspan": 2
-        },
-        {
-            "id": 1112,
-            "name": "来源2",
-            "selected": true,
-            "rowspan": 1
-        }
-    ],
-    "ids": "11_111_1112",
-    "names": "尺码1_材质1_来源2"
-}
-```

+ 0 - 418
src/components/common/ImageEditUpload/ImageEditUpload.vue

@@ -1,418 +0,0 @@
-<template>
-  <div class="image-edit-upload">
-    <div :class="[`${prefixCls}-main`]" v-show="!edit">
-      <div :class="elPrefixCls">
-        <div
-          :class="classes"
-          @click="handleClick"
-          @drop.prevent="onDrop"
-          @dragover.prevent="dragOver = true"
-          @dragleave.prevent="dragOver = false"
-        >
-          <input
-            ref="input"
-            type="file"
-            :class="[`${elPrefixCls}-input`]"
-            @change="handleChange"
-            :accept="accept"
-          />
-          <div :class="[`${prefixCls}-cover`]" v-if="imgUrl">
-            <img :src="imgUrl" alt="default" />
-          </div>
-          <div :class="[`${prefixCls}-dcover`]" v-else>
-            <i class="el-icon-user-solid"></i><br />
-            <p>点击或拖拽图片到此处</p>
-          </div>
-        </div>
-      </div>
-    </div>
-    <div :class="[`${prefixCls}-edit`]" v-show="file.url && edit">
-      <div :class="[`${prefixCls}-edit-box`]">
-        <img ref="editImage" :src="file.url" />
-        <transition name="fade" v-if="file && file.showProgress">
-          <div class="img-progress">
-            <el-progress
-              :show-text="false"
-              :stroke-width="4"
-              :percentage="file.percentage"
-              :status="
-                file.status === 'finished' && file.showProgress
-                  ? 'success'
-                  : null
-              "
-            ></el-progress>
-          </div>
-        </transition>
-      </div>
-      <div :class="[`${prefixCls}-edit-btns`]">
-        <el-button type="error" @click="clearEdit">取消</el-button>
-        <el-button type="primary" @click="editSave">确认</el-button>
-      </div>
-    </div>
-    <p
-      :class="[
-        `${prefixCls}-tips`,
-        { 'cc-tips-success': res.success, 'cc-tips-error': !res.success }
-      ]"
-      v-if="res.msg"
-    >
-      {{ res.msg }}
-    </p>
-  </div>
-</template>
-
-<script>
-import ajax from "../utils/ajax";
-import Cropper from "cropperjs";
-import "cropperjs/dist/cropper.min.css";
-
-const elPrefixCls = "el-upload";
-const prefixCls = "cc-edit-upload";
-
-const ratios = {
-  double: 1 / 2,
-  square: 1,
-  rectangle: 3 / 4
-};
-
-export default {
-  name: "image-edit-upload",
-  props: {
-    action: {
-      type: String,
-      required: true
-    },
-    headers: {
-      type: Object,
-      default() {
-        return {};
-      }
-    },
-    defImage: {
-      type: String
-    },
-    data: {
-      type: Object
-    },
-    name: {
-      type: String,
-      default: "file"
-    },
-    withCredentials: {
-      type: Boolean,
-      default: false
-    },
-    format: {
-      type: Array,
-      default() {
-        return ["jpg", "png"];
-      }
-    },
-    accept: {
-      type: String
-    },
-    maxSize: {
-      type: Number,
-      default() {
-        return 2 * 1024;
-      }
-    },
-    ratioType: {
-      type: String,
-      default: "rectangle",
-      validator(val) {
-        return ["square", "rectangle", "double"].indexOf(val) > -1;
-      }
-    },
-    onProgress: {
-      type: Function,
-      default() {
-        return {};
-      }
-    },
-    onSuccess: {
-      type: Function,
-      default() {
-        return {};
-      }
-    },
-    onError: {
-      type: Function,
-      default() {
-        return {};
-      }
-    },
-    onRemove: {
-      type: Function,
-      default() {
-        return {};
-      }
-    },
-    onPreview: {
-      type: Function,
-      default() {
-        return {};
-      }
-    },
-    onExceededSize: {
-      type: Function,
-      default() {
-        return {};
-      }
-    },
-    onFormatError: {
-      type: Function,
-      default() {
-        return {};
-      }
-    }
-  },
-  data() {
-    return {
-      file: {},
-      type: "drag",
-      edit: false,
-      cropper: false,
-      imgUrl: this.defImage,
-      prefixCls,
-      elPrefixCls,
-      dragOver: false,
-      tempIndex: 1,
-      res: {
-        success: true,
-        msg: ""
-      }
-    };
-  },
-  computed: {
-    classes() {
-      return [
-        `${elPrefixCls}`,
-        {
-          [`${elPrefixCls}-dragger`]: this.type === "drag",
-          [`${elPrefixCls}-dragOver`]: this.type === "drag" && this.dragOver
-        }
-      ];
-    },
-    aspectRatio() {
-      return ratios[this.ratioType];
-    },
-    limitSize() {
-      const mn = this.maxSize / 1024;
-      return mn >= 1 ? mn + "M" : this.maxSize + "Kb";
-    }
-    // accept() {
-    //   let formats = this.format.map(item => {
-    //     return "image/" + item;
-    //   });
-    //   return formats.join();
-    // }
-  },
-  watch: {
-    edit(value) {
-      if (value) {
-        this.$nextTick(function() {
-          if (!this.$refs.editImage) {
-            return;
-          }
-          this.cropper = new Cropper(this.$refs.editImage, {
-            aspectRatio: this.aspectRatio,
-            minCropBoxWidth: 120,
-            minCropBoxHeight: 120 / this.aspectRatio,
-            viewMode: 1
-          });
-        });
-      } else {
-        if (this.cropper) {
-          this.cropper.destroy();
-          this.cropper = false;
-        }
-      }
-    },
-    defImage(val) {
-      this.imgUrl = val;
-    }
-  },
-  methods: {
-    isIe() {
-      let userAgent = navigator.userAgent;
-      let isIE =
-        userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1;
-      let isEdge = userAgent.indexOf("Edge") > -1 && !isIE;
-      let isIE11 =
-        userAgent.indexOf("Trident") > -1 && userAgent.indexOf("rv:11.0") > -1;
-
-      return isEdge || isIE11 || isIE;
-    },
-    handleClick() {
-      this.res = { success: true, msg: "" };
-      this.$refs.input.click();
-    },
-    handleChange(e) {
-      const files = e.target.files;
-
-      if (!files) return;
-
-      this.uploadFiles(files);
-      this.$refs.input.value = null;
-    },
-    onDrop(e) {
-      this.res = { success: true, msg: "" };
-      this.dragOver = false;
-      this.uploadFiles(e.dataTransfer.files);
-    },
-    uploadFiles(files) {
-      let postFiles = Array.prototype.slice.call(files);
-
-      if (postFiles.length === 0) return;
-
-      if (this.checkValid(postFiles[0])) {
-        this.openEdit(postFiles[0]);
-      }
-    },
-    checkValid(file) {
-      // check format
-      if (this.format.length) {
-        const _file_format = file.name
-          .split(".")
-          .pop()
-          .toLocaleLowerCase();
-        const checked = this.format.some(
-          item => item.toLocaleLowerCase() === _file_format
-        );
-        if (!checked) {
-          this.res = {
-            success: false,
-            msg: "只支持文件格式为" + this.format.join("/")
-          };
-          this.onFormatError(file);
-          return false;
-        }
-      }
-
-      // check maxSize
-      if (this.maxSize) {
-        if (file.size > this.maxSize * 1024) {
-          this.res = {
-            success: false,
-            msg: "文件大小不能超过" + this.limitSize
-          };
-          this.onExceededSize(file);
-          return false;
-        }
-      }
-
-      this.res = {
-        success: true,
-        msg: ""
-      };
-      return true;
-    },
-    openEdit(file) {
-      this.initFile(file);
-      this.$nextTick(function() {
-        this.edit = true;
-      });
-    },
-    initFile(file) {
-      this.file = {
-        status: "uploading",
-        name: file.name,
-        size: file.size,
-        type: file.type,
-        url: this.createUrl(file),
-        response: {},
-        percentage: 0,
-        showProgress: true
-      };
-    },
-    createUrl(file) {
-      let url = "";
-      let URL = window.URL || window.webkitURL;
-      if (URL && URL.createObjectURL) {
-        url = URL.createObjectURL(file);
-      }
-      return url;
-    },
-    clearEdit() {
-      this.edit = false;
-    },
-    editSave() {
-      const { name, type } = this.file;
-      const cropBoxSize = this.cropper.getCropBoxData();
-      // 配置width,height之后会压缩原始图片
-      const binStr = atob(
-        this.cropper
-          .getCroppedCanvas({
-            width: cropBoxSize.width,
-            height: cropBoxSize.height
-          })
-          .toDataURL(type)
-          .split(",")[1]
-      );
-
-      let arr = new Uint8Array(binStr.length);
-      for (let i = 0; i < binStr.length; i++) {
-        arr[i] = binStr.charCodeAt(i);
-      }
-
-      let file;
-      if (this.isIe()) {
-        file = new Blob([arr], { type });
-      } else {
-        file = new File([arr], name, { type });
-      }
-
-      this.post(file);
-    },
-    post(file) {
-      ajax({
-        headers: this.headers,
-        withCredentials: this.withCredentials,
-        file: file,
-        data: this.data,
-        filename: this.name,
-        action: this.action,
-        onProgress: e => {
-          this.handleProgress(e);
-        },
-        onSuccess: res => {
-          this.edit = false;
-          this.handleSuccess(res, file);
-        },
-        onError: (err, response) => {
-          this.edit = false;
-          this.handleError(err, response);
-        }
-      });
-    },
-    handleProgress(e) {
-      this.onProgress(e, this.file);
-      this.file.percentage = parseFloat(e.percent) || 0;
-    },
-    handleSuccess(res, file) {
-      this.file.status = "finished";
-      this.file.response = res;
-      this.res = {
-        success: true,
-        msg: "图片上传成功!"
-      };
-      this.file.url = this.createUrl(file);
-      this.imgUrl = this.file.url;
-      this.onSuccess(res, this.file);
-
-      setTimeout(() => {
-        this.file.showProgress = false;
-      }, 300);
-    },
-    handleError(err, response) {
-      this.file.status = "fail";
-      this.res = {
-        success: false,
-        msg: `图片上传失败:${response.msg || "请求错误"}`
-      };
-      this.onError(err, response, this.file);
-    }
-  }
-};
-</script>

+ 0 - 2
src/components/common/ImageEditUpload/index.js

@@ -1,2 +0,0 @@
-import ImageEditUpload from "./ImageEditUpload.vue";
-export default ImageEditUpload;

+ 0 - 55
src/components/common/ImageEditUpload/intro.md

@@ -1,55 +0,0 @@
-# ImageEditUpload api
-
-## 实例
-
-```html
-<template>
-  <div class="demo">
-    <image-edit-upload
-      :action="action"
-      :headers="headers"
-      ></image-edit-upload>
-  </div>
-</template>
-
-<script>
-import ImageEditUpload from "@/components/common/ImageEditUpload";
-
-export default {
-  name: "demo",
-  components: {
-    ImageEditUpload
-  },
-  data() {
-    return {
-      action: "/enrolling/enrolling/common/upload/planId/schoolId",
-      headers: {
-        Authorization: '123'
-      }
-    };
-  }
-};
-</script>
-```
-
-## ImageEditUpload props
-
-| 属性             | 说明                                                                                                                                        | 类型     | 默认值         |
-| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------- |
-| def-image        | 默认的显示的图片地址                                                                                                                        | String   | -              |
-| action           | 上传的地址,必填                                                                                                                            | String   | -              |
-| headers          | 设置上传的请求头部                                                                                                                          | Object   | {}             |
-| data             | 上传时附带的额外参数                                                                                                                        | Object   | -              |
-| name             | 上传的文件字段名                                                                                                                            | String   | file           |
-| with-credentials | 支持发送 cookie 凭证信息                                                                                                                    | Boolean  | false          |
-| show-upload-list | 是否显示已上传文件列表                                                                                                                      | Boolean  | true           |
-| accept           | 接受上传的[文件类型](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept)                                           | String   | -              |
-| format           | 支持的文件类型,与 accept 不同的是,format 是识别文件的后缀名,accept 为 input 标签原生的 accept 属性,会在选择文件时过滤,可以两者结合使用 | Array    | ["jpg", "png"] |
-| max-size         | 文件大小限制,单位 kb                                                                                                                       | Number   | 2 * 1024       |
-| ratio-type       | 图片裁剪的宽高比例,rectangle:3/4,square:1/1,double:1/2                                                                                    | String   | rectangle      |
-| on-progress      | 文件上传时的钩子,返回字段为 event, file                                                                                                    | Function | -              |
-| on-success       | 文件上传成功时的钩子,返回字段为 response, file                                                                                             | Function | -              |
-| on-error         | 文件上传失败时的钩子,返回字段为 error, file                                                                                                | Function | -              |
-| on-format-error  | 文件格式验证失败时的钩子,返回字段为 file                                                                                                   | Function | -              |
-| on-exceeded-size | 文件超出指定大小限制时的钩子,返回字段为 file                                                                                               | Function | -              |
-

BIN
src/components/common/ImageEditUpload/temp-img.png


+ 0 - 322
src/components/common/ImageListUpload/ImageListUpload.vue

@@ -1,322 +0,0 @@
-<template>
-  <div :class="['image-list-upload', prefixCls]">
-    <!-- message alert -->
-    <el-alert
-      :title="res.msg"
-      :type="res.success ? 'success' : 'error'"
-      v-if="res.msg"
-    >
-    </el-alert>
-    <!-- image-list -->
-    <div :class="[`${prefixCls}-list`]">
-      <div
-        v-for="(item, index) in fileList"
-        :class="[
-          `${prefixCls}-item`,
-          `${prefixCls}-item-${item.status}`,
-          { [`${prefixCls}-item-unvalid`]: !item.valid }
-        ]"
-        :key="index"
-      >
-        <div :class="[`${prefixCls}-box`, `${prefixCls}-info`]">
-          <img :src="item.url" :alt="item.name" />
-        </div>
-        <div :class="[`${prefixCls}-box`, `${prefixCls}-progress`]">
-          <el-progress
-            :percentage="item.percentage"
-            :stroke-width="8"
-            :show-text="false"
-          ></el-progress>
-        </div>
-        <div :class="[`${prefixCls}-box `, `${prefixCls}-action`]">
-          <i
-            :class="['el-icon-delete-solid', `${prefixCls}-del`]"
-            title="删除"
-            @click="handleRemove(index)"
-          ></i>
-        </div>
-        <div
-          :class="[
-            `${prefixCls}-tips`,
-            {
-              [`${prefixCls}-tips-success`]:
-                item.valid && item.status === 'success',
-              [`${prefixCls}-tips-error`]:
-                !item.valid || item.status === 'error'
-            }
-          ]"
-        >
-          <span>{{ item.statusTips }}</span>
-        </div>
-      </div>
-
-      <!-- upload add btn -->
-      <div
-        :class="[`${prefixCls}-item`]"
-        @click="handleClick"
-        title="点击添加图片"
-      >
-        <div :class="[`${prefixCls}-box`, `${prefixCls}-add`]">
-          <i class="el-icon-upload"></i>
-        </div>
-        <input
-          ref="fileInput"
-          type="file"
-          :class="[`${prefixCls}-input`]"
-          @change="handleChange"
-          :multiple="multiple"
-        />
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import ajax from "../utils/ajax";
-
-/**
- * 图片上传状态:
- * init 初始状态
- * ready 准备上传
- * uploading 正在上传
- * sucess 上传成功
- * error 上传失败
- *
- * 图片上传流程:
- * 1 选中图片
- * 2 校验合法性:大小,类型
- * 3 自动上传合法图片
- *
- * 说明:
- * 1 继发上传
- * 2 上传中不可删除图片,上传结束之后可以删除图片
- * 3 每一个图片上传都会触发开始上传、上传成功以及上传失败事件
- * 4 所有合法图片上传完成之后,以及删除图片时,都会触发完成事件。
- */
-
-const prefixCls = "cc-list-upload";
-
-export default {
-  name: "image-list-upload",
-  props: {
-    action: {
-      type: String,
-      default: "/backend/uploadImage"
-    },
-    multiple: {
-      type: Boolean,
-      default: true
-    },
-    headers: {
-      type: Object,
-      default() {
-        return {};
-      }
-    },
-    withCredentials: {
-      type: Boolean,
-      default: false
-    },
-    data: {
-      type: Object
-    },
-    name: {
-      type: String,
-      default: "file"
-    },
-    maxSize: {
-      type: Number,
-      default: 10 * 1024
-    },
-    rendFileUrl: {
-      type: Function,
-      default(fileInfo) {
-        return fileInfo.url;
-      }
-    }
-  },
-  data() {
-    return {
-      prefixCls,
-      fileList: [],
-      format: ["jpg", "jpeg", "png"],
-      limitNum: 10,
-      res: {
-        success: true,
-        msg: ""
-      },
-      isUploading: false
-    };
-  },
-  computed: {
-    limitSize() {
-      let mn = this.maxSize / 1024;
-      return mn >= 1 ? mn + "M" : this.maxSize + "Kb";
-    }
-  },
-  methods: {
-    initData() {
-      this.fileList = [];
-      this.uploadErrorFiles = [];
-      this.res = { success: true, msg: "" };
-      this.isUploading = false;
-    },
-    handleClick() {
-      if (this.isUploading) return;
-      this.$refs.fileInput.click();
-    },
-    handleChange(e) {
-      this.initFileList(e.target.files);
-    },
-    initFileList(files) {
-      if (!files) return;
-      if (files.length + this.fileList.length > this.limitNum) {
-        this.res = {
-          success: false,
-          msg: "文件数量不能超过" + this.limitNum
-        };
-        return;
-      }
-
-      const postFiles = Array.prototype.slice.call(files);
-
-      let fileList = [];
-      postFiles.forEach((el, i) => {
-        el.uid = Date.now() + i;
-        let { statusTips, valid } = this.checkFileValid(el);
-        fileList[i] = {
-          size: el.size,
-          name: el.name,
-          type: el.type,
-          percentage: 0,
-          uid: el.uid,
-          url: this.getFileUrl(el),
-          fileData: {},
-          files: el,
-          status: "init",
-          statusTips,
-          valid
-        };
-      });
-      this.fileList = [...this.fileList, ...fileList];
-      this.toUpload();
-    },
-    getFileUrl(file) {
-      const URL = window.URL || window.webkitURL;
-      if (URL && URL.createObjectURL) return URL.createObjectURL(file);
-      return "";
-    },
-    getFileItem(uid) {
-      return this.fileList.find(el => el.uid === uid);
-    },
-    clearData() {
-      this.$refs.fileInput.value = null;
-      this.fileList = [];
-    },
-    checkFileValid(fileItem) {
-      let result = {};
-      result = this.checkFileSize(fileItem);
-      if (!result.valid) return result;
-
-      result = this.checkFileFormat(fileItem);
-      if (!result.valid) return result;
-
-      return { valid: true, statusTips: "" };
-    },
-    checkFileSize(fileItem) {
-      const valid = fileItem.size / 1024 <= this.maxSize;
-      return {
-        statusTips: valid ? "" : "文件过大",
-        valid
-      };
-    },
-    checkFileFormat(fileItem) {
-      const formats = this.format.join("|");
-      const reg = `\\.(${formats})$`;
-      const pattern = new RegExp(reg, "i");
-
-      const valid = pattern.test(fileItem.name);
-      return {
-        statusTips: valid ? "" : "格式不对",
-        valid
-      };
-    },
-    handleRemove(index) {
-      this.fileList.splice(index, 1);
-      this.emitUploaded();
-      if (!this.fileList.length) this.clearData();
-    },
-    // action
-    async toUpload() {
-      if (this.isUploading) return;
-      this.isUploading = true;
-
-      this.fileList.map(item => {
-        if (item.status === "init" && item.valid) item.status = "ready";
-      });
-      // 上传队列,继发上传,返回失败文件
-      const queenFunc = async () => {
-        for (let fileItem of this.fileList) {
-          await this.upload(fileItem).catch(() => {});
-        }
-      };
-      // 开启上传
-      await queenFunc().catch(() => {});
-
-      this.isUploading = false;
-      this.emitUploaded();
-    },
-    async upload(fileItem) {
-      if (fileItem.status !== "ready") return;
-      this.$emit("upload-start", fileItem);
-
-      fileItem.status = "uploading";
-      let errorData = "";
-      const resData = await this.post(fileItem).catch(error => {
-        errorData = error;
-      });
-
-      if (resData) {
-        fileItem.status = "success";
-        fileItem.statusTips = "上传成功";
-        this.$emit("upload-success", resData, fileItem);
-      } else {
-        fileItem.status = "error";
-        fileItem.statusTips = "上传失败";
-        this.$emit("upload-error", errorData, fileItem);
-      }
-    },
-    post(fileItem) {
-      return new Promise((resolve, reject) => {
-        ajax({
-          headers: this.headers,
-          withCredentials: this.withCredentials,
-          file: fileItem.files,
-          data: this.data,
-          filename: this.name,
-          action: this.GLOBAL.domain + this.action,
-          onProgress: e => {
-            fileItem.percentage = e.percent || 0;
-          },
-          onSuccess: res => {
-            if (res.code === 0) {
-              resolve(res.data);
-            } else {
-              reject({ res, msg: res.message || "上传失败" });
-            }
-          },
-          onError: (err, res) => {
-            reject({ res, msg: "网络错误" });
-          }
-        });
-      });
-    },
-    emitUploaded() {
-      this.$emit(
-        "uploaded",
-        this.fileList.filter(el => el.status === "success" && el.valid)
-      );
-    }
-  }
-};
-</script>

+ 0 - 2
src/components/common/ImageListUpload/index.js

@@ -1,2 +0,0 @@
-import ImageListUpload from "./ImageListUpload.vue";
-export default ImageListUpload;

+ 0 - 47
src/components/common/ImageListUpload/intro.md

@@ -1,47 +0,0 @@
-# ImageListUpload api
-
-## 实例
-
-```html
-<template>
-  <div class="image-list-upload-instance part-box">
-    <image-list-upload></image-list-upload>
-  </div>
-</template>
-
-<script>
-import ImageListUpload from "@/components/common/ImageListUpload";
-
-export default {
-  name: "image-list-upload-instance",
-  components: { ImageListUpload },
-  data() {
-    return {};
-  },
-  methods: {}
-};
-</script>
-```
-
-## props
-
-| 属性             | 说明                     | 类型     | 默认值              |
-| ---------------- | ------------------------ | -------- | ------------------- |
-| action           | 上传的地址,必填         | String   | -                   |
-| multiple         | 支持多文件上传           | Boolean  | true                |
-| headers          | 设置上传的请求头部       | Object   | {}                  |
-| with-credentials | 支持发送 cookie 凭证信息 | Boolean  | false               |
-| data             | 上传时附带的额外参数     | Object   | -                   |
-| name             | 上传的文件字段名         | String   | file                |
-| max-size         | 文件大小限制,单位 kb    | Number   | 10 * 1024           |
-| rendFileUrl      | 上传完后图片解析路径     | Function | return fileInfo.url |
-
-
-## events
-
-| 事件名         | 说明                           | 返回值                       |
-| -------------- | ------------------------------ | ---------------------------- |
-| upload-start   | 文件开始开始上传时的回调       | fileItem:当前上传文件的对象 |
-| upload-success | 文件开始上传成功时的回调       | res, fileItem                |
-| upload-error   | 文件开始上传失败时的回调       | error, fileItem              |
-| uploaded       | 所有合法文件上传成功之后的回调 | fileList                     |

+ 0 - 312
src/components/common/ImagePreview/ImagePreview.vue

@@ -1,312 +0,0 @@
-<template>
-  <el-dialog
-    :class="prefixCls"
-    :visible.sync="modalIsShow"
-    title="图片预览"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    :show-close="false"
-    fullscreen
-    append-to-body
-    @open="visibleChange"
-  >
-    <div slot="footer"></div>
-    <div slot="title"></div>
-
-    <div :class="[`${prefixCls}-close`]" @click="modalIsShow = false">
-      <i class="el-icon-circle-close"></i>
-    </div>
-    <div :class="[`${prefixCls}-header`]" v-if="!headerHide">
-      <h3>{{ curFile.name }}</h3>
-      <div :class="[`${prefixCls}-index`]">
-        {{ this.curIndex }} / {{ this.lastIndex }}
-      </div>
-    </div>
-    <div :class="[`${prefixCls}-body`]" ref="ReviewBody">
-      <div
-        :class="[`${prefixCls}-guide`, `${prefixCls}-guide-prev`]"
-        @click="showPrev"
-      >
-        <i class="el-icon-arrow-left"></i>
-      </div>
-      <div
-        :class="[`${prefixCls}-guide`, `${prefixCls}-guide-next`]"
-        @click="showNext"
-      >
-        <i class="el-icon-arrow-right"></i>
-      </div>
-      <div
-        :class="[
-          `${prefixCls}-imgs`,
-          { [`${prefixCls}-imgs-nosition`]: nosition }
-        ]"
-        :style="styles"
-        v-move-ele.prevent="{ mouseMove }"
-      >
-        <img
-          :src="curFile.url"
-          :alt="curFile.name"
-          v-if="curFile.url"
-          ref="PreviewImgDetail"
-        />
-      </div>
-    </div>
-    <div :class="[`${prefixCls}-footer`]">
-      <ul>
-        <li title="合适大小" @click="toOrigin">
-          <i class="el-icon-full-screen"></i>
-        </li>
-        <li
-          title="放大"
-          @click="toMagnify"
-          :class="{
-            'li-disabled': transform.scale === maxScale
-          }"
-        >
-          <i class="el-icon-zoom-in"></i>
-        </li>
-        <li
-          title="缩小"
-          @click="toShrink"
-          :class="{
-            'li-disabled': transform.scale === minScale
-          }"
-        >
-          <i class="el-icon-zoom-out"></i>
-        </li>
-        <li title="旋转" @click="toRotate">
-          <i class="el-icon-refresh-right"></i>
-        </li>
-      </ul>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import MoveEle from "./move-ele";
-
-const prefixCls = "cc-image-preview";
-
-export default {
-  name: "image-preview",
-  props: {
-    imageList: {
-      type: Array,
-      default() {
-        return [];
-      }
-    },
-    initIndex: {
-      type: Number,
-      default: 0
-    },
-    headerHide: {
-      type: Boolean,
-      default: false
-    }
-  },
-  directives: {
-    MoveEle
-  },
-  data() {
-    return {
-      prefixCls,
-      modalIsShow: false,
-      curFile: { name: "", url: null },
-      curIndex: 1,
-      minScale: 0.2,
-      maxScale: 3,
-      styles: { width: "", height: "", top: "100px", left: "", transform: "" },
-      initWidth: 500,
-      transform: {
-        scale: 1,
-        rotate: 0
-      },
-      nosition: false
-    };
-  },
-  computed: {
-    isFirst() {
-      return this.curIndex === 1;
-    },
-    isLast() {
-      return this.lastIndex === this.curIndex;
-    },
-    lastIndex() {
-      return this.imageList.length;
-    }
-  },
-  watch: {
-    curIndex: {
-      immediate: true,
-      handler(val, oldVal) {
-        this.curFileChange(val);
-      }
-    }
-  },
-  methods: {
-    visibleChange() {
-      if (!this.imageList.length) return;
-      this.curIndex = this.initIndex + 1;
-    },
-    curFileChange(val) {
-      this.nosition = true;
-      this.curFile = this.imageList[val - 1];
-      this.$nextTick(() => {
-        this.fileLoad();
-      });
-    },
-    setCurIndex(index) {
-      this.curIndex = index;
-    },
-    fileLoad() {
-      const imgDom = this.$refs.PreviewImgDetail;
-      if (!imgDom) return;
-
-      imgDom.onload = () => {
-        const { naturalWidth, naturalHeight } = imgDom;
-        const imageSize = this.getImageSizePos({
-          win: {
-            width: this.$refs.ReviewBody.clientWidth,
-            height: this.$refs.ReviewBody.clientHeight
-          },
-          img: {
-            width: naturalWidth,
-            height: naturalHeight
-          },
-          rotate: 0
-        });
-
-        this.styles = Object.assign(this.styles, {
-          width: imageSize.width + "px",
-          height: imageSize.height + "px",
-          top: imageSize.top + "px",
-          left: imageSize.left + "px",
-          transform: ""
-        });
-        this.transform = {
-          scale: 1,
-          rotate: 0
-        };
-        setTimeout(() => {
-          this.nosition = false;
-        }, 100);
-      };
-    },
-    getImageSizePos({ win, img, rotate }) {
-      const imageSize = {
-        width: 0,
-        height: 0,
-        top: 0,
-        left: 0
-      };
-      const isHorizontal = !!(rotate % 180);
-
-      const rateWin = isHorizontal
-        ? win.height / win.width
-        : win.width / win.height;
-      const hwin = isHorizontal
-        ? {
-            width: win.height,
-            height: win.width
-          }
-        : win;
-
-      const rateImg = img.width / img.height;
-
-      if (rateImg <= rateWin) {
-        imageSize.height = Math.min(hwin.height, img.height);
-        imageSize.width = Math.floor(
-          (imageSize.height * img.width) / img.height
-        );
-      } else {
-        imageSize.width = Math.min(hwin.width, img.width);
-        imageSize.height = Math.floor(
-          (imageSize.width * img.height) / img.width
-        );
-      }
-      imageSize.left = (win.width - imageSize.width) / 2;
-      imageSize.top = (win.height - imageSize.height) / 2;
-      return imageSize;
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    showPrev() {
-      if (this.isFirst) {
-        this.curIndex = this.lastIndex;
-      } else {
-        this.curIndex -= 1;
-      }
-    },
-    showNext() {
-      if (this.isLast) {
-        this.curIndex = 1;
-      } else {
-        this.curIndex += 1;
-      }
-    },
-    // dome-move
-    mouseMove({ left, top }) {
-      this.styles.left = left + "px";
-      this.styles.top = top + "px";
-    },
-    setStyleTransform() {
-      const { scale, rotate } = this.transform;
-      this.styles.transform = `scale(${scale}, ${scale}) rotate(${rotate}deg)`;
-    },
-    toOrigin() {
-      this.transform.scale = 1;
-      this.setStyleTransform();
-    },
-    toMagnify() {
-      const scale = (this.transform.scale * 1.2).toFixed(2);
-      this.transform.scale = scale >= this.maxScale ? this.maxScale : scale;
-      this.setStyleTransform();
-    },
-    toShrink() {
-      const scale = (this.transform.scale * 0.75).toFixed(2);
-      this.transform.scale = scale <= this.minScale ? this.minScale : scale;
-      this.setStyleTransform();
-    },
-    toRotate() {
-      this.transform.rotate = this.transform.rotate + 90;
-      this.setStyleTransform();
-      // 调整图片尺寸
-      const { naturalWidth, naturalHeight } = this.$refs.PreviewImgDetail;
-      const imageSize = this.getImageSizePos({
-        win: {
-          width: this.$refs.ReviewBody.clientWidth,
-          height: this.$refs.ReviewBody.clientHeight
-        },
-        img: {
-          width: naturalWidth,
-          height: naturalHeight
-        },
-        rotate: this.transform.rotate
-      });
-
-      this.styles = Object.assign(this.styles, {
-        width: imageSize.width + "px",
-        height: imageSize.height + "px",
-        top: imageSize.top + "px",
-        left: imageSize.left + "px"
-      });
-      // 360度无缝切换到0度
-      setTimeout(() => {
-        if (this.transform.rotate >= 360) {
-          this.nosition = true;
-          this.transform.rotate = 0;
-          this.setStyleTransform();
-          setTimeout(() => {
-            this.nosition = false;
-          }, 100);
-        }
-      }, 200);
-    }
-  }
-};
-</script>

+ 0 - 2
src/components/common/ImagePreview/index.js

@@ -1,2 +0,0 @@
-import ImagePreview from "./ImagePreview.vue";
-export default ImagePreview;

+ 0 - 51
src/components/common/ImagePreview/move-ele.js

@@ -1,51 +0,0 @@
-export default {
-  inserted(el, { value, modifiers }, vnode) {
-    let [_x, _y] = [0, 0];
-    // 当前拖动事务开始前元素的left,top
-    let [oleft, otop] = [0, 0];
-    // 元素移动后的left,top
-    let [left, top] = [0, 0];
-
-    let moveHandle = function(e) {
-      if (modifiers.prevent) {
-        e.preventDefault();
-      }
-      left = oleft + e.pageX - _x;
-      top = otop + e.pageY - _y;
-
-      if (value && value.mouseMove) {
-        value.mouseMove({ left, top });
-      } else {
-        el.style.left = left + "px";
-        el.style.top = top + "px";
-      }
-    };
-
-    let upHandle = function(e) {
-      if (modifiers.prevent) {
-        e.preventDefault();
-      }
-      oleft = left;
-      otop = top;
-
-      if (value && value.mouseUp) value.mouseUp({ oleft, otop });
-
-      document.removeEventListener("mousemove", moveHandle);
-      document.removeEventListener("mouseup", upHandle);
-    };
-
-    el.addEventListener("mousedown", function(e) {
-      if (modifiers.prevent) {
-        e.preventDefault();
-      }
-      _x = e.pageX;
-      _y = e.pageY;
-      oleft = el.offsetLeft;
-      otop = el.offsetTop;
-      if (value && value.mouseDown) value.mouseDown({ oleft, otop });
-
-      document.addEventListener("mousemove", moveHandle);
-      document.addEventListener("mouseup", upHandle);
-    });
-  }
-};

+ 0 - 72
src/components/common/LabelFilter/LabelFilter.vue

@@ -1,72 +0,0 @@
-<template>
-  <div class="label-filter">
-    <label-select
-      v-model="filter.color"
-      label="颜色"
-      :options="colorList"
-      :label-width="60"
-      @on-change="colorChange"
-    ></label-select>
-    <label-select
-      v-model="filter.size"
-      label="尺码"
-      :options="sizeList"
-      :label-width="60"
-      @on-change="colorChange"
-      multiple
-    ></label-select>
-
-    <div class="label-list">
-      {{ strFilter }}
-    </div>
-  </div>
-</template>
-
-<script>
-import LabelSelect from "./LabelSelect";
-
-const colorList = "#"
-  .repeat(6)
-  .split("")
-  .map((item, index) => {
-    return {
-      id: index + 1,
-      name: "红色" + (index + 1)
-    };
-  });
-
-const sizeList = "#"
-  .repeat(6)
-  .split("")
-  .map((item, index) => {
-    return {
-      id: index + 1,
-      name: "大号" + (index + 1)
-    };
-  });
-
-export default {
-  name: "label-filter",
-  components: { LabelSelect },
-  data() {
-    return {
-      filter: {
-        color: "",
-        size: ""
-      },
-      colorList: colorList,
-      sizeList: sizeList
-    };
-  },
-  computed: {
-    strFilter() {
-      return JSON.stringify(this.filter);
-    }
-  },
-  methods: {
-    colorChange(val) {
-      console.log(val);
-    }
-  }
-};
-</script>

+ 0 - 205
src/components/common/LabelFilter/LabelSelect.vue

@@ -1,205 +0,0 @@
-<template>
-  <div :class="['label-select', prefixCls]">
-    <span
-      :class="[`${prefixCls}-label`]"
-      v-if="labelIsShow"
-      :style="labelStyles"
-      >{{ label }}</span
-    >
-    <ul :class="[`${prefixCls}-options`]" :style="optionsStyles">
-      <li
-        :class="{
-          [`${prefixCls}-selected`]: !selectedIds.length
-        }"
-        @click="selectAll"
-        v-if="showAllOptionTag"
-      >
-        全部
-      </li>
-      <li
-        v-for="(item, index) in optionList"
-        :key="index"
-        :class="{
-          [`${prefixCls}-selected`]: item.selected,
-          [`${prefixCls}-disabled`]: item.disabled
-        }"
-        @click="select(item)"
-      >
-        {{ item.name }}
-      </li>
-    </ul>
-  </div>
-</template>
-
-<script>
-const prefixCls = "cc-labels";
-
-export default {
-  name: "label-select",
-  props: {
-    value: {
-      type: [String, Number, Array]
-    },
-    label: {
-      type: String
-    },
-    labelWidth: {
-      type: Number
-    },
-    labelIsShow: {
-      type: Boolean,
-      default: true
-    },
-    showAllOptionTag: {
-      type: Boolean,
-      default: true
-    },
-    multiple: {
-      type: Boolean,
-      default: false
-    },
-    optionKey: {
-      type: String,
-      default: "id"
-    },
-    options: {
-      type: Array,
-      default() {
-        return [];
-      }
-    },
-    costom: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {
-      prefixCls,
-      selectedIds: [],
-      optionList: []
-    };
-  },
-  computed: {
-    labelStyles() {
-      const width =
-        this.labelWidth || this.labelWidth === 0 ? this.labelWidth : 60;
-
-      return {
-        width: `${width}px`
-      };
-    },
-    optionsStyles() {
-      const width =
-        this.labelWidth || this.labelWidth === 0 ? this.labelWidth : 60;
-
-      return {
-        marginLeft: `${width}px`
-      };
-    }
-  },
-  watch: {
-    options: {
-      immediate: true,
-      handler(val) {
-        this.optionList = val.map(item => {
-          return {
-            ...item,
-            selected: this.selectedIds.indexOf(item[this.optionKey]) !== -1
-          };
-        });
-      }
-    },
-    value: {
-      immediate: true,
-      handler(val) {
-        if (this.multiple) {
-          this.selectedIds = val ? [...val] : [];
-        } else {
-          this.selectedIds = val ? [val] : [];
-        }
-        this.actOptions();
-      }
-    }
-  },
-  methods: {
-    select(option) {
-      const optkey = option[this.optionKey];
-      if (this.multiple) {
-        option.selected = !option.selected;
-        const optPoz = this.selectedIds.indexOf(optkey);
-        if (optPoz === -1) {
-          this.selectedIds.push(optkey);
-        } else {
-          this.selectedIds.splice(optPoz, 1);
-        }
-      } else {
-        this.optionList.map(item => {
-          item.selected = optkey === item[this.optionKey];
-        });
-        this.selectedIds = [optkey];
-      }
-      this.emitSelect();
-    },
-    actOptions() {
-      this.optionList.map(item => {
-        item.selected = this.selectedIds.indexOf(item[this.optionKey]) !== -1;
-      });
-    },
-    selectAll() {
-      this.optionList.map(item => (item.selected = false));
-      this.selectedIds = [];
-      this.emitSelect();
-    },
-    emitSelect() {
-      const selectOptions = this.optionList.filter(
-        item => this.selectedIds.indexOf(item[this.optionKey]) !== -1
-      );
-      this.$emit(
-        "input",
-        this.multiple ? this.selectedIds : this.selectedIds[0]
-      );
-      this.$emit("on-change", selectOptions);
-    }
-  }
-};
-</script>
-
-<style lang="css">
-.label-select {
-  margin-bottom: 8px;
-}
-.label-label {
-  display: block;
-  float: left;
-  height: 24px;
-  line-height: 24px;
-  font-size: 14px;
-  padding-right: 20px;
-  font-weight: 600;
-}
-.label-options {
-  margin-left: 60px;
-}
-.label-options li {
-  display: inline-block;
-  vertical-align: top;
-  margin: 0 5px 5px 0;
-  height: 24px;
-  line-height: 24px;
-  padding: 0 10px;
-  border-radius: 3px;
-  cursor: pointer;
-}
-.label-options li:hover {
-  color: #409eff;
-}
-.label-options li.label-selected {
-  background: #409eff;
-  color: #fff;
-}
-.label-options li.label-disabled {
-  color: #909399;
-  cursor: not-allowed;
-}
-</style>

+ 0 - 283
src/components/common/RichTextEditor/RichTextEditor.vue

@@ -1,283 +0,0 @@
-<template>
-  <div class="rich-text-editor cc-editor">
-    <quill-editor
-      :id="editorId"
-      :content="content"
-      ref="QuillEditor"
-      @change="onEditorChange"
-      :options="options"
-    ></quill-editor>
-    <input
-      style="display: none"
-      :id="uniqueInputId"
-      type="file"
-      name="fileinput"
-      @change="uploadImg"
-    />
-    <el-progress
-      :percentage="percentage"
-      :stroke-width="2"
-      :show-text="false"
-    ></el-progress>
-  </div>
-</template>
-
-<script>
-// 文档:https://github.com/surmon-china/vue-quill-editor
-import ajax from "../utils/ajax";
-import Quill from "quill";
-import Delta from "quill-delta";
-import { quillEditor } from "vue-quill-editor";
-import "quill/dist/quill.snow.css";
-import ImageResize from "quill-image-resize-module";
-Quill.register("modules/imageResize", ImageResize);
-
-export default {
-  name: "rich-text-editor",
-  props: {
-    value: String,
-    // upload
-    action: {
-      type: String,
-      required: true
-    },
-    headers: {
-      type: Object,
-      default() {
-        return {};
-      }
-    },
-    withCredentials: {
-      type: Boolean,
-      default: false
-    },
-    data: {
-      type: Object
-    },
-    name: {
-      type: String,
-      default: "file"
-    },
-    maxSize: {
-      type: Number,
-      default: 2 * 1024
-    },
-    rendFileUrl: {
-      type: Function,
-      default(fileInfo) {
-        return fileInfo;
-      }
-    },
-    onUploadSuccess: {
-      type: Function,
-      default() {
-        return {};
-      }
-    },
-    onUploadError: {
-      type: Function,
-      default() {
-        return {};
-      }
-    }
-  },
-  components: {
-    quillEditor
-  },
-  data() {
-    return {
-      content: "",
-      iframeSrc: "",
-      options: {
-        placeholder: "请输入内容",
-        modules: {
-          toolbar: [
-            ["bold", "italic", "underline", "strike"],
-            ["blockquote", "code-block"],
-            [{ list: "ordered" }, { list: "bullet" }],
-            [{ script: "sub" }, { script: "super" }],
-            [{ indent: "-1" }, { indent: "+1" }, { direction: "rtl" }],
-            [{ size: ["small", false, "large", "huge"] }],
-            [{ header: [1, 2, 3, 4, 5, 6, false] }],
-            [{ color: [] }, { background: [] }, { align: [] }],
-            ["clean", "link", "image"]
-          ],
-          imageResize: true,
-          history: {
-            delay: 1000,
-            maxStack: 50,
-            userOnly: false
-          }
-        }
-      },
-      percentage: 0,
-      uniqueInputId: "",
-      uploadImages: [],
-      editorId: "",
-      // math-modal
-      src: "",
-      mathModalIsShow: false
-    };
-  },
-  computed: {
-    editor() {
-      return this.$refs.QuillEditor.quill;
-    }
-  },
-  watch: {
-    value(val) {
-      this.content = val;
-    }
-  },
-  mounted() {
-    const serno = Math.random()
-      .toString(16)
-      .slice(-8);
-    this.editorId = "rich-text-editor-" + serno;
-    this.uniqueInputId = "file-input-" + serno;
-
-    this.registImageHandle();
-    this.registPasteEvent();
-    this.content = this.value;
-  },
-  methods: {
-    registPasteEvent() {
-      const inputBox = this.$el.querySelector(".ql-editor");
-      inputBox.addEventListener("paste", e => {
-        e.preventDefault();
-        let items = e.clipboardData ? e.clipboardData.items : [];
-        if (!items || !items.length) return;
-
-        for (let i = 0; i < items.length; i++) {
-          let item = items[i];
-          if (
-            item &&
-            item.kind === "string" &&
-            item.type.match(/^text\/plain/i)
-          ) {
-            this.textPasteHandle(item);
-            break;
-          } else if (
-            item &&
-            item.kind === "file" &&
-            item.type.match(/^image\//i)
-          ) {
-            this.imgPasteHandle(item);
-            break;
-          }
-        }
-      });
-    },
-    textPasteHandle(item) {
-      item.getAsString(content => {
-        this.insertText(content);
-      });
-    },
-    imgPasteHandle(item) {
-      let file = item.getAsFile();
-
-      // 展示文件
-      // const reader = new FileReader();
-      // reader.onload = e => {
-      //   this.insertImg(e.target.result);
-      // };
-      // reader.readAsDataURL(file);
-
-      this.upload(file)
-        .then(rep => {
-          const fileUrl = this.rendFileUrl(rep);
-          this.insertImg(fileUrl);
-          this.onUploadSuccess(fileUrl);
-        })
-        .catch(error => {
-          this.onUploadError(error);
-        });
-    },
-    registImageHandle() {
-      let that = this;
-      let imgHandler = async state => {
-        if (state) {
-          let fileInput = document.getElementById(that.uniqueInputId);
-          fileInput.click();
-        }
-      };
-      that.editor.getModule("toolbar").addHandler("image", imgHandler);
-    },
-    onEditorChange() {
-      this.$emit("input", this.content);
-    },
-    uploadImg() {
-      let file = document.getElementById(this.uniqueInputId).files[0];
-      this.upload(file)
-        .then(rep => {
-          const fileUrl = this.rendFileUrl(rep);
-          this.insertImg(fileUrl);
-          this.onUploadSuccess(fileUrl);
-        })
-        .catch(error => {
-          this.onUploadError(error);
-        });
-    },
-    getSelectionIndex() {
-      this.editor.focus();
-      const selectionRange = this.editor.getSelection();
-      if (selectionRange && selectionRange.length)
-        this.editor.deleteText(selectionRange.index, selectionRange.length);
-
-      return selectionRange ? selectionRange.index : 0;
-    },
-    insertText(content) {
-      const index = this.getSelectionIndex();
-      this.editor.insertEmbed(index, "text", content, "user");
-    },
-    insertImg(url, alt) {
-      const index = this.getSelectionIndex();
-      let delta = this.editor.insertEmbed(index, "image", url, "user");
-      this.editor.setSelection(index + 1);
-      if (alt) {
-        let retain = delta.ops[0].retain;
-        this.editor.updateContents(
-          new Delta().retain(retain).retain(1, { alt })
-        );
-      }
-    },
-    base64ToBlob(base64Str) {
-      var bytes = atob(base64Str.split(",")[1]);
-      let arr = new Uint8Array(bytes.length);
-      for (let i = 0; i < bytes.length; i++) {
-        arr[i] = bytes.charCodeAt(i);
-      }
-      return new Blob([arr], { type: "image/png" });
-    },
-    upload(file) {
-      if (file.size > this.maxSize * 1024) {
-        return Promise.reject({ msg: "图片过大,请重新编辑!" });
-      }
-      return new Promise((resolve, reject) => {
-        ajax({
-          headers: this.headers,
-          withCredentials: this.withCredentials,
-          file: file,
-          data: this.data,
-          filename: this.name,
-          action: this.action,
-          onProgress: e => {
-            this.percentage = e.percent || 0;
-            if (this.percentage === 100) {
-              setTimeout(() => {
-                this.percentage = 0;
-              }, 300);
-            }
-          },
-          onSuccess: res => {
-            resolve(res);
-          },
-          onError: (err, response) => {
-            reject({ err, response });
-          }
-        });
-      });
-    }
-  }
-};
-</script>

+ 0 - 2
src/components/common/RichTextEditor/index.js

@@ -1,2 +0,0 @@
-import RichTextEditor from "./RichTextEditor.vue";
-export default RichTextEditor;

+ 0 - 104
src/components/common/RichTextEditor/intro.md

@@ -1,104 +0,0 @@
-# RickEdit api
-
-- [官方git地址](https://github.com/surmon-china/vue-quill-editor)
-
-## 实例
-
-```html
-<template>
-  <div class="demo">
-    <rich-editor v-model="content" :headers="headers" :action="action" :rend-file-url="rendFileUrl" ref="RichEditor"></rich-editor>
-  </div>
-</template>
-
-<script>
-import RichEditor from "@/components/common/RichEditor";
-
-export default {
-  name: "demo",
-  components: {
-    RichEditor
-  },
-  computed: {
-    editor() {
-      // editor实例,实质时quill对象
-      return this.$refs.RichEditor.editor;
-    }
-  },
-  data() {
-    return {
-      content: "<p>这是一段默认内容</p>",
-      headers: {},
-      action: ""
-    };
-  },
-  mounted() {
-    this.headers = {
-      Authorization: "token"
-    };
-    this.action = "file upload url";
-  },
-  methods: {
-    rendFileUrl(rep) {
-      return 'file-url'
-    }
-  }
-};
-</script>
-```
-
-## RickEdit props
-
-| 属性              | 说明                                                      | 类型     | 默认值   |
-| ----------------- | --------------------------------------------------------- | -------- | -------- |
-| value             | 配合v-model实现文本数据的双向绑定                         | String   | -        |
-| action            | 上传文件的api地址                                         | String   | -        |
-| headers           | 上传文件的header信息                                      | Object   | {}       |
-| max-size          | 上传文件大小限制,单位kb                                   | Number   | 2 * 1024 |
-| rend-file-url     | 上传文件成功后,解析文件路径的方法,参数rep为response对象 | Function | {}       |
-| name              | 上传文件的字段名                                          | String   | file     |
-| on-upload-success | 上传文件成功后的回调方法                                  | Function | {}       |
-| on-upload-error   | 上传文件失败后的回调方法,参数error信息                   | Function | {}       |
-
-
-## 插件说明:
-
-### 1. 图片缩放插件
-
-- 官方推荐插件:[quill-image-resize-module](https://github.com/kensnyder/quill-image-resize-module)
-- **Tips:** quill-image-resize-module若按官方提供的方式引入会有问题。调整后的方式如下:
-
-**载入图片缩放插件**
-
-- `vue.config.js`文件中加入如下代码
- 
-```bash
-configureWebpack: {
-    plugins: [
-      new webpack.ProvidePlugin({
-        'window.Quill': 'quill/dist/quill.js',
-        Quill: 'quill/dist/quill.js'
-      })
-    ]
-  }
-```
-
-- 引入插件
-
-```bash
-import Quill from "quill";
-import ImageResize from "quill-image-resize-module";
-Quill.register("modules/imageResize", ImageResize);
-```
-
-- 配置插件
-
-```bash
-options: {
- modules: {
-   imageResize: true
- }
-}
-```
-
-- **Tips:** 如果不需要图片缩放插件,则可以删除相应的文件及代码。

+ 0 - 28
src/components/common/StepsProgress/StepFour.vue

@@ -1,28 +0,0 @@
-<template>
-  <div class="step-four">
-    step-four
-  </div>
-</template>
-
-<script>
-export default {
-  name: "step-four",
-  data() {
-    return {};
-  },
-  mounted() {
-    setTimeout(() => {
-      // 提交步骤准备就绪事件
-      this.$emit("on-ready");
-    }, 500);
-  },
-  methods: {
-    checkValid() {
-      // some code
-
-      // 提交可执行下一步操作事件
-      this.$emit("on-next");
-    }
-  }
-};
-</script>

+ 0 - 28
src/components/common/StepsProgress/StepOne.vue

@@ -1,28 +0,0 @@
-<template>
-  <div class="step-one">
-    step-one
-  </div>
-</template>
-
-<script>
-export default {
-  name: "step-one",
-  data() {
-    return {};
-  },
-  mounted() {
-    setTimeout(() => {
-      // 提交步骤准备就绪事件
-      this.$emit("on-ready");
-    }, 500);
-  },
-  methods: {
-    checkValid() {
-      // some code
-
-      // 提交可执行下一步操作事件
-      this.$emit("on-next");
-    }
-  }
-};
-</script>

+ 0 - 28
src/components/common/StepsProgress/StepThree.vue

@@ -1,28 +0,0 @@
-<template>
-  <div class="step-three">
-    step-three
-  </div>
-</template>
-
-<script>
-export default {
-  name: "step-three",
-  data() {
-    return {};
-  },
-  mounted() {
-    setTimeout(() => {
-      // 提交步骤准备就绪事件
-      this.$emit("on-ready");
-    }, 500);
-  },
-  methods: {
-    checkValid() {
-      // some code
-
-      // 提交可执行下一步操作事件
-      this.$emit("on-next");
-    }
-  }
-};
-</script>

+ 0 - 28
src/components/common/StepsProgress/StepTwo.vue

@@ -1,28 +0,0 @@
-<template>
-  <div class="step-two">
-    step-two
-  </div>
-</template>
-
-<script>
-export default {
-  name: "step-two",
-  data() {
-    return {};
-  },
-  mounted() {
-    setTimeout(() => {
-      // 提交步骤准备就绪事件
-      this.$emit("on-ready");
-    }, 500);
-  },
-  methods: {
-    checkValid() {
-      // some code
-
-      // 提交可执行下一步操作事件
-      this.$emit("on-next");
-    }
-  }
-};
-</script>

+ 0 - 126
src/components/common/StepsProgress/StepsProgress.vue

@@ -1,126 +0,0 @@
-<template>
-  <div class="step-progress">
-    <div class="step-menu">
-      <el-steps :active="current" align-center process-status="finish">
-        <el-step
-          v-for="(step, index) in STEPS_LIST"
-          :key="index"
-          :title="step.title"
-        ></el-step>
-      </el-steps>
-    </div>
-    <div class="step-body">
-      <component
-        :is="currentComponent"
-        :ref="currentComponent"
-        @on-next="toNext"
-        @on-ready="stepReady"
-      ></component>
-    </div>
-
-    <div class="step-ctrl">
-      <el-button type="primary" @click="prevStep" :disabled="isFirstStep"
-        >上一步</el-button
-      >
-      <el-button
-        type="primary"
-        @click="nextStep"
-        :disabled="nextHolder || isLastStep"
-        >下一步</el-button
-      >
-    </div>
-  </div>
-</template>
-
-<script>
-import StepOne from "./StepOne";
-import StepTwo from "./StepTwo";
-import StepThree from "./StepThree";
-import StepFour from "./StepFour";
-
-const STEPS_LIST = [
-  {
-    name: "step-one",
-    title: "步骤1"
-  },
-  {
-    name: "step-two",
-    title: "步骤2"
-  },
-  {
-    name: "step-three",
-    title: "步骤3"
-  },
-  {
-    name: "step-four",
-    title: "步骤4"
-  }
-];
-
-export default {
-  name: "step-progress",
-  components: {
-    StepOne,
-    StepTwo,
-    StepThree,
-    StepFour
-  },
-  data() {
-    return {
-      STEPS_LIST,
-      current: 0,
-      nextHolder: true,
-      dataReady: true
-    };
-  },
-  computed: {
-    currentComponent() {
-      return this.STEPS_LIST[this.current].name;
-    },
-    isFirstStep() {
-      return this.current === 0;
-    },
-    isLastStep() {
-      return this.current === this.lastStep;
-    },
-    lastStep() {
-      return this.STEPS_LIST.length - 1;
-    }
-  },
-  watch: {
-    current() {
-      // 滚动条置顶
-      // document.getElementById("home-body").scrollTop = 0;
-    }
-  },
-  methods: {
-    prevStep() {
-      if (this.isFirstStep) return;
-      this.current -= 1;
-    },
-    nextStep() {
-      if (this.isLastStep || this.nextHolder) return;
-      this.$refs[this.currentComponent].checkValid();
-    },
-    toNext() {
-      if (this.isLastStep) return;
-      this.current += 1;
-      this.nextHolder = true;
-    },
-    stepReady() {
-      this.nextHolder = false;
-    }
-  }
-};
-</script>
-
-<style lang="css">
-.step-body {
-  min-height: 600px;
-  padding: 20px;
-}
-.step-ctrl {
-  text-align: center;
-  margin-top: 50px;
-}
-</style>

+ 0 - 82
src/components/common/utils/ajax.js

@@ -1,82 +0,0 @@
-// https://github.com/ElemeFE/element/blob/dev/packages/upload/src/ajax.js
-
-function getError(action, option, xhr) {
-  const msg = `fail to post ${action} ${xhr.status}'`;
-  const err = new Error(msg);
-  err.status = xhr.status;
-  err.method = "post";
-  err.url = action;
-  return err;
-}
-
-function getBody(xhr) {
-  const text = xhr.responseText || xhr.response;
-  if (!text) {
-    return text;
-  }
-
-  try {
-    return JSON.parse(text);
-  } catch (e) {
-    return text;
-  }
-}
-
-export default function upload(option) {
-  if (typeof XMLHttpRequest === "undefined") {
-    return;
-  }
-
-  const xhr = new XMLHttpRequest();
-  const action = option.action;
-
-  if (xhr.upload) {
-    xhr.upload.onprogress = function progress(e) {
-      if (e.total > 0) {
-        e.percent = (e.loaded / e.total) * 100;
-      }
-      option.onProgress(e);
-    };
-  }
-
-  const formData = new FormData();
-
-  if (option.data) {
-    Object.keys(option.data).map(key => {
-      formData.append(key, option.data[key]);
-    });
-  }
-
-  formData.append(option.filename, option.file);
-
-  xhr.onerror = function error(e) {
-    option.onError(e);
-  };
-
-  xhr.onload = function onload() {
-    if (xhr.status < 200 || xhr.status >= 300) {
-      return option.onError(getError(action, option, xhr), getBody(xhr));
-    }
-
-    option.onSuccess(getBody(xhr));
-  };
-
-  xhr.open("post", action, true);
-
-  if (option.withCredentials && "withCredentials" in xhr) {
-    xhr.withCredentials = true;
-  }
-
-  const headers = option.headers || {};
-
-  // if (headers['X-Requested-With'] !== null) {
-  //   xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
-  // }
-
-  for (let item in headers) {
-    if (headers.hasOwnProperty(item) && headers[item] !== null) {
-      xhr.setRequestHeader(item, headers[item]);
-    }
-  }
-  xhr.send(formData);
-}

+ 1 - 1
src/constants/app.js

@@ -1,7 +1,7 @@
 import { parseHrefParam } from "../plugins/utils";
 const MD5 = require("js-md5");
 
-export const APP_TITLE = '试卷电子化';
+export const APP_TITLE = "试卷电子化";
 
 // domain
 let domain;

+ 0 - 150
src/constants/printTemplateData.js

@@ -1,150 +0,0 @@
-export const SIGN_DATA = {
-  basic: [
-    {
-      code: "courseName",
-      name: "课程",
-      disabled: true,
-      enable: true
-    },
-    {
-      code: "paperNumber",
-      name: "试卷编号",
-      disabled: false,
-      enable: true
-    },
-    {
-      code: "examTime",
-      name: "考试时间",
-      disabled: true,
-      enable: true
-    },
-    {
-      code: "examPlace",
-      name: "考试地点",
-      disabled: true,
-      enable: true
-    },
-    {
-      code: "examCount",
-      name: "应考人数",
-      disabled: true,
-      enable: true
-    },
-    {
-      code: "actualExamCount",
-      name: "实考人数",
-      disabled: true,
-      enable: true
-    }
-  ],
-  table: [
-    {
-      code: "studentName",
-      name: "姓名",
-      disabled: false,
-      enable: true
-    },
-    {
-      code: "studentCode",
-      name: "学号",
-      disabled: false,
-      enable: true
-    },
-    {
-      code: "clazzName",
-      name: "班级",
-      disabled: false,
-      enable: false
-    },
-    {
-      code: "ticketNumber",
-      name: "考号",
-      disabled: false,
-      enable: false
-    }
-  ]
-};
-
-export const PACKAGE_DATA = [
-  {
-    code: "examTime",
-    name: "考试时间",
-    disabled: true,
-    enable: true
-  },
-  {
-    code: "courseCode",
-    name: "课程代码",
-    disabled: true,
-    enable: true
-  },
-  {
-    code: "paperNumber",
-    name: "试卷编号",
-    disabled: true,
-    enable: true
-  },
-  {
-    code: "examPlace",
-    name: "考点",
-    disabled: true,
-    enable: true
-  },
-  {
-    code: "examRoom",
-    name: "考场",
-    disabled: true,
-    enable: true
-  },
-  {
-    code: "collegeName",
-    name: "学院",
-    disabled: false,
-    enable: false
-  },
-  {
-    code: "majorName",
-    name: "专业",
-    disabled: false,
-    enable: false
-  },
-  {
-    code: "clazzName",
-    name: "班级",
-    disabled: false,
-    enable: false
-  },
-  {
-    code: "examCount",
-    name: "应考人数",
-    disabled: true,
-    enable: true
-  },
-  {
-    code: "actualExamCount",
-    name: "实考人数",
-    disabled: true,
-    enable: true
-  }
-];
-
-// acorn = {
-//   code: 200,
-//   message: "成功",
-//   data: [
-//     { name: "STUDENT_CODE", ordinal: 0, code: "studentCode", desc: "学号" },
-//     { name: "TICKET_NUMBER", ordinal: 1, code: "ticketNumber", desc: "考号" },
-//     { name: "SITE_NUMBER", ordinal: 2, code: "siteNumber", desc: "座位号" },
-//     { name: "STUDENT_NAME", ordinal: 3, code: "studentName", desc: "姓名" },
-//     { name: "COURSE_CODE", ordinal: 4, code: "courseCode", desc: "课程代码" },
-//     { name: "COURSE_NAME", ordinal: 5, code: "courseName", desc: "课程名称" },
-//     { name: "PAPER_NUMBER", ordinal: 6, code: "paperNumber", desc: "试卷编号" },
-//     { name: "EXAM_PLACE", ordinal: 7, code: "examPlace", desc: "考点" },
-//     { name: "EXAM_ROOM", ordinal: 8, code: "examRoom", desc: "考场" },
-//     { name: "EXAM_DATE", ordinal: 9, code: "examDate", desc: "考试日期" },
-//     { name: "EXAM_TIME", ordinal: 10, code: "examTime", desc: "考试时间" },
-//     { name: "COLLEGE_NAME", ordinal: 11, code: "collegeName", desc: "学院" },
-//     { name: "MAJOR_NAME", ordinal: 12, code: "majorName", desc: "专业" },
-//     { name: "CLAZZ_NAME", ordinal: 13, code: "clazzName", desc: "班级" }
-//   ]
-// };

+ 0 - 1
src/main.js

@@ -12,7 +12,6 @@ import VueLocalStorage from "vue-ls";
 import ElementUI from "element-ui";
 import "element-ui/lib/theme-chalk/index.css";
 import "./assets/styles/index.scss";
-import "../card/assets/styles/module.scss";
 
 Vue.use(ElementUI, { size: "small" });
 

+ 0 - 92
src/modules/analysis/api.js

@@ -1,92 +0,0 @@
-import { $postParam, $post } from "@/plugins/axios";
-
-// data-init-manage
-export const dataInitList = datas => {
-  return $postParam("/api/admin/grade/paper/initialize", datas);
-};
-// dimension
-export const paperDimensionList = datas => {
-  return $postParam("/api/admin/grade/paper/dimension/list", datas);
-};
-export const updatePaperDimension = datas => {
-  return $post("/api/admin/grade/paper/dimension/save", datas);
-};
-export const paperDimensionExport = datas => {
-  return $postParam("/api/admin/grade/paper/dimension/export", datas, {
-    responseType: "blob"
-  });
-};
-export const syncPaperStruct = datas => {
-  return $postParam(
-    "/api/admin/grade/paper/struct/change_paper_structure",
-    datas
-  );
-};
-export const paperStructList = datas => {
-  return $postParam("/api/admin/grade/paper/struct/list", datas);
-};
-export const updatePaperStruct = datas => {
-  return $post("/api/admin/grade/paper/struct/save", datas);
-};
-export const paperStructExport = datas => {
-  return $postParam("/api/admin/grade/paper/struct/export", datas, {
-    responseType: "blob"
-  });
-};
-export const paperDefineList = datas => {
-  return $postParam("/api/admin/grade/paper/paper_define", datas);
-};
-export const updatePaperDefine = datas => {
-  return $post("/api/admin/grade/paper/save_define", datas);
-};
-export const moduleEvaluationList = datas => {
-  return $postParam("/api/admin/grade/module/evaluation/list", datas);
-};
-export const updateModuleEvaluation = datas => {
-  return $post("/api/admin/grade/module/evaluation/save", datas);
-};
-
-// analysis-course-manage
-export const analysisBatchList = datas => {
-  return $postParam("/api/admin/grade/batch/page", datas);
-};
-export const updateAnalysisBatch = datas => {
-  return $post("/api/admin/grade/batch/save", datas);
-};
-export const deleteAnalysisBatch = id => {
-  return $postParam("/api/admin/grade/batch/delete", { id });
-};
-export const analysisBatchPaperList = datas => {
-  return $postParam("/api/admin/grade/batch/paper/page", datas);
-};
-export const addAnalysisBatchPaper = datas => {
-  return $post("/api/admin/grade/batch/paper/save", datas);
-};
-export const deleteAnalysisBatchPaper = (batchId, idList) => {
-  return $postParam("/api/admin/grade/batch/paper/delete", { batchId, idList });
-};
-export const analysisBatchPaperPublish = (batchId, gradeBatchPaperId) => {
-  return $postParam("/api/admin/grade/batch/paper/publish", {
-    batchId,
-    gradeBatchPaperId
-  });
-};
-export const analysisPaperList = datas => {
-  return $postParam("/api/admin/grade/batch/paper/able", datas);
-};
-export const analysisBatchTemplateExport = datas => {
-  return $postParam("/api/admin/grade/batch/download", datas, {
-    responseType: "blob"
-  });
-};
-export const analysisDataImport = datas => {
-  return $postParam("/api/admin/grade/batch/push", datas);
-};
-export const analysisBatchCalc = datas => {
-  return $postParam("/api/admin/grade/batch/start_calc", datas);
-};
-
-// analysis-report-view
-export const ssoAnalysisLogin = datas => {
-  return $postParam("/api/admin/exam/sso/analysis_login", datas);
-};

+ 0 - 132
src/modules/analysis/components/ModifyAnalysisBatch.vue

@@ -1,132 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-analysis-batch"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="540px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @opened="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      label-width="100px"
-    >
-      <el-form-item prop="batchName" label="批次名称:">
-        <el-input
-          class="width-full"
-          v-model.trim="modalForm.batchName"
-          placeholder="请输入批次名称"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="semesterId" label="学期:">
-        <semester-select
-          class="width-full"
-          v-model="modalForm.semesterId"
-          placeholder="学期"
-        ></semester-select>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button type="danger" @click="cancel" plain>取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { updateAnalysisBatch } from "../api";
-
-const initModalForm = {
-  id: null,
-  semesterId: null,
-  batchName: ""
-};
-
-export default {
-  name: "modify-analysis-batch",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "分析批次";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: {},
-      rules: {
-        batchName: [
-          {
-            required: true,
-            message: "请输入批次名称",
-            trigger: "change"
-          },
-          {
-            max: 50,
-            message: "批次名称不能超过50",
-            trigger: "change"
-          }
-        ],
-        semesterId: [
-          {
-            required: true,
-            message: "请选择学期",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    async visibleChange() {
-      if (this.instance.id) {
-        this.modalForm = this.$objAssign(initModalForm, this.instance);
-      } else {
-        this.modalForm = { ...initModalForm };
-      }
-      this.$nextTick(() => {
-        this.$refs.modalFormComp.clearValidate();
-      });
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      const datas = { ...this.modalForm };
-      const data = await updateAnalysisBatch(datas).catch(() => {});
-      this.isSubmit = false;
-      if (!data) return;
-
-      this.$emit("modified");
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 244
src/modules/analysis/components/ModifyAnalysisBatchPaper.vue

@@ -1,244 +0,0 @@
-<template>
-  <div class="modify-analysis-batch">
-    <el-dialog
-      class="page-dialog"
-      :visible.sync="modalIsShow"
-      :title="title"
-      :close-on-click-modal="false"
-      :close-on-press-escape="false"
-      append-to-body
-      fullscreen
-      @opened="visibleChange"
-      @closed="dialogClosed"
-    >
-      <div class="part-box part-box-filter part-box-flex">
-        <el-form
-          ref="FilterForm"
-          label-position="left"
-          label-width="55px"
-          inline
-        >
-          <el-form-item label="课程:">
-            <el-input
-              style="width:100%;"
-              v-model.trim="filter.courseName"
-              placeholder="课程名称"
-              clearable
-            ></el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="toPage(1)">查询</el-button>
-          </el-form-item>
-        </el-form>
-        <div class="part-box-action">
-          <el-button type="danger" @click="toBatchDelete">批量删除</el-button>
-          <el-button type="primary" @click="toAdd">添加分析试卷</el-button>
-        </div>
-      </div>
-      <div class="part-box part-box-pad">
-        <el-table
-          ref="TableList"
-          :data="dataList"
-          @selection-change="handleSelectionChange"
-        >
-          <el-table-column
-            type="selection"
-            width="55"
-            align="center"
-          ></el-table-column>
-          <el-table-column prop="semesterName" label="学期"></el-table-column>
-          <el-table-column prop="examName" label="考试"> </el-table-column>
-          <el-table-column prop="courseCode" label="课程(代码)" min-width="120">
-            <span slot-scope="scope">
-              {{ scope.row.courseName }}({{ scope.row.courseCode }})
-            </span>
-          </el-table-column>
-          <el-table-column prop="paperNumber" label="试卷编号">
-          </el-table-column>
-          <el-table-column prop="paperType" label="试卷类型" width="100">
-          </el-table-column>
-          <el-table-column prop="teacherName" label="命题老师">
-          </el-table-column>
-          <el-table-column prop="publishStatus" label="发布状态">
-            <template slot-scope="scope">
-              <span>{{ scope.row.publishStatus ? "已发布" : "未发布" }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            class-name="action-column"
-            label="操作"
-            width="80"
-            align="center"
-          >
-            <template slot-scope="scope">
-              <el-button
-                v-if="
-                  scope.row.status === 'FINISH_CALCULATE' &&
-                    !scope.row.publishStatus
-                "
-                class="btn-primary"
-                type="text"
-                @click="toPublish(scope.row)"
-                >发布</el-button
-              >
-              <el-button
-                v-if="!scope.row.publishStatus"
-                class="btn-danger"
-                type="text"
-                @click="toDelete(scope.row)"
-                >删除</el-button
-              >
-            </template>
-          </el-table-column>
-        </el-table>
-        <div class="part-page">
-          <el-pagination
-            background
-            layout="total,prev, pager, next"
-            :current-page="current"
-            :total="total"
-            :page-size="size"
-            @current-change="toPage"
-          >
-          </el-pagination>
-        </div>
-      </div>
-      <div slot="footer"></div>
-    </el-dialog>
-
-    <!-- SelectAnalysisPaper -->
-    <select-analysis-paper
-      ref="SelectAnalysisPaper"
-      :batch="instance"
-      @modified="getList"
-    ></select-analysis-paper>
-  </div>
-</template>
-
-<script>
-import {
-  analysisBatchPaperList,
-  deleteAnalysisBatchPaper,
-  analysisBatchPaperPublish
-} from "../api";
-import SelectAnalysisPaper from "./SelectAnalysisPaper.vue";
-
-export default {
-  name: "modify-analysis-batch-paper",
-  components: { SelectAnalysisPaper },
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      filter: {
-        batchId: "",
-        semesterId: "",
-        courseName: ""
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      dataList: [],
-      curRow: {},
-      multipleSelection: [],
-      loading: false
-    };
-  },
-  computed: {
-    title() {
-      return `分析试卷管理-${this.instance.batchName}`;
-    }
-  },
-  methods: {
-    visibleChange() {
-      this.filter = {
-        batchId: this.instance.id,
-        semesterId: this.instance.semesterId,
-        courseName: ""
-      };
-      this.curRow = {};
-      this.toPage(1);
-    },
-    dialogClosed() {
-      this.$emit("closed");
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async getList() {
-      this.multipleSelection = [];
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      const data = await analysisBatchPaperList(datas);
-      this.dataList = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    toAdd() {
-      this.$refs.SelectAnalysisPaper.open();
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val.map(item => item.id);
-    },
-    async toBatchDelete() {
-      if (!this.multipleSelection.length) {
-        this.$message.error("请选择要删除的试卷!");
-        return;
-      }
-
-      const confirm = await this.$confirm(`确定要删除选中的试卷吗?`, "提示", {
-        type: "warning"
-      }).catch(() => {});
-      if (confirm !== "confirm") return;
-
-      await deleteAnalysisBatchPaper(this.instance.id, this.multipleSelection);
-      this.$message.success("删除成功!");
-      this.deletePageLastItem();
-    },
-    async toPublish(row) {
-      const confirm = await this.$confirm(
-        `确定要发布试卷【${row.paperNumber}】吗?`,
-        "提示",
-        {
-          type: "warning"
-        }
-      ).catch(() => {});
-      if (confirm !== "confirm") return;
-
-      await analysisBatchPaperPublish(this.instance.id, row.id);
-      this.$message.success("发布成功!");
-      this.getList();
-    },
-    async toDelete(row) {
-      const confirm = await this.$confirm(
-        `确定要删除试卷【${row.paperNumber}】吗?`,
-        "提示",
-        {
-          type: "warning"
-        }
-      ).catch(() => {});
-      if (confirm !== "confirm") return;
-
-      await deleteAnalysisBatchPaper(this.instance.id, [row.id]);
-      this.$message.success("删除成功!");
-      this.deletePageLastItem();
-    }
-  }
-};
-</script>

+ 0 - 215
src/modules/analysis/components/ModifyBaseConfig.vue

@@ -1,215 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-base-config page-dialog"
-    :visible.sync="modalIsShow"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    fullscreen
-    destroy-on-close
-    @opened="visibleChange"
-    @closed="dialogClosed"
-  >
-    <div slot="title">
-      基础配置<span class="color-gray-2 ml-2">{{ insCont }}</span>
-    </div>
-    <div v-if="dataReady" class="part-box part-box-pad">
-      <el-steps :active="curStep" align-center finish-status="success">
-        <el-step
-          v-for="(item, ind) in steps"
-          :key="item.val"
-          :status="item.status"
-        >
-          <el-button
-            slot="title"
-            :class="['step-title', { 'is-active': curStep === ind }]"
-            type="text"
-            :disabled="item.disabled"
-            @click="changeStep(ind)"
-            >{{ item.name }}</el-button
-          >
-        </el-step>
-      </el-steps>
-    </div>
-
-    <div v-if="dataReady" class="part-box part-box-pad">
-      <component :is="compName" @modified="modified"></component>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { mapState, mapActions, mapMutations } from "vuex";
-import DimensionConfig from "./baseConfig/DimensionConfig.vue";
-import BlueprintConfig from "./baseConfig/BlueprintConfig.vue";
-import DiagnoseConfig from "./baseConfig/DiagnoseConfig.vue";
-import CommentConfig from "./baseConfig/CommentConfig.vue";
-
-const steps = [
-  {
-    name: "知识/能力维度设置",
-    val: "dimension",
-    disabled: false,
-    status: "process",
-    storeName: "dimensionList",
-    fetchFunc: "fetchDimensionList"
-  },
-  {
-    name: "命题蓝图设置",
-    val: "blueprint",
-    disabled: false,
-    status: "wait",
-    storeName: "structList",
-    fetchFunc: "fetchStructList"
-  },
-  {
-    name: "诊断规则定义",
-    val: "diagnose",
-    disabled: false,
-    status: "wait",
-    storeName: "defineList",
-    fetchFunc: "fetchDefineList"
-  },
-  {
-    name: "评价模型设置",
-    val: "comment",
-    disabled: false,
-    status: "wait",
-    storeName: "evaluationList",
-    fetchFunc: "fetchEvaluationList"
-  }
-];
-
-export default {
-  name: "modify-base-config",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  components: {
-    DimensionConfig,
-    BlueprintConfig,
-    DiagnoseConfig,
-    CommentConfig
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      curStep: 0,
-      steps: [],
-      dataReady: false
-    };
-  },
-  computed: {
-    ...mapState("baseConfigs", [
-      "dimensionList",
-      "structList",
-      "defineList",
-      "evaluationList"
-    ]),
-    compName() {
-      const stepVal = this.steps[this.curStep] && this.steps[this.curStep].val;
-      if (!stepVal) return null;
-      return `${stepVal}-config`;
-    },
-    insCont() {
-      return `${this.instance.semesterName}-${this.instance.examName}-${this.instance.courseName}(${this.instance.courseCode})`;
-    }
-  },
-  methods: {
-    ...mapMutations("baseConfigs", ["setBaseInfo", "initConfigStore"]),
-    ...mapActions("baseConfigs", [
-      "fetchDimensionList",
-      "fetchStructList",
-      "fetchDefineList",
-      "fetchEvaluationList"
-    ]),
-    async visibleChange() {
-      this.setBaseInfo({ ...this.instance });
-      await this.getData();
-      this.dataReady = true;
-    },
-    dialogClosed() {
-      this.initConfigStore();
-      this.dataReady = false;
-      this.steps = [];
-      this.curStep = 0;
-      this.$emit("closed");
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async getData() {
-      const funcs = [
-        this.fetchDimensionList(),
-        this.fetchStructList(),
-        this.fetchDefineList(),
-        this.fetchEvaluationList()
-      ];
-      const result = await Promise.all(funcs).catch(() => {});
-      if (!result) return;
-
-      this.steps = steps.map(step => {
-        let item = { ...step };
-        if (item.val === "blueprint") {
-          const finished = !this[item.storeName].some(
-            elem => !elem.knowledgeDimension || !elem.abilityDimension
-          );
-          if (finished) item.status = "success";
-        } else if (item.val === "diagnose") {
-          if (this[item.storeName]) item.status = "success";
-        } else {
-          if (this[item.storeName] && this[item.storeName].length)
-            item.status = "success";
-        }
-        return item;
-      });
-
-      const nextStep = this.steps.findIndex(item => item.status !== "success");
-      if (nextStep > -1 && this.steps[nextStep].status === "wait") {
-        this.curStep = nextStep;
-        this.steps[this.curStep].status = "process";
-      }
-
-      this.steps.forEach(item => {
-        item.disabled = item.status === "wait";
-      });
-    },
-    changeStep(ind) {
-      if (ind === this.curStep) return;
-      this.curStep = ind;
-    },
-    modified() {
-      if (
-        this.curStep === this.steps.length - 1 &&
-        this.steps[this.curStep].status === "process"
-      ) {
-        this.cancel();
-        return;
-      }
-
-      this[this.steps[this.curStep].fetchFunc]();
-      this.steps[this.curStep].status = "success";
-      if (
-        this.curStep !== this.steps.length - 1 &&
-        this.steps[this.curStep + 1].status === "wait"
-      ) {
-        this.curStep += 1;
-        this.steps[this.curStep].status = "process";
-      }
-
-      this.steps.forEach(item => {
-        item.disabled = item.status === "wait";
-      });
-    }
-  }
-};
-</script>

+ 0 - 331
src/modules/analysis/components/SelectAnalysisPaper.vue

@@ -1,331 +0,0 @@
-<template>
-  <el-dialog
-    class="select-analysis-paper page-dialog"
-    :visible.sync="modalIsShow"
-    title="选择分析试卷"
-    top="10px"
-    width="80%"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @opened="visibleChange"
-  >
-    <div class="part-box part-box-filter part-box-flex">
-      <el-form ref="FilterForm" label-position="left" label-width="55px" inline>
-        <el-form-item label="考试:">
-          <exam-select
-            v-model="filter.examId"
-            :semester-id="filter.semesterId"
-            placeholder="考试"
-            @change="examChange"
-          ></exam-select>
-        </el-form-item>
-        <el-form-item label="学院:">
-          <!-- <college-select
-            v-model="filter.collegeId"
-            placeholder="学院"
-          ></college-select> -->
-          <el-select
-            v-model="filter.collegeId"
-            class="college-select"
-            placeholder="学院"
-            filterable
-            clearable
-          >
-            <el-option
-              v-for="item in collegeList"
-              :key="item.id"
-              :value="item.id"
-              :label="item.name"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="课程:">
-          <course-select
-            v-model="filter.courseCode"
-            placeholder="课程"
-          ></course-select>
-        </el-form-item>
-        <el-form-item>
-          <el-input
-            v-model="filter.teacherName"
-            placeholder="请输入命题老师姓名"
-          ></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" :disabled="!filter.examId" @click="search"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-    </div>
-
-    <div class="mb-4 tab-btns">
-      <el-button
-        v-for="tab in tabs"
-        :key="tab.val"
-        size="medium"
-        :type="curTab == tab.val ? 'primary' : 'default'"
-        @click="selectMenu(tab.val)"
-        >{{ tab.name }}
-        <span v-if="tab.val === 'selected'">({{ selectedPapers.length }})</span>
-      </el-button>
-    </div>
-
-    <div v-if="curTab === 'query'" class="part-box part-box-pad">
-      <el-table
-        ref="TableList"
-        :data="dataList"
-        key="query"
-        @select="handleSelectionChange"
-        @select-all="handleSelectionChange"
-      >
-        <el-table-column
-          type="selection"
-          width="55"
-          align="center"
-        ></el-table-column>
-        <el-table-column prop="semesterName" label="学期"></el-table-column>
-        <el-table-column prop="examName" label="考试"> </el-table-column>
-        <el-table-column prop="courseCode" label="课程(代码)" min-width="120">
-          <span slot-scope="scope">
-            {{ scope.row.courseName }}({{ scope.row.courseCode }})
-          </span>
-        </el-table-column>
-        <el-table-column prop="teachCollegeName" label="开课学院">
-        </el-table-column>
-        <el-table-column prop="teacherName" label="命题老师"> </el-table-column>
-        <el-table-column prop="paperNumber" label="试卷编号"> </el-table-column>
-        <el-table-column prop="paperType" label="试卷类型" width="80">
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-    <div v-else class="part-box part-box-pad">
-      <el-table ref="SelectedTableList" key="select" :data="selectedPapers">
-        <el-table-column prop="semesterName" label="学期"></el-table-column>
-        <el-table-column prop="examName" label="考试"> </el-table-column>
-        <el-table-column prop="courseCode" label="课程(代码)" min-width="120">
-          <span slot-scope="scope">
-            {{ scope.row.courseName }}({{ scope.row.courseCode }})
-          </span>
-        </el-table-column>
-        <el-table-column prop="teachCollegeName" label="开课学院">
-        </el-table-column>
-        <el-table-column prop="teacherName" label="命题老师"> </el-table-column>
-        <el-table-column prop="paperNumber" label="试卷编号"> </el-table-column>
-        <el-table-column prop="paperType" label="试卷类型" width="80">
-        </el-table-column>
-        <el-table-column
-          class-name="action-column"
-          label="操作"
-          width="80px"
-          align="center"
-        >
-          <template slot-scope="scope">
-            <el-button
-              class="btn-danger"
-              type="text"
-              @click="toDelete(scope.row)"
-              >删除</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-
-    <div slot="footer">
-      <el-button type="primary" :loading="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button type="danger" @click="cancel" plain>取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { teachCollegeList } from "../../base/api";
-import { analysisPaperList, addAnalysisBatchPaper } from "../api";
-const initFilter = {
-  batchId: "",
-  semesterId: "",
-  examId: "",
-  collegeId: "",
-  courseCode: "",
-  teacherName: ""
-};
-
-export default {
-  name: "select-analysis-paper",
-  props: {
-    batch: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      filter: {
-        ...initFilter
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      curTab: "query",
-      tabs: [
-        {
-          name: "列表",
-          val: "query"
-        },
-        {
-          name: "已选",
-          val: "selected"
-        }
-      ],
-      collegeList: [],
-      searchList: [],
-      dataList: [],
-      selectedPapers: [],
-      selectedPaperIds: [],
-      isSubmit: false
-    };
-  },
-  methods: {
-    visibleChange() {
-      this.curTab = "query";
-      this.selectedPapers = [];
-      this.selectedPaperIds = [];
-      this.filter = Object.assign({}, initFilter, {
-        batchId: this.batch.id,
-        semesterId: this.batch.semesterId
-      });
-      this.$nextTick(() => this.changeCurListSelect());
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    examChange() {
-      this.filter.collegeId = "";
-      this.collegeList = [];
-      this.getCollegeList();
-    },
-    async getCollegeList() {
-      const data = await teachCollegeList(this.filter.examId);
-      this.collegeList = data || [];
-    },
-    async search() {
-      const datas = {
-        ...this.filter
-      };
-      const data = await analysisPaperList(datas);
-      this.searchList = data.map(item => {
-        item.id = `${item.paperNumber}-${item.paperType}`;
-        return item;
-      });
-      this.total = data.length;
-      this.toPage(1);
-    },
-    changeCurListSelect() {
-      this.dataList.forEach(row => {
-        if (this.selectedPaperIds.includes(row.id)) {
-          this.$refs.TableList.toggleRowSelection(row, true);
-        } else {
-          this.$refs.TableList.toggleRowSelection(row, false);
-        }
-      });
-    },
-    getList() {
-      this.dataList = this.searchList
-        .slice((this.current - 1) * this.size, this.current * this.size)
-        .map(item => {
-          return { ...item };
-        });
-      if (this.curTab === "query") {
-        this.$nextTick(() => this.changeCurListSelect());
-      }
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    selectMenu(tab) {
-      this.curTab = tab;
-      if (this.curTab === "query") {
-        this.$nextTick(() => this.changeCurListSelect());
-      }
-    },
-    toDelete(row) {
-      this.selectedPapers = this.selectedPapers.filter(
-        item => item.id !== row.id
-      );
-      this.updateSelectedIds();
-    },
-    updateSelectedIds() {
-      this.selectedPaperIds = this.selectedPapers.map(item => item.id);
-    },
-    handleSelectionChange(selection) {
-      // console.log(selection);
-      const seletedIds = selection.map(item => item.id);
-      this.dataList.forEach(item => {
-        const isSelected = seletedIds.includes(item.id);
-        if (isSelected) {
-          if (this.selectedPaperIds.includes(item.id)) return;
-          this.selectedPapers.push({ ...item });
-        } else {
-          if (!this.selectedPaperIds.includes(item.id)) return;
-          const pos = this.selectedPapers.findIndex(p => p.id === item.id);
-          this.selectedPapers.splice(pos, 1);
-        }
-      });
-      this.updateSelectedIds();
-    },
-    async submit() {
-      if (!this.selectedPapers.length) {
-        this.$message.error("请选择试卷");
-        return;
-      }
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-
-      const ableAnalyzePaperList = this.selectedPapers.map(item => {
-        return {
-          teachCollegeName: item.teachCollegeName,
-          paperName: item.paperName,
-          teachCollegeId: item.teachCollegeId,
-          paperType: item.paperType,
-          paperNumber: item.paperNumber
-        };
-      });
-
-      const res = await addAnalysisBatchPaper({
-        batchId: this.batch.id,
-        ableAnalyzePaperList
-      }).catch(() => {});
-      this.isSubmit = false;
-      if (!res) return;
-
-      this.$message.success("添加成功!");
-      this.cancel();
-      this.$emit("modified");
-    }
-  }
-};
-</script>

+ 0 - 290
src/modules/analysis/components/baseConfig/BlueprintConfig.vue

@@ -1,290 +0,0 @@
-<template>
-  <div class="blueprint-config">
-    <div class="mb-4 box-justify">
-      <el-button type="success" @click="toImport">导入</el-button>
-      <el-button
-        v-if="baseInfo.structureChange"
-        type="primary"
-        :loading="updating"
-        @click="toUpdateExamCloudStruct"
-        >更新试卷结构</el-button
-      >
-    </div>
-
-    <div class="part-box part-box-border-bold">
-      <el-table ref="TableList" :data="dataList">
-        <el-table-column prop="courseCode" label="课程代码"></el-table-column>
-        <el-table-column prop="courseName" label="课程名称"> </el-table-column>
-        <el-table-column prop="paperNumber" label="试卷编号"> </el-table-column>
-        <el-table-column prop="bigQuestionNumber" label="大题号" width="80">
-        </el-table-column>
-        <el-table-column prop="smallQuestionNumber" label="小题号" width="80">
-        </el-table-column>
-        <el-table-column prop="bigTopicName" label="题目类型" width="100">
-        </el-table-column>
-        <el-table-column prop="fullScore" label="题目满分" width="80">
-        </el-table-column>
-        <el-table-column prop="knowledgeDimension" label="知识模块" width="260">
-          <template slot-scope="scope">
-            <el-select
-              v-model="scope.row.knowledgeDimension"
-              placeholder="请选择"
-              filterable
-              clearable
-              multiple
-            >
-              <el-option
-                v-for="item in knowledgeList"
-                :key="item.code"
-                :value="item.code"
-                :label="item.code"
-              >
-                {{ item.code }}({{ item.name }})
-              </el-option>
-            </el-select>
-          </template>
-        </el-table-column>
-        <el-table-column prop="abilityDimension" label="能力模块" width="260">
-          <template slot-scope="scope">
-            <el-select
-              v-model="scope.row.abilityDimension"
-              placeholder="请选择"
-              filterable
-              clearable
-              multiple
-            >
-              <el-option
-                v-for="item in abilityList"
-                :key="item.code"
-                :value="item.code"
-                :label="item.code"
-              >
-                {{ item.code }}({{ item.name }})
-              </el-option>
-            </el-select>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-
-    <div class="config-footer">
-      <el-button
-        class="width-200"
-        type="primary"
-        :loading="loading"
-        @click="toSubmit"
-        >保存</el-button
-      >
-    </div>
-
-    <import-file
-      ref="ImportFile"
-      title="上传文件"
-      :upload-url="uploadUrl"
-      :upload-data="uploadData"
-      :download-handle="downloadHandle"
-      download-filename="命题蓝图模板"
-      :format="['xls', 'xlsx']"
-      @upload-success="fileUploaded"
-    >
-    </import-file>
-  </div>
-</template>
-
-<script>
-import { mapState, mapMutations, mapActions } from "vuex";
-import ImportFile from "@/components/ImportFile";
-import {
-  updatePaperStruct,
-  paperStructExport,
-  syncPaperStruct
-} from "../../api";
-import { downloadByApi } from "@/plugins/download";
-
-export default {
-  name: "blueprint-config",
-  components: { ImportFile },
-  data() {
-    return {
-      dataList: [],
-      knowledgeList: [],
-      abilityList: [],
-      loading: false,
-      updating: false,
-      // upload
-      uploadUrl: "/api/admin/grade/paper/struct/import",
-      uploadData: {},
-      downloading: false
-    };
-  },
-  computed: {
-    ...mapState("baseConfigs", ["dimensionList", "structList", "baseInfo"])
-  },
-  created() {
-    this.initDimensions();
-    this.initData();
-  },
-  methods: {
-    ...mapMutations("baseConfigs", ["setBaseInfo"]),
-    ...mapActions("baseConfigs", ["fetchStructList"]),
-    initDimensions() {
-      this.knowledgeList = this.dimensionList
-        .filter(item => item.dimensionType === "KNOWLEDGE")
-        .map(item => {
-          return {
-            name: item.nameSecond,
-            code: item.codeSecond
-          };
-        });
-      this.abilityList = this.dimensionList
-        .filter(item => item.dimensionType === "ABILITY")
-        .map(item => {
-          return {
-            name: item.namePrimary,
-            code: item.codePrimary
-          };
-        });
-    },
-    initData() {
-      const knowledgeCodes = this.knowledgeList.map(item => item.code);
-      const abilityCodes = this.abilityList.map(item => item.code);
-      this.dataList = this.structList.map(item => {
-        let nitem = { ...item };
-        let knowledgeDimension = (item.knowledgeDimension || "").split(",");
-        if (knowledgeDimension.length) {
-          knowledgeDimension = knowledgeDimension.filter(item =>
-            knowledgeCodes.includes(item)
-          );
-        }
-        nitem.knowledgeDimension = knowledgeDimension;
-
-        let abilityDimension = (item.abilityDimension || "").split(",");
-        if (abilityDimension.length) {
-          abilityDimension = abilityDimension.filter(item =>
-            abilityCodes.includes(item)
-          );
-        }
-        nitem.abilityDimension = abilityDimension;
-
-        return nitem;
-      });
-      this.uploadData = {
-        paperNumber: this.baseInfo.paperNumber,
-        paperType: this.baseInfo.paperType,
-        paperName: this.baseInfo.paperName
-      };
-    },
-    toImport() {
-      this.$refs.ImportFile.open();
-    },
-    async toUpdateExamCloudStruct() {
-      const confirm = await this.$confirm(
-        `云阅卷试卷结构和本页面设置的试卷结构不一致,请重新设置,重新设置会清除该页面之前设置过的试卷结构参数!`,
-        "提示",
-        {
-          type: "warning"
-        }
-      ).catch(() => {});
-      if (confirm !== "confirm") return;
-
-      if (this.updating) return;
-      this.updating = true;
-
-      const res = await syncPaperStruct({
-        paperNumber: this.baseInfo.paperNumber,
-        paperType: this.baseInfo.paperType
-      }).catch(() => {});
-      this.updating = false;
-      if (!res) return;
-
-      this.setBaseInfo({ ...this.baseInfo, structureChange: false });
-      await this.fetchStructList();
-      this.initData();
-    },
-    async downloadHandle() {
-      if (this.downloading) return;
-      this.downloading = true;
-
-      const res = await downloadByApi(() => {
-        let datas = {
-          paperNumber: this.baseInfo.paperNumber,
-          paperType: this.baseInfo.paperType
-        };
-        return paperStructExport(datas);
-      }).catch(e => {
-        this.$message.error(e || "下载失败,请重新尝试!");
-      });
-      this.downloading = false;
-
-      if (!res) return;
-      this.$message.success("下载成功!");
-    },
-    async fileUploaded() {
-      this.$message.success("导入成功!");
-      await this.fetchStructList();
-      this.initData();
-    },
-    checkData() {
-      let errMsg = [];
-      const needCheckAbility = !!this.abilityList.length;
-      this.dataList.forEach(item => {
-        let names = [];
-        if (!item.knowledgeDimension.length) names.push("知识模块");
-        if (!item.abilityDimension.length && needCheckAbility)
-          names.push("能力模块");
-
-        if (names.length) {
-          errMsg.push(
-            `第${item.bigQuestionNumber}大题、第${
-              item.smallQuestionNumber
-            }小题${names.join("和")}未选择`
-          );
-        }
-      });
-
-      if (errMsg.length) {
-        if (errMsg.length > 5) {
-          this.$message.error("未选择模块的小题数过多!");
-        } else {
-          this.$message.error(errMsg.join("。"));
-        }
-        return false;
-      }
-
-      return true;
-    },
-    async toSubmit() {
-      if (!this.checkData()) return;
-
-      if (this.loading) return;
-      this.loading = true;
-      const datasource = this.dataList.map(item => {
-        let nitem = { ...item };
-        nitem.knowledgeDimension = item.knowledgeDimension.join();
-        nitem.abilityDimension = item.abilityDimension.join();
-        return nitem;
-      });
-      const datas = {
-        datasource,
-        paperNumber: this.baseInfo.paperNumber,
-        paperName: this.baseInfo.paperName,
-        paperType: this.baseInfo.paperType
-      };
-      let errorInfo = null;
-      await updatePaperStruct(datas).catch(error => {
-        errorInfo = error;
-      });
-      this.loading = false;
-      if (errorInfo) {
-        if (errorInfo.code == 5100003) {
-          this.toUpdateExamCloudStruct();
-          return;
-        }
-      } else {
-        this.$message.success("保存成功!");
-        this.$emit("modified");
-      }
-    }
-  }
-};
-</script>

+ 0 - 118
src/modules/analysis/components/baseConfig/CommentAbility.vue

@@ -1,118 +0,0 @@
-<template>
-  <div class="comment-ability">
-    <el-table ref="TableList" :data="dataList">
-      <el-table-column
-        prop="levelCode"
-        label="等级"
-        width="60"
-      ></el-table-column>
-      <el-table-column label="划分规划" width="310">
-        <div
-          slot-scope="scope"
-          :class="[
-            'rate-input',
-            { 'rate-input-offset-left': scope.$index === dataList.length - 1 }
-          ]"
-        >
-          <el-input-number
-            v-if="scope.$index !== dataList.length - 1"
-            v-model="scope.row.startRate"
-            placeholder="请输入"
-            :min="0"
-            :max="100"
-            :step="1"
-            step-strictly
-            size="small"
-            :controls="false"
-            @change="rateChange"
-          ></el-input-number>
-          <span v-if="scope.$index !== dataList.length - 1">≤</span>
-          <span>百分位等级TOP</span>
-          <span><</span>
-          <el-input-number
-            v-model="scope.row.endRate"
-            placeholder="请输入"
-            :min="0"
-            :max="100"
-            :step="1"
-            step-strictly
-            size="small"
-            :controls="false"
-            @change="rateChange"
-          ></el-input-number>
-        </div>
-      </el-table-column>
-      <el-table-column
-        prop="levelName"
-        label="水平层次"
-        width="140"
-      ></el-table-column>
-      <el-table-column prop="result" label="诊断结果"></el-table-column>
-      <el-table-column prop="advice" label="学习建议"></el-table-column>
-      <el-table-column
-        class-name="action-column"
-        label="操作"
-        width="80px"
-        align="center"
-      >
-        <template slot-scope="scope">
-          <el-button class="btn-primary" type="text" @click="toEdit(scope.row)"
-            >编辑</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <!-- ModifyAbilityComment -->
-    <modify-ability-comment
-      ref="ModifyAbilityComment"
-      :instance="curRow"
-      @modified="modified"
-    ></modify-ability-comment>
-  </div>
-</template>
-
-<script>
-import ModifyAbilityComment from "./ModifyAbilityComment.vue";
-
-export default {
-  name: "comment-ability",
-  components: { ModifyAbilityComment },
-  props: {
-    rates: {
-      type: Array,
-      default() {
-        return [];
-      }
-    }
-  },
-  data() {
-    return {
-      dataList: [],
-      curRow: {}
-    };
-  },
-  mounted() {
-    this.dataList = this.rates.map(item => {
-      return { ...item };
-    });
-  },
-  methods: {
-    toEdit(row) {
-      this.curRow = row;
-      this.$refs.ModifyAbilityComment.open();
-    },
-    modified(data) {
-      const ind = this.dataList.findIndex(
-        item => item.levelCode === data.levelCode
-      );
-      const row = this.$objAssign(this.dataList[ind], data);
-      this.dataList.splice(ind, 1, row);
-      this.rateChange();
-    },
-    rateChange() {
-      this.$emit("data-change", this.dataList);
-    }
-  }
-};
-</script>

+ 0 - 255
src/modules/analysis/components/baseConfig/CommentConfig.vue

@@ -1,255 +0,0 @@
-<template>
-  <div class="comment-config">
-    <div class="mb-4 tab-btns">
-      <el-button
-        v-for="tab in tabs"
-        :key="tab.val"
-        size="medium"
-        :type="curTab == tab.val ? 'primary' : 'default'"
-        @click="selectMenu(tab.val)"
-        >{{ tab.name }}
-      </el-button>
-    </div>
-
-    <component
-      :is="compName"
-      :rates="curRates"
-      @data-change="dataChange"
-    ></component>
-    <p v-if="errorMsg" class="tips-info tips-error">{{ errorMsg }}</p>
-
-    <div class="config-footer">
-      <el-button
-        class="width-200"
-        type="primary"
-        :loading="loading"
-        @click="toSubmit"
-        >保存</el-button
-      >
-    </div>
-  </div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-import CommentKnowledge from "./CommentKnowledge.vue";
-import CommentAbility from "./CommentAbility.vue";
-import { initKnowledgeList, initAbilityList } from "./defaultComment";
-import { updateModuleEvaluation } from "../../api";
-
-export default {
-  name: "comment-config",
-  components: { CommentKnowledge, CommentAbility },
-  data() {
-    return {
-      curTab: "knowledge",
-      tabs: [
-        {
-          name: "知识维度",
-          val: "knowledge"
-        },
-        {
-          name: "能力维度",
-          val: "ability"
-        }
-      ],
-      loading: false,
-      knowledgeList: [],
-      abilityList: [],
-      errorMsg: ""
-    };
-  },
-  computed: {
-    ...mapState("baseConfigs", ["evaluationList", "baseInfo"]),
-    compName() {
-      return `comment-${this.curTab}`;
-    },
-    curRates() {
-      return this.curTab === "knowledge"
-        ? this.knowledgeList
-        : this.abilityList;
-    }
-  },
-  created() {
-    this.initData();
-  },
-  methods: {
-    initData() {
-      this.parseKnowledgeList();
-      this.parseAbilityList();
-    },
-    parseKnowledgeList() {
-      const rateList = this.evaluationList.filter(
-        item => item.moduleType === "KNOWLEDGE"
-      );
-      if (rateList.length) {
-        this.knowledgeList = rateList.map(item => {
-          return {
-            levelCode: item.levelCode,
-            levelName: item.levelName,
-            result: item.result,
-            advice: item.advice,
-            startRate: Math.floor(item.min * 100),
-            endRate: Math.floor(item.max * 100)
-          };
-        });
-      } else {
-        this.knowledgeList = initKnowledgeList.map(item => {
-          return { ...item };
-        });
-      }
-    },
-    parseAbilityList() {
-      const rateList = this.evaluationList.filter(
-        item => item.moduleType === "ABILITY"
-      );
-      if (rateList.length) {
-        this.abilityList = rateList.map(item => {
-          return {
-            levelCode: item.levelCode,
-            levelName: item.levelName,
-            result: item.result,
-            advice: item.advice,
-            startRate: item.min * 1,
-            endRate: item.max * 1
-          };
-        });
-      } else {
-        this.abilityList = initAbilityList.map(item => {
-          return { ...item };
-        });
-      }
-    },
-    selectMenu(tab) {
-      this.curTab = tab;
-    },
-    dataChange(data) {
-      if (this.curTab === "knowledge") {
-        this.knowledgeList = data;
-      } else {
-        this.abilityList = data;
-      }
-      this.checkData();
-    },
-    checkData() {
-      this.errorMsg = "";
-      return this.checkKnowledgeList() && this.checkAbilityList();
-    },
-    checkKnowledgeList() {
-      const isEmpty = num => !num && num !== 0;
-
-      if (
-        this.knowledgeList.some(
-          item => isEmpty(item.startRate) || isEmpty(item.endRate)
-        )
-      ) {
-        this.errorMsg = "请完成知识维度划分规则";
-        return;
-      }
-
-      for (let i = 0; i < this.knowledgeList.length; i++) {
-        const item = this.knowledgeList[i];
-        if (i) {
-          const prevItem = this.knowledgeList[i - 1];
-          if (prevItem.startRate !== item.endRate) {
-            this.errorMsg = "请保证知识维度划分规则区间连续";
-            return;
-          }
-        }
-      }
-
-      return true;
-    },
-    checkAbilityList() {
-      const isEmpty = num => !num && num !== 0;
-
-      if (
-        this.abilityList.some(
-          item => isEmpty(item.startRate) || isEmpty(item.endRate)
-        )
-      ) {
-        this.errorMsg = "请完成能力维度划分规则";
-        return;
-      }
-
-      for (let i = 0; i < this.abilityList.length; i++) {
-        const item = this.abilityList[i];
-        if (i) {
-          const prevItem = this.abilityList[i - 1];
-          if (prevItem.startRate !== item.endRate) {
-            this.errorMsg = "请保证能力维度划分规则区间连续";
-            return;
-          }
-        }
-      }
-
-      return true;
-    },
-    getData() {
-      let data = [];
-      this.knowledgeList.forEach(item => {
-        const min = item.startRate / 100;
-        const max = item.endRate / 100;
-        let scopeStr = "";
-        if (item.endRate === 100) {
-          scopeStr = `[${min},${max}]`;
-        } else if (item.startRate === 0) {
-          scopeStr = `[${min},${max})`;
-        } else {
-          scopeStr = `[${min},${max})`;
-        }
-
-        data.push({
-          advice: item.advice,
-          formula: "PERSONAL_SCORE_RATE",
-          scope: scopeStr,
-          result: item.result,
-          levelCode: item.levelCode,
-          moduleType: "KNOWLEDGE",
-          levelName: item.levelName
-        });
-      });
-
-      this.abilityList.forEach(item => {
-        let scopeStr = "";
-        if (item.levelCode === "A") {
-          scopeStr = `[${item.startRate},${item.endRate}]`;
-        } else if (item.startRate === 0) {
-          scopeStr = `[${item.startRate},${item.endRate})`;
-        } else {
-          scopeStr = `[${item.startRate},${item.endRate})`;
-        }
-
-        data.push({
-          advice: item.advice,
-          formula: "PERCENTILE_RANK",
-          scope: scopeStr,
-          result: item.result,
-          levelCode: item.levelCode,
-          moduleType: "ABILITY",
-          levelName: item.levelName
-        });
-      });
-
-      return data;
-    },
-    async toSubmit() {
-      if (!this.checkData()) return;
-
-      if (this.loading) return;
-      this.loading = true;
-      const gradeModuleEvaluationDatasourceList = this.getData();
-      const data = await updateModuleEvaluation({
-        paperNumber: this.baseInfo.paperNumber,
-        paperName: this.baseInfo.paperName,
-        paperType: this.baseInfo.paperType,
-        gradeModuleEvaluationDatasourceList
-      }).catch(() => {});
-      this.loading = false;
-      if (!data) return;
-      this.$message.success("保存成功!");
-      this.$emit("modified");
-    }
-  }
-};
-</script>

+ 0 - 118
src/modules/analysis/components/baseConfig/CommentKnowledge.vue

@@ -1,118 +0,0 @@
-<template>
-  <div class="comment-knowledge">
-    <el-table ref="TableList" :data="dataList">
-      <el-table-column
-        prop="levelCode"
-        label="等级"
-        width="60"
-      ></el-table-column>
-      <el-table-column label="划分规划" width="280">
-        <div
-          slot-scope="scope"
-          :class="[
-            'rate-input',
-            { 'rate-input-offset-left': scope.$index === dataList.length - 1 }
-          ]"
-        >
-          <el-input-number
-            v-if="scope.$index !== dataList.length - 1"
-            v-model="scope.row.startRate"
-            placeholder="请输入"
-            :min="0"
-            :max="100"
-            :step="1"
-            step-strictly
-            size="small"
-            :controls="false"
-            @change="rateChange"
-          ></el-input-number>
-          <span v-if="scope.$index !== dataList.length - 1">≤</span>
-          <span>个人得分率</span>
-          <span v-if="scope.$index !== 0"><</span>
-          <el-input-number
-            v-if="scope.$index !== 0"
-            v-model="scope.row.endRate"
-            placeholder="请输入"
-            :min="0"
-            :max="100"
-            :step="1"
-            step-strictly
-            size="small"
-            :controls="false"
-            @change="rateChange"
-          ></el-input-number>
-        </div>
-      </el-table-column>
-      <el-table-column
-        prop="levelName"
-        label="水平层次"
-        width="140"
-      ></el-table-column>
-      <el-table-column prop="result" label="诊断结果"></el-table-column>
-      <el-table-column prop="advice" label="学习建议"></el-table-column>
-      <el-table-column
-        class-name="action-column"
-        label="操作"
-        width="80px"
-        align="center"
-      >
-        <template slot-scope="scope">
-          <el-button class="btn-primary" type="text" @click="toEdit(scope.row)"
-            >编辑</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
-    <!-- ModifyKnowledgeComment -->
-    <modify-knowledge-comment
-      ref="ModifyKnowledgeComment"
-      :instance="curRow"
-      @modified="modified"
-    ></modify-knowledge-comment>
-  </div>
-</template>
-
-<script>
-import ModifyKnowledgeComment from "./ModifyKnowledgeComment.vue";
-
-export default {
-  name: "comment-knowledge",
-  components: { ModifyKnowledgeComment },
-  props: {
-    rates: {
-      type: Array,
-      default() {
-        return [];
-      }
-    }
-  },
-  data() {
-    return {
-      dataList: [],
-      curRow: {}
-    };
-  },
-  mounted() {
-    this.dataList = this.rates.map(item => {
-      return { ...item };
-    });
-  },
-  methods: {
-    toEdit(row) {
-      this.curRow = row;
-      this.$refs.ModifyKnowledgeComment.open();
-    },
-    modified(data) {
-      const ind = this.dataList.findIndex(
-        item => item.levelCode === data.levelCode
-      );
-      const row = this.$objAssign(this.dataList[ind], data);
-      this.dataList.splice(ind, 1, row);
-      this.rateChange();
-    },
-    rateChange() {
-      this.$emit("data-change", this.dataList);
-    }
-  }
-};
-</script>

+ 0 - 277
src/modules/analysis/components/baseConfig/DiagnoseConfig.vue

@@ -1,277 +0,0 @@
-<template>
-  <div class="diagnose-config">
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      label-width="180px"
-    >
-      <el-form-item prop="knowledgeInterpret" label="知识:">
-        <el-input
-          v-model.trim="modalForm.knowledgeInterpret"
-          placeholder="知识"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item
-        prop="gradeModuleDefineParamList"
-        label="二级维度的精熟度定义:"
-      >
-        <div class="part-box part-box-pad part-box-border-bold">
-          <proficiency-edit
-            :rates="modalForm.gradeModuleDefineParamList"
-            @data-change="paramChange"
-          ></proficiency-edit>
-        </div>
-      </el-form-item>
-      <el-form-item prop="abilityInterpret" label="能力:">
-        <el-input
-          v-model.trim="modalForm.abilityInterpret"
-          placeholder="能力"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="totalScore" label="满分:">
-        <el-input-number
-          v-model="modalForm.totalScore"
-          placeholder="请输入满分,如100"
-          :min="1"
-          :max="9999"
-          :step="1"
-          step-strictly
-          :controls="false"
-        ></el-input-number>
-        <p class="tips-info">
-          说明:若显示赋分,则填写赋分满分分值,否则填写卷面原始分满分分值。
-        </p>
-      </el-form-item>
-      <el-form-item prop="passScore" label="及格分:">
-        <el-input-number
-          v-model="modalForm.passScore"
-          placeholder="请输入及格分,如60"
-          :min="1"
-          :max="9999"
-          :step="1"
-          step-strictly
-          :controls="false"
-        ></el-input-number>
-        <p class="tips-info">
-          说明:成绩分数≥及格分数线,报告中的结果显示“通过”,否则为“不通过”。
-        </p>
-      </el-form-item>
-    </el-form>
-
-    <div class="config-footer">
-      <el-button
-        class="width-200"
-        type="primary"
-        :loading="loading"
-        @click="toSubmit"
-        >保存</el-button
-      >
-    </div>
-  </div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-import ProficiencyEdit from "./ProficiencyEdit.vue";
-import { updatePaperDefine } from "../../api";
-import { calcSum, deepCopy } from "@/plugins/utils";
-
-const initModalForm = {
-  knowledgeInterpret: "课程标准规定的学科内容",
-  abilityInterpret: "经学习与训练内化而成的心理结构",
-  totalScore: 0,
-  passScore: 0,
-  gradeModuleDefineParamList: [
-    {
-      level: "A",
-      title: "熟练掌握",
-      startRate: 90,
-      endRate: 100
-    },
-    {
-      level: "B",
-      title: "较好掌握",
-      startRate: 75,
-      endRate: 90
-    },
-    {
-      level: "C",
-      title: "基本掌握",
-      startRate: 55,
-      endRate: 75
-    },
-    {
-      level: "D",
-      title: "部分掌握",
-      startRate: 40,
-      endRate: 55
-    },
-    {
-      level: "E",
-      title: "没有掌握,需从头再学",
-      startRate: 0,
-      endRate: 40
-    }
-  ]
-};
-
-export default {
-  name: "diagnose-config",
-  components: { ProficiencyEdit },
-  data() {
-    const isEmpty = num => !num && num !== 0;
-
-    const rateSetValidator = (rule, value, callback) => {
-      if (
-        value.some(item => isEmpty(item.startRate) || isEmpty(item.endRate))
-      ) {
-        return callback(new Error("请完成精熟度定义"));
-      }
-
-      for (let i = 0; i < value.length; i++) {
-        const item = value[i];
-        if (i) {
-          const prevItem = value[i - 1];
-          if (prevItem.startRate !== item.endRate)
-            return callback(new Error("请保证区间连续"));
-        }
-      }
-
-      callback();
-    };
-    return {
-      modalForm: { ...initModalForm },
-      rules: {
-        knowledgeInterpret: [
-          {
-            required: true,
-            message: "请输入知识",
-            trigger: "change"
-          },
-          {
-            max: 100,
-            message: "知识字数不能超过100",
-            trigger: "change"
-          }
-        ],
-        abilityInterpret: [
-          {
-            required: true,
-            message: "请输入能力",
-            trigger: "change"
-          },
-          {
-            max: 100,
-            message: "能力字数不能超过100",
-            trigger: "change"
-          }
-        ],
-        totalScore: [
-          {
-            required: true,
-            message: "请输入满分",
-            trigger: "change"
-          }
-        ],
-        passScore: [
-          {
-            required: true,
-            message: "请输入及格分",
-            trigger: "change"
-          }
-        ],
-        gradeModuleDefineParamList: [
-          {
-            validator: rateSetValidator,
-            trigger: "change"
-          }
-        ]
-      },
-      loading: false
-    };
-  },
-  computed: {
-    ...mapState("baseConfigs", ["defineList", "structList", "baseInfo"])
-  },
-  created() {
-    this.initData();
-  },
-  methods: {
-    initData() {
-      if (this.defineList) {
-        this.modalForm = this.$objAssign(initModalForm, this.defineList);
-        this.modalForm.gradeModuleDefineParamList = this.defineList.gradeModuleKnowledgeDefineParamList.map(
-          item => {
-            return {
-              level: item.level,
-              title: item.define.split(":")[0],
-              startRate: Math.floor(item.min * 100),
-              endRate: Math.floor(item.max * 100)
-            };
-          }
-        );
-      } else {
-        this.modalForm = deepCopy(initModalForm);
-      }
-      if (!this.modalForm.totalScore) {
-        this.modalForm.totalScore = calcSum(
-          this.structList.map(item => item.fullScore)
-        );
-
-        this.modalForm.passScore = Math.floor(this.modalForm.totalScore * 0.6);
-      }
-    },
-    paramChange(data) {
-      this.modalForm.gradeModuleDefineParamList = data;
-      this.$refs.modalFormComp.validateField("gradeModuleDefineParamList");
-    },
-    async toSubmit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.loading) return;
-      this.loading = true;
-      const datas = {
-        ...this.modalForm,
-        paperNumber: this.baseInfo.paperNumber,
-        paperName: this.baseInfo.paperName,
-        paperType: this.baseInfo.paperType
-      };
-      datas.gradeModuleDefineParamList = this.modalForm.gradeModuleDefineParamList.map(
-        item => {
-          const min = item.startRate / 100;
-          const max = item.endRate / 100;
-          let scopeStr = "",
-            defineStr = "";
-          if (item.endRate === 100) {
-            scopeStr = `[${min},${max}]`;
-            defineStr = `${item.title}:个人得分率≥${item.startRate}%`;
-          } else if (item.min === 0) {
-            scopeStr = `[${min},${max})`;
-            defineStr = `${item.title}:个人得分率<${item.endRate}%`;
-          } else {
-            scopeStr = `[${min},${max})`;
-            defineStr = `${item.title}:${item.startRate}%≤个人得分率<${item.endRate}%`;
-          }
-
-          return {
-            level: item.level,
-            min,
-            max,
-            scope: scopeStr,
-            define: defineStr
-          };
-        }
-      );
-      const data = await updatePaperDefine(datas).catch(() => {});
-      this.loading = false;
-      if (!data) return;
-      this.$message.success("保存成功!");
-      this.$emit("modified");
-    }
-  }
-};
-</script>

+ 0 - 223
src/modules/analysis/components/baseConfig/DimensionAbilityList.vue

@@ -1,223 +0,0 @@
-<template>
-  <div class="dimension-ability-list">
-    <div class="mb-4 box-justify">
-      <el-button type="success" @click="toImport">导入</el-button>
-      <el-button type="primary" @click="toAdd">新增</el-button>
-    </div>
-
-    <div class="part-box part-box-border-bold dimension-table">
-      <el-table ref="TableList" :data="dataList">
-        <el-table-column prop="courseCode" label="课程代码"></el-table-column>
-        <el-table-column prop="courseName" label="课程名称"> </el-table-column>
-        <el-table-column prop="namePrimary" label="一级能力维度">
-        </el-table-column>
-        <el-table-column prop="codePrimary" label="一级维度编号" width="110">
-        </el-table-column>
-        <el-table-column prop="interpretation" label="一级维度术语解释">
-        </el-table-column>
-        <el-table-column
-          class-name="action-column"
-          label="操作"
-          width="180px"
-          align="center"
-        >
-          <template slot-scope="scope">
-            <el-button
-              class="btn-primary"
-              type="text"
-              :disabled="loading"
-              @click="toEdit(scope.row)"
-              >编辑</el-button
-            >
-            <el-button
-              class="btn-danger"
-              type="text"
-              :disabled="loading"
-              @click="toDelete(scope)"
-              >删除</el-button
-            >
-            <el-button
-              class="btn-primary"
-              type="text"
-              :disabled="loading || scope.$index === 0"
-              @click="toUp(scope)"
-              >上移</el-button
-            >
-            <el-button
-              class="btn-primary"
-              type="text"
-              :disabled="loading || scope.$index === dataListLastInd"
-              @click="toDown(scope)"
-              >下移</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-
-    <import-file
-      ref="ImportFile"
-      title="上传文件"
-      :upload-url="uploadUrl"
-      :upload-data="uploadData"
-      :download-handle="downloadHandle"
-      download-filename="能力维度模板"
-      :format="['xls', 'xlsx']"
-      @upload-success="fileUploaded"
-    >
-    </import-file>
-    <!-- ModifyAbilityDim -->
-    <modify-ability-dim
-      ref="ModifyAbilityDim"
-      :instance="curRow"
-      :dict-data="dataList"
-      @modified="modified"
-    ></modify-ability-dim>
-  </div>
-</template>
-
-<script>
-import { mapState, mapActions, mapMutations } from "vuex";
-import ImportFile from "@/components/ImportFile";
-import ModifyAbilityDim from "./ModifyAbilityDim.vue";
-import { paperDimensionExport } from "../../api";
-import { downloadByApi } from "@/plugins/download";
-
-export default {
-  name: "dimension-ability-list",
-  components: { ImportFile, ModifyAbilityDim },
-  data() {
-    return {
-      dataList: [],
-      curRow: {},
-      loading: false,
-      structSelectedDimension: [],
-      // upload
-      uploadUrl: "/api/admin/grade/paper/dimension/import",
-      uploadData: {},
-      downloading: false
-    };
-  },
-  computed: {
-    ...mapState("baseConfigs", ["dimensionList", "structList", "baseInfo"]),
-    dataListLastInd() {
-      return this.dataList.length - 1;
-    }
-  },
-  mounted() {
-    this.initStructSelectedDimension();
-    this.initData();
-  },
-  methods: {
-    ...mapMutations("baseConfigs", ["setDimensionList"]),
-    ...mapActions("baseConfigs", ["fetchDimensionList"]),
-    initStructSelectedDimension() {
-      const dimensions = this.structList.map(item => item.abilityDimension);
-      if (!dimensions.length) return;
-
-      const dimSet = new Set(dimensions.join().split(","));
-      this.structSelectedDimension = Array.from(dimSet);
-    },
-    initData() {
-      this.dataList = this.dimensionList
-        .filter(item => item.dimensionType === "ABILITY")
-        .map(item => {
-          return { ...item, id: this.$randomCode() };
-        });
-      this.sortDataList();
-      this.uploadData = {
-        paperNumber: this.baseInfo.paperNumber,
-        paperType: this.baseInfo.paperType,
-        paperName: this.baseInfo.paperName,
-        dimensionType: "ABILITY"
-      };
-    },
-    toImport() {
-      this.$refs.ImportFile.open();
-    },
-    async downloadHandle() {
-      if (this.downloading) return;
-      this.downloading = true;
-
-      const res = await downloadByApi(() => {
-        return paperDimensionExport({
-          courseCode: this.baseInfo.courseCode,
-          courseName: this.baseInfo.courseName,
-          dimensionType: "ABILITY"
-        });
-      }).catch(e => {
-        this.$message.error(e || "下载失败,请重新尝试!");
-      });
-      this.downloading = false;
-
-      if (!res) return;
-      this.$message.success("下载成功!");
-    },
-    async fileUploaded() {
-      this.$message.success("导入成功!");
-      await this.fetchDimensionList();
-      this.initData();
-    },
-    modified(data) {
-      if (data.id) {
-        const pos = this.dataList.findIndex(item => item.id === data.id);
-        this.dataList.splice(pos, 1, data);
-      } else {
-        this.dataList.push({ ...data, id: this.$randomCode() });
-      }
-      this.sortDataList();
-      this.updateChange();
-    },
-    sortDataList() {
-      this.dataList.sort((a, b) => {
-        return a.codePrimary < b.codePrimary ? -1 : 1;
-      });
-    },
-    toAdd() {
-      this.curRow = {
-        courseCode: this.baseInfo.courseCode,
-        courseName: this.baseInfo.courseName
-      };
-      this.$refs.ModifyAbilityDim.open();
-    },
-    toEdit(row) {
-      this.curRow = row;
-      this.$refs.ModifyAbilityDim.open();
-    },
-    toDelete({ row, $index }) {
-      if (this.structSelectedDimension.includes(row.codePrimary)) {
-        this.$message.error("蓝图中已选择当前维度,禁止删除!");
-        return;
-      }
-      this.dataList.splice($index, 1);
-      this.updateChange();
-    },
-    toUp({ row, $index }) {
-      const pos = $index;
-      const curRowCode = row.codePrimary;
-      const prevRowCode = this.dataList[$index - 1].codePrimary;
-      this.dataList.splice(pos, 1);
-      this.dataList.splice(pos - 1, 0, row);
-      this.dataList[pos].codePrimary = curRowCode;
-      this.dataList[pos - 1].codePrimary = prevRowCode;
-      this.updateChange();
-    },
-    toDown({ row, $index }) {
-      const pos = $index;
-      const curRowCode = row.codePrimary;
-      const nextRowCode = this.dataList[$index + 1].codePrimary;
-      this.dataList.splice(pos, 1);
-      this.dataList.splice(pos + 1, 0, row);
-      this.dataList[pos].codePrimary = curRowCode;
-      this.dataList[pos + 1].codePrimary = nextRowCode;
-      this.updateChange();
-    },
-    updateChange() {
-      const knowledgeList = this.dimensionList.filter(
-        item => item.dimensionType === "KNOWLEDGE"
-      );
-      this.setDimensionList([...knowledgeList, ...this.dataList]);
-    }
-  }
-};
-</script>

+ 0 - 120
src/modules/analysis/components/baseConfig/DimensionConfig.vue

@@ -1,120 +0,0 @@
-<template>
-  <div class="dimension-config">
-    <div class="mb-4 tab-btns">
-      <el-button
-        v-for="tab in tabs"
-        :key="tab.val"
-        size="medium"
-        :type="curTab == tab.val ? 'primary' : 'default'"
-        @click="selectMenu(tab.val)"
-        >{{ tab.name }}
-      </el-button>
-    </div>
-
-    <component :is="compName"></component>
-
-    <div class="config-footer">
-      <el-button
-        class="width-200"
-        type="primary"
-        :loading="loading"
-        @click="toSubmit"
-        >保存</el-button
-      >
-    </div>
-  </div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-import DimensionKnowledgeList from "./DimensionKnowledgeList.vue";
-import DimensionAbilityList from "./DimensionAbilityList.vue";
-import { updatePaperDimension } from "../../api";
-
-export default {
-  name: "dimension-config",
-  components: { DimensionKnowledgeList, DimensionAbilityList },
-  data() {
-    return {
-      curTab: "knowledge",
-      tabs: [
-        {
-          name: "知识维度",
-          val: "knowledge"
-        },
-        {
-          name: "能力维度",
-          val: "ability"
-        }
-      ],
-      loading: false
-    };
-  },
-  computed: {
-    ...mapState("baseConfigs", ["dimensionList", "baseInfo"]),
-    compName() {
-      return `dimension-${this.curTab}-list`;
-    }
-  },
-  methods: {
-    selectMenu(tab) {
-      this.curTab = tab;
-    },
-    async toSubmit() {
-      if (this.loading) return;
-      this.loading = true;
-
-      const defData = {
-        paperNumber: this.baseInfo.paperNumber,
-        paperName: this.baseInfo.paperName,
-        paperType: this.baseInfo.paperType
-      };
-      const knowledgeList = this.dimensionList.filter(
-        item => item.dimensionType === "KNOWLEDGE"
-      );
-      if (!knowledgeList.length) {
-        this.$message.error("请设置知识维度");
-        this.loading = false;
-        return;
-      }
-
-      const abilityList = this.dimensionList.filter(
-        item => item.dimensionType === "ABILITY"
-      );
-      if (!abilityList.length) {
-        const confirm = await this.$confirm(
-          `能力维度未设置,确定要提交吗?`,
-          "提示",
-          {
-            type: "warning"
-          }
-        ).catch(() => {});
-        if (confirm !== "confirm") {
-          this.loading = false;
-          return;
-        }
-      }
-
-      const funcs = [
-        updatePaperDimension({
-          ...defData,
-          datasource: knowledgeList,
-          dimensionType: "KNOWLEDGE"
-        }),
-        updatePaperDimension({
-          ...defData,
-          datasource: abilityList,
-          dimensionType: "ABILITY"
-        })
-      ];
-
-      const res = await Promise.all(funcs).catch(() => {});
-      this.loading = false;
-
-      if (!res) return;
-      this.$message.success("保存成功!");
-      this.$emit("modified");
-    }
-  }
-};
-</script>

+ 0 - 258
src/modules/analysis/components/baseConfig/DimensionKnowledgeList.vue

@@ -1,258 +0,0 @@
-<template>
-  <div class="dimension-knowledge-list">
-    <div class="mb-4 box-justify">
-      <el-button type="success" @click="toImport">导入</el-button>
-      <el-button type="primary" @click="toAdd">新增</el-button>
-    </div>
-
-    <div class="part-box part-box-border-bold dimension-table">
-      <el-table ref="TableList" :data="dataList">
-        <el-table-column prop="courseCode" label="课程代码"></el-table-column>
-        <el-table-column prop="courseName" label="课程名称"> </el-table-column>
-        <el-table-column prop="namePrimary" label="一级知识维度">
-        </el-table-column>
-        <el-table-column prop="codePrimary" label="一级维度编号" width="110">
-        </el-table-column>
-        <el-table-column prop="nameSecond" label="二级知识维度">
-        </el-table-column>
-        <el-table-column prop="codeSecond" label="二级维度编号" width="110">
-        </el-table-column>
-        <el-table-column prop="interpretation" label="一级维度术语解释">
-        </el-table-column>
-        <el-table-column
-          class-name="action-column"
-          label="操作"
-          width="180px"
-          align="center"
-        >
-          <template slot-scope="scope">
-            <el-button
-              class="btn-primary"
-              type="text"
-              :disabled="loading"
-              @click="toEdit(scope.row)"
-              >编辑</el-button
-            >
-            <el-button
-              class="btn-danger"
-              type="text"
-              :disabled="loading"
-              @click="toDelete(scope)"
-              >删除</el-button
-            >
-            <el-button
-              class="btn-primary"
-              type="text"
-              :disabled="loading || scope.row.secondInd === 1"
-              @click="toUp(scope)"
-              >上移</el-button
-            >
-            <el-button
-              class="btn-primary"
-              type="text"
-              :disabled="loading || scope.row.isLastSec"
-              @click="toDown(scope)"
-              >下移</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-
-    <import-file
-      ref="ImportFile"
-      title="上传文件"
-      :upload-url="uploadUrl"
-      :upload-data="uploadData"
-      :download-handle="downloadHandle"
-      download-filename="知识维度模板"
-      :format="['xls', 'xlsx']"
-      @upload-success="fileUploaded"
-    >
-    </import-file>
-    <!-- ModifyKnowledgeDim -->
-    <modify-knowledge-dim
-      ref="ModifyKnowledgeDim"
-      :instance="curRow"
-      @modified="modified"
-    ></modify-knowledge-dim>
-  </div>
-</template>
-
-<script>
-import { mapState, mapActions, mapMutations } from "vuex";
-import ImportFile from "@/components/ImportFile";
-import ModifyKnowledgeDim from "./ModifyKnowledgeDim.vue";
-import { paperDimensionExport } from "../../api";
-import { downloadByApi } from "@/plugins/download";
-
-export default {
-  name: "dimension-knowledge-list",
-  components: { ImportFile, ModifyKnowledgeDim },
-  data() {
-    return {
-      dataList: [],
-      curRow: {},
-      loading: false,
-      structSelectedDimension: [],
-      // upload
-      uploadUrl: "/api/admin/grade/paper/dimension/import",
-      uploadData: {},
-      downloading: false
-    };
-  },
-  computed: {
-    ...mapState("baseConfigs", ["dimensionList", "structList", "baseInfo"])
-  },
-  mounted() {
-    this.initStructSelectedDimension();
-    this.initData();
-  },
-  methods: {
-    ...mapMutations("baseConfigs", ["setDimensionList"]),
-    ...mapActions("baseConfigs", ["fetchDimensionList"]),
-    initStructSelectedDimension() {
-      const dimensions = this.structList.map(item => item.knowledgeDimension);
-      if (!dimensions.length) return;
-
-      const dimSet = new Set(dimensions.join().split(","));
-      this.structSelectedDimension = Array.from(dimSet);
-    },
-    initData() {
-      this.dataList = this.dimensionList
-        .filter(item => item.dimensionType === "KNOWLEDGE")
-        .map(item => {
-          return {
-            ...item,
-            secondInd: item.codeSecond.substring(1) * 1,
-            isLastSec: false,
-            id: this.$randomCode()
-          };
-        });
-      this.sortDataList();
-      this.uploadData = {
-        paperNumber: this.baseInfo.paperNumber,
-        paperType: this.baseInfo.paperType,
-        paperName: this.baseInfo.paperName,
-        dimensionType: "KNOWLEDGE"
-      };
-    },
-    toImport() {
-      this.$refs.ImportFile.open();
-    },
-    async downloadHandle() {
-      if (this.downloading) return;
-      this.downloading = true;
-
-      const res = await downloadByApi(() => {
-        return paperDimensionExport({
-          courseCode: this.baseInfo.courseCode,
-          courseName: this.baseInfo.courseName,
-          dimensionType: "KNOWLEDGE"
-        });
-      }).catch(e => {
-        this.$message.error(e || "下载失败,请重新尝试!");
-      });
-      this.downloading = false;
-
-      if (!res) return;
-      this.$message.success("下载成功!");
-    },
-    async fileUploaded() {
-      this.$message.success("导入成功!");
-      await this.fetchDimensionList();
-      this.initData();
-    },
-    modified(data) {
-      const priDims = this.dataList.filter(
-        item => item.codePrimary === data.codePrimary
-      );
-      if (data.id) {
-        const pos = this.dataList.findIndex(item => item.id === data.id);
-        this.dataList.splice(pos, 1, data);
-      } else {
-        if (!data.interpretation)
-          data.interpretation = priDims[0] && priDims[0].interpretation;
-
-        this.dataList.push({
-          ...data,
-          id: this.$randomCode()
-        });
-      }
-
-      priDims.map(item => {
-        item.namePrimary = data.namePrimary;
-        item.interpretation = data.interpretation;
-      });
-      this.sortDataList();
-      this.updateChange();
-    },
-    sortDataList() {
-      if (!this.dataList.length) return;
-      this.dataList.sort((a, b) => {
-        if (a.codePrimary < b.codePrimary) return -1;
-        if (a.codePrimary > b.codePrimary) return 1;
-
-        return a.secondInd < b.secondInd ? -1 : 1;
-      });
-      this.dataList.forEach((item, index) => {
-        const nextItem = this.dataList[index + 1];
-        item.isLastSec = nextItem && nextItem.codePrimary !== item.codePrimary;
-      });
-      this.dataList[this.dataList.length - 1].isLastSec = true;
-    },
-    toAdd() {
-      this.curRow = {
-        courseCode: this.baseInfo.courseCode,
-        courseName: this.baseInfo.courseName
-      };
-      this.$refs.ModifyKnowledgeDim.open();
-    },
-    toEdit(row) {
-      this.curRow = row;
-      this.$refs.ModifyKnowledgeDim.open();
-    },
-    toDelete({ row, $index }) {
-      if (this.structSelectedDimension.includes(row.codeSecond)) {
-        this.$message.error("蓝图中已选择当前维度,禁止删除!");
-        return;
-      }
-      this.dataList.splice($index, 1);
-      this.sortDataList();
-      this.updateChange();
-    },
-    toUp({ row, $index }) {
-      const pos = $index;
-      const rowSecondInd = row.secondInd;
-      const rowFirstCode = row.codePrimary;
-      this.dataList.splice(pos, 1);
-      this.dataList.splice(pos - 1, 0, row);
-      this.dataList[pos - 1].secondInd = rowSecondInd - 1;
-      this.dataList[pos - 1].codeSecond = `${rowFirstCode}${rowSecondInd - 1}`;
-      this.dataList[pos].secondInd = rowSecondInd;
-      this.dataList[pos].codeSecond = `${rowFirstCode}${rowSecondInd}`;
-      this.sortDataList();
-      this.updateChange();
-    },
-    toDown({ row, $index }) {
-      const pos = $index;
-      const rowSecondInd = row.secondInd;
-      const rowFirstCode = row.codePrimary;
-      this.dataList.splice(pos, 1);
-      this.dataList.splice(pos + 1, 0, row);
-      this.dataList[pos + 1].secondInd = rowSecondInd + 1;
-      this.dataList[pos + 1].codeSecond = `${rowFirstCode}${rowSecondInd + 1}`;
-      this.dataList[pos].secondInd = rowSecondInd;
-      this.dataList[pos].codeSecond = `${rowFirstCode}${rowSecondInd}`;
-      this.sortDataList();
-      this.updateChange();
-    },
-    updateChange() {
-      const abilityList = this.dimensionList.filter(
-        item => item.dimensionType === "ABILITY"
-      );
-      this.setDimensionList([...this.dataList, ...abilityList]);
-    }
-  }
-};
-</script>

+ 0 - 140
src/modules/analysis/components/baseConfig/ModifyAbilityComment.vue

@@ -1,140 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-ability-comment"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="700px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @opened="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      label-width="100px"
-    >
-      <el-form-item label="等级:">
-        {{ modalForm.levelCode }}
-      </el-form-item>
-      <el-form-item label="水平层次:">
-        {{ modalForm.levelName }}
-      </el-form-item>
-      <el-form-item label="划分规则:">
-        <p v-if="modalForm.levelCode === 'A'">
-          百分位等级TOP≤{{ modalForm.endRate }}%
-        </p>
-        <p v-else>
-          {{ modalForm.startRate }}%≤百分位等级TOP≤{{ modalForm.endRate }}%
-        </p>
-      </el-form-item>
-      <el-form-item prop="result" label="诊断结果:">
-        <el-input
-          v-model.trim="modalForm.result"
-          type="textarea"
-          :autosize="{ minRows: 3, maxRows: 5 }"
-          placeholder="请输入诊断结果"
-          maxlength="9999"
-          show-word-limit
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="advice" label="学习建议:">
-        <el-input
-          v-model.trim="modalForm.advice"
-          type="textarea"
-          :autosize="{ minRows: 3, maxRows: 5 }"
-          placeholder="请输入学习建议"
-          maxlength="9999"
-          show-word-limit
-        ></el-input>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button type="danger" @click="cancel" plain>取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-const initModalForm = {
-  id: null,
-  levelCode: "",
-  levelName: "",
-  startRate: null,
-  endRate: null,
-  result: "",
-  advice: ""
-};
-
-export default {
-  name: "modify-ability-comment",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "划分规则";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: {},
-      rules: {
-        result: [
-          {
-            required: true,
-            message: "请输入诊断结果",
-            trigger: "change"
-          }
-        ],
-        advice: [
-          {
-            required: true,
-            message: "请输入学习建议",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      this.modalForm = this.$objAssign(initModalForm, val);
-    },
-    visibleChange() {
-      this.initData(this.instance);
-      this.$nextTick(() => {
-        this.$refs.modalFormComp.clearValidate();
-      });
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      this.$emit("modified", this.modalForm);
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 209
src/modules/analysis/components/baseConfig/ModifyAbilityDim.vue

@@ -1,209 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-ability-dim"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="600px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @opened="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      label-width="140px"
-    >
-      <el-form-item prop="courseCode" label="课程代码:" required>
-        <el-input
-          v-model.trim="modalForm.courseCode"
-          placeholder="请输入课程代码"
-          readonly
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="courseName" label="课程名称:" required>
-        <el-input
-          v-model.trim="modalForm.courseName"
-          placeholder="请输入课程名称"
-          readonly
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="namePrimary" label="一级能力维度:">
-        <el-input
-          v-model.trim="modalForm.namePrimary"
-          placeholder="请输入一级能力维度"
-          clearable
-          @change="dimValidate"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="codePrimary" label="一级维度编号:">
-        <el-input
-          v-model.trim="modalForm.codePrimary"
-          placeholder="请输入一级维度编号"
-          clearable
-          @change="dimValidate"
-        ></el-input>
-      </el-form-item>
-      <el-form-item label="一级维度术语解释:">
-        <el-input
-          v-model.trim="modalForm.interpretation"
-          type="textarea"
-          :autosize="{ minRows: 3, maxRows: 5 }"
-          placeholder="请输入一级维度术语解释"
-          maxlength="100"
-          show-word-limit
-        ></el-input>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button type="danger" @click="cancel" plain>取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-const initModalForm = {
-  id: null,
-  courseName: "",
-  courseCode: "",
-  namePrimary: "",
-  codePrimary: "",
-  interpretation: "",
-  dimensionType: "ABILITY"
-};
-
-export default {
-  name: "modify-ability-dim",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    },
-    dictData: {
-      type: Array,
-      default() {
-        return [];
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "能力维度";
-    }
-  },
-  data() {
-    const firstNameValidator = (rule, value, callback) => {
-      let existFirstDim = this.dictData.find(
-        item => item.namePrimary === value
-      );
-
-      if (this.isEdit) {
-        if (existFirstDim && this.instance.namePrimary !== value) {
-          return callback(new Error("一级能力维度已存在"));
-        }
-      } else {
-        if (existFirstDim) {
-          return callback(new Error("一级能力维度已存在"));
-        }
-      }
-
-      callback();
-    };
-    const firstCodeValidator = (rule, value, callback) => {
-      let existFirstDim = this.dictData.find(
-        item => item.codePrimary === value
-      );
-
-      if (this.isEdit) {
-        if (existFirstDim && this.instance.codePrimary !== value) {
-          return callback(new Error("一级维度编号已存在"));
-        }
-      } else {
-        if (existFirstDim) {
-          return callback(new Error("一级维度编号已存在"));
-        }
-      }
-
-      callback();
-    };
-
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: {},
-      rules: {
-        namePrimary: [
-          {
-            required: true,
-            message: "请输入一级能力维度",
-            trigger: "change"
-          },
-          {
-            max: 30,
-            message: "一级能力维度字数不能超过30",
-            trigger: "change"
-          },
-          {
-            validator: firstNameValidator,
-            trigger: "change"
-          }
-        ],
-        codePrimary: [
-          {
-            required: true,
-            pattern: /^[A-Z]{1}$/,
-            message: "一级维度编号只能是大写字母A-Z,长度为1",
-            trigger: "change"
-          },
-          {
-            validator: firstCodeValidator,
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      this.modalForm = this.$objAssign(initModalForm, val);
-    },
-    visibleChange() {
-      this.initData(this.instance);
-      this.$nextTick(() => {
-        this.$refs.modalFormComp.clearValidate();
-      });
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    dimValidate() {
-      this.$refs.modalFormComp.validateField([
-        "namePrimary",
-        "codePrimary",
-        "nameSecond",
-        "codeSecond"
-      ]);
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      this.$emit("modified", this.modalForm);
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 143
src/modules/analysis/components/baseConfig/ModifyKnowledgeComment.vue

@@ -1,143 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-knowledge-comment"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="700px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @opened="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      label-width="100px"
-    >
-      <el-form-item label="等级:">
-        {{ modalForm.levelCode }}
-      </el-form-item>
-      <el-form-item label="水平层次:">
-        {{ modalForm.levelName }}
-      </el-form-item>
-      <el-form-item label="划分规则:">
-        <p v-if="modalForm.startRate === 0">
-          个人得分率≥{{ modalForm.startRate }}%
-        </p>
-        <p v-else-if="modalForm.endRate === 100">
-          个人得分率≤{{ modalForm.endRate }}%
-        </p>
-        <p v-else>
-          {{ modalForm.startRate }}%≤个人得分率≤{{ modalForm.endRate }}%
-        </p>
-      </el-form-item>
-      <el-form-item prop="result" label="诊断结果:">
-        <el-input
-          v-model.trim="modalForm.result"
-          type="textarea"
-          :autosize="{ minRows: 3, maxRows: 5 }"
-          placeholder="请输入诊断结果"
-          maxlength="9999"
-          show-word-limit
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="advice" label="学习建议:">
-        <el-input
-          v-model.trim="modalForm.advice"
-          type="textarea"
-          :autosize="{ minRows: 3, maxRows: 5 }"
-          placeholder="请输入学习建议"
-          maxlength="9999"
-          show-word-limit
-        ></el-input>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button type="danger" @click="cancel" plain>取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-const initModalForm = {
-  id: null,
-  levelCode: "",
-  levelName: "",
-  startRate: "",
-  endRate: "",
-  result: "",
-  advice: ""
-};
-
-export default {
-  name: "modify-knowledge-comment",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "划分规则";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: {},
-      rules: {
-        result: [
-          {
-            required: true,
-            message: "请输入诊断结果",
-            trigger: "change"
-          }
-        ],
-        advice: [
-          {
-            required: true,
-            message: "请输入学习建议",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      this.modalForm = this.$objAssign(initModalForm, val);
-    },
-    visibleChange() {
-      this.initData(this.instance);
-      this.$nextTick(() => {
-        this.$refs.modalFormComp.clearValidate();
-      });
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      this.$emit("modified", this.modalForm);
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 342
src/modules/analysis/components/baseConfig/ModifyKnowledgeDim.vue

@@ -1,342 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-knowledge-dim"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="600px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @opened="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      label-width="140px"
-    >
-      <el-form-item prop="courseCode" label="课程代码:" required>
-        <el-input
-          v-model.trim="modalForm.courseCode"
-          placeholder="请输入课程代码"
-          readonly
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="courseName" label="课程名称:" required>
-        <el-input
-          v-model.trim="modalForm.courseName"
-          placeholder="请输入课程名称"
-          readonly
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="namePrimary" label="一级知识维度:">
-        <el-input
-          v-model.trim="modalForm.namePrimary"
-          placeholder="请输入一级知识维度"
-          clearable
-          @change="dimValidate"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="codePrimary" label="一级维度编号:">
-        <el-input
-          v-model.trim="modalForm.codePrimary"
-          placeholder="请输入一级维度编号"
-          clearable
-          @change="dimValidate"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="nameSecond" label="二级知识维度:">
-        <el-input
-          v-model.trim="modalForm.nameSecond"
-          placeholder="请输入二级知识维度"
-          clearable
-          @change="dimValidate"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="codeSecond" label="二级维度编号:">
-        <el-input
-          v-model.trim="modalForm.codeSecond"
-          placeholder="请输入二级维度编号"
-          clearable
-          @change="dimValidate"
-        ></el-input>
-      </el-form-item>
-      <el-form-item label="一级维度术语解释:">
-        <el-input
-          v-model.trim="modalForm.interpretation"
-          type="textarea"
-          :autosize="{ minRows: 3, maxRows: 5 }"
-          placeholder="请输入一级维度术语解释"
-          maxlength="100"
-          show-word-limit
-        ></el-input>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button type="danger" @click="cancel" plain>取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { mapState } from "vuex";
-
-const initModalForm = {
-  id: null,
-  courseName: "",
-  courseCode: "",
-  namePrimary: "",
-  codePrimary: "",
-  nameSecond: "",
-  codeSecond: "",
-  interpretation: "",
-  dimensionType: "KNOWLEDGE"
-};
-
-export default {
-  name: "modify-knowledge-dim",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    ...mapState("baseConfigs", ["dimensionList"]),
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "知识维度";
-    }
-  },
-  data() {
-    const namePrimaryValidator = (rule, value, callback) => {
-      if (!this.modalForm.codePrimary || !value) return callback();
-
-      let existFirstDim = this.dictData.find(
-        item => item.code === this.modalForm.codePrimary
-      );
-      if (existFirstDim) {
-        const existFirstDim1 = this.dictData.find(
-          item => item.name === value && value !== existFirstDim.name
-        );
-        if (existFirstDim1) return callback(new Error("一级知识维度已存在"));
-      } else {
-        const existFirstDim1 = this.dictData.find(item => item.name === value);
-        if (existFirstDim1 && !this.isEditOnlyOneDim)
-          return callback(new Error("一级知识维度已存在"));
-      }
-
-      callback();
-    };
-
-    const nameSecondValidator = (rule, value, callback) => {
-      if (
-        !this.modalForm.codeSecond ||
-        !value ||
-        !this.modalForm.namePrimary ||
-        !this.modalForm.codePrimary
-      )
-        return callback();
-
-      const addValidator = () => {
-        let existFirstDim = this.dictData.find(
-          item => item.code === this.modalForm.codePrimary
-        );
-        if (existFirstDim) {
-          const secondDimExist = this.dictData.some(item =>
-            item.children.some(elem => elem.name === value)
-          );
-          if (secondDimExist) return callback(new Error("二级知识维度已存在"));
-        }
-
-        return callback();
-      };
-
-      const editValidator = () => {
-        let existFirstDim = this.dictData.find(
-          item => item.code === this.modalForm.codePrimary
-        );
-        if (existFirstDim) {
-          const existSecondDim = existFirstDim.children.find(
-            item =>
-              item.name === value && item.name !== this.instance.nameSecond
-          );
-          if (existSecondDim) return callback(new Error("二级知识维度已存在"));
-        }
-        return callback();
-      };
-
-      return this.isEdit ? editValidator() : addValidator();
-    };
-
-    const codeSecondValidator = (rule, value, callback) => {
-      if (
-        !this.modalForm.codeSecond ||
-        !value ||
-        !this.modalForm.namePrimary ||
-        !this.modalForm.codePrimary
-      )
-        return callback();
-
-      if (value[0] !== this.modalForm.codePrimary) {
-        return callback(new Error("二级维度编码首字母应该与一级维度编码一致"));
-      }
-
-      let existFirstDim = this.dictData.find(
-        item => item.code === this.modalForm.codePrimary
-      );
-
-      if (existFirstDim) {
-        let existSecondDim = existFirstDim.children.find(
-          item => item.code === this.modalForm.codeSecond
-        );
-        if (this.isEdit) {
-          if (
-            existSecondDim &&
-            existSecondDim.code !== this.instance.codeSecond
-          ) {
-            return callback(new Error("二级维度编号已存在"));
-          }
-        } else {
-          if (existSecondDim) return callback(new Error("二级维度编号已存在"));
-        }
-      }
-
-      callback();
-    };
-
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: {},
-      dictData: [],
-      isEditOnlyOneDim: false,
-      rules: {
-        namePrimary: [
-          {
-            required: true,
-            message: "请输入一级知识维度",
-            trigger: "change"
-          },
-          {
-            max: 30,
-            message: "一级知识维度字数不能超过30",
-            trigger: "change"
-          },
-          {
-            validator: namePrimaryValidator,
-            trigger: "change"
-          }
-        ],
-        codePrimary: [
-          {
-            required: true,
-            pattern: /^[A-Z]{1}$/,
-            message: "一级维度编号只能是大写字母A-Z,长度为1",
-            trigger: "change"
-          }
-        ],
-        nameSecond: [
-          {
-            required: true,
-            message: "请输入二级知识维度",
-            trigger: "change"
-          },
-          {
-            max: 30,
-            message: "二级知识维度字数不能超过30",
-            trigger: "change"
-          },
-          {
-            validator: nameSecondValidator,
-            trigger: "change"
-          }
-        ],
-        codeSecond: [
-          {
-            required: true,
-            pattern: /^[A-Z][0-9]{1,4}$/,
-            message: "二级维度编号只能是大写字母+数字,长度不能超过5",
-            trigger: "change"
-          },
-          {
-            validator: codeSecondValidator,
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      this.modalForm = this.$objAssign(initModalForm, val);
-    },
-    visibleChange() {
-      this.getDict();
-      const existPrimaryDim = this.dictData.find(
-        item => item.code === this.instance.codePrimary
-      );
-      this.isEditOnlyOneDim =
-        existPrimaryDim && existPrimaryDim.children.length === 1;
-
-      this.initData(this.instance);
-      this.$nextTick(() => {
-        this.$refs.modalFormComp.clearValidate();
-      });
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    getDict() {
-      let dictData = {};
-
-      this.dimensionList
-        .filter(item => item.dimensionType === "KNOWLEDGE")
-        .forEach(item => {
-          if (!dictData[item.codePrimary]) {
-            dictData[item.codePrimary] = {
-              name: item.namePrimary,
-              code: item.codePrimary,
-              children: []
-            };
-          }
-          dictData[item.codePrimary].children.push({
-            name: item.nameSecond,
-            code: item.codeSecond
-          });
-        });
-      this.dictData = Object.values(dictData);
-    },
-    dimValidate() {
-      this.$refs.modalFormComp.validateField([
-        "namePrimary",
-        "codePrimary",
-        "nameSecond",
-        "codeSecond"
-      ]);
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      this.$emit("modified", {
-        ...this.modalForm,
-        isLastSec: false,
-        secondInd: this.modalForm.codeSecond.substring(1) * 1
-      });
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 109
src/modules/analysis/components/baseConfig/ProficiencyEdit.vue

@@ -1,109 +0,0 @@
-<template>
-  <div class="proficiency-edit">
-    <el-form ref="modalFormComp" label-width="180px">
-      <el-form-item
-        v-for="(item, ind) in modalForm"
-        :key="ind"
-        :label="`${item.title}:`"
-      >
-        <div
-          :class="[
-            'rate-input',
-            { 'rate-input-offset-left': ind === modalForm.length - 1 }
-          ]"
-        >
-          <el-input-number
-            v-if="ind !== modalForm.length - 1"
-            v-model="item.startRate"
-            placeholder="请输入"
-            :min="0"
-            :max="100"
-            :step="1"
-            step-strictly
-            size="small"
-            :controls="false"
-            @change="rateChange"
-          ></el-input-number>
-          <span v-if="ind !== modalForm.length - 1">≤</span>
-          <span>个人得分率</span>
-          <span v-if="ind !== 0"><</span>
-          <el-input-number
-            v-if="ind !== 0"
-            v-model="item.endRate"
-            placeholder="请输入"
-            :min="0"
-            :max="100"
-            :step="1"
-            step-strictly
-            size="small"
-            :controls="false"
-            @change="rateChange"
-          ></el-input-number>
-        </div>
-      </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-const initRateSet = [
-  {
-    level: "A",
-    title: "熟练掌握",
-    startRate: null,
-    endRate: 100
-  },
-  {
-    level: "B",
-    title: "较好掌握",
-    startRate: null,
-    endRate: null
-  },
-  {
-    level: "C",
-    title: "基本掌握",
-    startRate: null,
-    endRate: null
-  },
-  {
-    level: "D",
-    title: "部分掌握",
-    startRate: null,
-    endRate: null
-  },
-  {
-    level: "E",
-    title: "没有掌握,需从头再学",
-    startRate: 0,
-    endRate: null
-  }
-];
-
-export default {
-  name: "proficiency-edit",
-  props: {
-    rates: {
-      type: Array,
-      default() {
-        return [];
-      }
-    }
-  },
-  data() {
-    return {
-      modalForm: [...initRateSet]
-    };
-  },
-  mounted() {
-    const defRates = this.rates.length ? this.rates : initRateSet;
-    this.modalForm = defRates.map(item => {
-      return { ...item };
-    });
-  },
-  methods: {
-    rateChange() {
-      this.$emit("data-change", this.modalForm);
-    }
-  }
-};
-</script>

+ 0 - 88
src/modules/analysis/components/baseConfig/baseConfigsStore.js

@@ -1,88 +0,0 @@
-import {
-  paperDimensionList,
-  paperStructList,
-  paperDefineList,
-  moduleEvaluationList
-} from "../../api";
-
-const state = {
-  baseInfo: {},
-  dimensionList: [],
-  structList: [],
-  defineList: null,
-  evaluationList: []
-};
-
-const mutations = {
-  setBaseInfo(state, baseInfo) {
-    state.baseInfo = baseInfo;
-  },
-  setDimensionList(state, dimensionList) {
-    state.dimensionList = dimensionList;
-  },
-  setStructList(state, structList) {
-    state.structList = structList;
-  },
-  setDefineList(state, defineList) {
-    state.defineList = defineList;
-  },
-  setEvaluationList(state, evaluationList) {
-    state.evaluationList = evaluationList;
-  },
-  initConfigStore(state) {
-    state.baseInfo = {};
-    state.dimensionList = [];
-    state.structList = [];
-    state.defineList = null;
-    state.evaluationList = [];
-  }
-};
-
-const actions = {
-  async fetchDimensionList({ state, commit }) {
-    const datas = {
-      paperNumber: state.baseInfo.paperNumber,
-      paperType: state.baseInfo.paperType
-    };
-    const data = await paperDimensionList(datas).catch(() => {});
-    if (!data) return Promise.reject();
-    commit("setDimensionList", data);
-  },
-  async fetchStructList({ state, commit }) {
-    const datas = {
-      paperNumber: state.baseInfo.paperNumber,
-      paperType: state.baseInfo.paperType
-    };
-    const data = await paperStructList(datas).catch(() => {});
-    if (!data) return Promise.reject();
-    commit("setStructList", data);
-  },
-  async fetchDefineList({ state, commit }) {
-    const datas = {
-      paperNumber: state.baseInfo.paperNumber,
-      paperType: state.baseInfo.paperType
-    };
-    let err = false;
-    const data = await paperDefineList(datas).catch(() => {
-      err = true;
-    });
-    if (err) return Promise.reject();
-    commit("setDefineList", data);
-  },
-  async fetchEvaluationList({ state, commit }) {
-    const datas = {
-      paperNumber: state.baseInfo.paperNumber,
-      paperType: state.baseInfo.paperType
-    };
-    const data = await moduleEvaluationList(datas).catch(() => {});
-    if (!data) return Promise.reject();
-    commit("setEvaluationList", data);
-  }
-};
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions
-};

+ 0 - 103
src/modules/analysis/components/baseConfig/defaultComment.js

@@ -1,103 +0,0 @@
-export const initKnowledgeList = [
-  {
-    levelCode: "A",
-    startRate: 90,
-    endRate: 100,
-    levelName: "表现优秀水平",
-    result:
-      "作答结果反映你在本次测试中表现优秀。你对本学期的知识点掌握的非常牢固,能够将所学的物理概念、规律和结论灵活用于解决相关的物理问题;具有将所学的物理知识,结合一定的数学手段解复杂的或综合性物理问题的能力。",
-    advice:
-      "希望你在后续课程的的学习中能够继续保持这种学习的态度和热情,戒骄戒躁,不忘初心,进一步拓宽知识面,进行个性化的深入学习,相信你一定会取得更优秀的成绩。"
-  },
-  {
-    levelCode: "B",
-    startRate: 75,
-    endRate: 90,
-    levelName: "表现良好水平",
-    result:
-      "作答结果反映你在本次测验中处于良好水平。你能理解并基本掌握本学期的绝大部分知识点,能够将所学的物理知识用于解决相关的物理问题。但可能在知识体系上还存在漏洞,对某些知识点掌握的还不够熟练,或者是综合分析的能力还不够强。总之你还有进步的空间。",
-    advice:
-      "建议你根据本次报告的反馈,进行有针对性的强化学习,逐个攻破曾困扰你的难题,加深对所学知识、概念的理解、进一步提高灵活应用能力和综合分析能力。相信你在下一次的测评中能够更上一层楼。"
-  },
-  {
-    levelCode: "C",
-    startRate: 55,
-    endRate: 75,
-    levelName: "中等水平",
-    result:
-      "作答结果反映你在本次测验中处于中等水平。你能够理解并掌握本学期所学的大部分知识点,但是还没有形成完整的知识体系,对某些知识点还不能够真正理解并掌握,对于有关物理规律、概念和公式的记忆还不够深刻、运用不够熟练,或者是综合分析能力还有待进一步提高。",
-    advice:
-      "希望你能够通过本次测试,能够找出自己的知识漏洞,进行有针对性的强化学习和能力训练,形成自己完整的知识体系,进一步提高自己的综合分析能力,相信你在下一次测评中能够取得理想成绩。"
-  },
-  {
-    levelCode: "D",
-    startRate: 40,
-    endRate: 55,
-    levelName: "有待提高水平",
-    result:
-      "作答结果反映你在本次测验中表现不佳,需要重考或重修本课程。你能够对本课程中所学的知识有初步认识,有一定的了解和记忆,但知识点可能有断层,对部分概念、规律的理解还不够透彻,运用不够熟练,综合分析能力和整体水平还有待提高。",
-    advice:
-      "胜不骄,败不馁。建议你端正学习态度,破而后立,总结经验,及时补差,相信你在下一次测评中一定能够有较大幅度的进步。"
-  },
-  {
-    levelCode: "E",
-    startRate: 0,
-    endRate: 40,
-    levelName: "本课程没有学好",
-    result:
-      "作答结果反映你对本课程没有用心学习。对所学的大部分知识点、基本概念、基本原理和基本规律都没有弄明白、含混不清,或考前没有好好复习,把平时学的都忘了。",
-    advice:
-      "建议你首先端正学习态度,然后将本课程从头开始学习,并做好知识点的梳理、归纳和总结、形成完整系统的知识框架。相信你在重修或重考时能够考出一个满意的成绩。"
-  }
-];
-
-export const initAbilityList = [
-  {
-    levelCode: "A",
-    startRate: 80,
-    endRate: 100,
-    levelName: "优秀",
-    result: "你在本课程的学习中表现优秀,学习成绩处于班级中前20%的领先水平。",
-    advice:
-      "能取得这样的成绩,既要有天赋还要足够勤奋,两者缺一不可。建议你继续保持勤奋学习的干劲和态度,充分发挥你的天赋,再接再厉,继续名列前茅。"
-  },
-  {
-    levelCode: "B",
-    startRate: 60,
-    endRate: 80,
-    levelName: "良好",
-    result:
-      "你在本课程的学习中表现良好,学习成绩处于班级中前21%-前40&的中上游水平",
-    advice:
-      "天才等于勤奋加努力。希望你能更加勤奋、更加努力地学习,争取下次考试能挤进班上前20%的领先水平。"
-  },
-  {
-    levelCode: "C",
-    startRate: 40,
-    endRate: 60,
-    levelName: "中等",
-    result:
-      "你的成绩在本课堂中处于中游水平,或许你还没有把你的学习潜能充分发挥出来。",
-    advice:
-      "你还有较大的上升空间,相信自己,只要足够努力就能进入班上的中上游水平,甚至领先水平。"
-  },
-  {
-    levelCode: "D",
-    startRate: 20,
-    endRate: 40,
-    levelName: "中等偏下",
-    result: "你的成绩在本课堂中处于班上前61%-80%中等偏下的水平。",
-    advice:
-      "建议你能通过本次测试发现自己的问题,向班里优秀的同学学习,你的上升空间很大,相信自己,只要努力一定有进步。"
-  },
-  {
-    levelCode: "E",
-    startRate: 0,
-    endRate: 20,
-    levelName: "表现不佳",
-    result:
-      "你本次考试的成绩处于班上最后20%的水平,表现不佳。或许你已经尽力了,或许你不够努力,太放松自己了,只有你自己明白。",
-    advice:
-      "如果你已经尽力了,不必灰心,高手过招,不管输赢,都是高手;如果你还不够努力,请努力追赶,下次一定有进步!"
-  }
-];

+ 0 - 22
src/modules/analysis/router.js

@@ -1,22 +0,0 @@
-// user
-import DataInitManage from "./views/DataInitManage.vue";
-import AnalysisBatchManage from "./views/AnalysisBatchManage.vue";
-import AnalysisReportView from "./views/AnalysisReportView.vue";
-
-export default [
-  {
-    path: "/analysis/data-init-manage",
-    name: "DataInitManage",
-    component: DataInitManage
-  },
-  {
-    path: "/analysis/analysis-batch-manage",
-    name: "AnalysisBatchManage",
-    component: AnalysisBatchManage
-  },
-  {
-    path: "/analysis/analysis-report-view",
-    name: "AnalysisReportView",
-    component: AnalysisReportView
-  }
-];

+ 0 - 357
src/modules/analysis/views/AnalysisBatchManage.vue

@@ -1,357 +0,0 @@
-<template>
-  <div class="analysis-batch-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
-        <template v-if="checkPrivilege('condition', 'condition')">
-          <el-form-item label="分析批次:">
-            <el-input
-              style="width:100%;"
-              v-model.trim="filter.gradeBatchName"
-              placeholder="请输入批次名称"
-              clearable
-            ></el-input>
-          </el-form-item>
-        </template>
-        <el-form-item>
-          <el-button
-            v-if="checkPrivilege('button', 'select')"
-            type="primary"
-            @click="toPage(1)"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-      <div class="part-box-action">
-        <!-- <el-button
-          v-if="checkPrivilege('button', 'delete')"
-          type="danger"
-          :loading="loading"
-          @click="toBatchDelete"
-          >批量删除</el-button
-        > -->
-        <el-button
-          v-if="checkPrivilege('button', 'add')"
-          type="primary"
-          @click="toAdd"
-          >新建分析批次</el-button
-        >
-      </div>
-    </div>
-    <div class="part-box part-box-pad">
-      <el-table
-        ref="TableList"
-        :data="dataList"
-        @selection-change="handleSelectionChange"
-      >
-        <el-table-column
-          type="selection"
-          width="55"
-          align="center"
-        ></el-table-column>
-        <el-table-column
-          prop="batchName"
-          label="分析批次"
-          min-width="160"
-        ></el-table-column>
-        <el-table-column
-          prop="semesterName"
-          label="学期"
-          min-width="160"
-        ></el-table-column>
-        <el-table-column prop="status" label="状态" min-width="120">
-          <template slot-scope="scope">
-            <span>
-              {{ scope.row.status | analysisBatchStatusFilter }}
-            </span>
-            <span v-if="scope.row.status === 'CALCULATING'" class="ml-2">
-              {{ scope.row.progress }}%</span
-            >
-            <span
-              v-if="scope.row.status === 'FINISH_CALCULATE'"
-              :class="[
-                'ml-2',
-                scope.row.result === 'SUCCESS'
-                  ? 'color-success'
-                  : 'color-danger'
-              ]"
-            >
-              {{ scope.row.result === "SUCCESS" ? "成功" : "失败" }}
-            </span>
-          </template>
-        </el-table-column>
-        <el-table-column class-name="action-column" label="操作" width="300">
-          <template slot-scope="scope">
-            <el-button
-              v-if="checkPrivilege('link', 'window')"
-              class="btn-primary"
-              type="text"
-              :disabled="loading"
-              @click="toAddCourse(scope.row)"
-              >添加分析试卷</el-button
-            >
-            <el-button
-              v-if="
-                checkPrivilege('link', 'StartCalc') &&
-                  scope.row.status === 'READY_TO_CALCULATE'
-              "
-              class="btn-primary"
-              type="text"
-              :disabled="loading"
-              @click="toCalc(scope.row)"
-              >开始计算</el-button
-            >
-            <el-button
-              v-if="
-                checkPrivilege('link', 'push') &&
-                  scope.row.status === 'PUSH_GRADE_BATCH'
-              "
-              class="btn-primary"
-              type="text"
-              :disabled="loading"
-              @click="toImportAnalysisData(scope.row)"
-              >提交分析数据</el-button
-            >
-            <el-button
-              v-if="
-                checkPrivilege('link', 'import') &&
-                  scope.row.status !== 'SETTING_GRADE_PAPER'
-              "
-              class="btn-primary"
-              type="text"
-              :disabled="loading"
-              @click="toImport(scope.row)"
-              >导入</el-button
-            >
-            <el-button
-              v-if="
-                checkPrivilege('link', 'delete') && !scope.row.publishStatus
-              "
-              class="btn-danger"
-              type="text"
-              :disabled="loading"
-              @click="toDelete(scope.row)"
-              >删除</el-button
-            >
-            <el-button
-              v-if="
-                scope.row.reportFilePath &&
-                  scope.row.status === 'FINISH_CALCULATE'
-              "
-              class="btn-primary"
-              type="text"
-              @click="toViewLog(row)"
-              >下载日志</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-
-    <!-- ModifyAnalysisBatch -->
-    <modify-analysis-batch
-      v-if="checkPrivilege('button', 'add')"
-      ref="ModifyAnalysisBatch"
-      :instance="curRow"
-      @modified="getList"
-    ></modify-analysis-batch>
-    <!-- ModifyAnalysisBatchPaper -->
-    <modify-analysis-batch-paper
-      v-if="checkPrivilege('link', 'window')"
-      ref="ModifyAnalysisBatchPaper"
-      :instance="curRow"
-      @closed="getList"
-    ></modify-analysis-batch-paper>
-    <!-- 数据导入 -->
-    <import-file
-      v-if="checkPrivilege('link', 'import')"
-      ref="ImportFile"
-      title="上传文件"
-      :upload-url="uploadUrl"
-      :upload-data="uploadData"
-      :download-handle="downloadHandle"
-      download-filename="考务数据模板"
-      :format="['xls', 'xlsx']"
-      @upload-success="fileUploaded"
-    >
-    </import-file>
-  </div>
-</template>
-
-<script>
-import {
-  analysisBatchList,
-  deleteAnalysisBatch,
-  analysisBatchTemplateExport,
-  analysisDataImport,
-  analysisBatchCalc
-} from "../api";
-import ModifyAnalysisBatch from "../components/ModifyAnalysisBatch.vue";
-import ModifyAnalysisBatchPaper from "../components/ModifyAnalysisBatchPaper.vue";
-import ImportFile from "@/components/ImportFile";
-import { downloadByApi } from "@/plugins/download";
-import timeMixins from "../../../mixins/timeMixin";
-
-export default {
-  name: "analysis-batch-manage",
-  components: { ModifyAnalysisBatch, ModifyAnalysisBatchPaper, ImportFile },
-  mixins: [timeMixins],
-  data() {
-    return {
-      filter: {
-        gradeBatchName: ""
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      dataList: [],
-      curRow: {},
-      batchs: [],
-      loading: false,
-      multipleSelection: [],
-      // upload
-      uploadUrl: "/api/admin/grade/batch/upload",
-      uploadData: {},
-      downloading: false
-    };
-  },
-  mounted() {
-    this.toPage(1);
-  },
-  beforeDestroy() {
-    this.clearSetTs();
-  },
-  methods: {
-    async getList() {
-      if (!this.checkPrivilege("list", "list")) return;
-      this.clearSetTs();
-
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      const data = await analysisBatchList(datas);
-      this.dataList = data.records.map(item => {
-        item.loading = false;
-        return item;
-      });
-      this.total = data.total;
-
-      if (this.dataList.some(item => item.status === "CALCULATING")) {
-        this.addSetTime(() => {
-          this.getList();
-        }, 10 * 1000);
-      }
-    },
-    toPage(page) {
-      this.multipleSelection = [];
-      this.current = page;
-      this.getList();
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val.map(item => item.id);
-    },
-    async toBatchDelete() {
-      if (!this.multipleSelection.length) {
-        this.$message.error("请选择要删除的批次!");
-        return;
-      }
-
-      const confirm = await this.$confirm(`确定要删除选中的批次吗?`, "提示", {
-        type: "warning"
-      }).catch(() => {});
-      if (confirm !== "confirm") return;
-
-      await deleteAnalysisBatch(this.multipleSelection);
-      this.$message.success("删除成功!");
-      this.deletePageLastItem();
-    },
-    toAdd() {
-      this.curRow = {};
-      this.$refs.ModifyAnalysisBatch.open();
-    },
-    toAddCourse(row) {
-      this.curRow = row;
-      this.$refs.ModifyAnalysisBatchPaper.open();
-    },
-    async toCalc(row) {
-      if (row.loading) return;
-      row.loading = true;
-
-      const res = await analysisBatchCalc({ batchId: row.id }).catch(() => {});
-      row.loading = false;
-      if (!res) return;
-
-      this.$message.success("操作成功!");
-      this.getList();
-    },
-    async toImportAnalysisData(row) {
-      if (row.loading) return;
-      row.loading = true;
-
-      const res = await analysisDataImport({ batchId: row.id }).catch(() => {});
-      row.loading = false;
-      if (!res) return;
-
-      this.$message.success("操作成功!");
-      this.getList();
-    },
-    toImport(row) {
-      this.curRow = row;
-      this.uploadData = {
-        batchId: row.id
-      };
-      this.$refs.ImportFile.open();
-    },
-    fileUploaded() {
-      this.getList();
-    },
-    async downloadHandle() {
-      if (this.downloading) return;
-      this.downloading = true;
-
-      const res = await downloadByApi(() => {
-        return analysisBatchTemplateExport({
-          batchId: this.curRow.id
-        });
-      }).catch(e => {
-        this.$message.error(e || "下载失败,请重新尝试!");
-      });
-      this.downloading = false;
-
-      if (!res) return;
-      this.$message.success("下载成功!");
-    },
-    async toDelete(row) {
-      const confirm = await this.$confirm(
-        `确定要删除批次【${row.batchName}】吗?`,
-        "提示",
-        {
-          type: "warning"
-        }
-      ).catch(() => {});
-      if (confirm !== "confirm") return;
-
-      await deleteAnalysisBatch(row.id);
-      this.$message.success(
-        "操作成功,请去基础配置 -> 系统设置 -> 同步管理中查看结果!"
-      );
-      this.deletePageLastItem();
-    },
-    toViewLog(row) {
-      window.open(row.reportFilePath);
-    }
-  }
-};
-</script>

+ 0 - 66
src/modules/analysis/views/AnalysisReportView.vue

@@ -1,66 +0,0 @@
-<template>
-  <div class="analysis-report-view">
-    <div class="part-box part-box-pad">
-      <el-button
-        v-for="item in roles"
-        :key="item.roleId"
-        type="primary"
-        class="auth-item"
-        :disabled="loading"
-        @click="toAuth(item)"
-        >{{ item.roleName }}</el-button
-      >
-    </div>
-  </div>
-</template>
-
-<script>
-import { autoSubmitForm } from "@/plugins/utils";
-import { ssoAnalysisLogin } from "../api";
-
-export default {
-  name: "analysis-report-view",
-  data() {
-    return {
-      user: {},
-      roles: [],
-      loading: false
-    };
-  },
-  created() {
-    this.user = this.$ls.get("user", {
-      roleSource: [],
-      loginName: "",
-      role: "",
-      orgName: ""
-    });
-    this.roles = this.user.roleSource.filter(
-      item => item.roleSource === "ANALYSIS"
-    );
-    if (this.$route.query.trigger) {
-      this.toAuth({ roleCode: this.$route.query.trigger });
-    }
-  },
-  methods: {
-    async toAuth(item) {
-      if (this.loading) return;
-      this.loading = true;
-
-      const params = {
-        loginName: this.user.loginName,
-        role: item.roleCode,
-        orgName: this.user.orgInfo.name,
-        returnUrl: window.location.href
-      };
-      const data = await ssoAnalysisLogin(params).catch(() => {});
-      this.loading = false;
-      if (!data) return;
-
-      console.log(data);
-      // if (data) return;
-
-      autoSubmitForm(data.redirectUrl, data);
-    }
-  }
-};
-</script>

+ 0 - 157
src/modules/analysis/views/DataInitManage.vue

@@ -1,157 +0,0 @@
-<template>
-  <div class="data-init-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <el-form ref="FilterForm" label-position="left" label-width="55px" inline>
-        <template v-if="checkPrivilege('condition', 'condition')">
-          <el-form-item label="学期:">
-            <semester-select
-              v-model="filter.semesterId"
-              placeholder="学期"
-            ></semester-select>
-          </el-form-item>
-          <el-form-item label="考试:">
-            <exam-select
-              v-model="filter.examId"
-              :semester-id="filter.semesterId"
-              placeholder="考试"
-            ></exam-select>
-          </el-form-item>
-          <el-form-item label="课程:">
-            <course-select
-              v-model="filter.courseCode"
-              placeholder="课程"
-            ></course-select>
-          </el-form-item>
-        </template>
-        <el-form-item>
-          <el-button
-            v-if="checkPrivilege('button', 'select')"
-            type="primary"
-            @click="toPage(1)"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-      <div class="part-box-action"></div>
-    </div>
-    <div class="part-box part-box-pad">
-      <el-table ref="TableList" :data="dataList">
-        <el-table-column
-          type="index"
-          label="序号"
-          width="50"
-          :index="indexMethod"
-        ></el-table-column>
-        <el-table-column
-          prop="semesterName"
-          label="学期"
-          min-width="160"
-        ></el-table-column>
-        <el-table-column prop="examName" label="考试" min-width="160">
-        </el-table-column>
-        <el-table-column prop="courseCode" label="课程(代码)" min-width="200">
-          <span slot-scope="scope">
-            {{ scope.row.courseName }}({{ scope.row.courseCode }})
-          </span>
-        </el-table-column>
-        <el-table-column
-          prop="paperNumber"
-          label="试卷编码"
-          min-width="160"
-        ></el-table-column>
-        <el-table-column
-          prop="paperType"
-          label="试卷类型"
-          width="100"
-        ></el-table-column>
-        <el-table-column prop="status" label="状态" width="100">
-        </el-table-column>
-        <el-table-column
-          class-name="action-column"
-          label="操作"
-          width="160px"
-          fixed="right"
-        >
-          <template slot-scope="scope">
-            <el-button
-              v-if="
-                checkPrivilege('link', 'window') && !scope.row.publishStatus
-              "
-              class="btn-primary"
-              type="text"
-              @click="toConfig(scope.row)"
-              >基础配置</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-    <!-- ModifyBaseConfig -->
-    <modify-base-config
-      ref="ModifyBaseConfig"
-      :instance="curRow"
-    ></modify-base-config>
-  </div>
-</template>
-
-<script>
-import { dataInitList } from "../api";
-import ModifyBaseConfig from "../components/ModifyBaseConfig.vue";
-
-export default {
-  name: "data-init-manage",
-  components: { ModifyBaseConfig },
-  data() {
-    return {
-      filter: {
-        semesterId: "",
-        examId: "",
-        courseCode: ""
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      dataList: [],
-      curRow: {},
-      loading: false
-    };
-  },
-  mounted() {
-    this.toPage(1);
-  },
-  methods: {
-    async getList() {
-      if (!this.checkPrivilege("list", "list")) return;
-
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      const data = await dataInitList(datas);
-      this.dataList = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    toConfig(row) {
-      console.log(row);
-      this.curRow = row;
-      this.$refs.ModifyBaseConfig.open();
-    }
-  }
-};
-</script>

+ 0 - 138
src/modules/base/components/CardTitleRuleEdit.vue

@@ -1,138 +0,0 @@
-<template>
-  <div class="card-title-rule-edit">
-    <div class="field-list">
-      <div
-        v-for="field in fields"
-        :key="field.code"
-        :class="[
-          'field-item',
-          { 'field-item-act': field.selected, 'field-item-disabled': disabled }
-        ]"
-        @mousedown="event => selectField(field, event)"
-      >
-        {{ field.name }}({{ field.code }})
-      </div>
-    </div>
-    <el-input
-      ref="FieldTextarea"
-      v-model="content"
-      type="textarea"
-      resize="none"
-      :rows="2"
-      placeholder="请输入内容"
-      :disabled="disabled"
-      @input="contentChange"
-    >
-    </el-input>
-  </div>
-</template>
-
-<script>
-export default {
-  name: "card-title-rule-edit",
-  props: {
-    value: {
-      type: String,
-      default: ""
-    },
-    fieldSourses: {
-      type: Array,
-      default() {
-        return [];
-      }
-    },
-    disabled: {
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {
-      fields: [],
-      fieldNameToCode: {},
-      fieldCodeToName: {},
-      frameWin: null,
-      content: ""
-    };
-  },
-  watch: {
-    fieldSourses: {
-      immediate: true,
-      handler(val) {
-        this.rebuildTextarea();
-        this.setFields(val);
-        this.updateFieldStatus();
-      }
-    },
-    value: {
-      immediate: true,
-      handler(val) {
-        // if (!val) return;
-        this.content = val;
-        this.updateFieldStatus();
-      }
-    }
-  },
-  methods: {
-    setFields(data) {
-      const selectedCodes = this.fields
-        .filter(item => item.selected)
-        .map(item => item.code);
-      this.fields = data.map(item => {
-        item.selected = selectedCodes.includes(item.code);
-        return item;
-      });
-      this.fields.forEach(field => {
-        this.fieldNameToCode[field.name] = field.code;
-        this.fieldCodeToName[field.code] = field.name;
-      });
-    },
-    updateFieldStatus() {
-      const rexp = new RegExp(/\$\{.+?\}/, "g");
-      const variates = this.content.match(rexp);
-
-      const selectedCodes = variates
-        ? variates.map(item => item.replace("${", "").replace("}", ""))
-        : [];
-      this.fields = this.fields.map(field => {
-        field.selected = selectedCodes.includes(field.code);
-        return field;
-      });
-    },
-    rebuildTextarea() {
-      const soursesCodes = this.fieldSourses.map(item => item.code);
-      const deletedCodes = this.fields.filter(
-        item => item.selected && !soursesCodes.includes(item.code)
-      );
-      console.log(deletedCodes);
-      deletedCodes.forEach(field => {
-        this.content = this.content.replace(`\${${field.code}}`, "");
-      });
-    },
-    selectField(field, event) {
-      if (this.disabled) return;
-      event.preventDefault();
-      field.selected = !field.selected;
-      if (field.selected) {
-        // 选中
-        const variateStr = `\${${field.code}}`;
-        const textareaDom = this.$refs.FieldTextarea.$el.children[0];
-        const { selectionStart, selectionEnd } = textareaDom;
-
-        this.content =
-          this.content.slice(0, selectionStart) +
-          variateStr +
-          this.content.slice(selectionEnd);
-      } else {
-        // 取消
-        this.content = this.content.replace(`\${${field.code}}`, "");
-      }
-      this.contentChange();
-    },
-    contentChange() {
-      this.$emit("input", this.content);
-      this.$emit("change", this.content);
-    }
-  }
-};
-</script>

+ 0 - 217
src/modules/base/components/MergePushDialog.vue

@@ -1,217 +0,0 @@
-<template>
-  <el-dialog
-    class="merge-push-dialog"
-    :visible.sync="modalIsShow"
-    title="批量合并印刷任务"
-    top="10vh"
-    width="448px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <div class="mb-4">
-      <p class="tips-info">
-        1、此操作会将多个印刷计划合并,合并操作不可还原,是否继续合并操作?
-      </p>
-      <p class="tips-info">
-        2、如果确定需要合并,请填写合并后考试名称及对应考试ID,然后点击确定按钮。
-      </p>
-    </div>
-    <div class="mb-4 tab-btns">
-      <el-button
-        v-for="(val, key) in EXAM_TYPE"
-        :key="key"
-        :type="examType == key ? 'primary' : 'default'"
-        @click="selectMenu(key)"
-        >{{ val }}</el-button
-      >
-    </div>
-    <el-form
-      v-if="examType === '0'"
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      label-position="top"
-    >
-      <el-form-item label="考试ID:">
-        <el-input
-          v-model.trim="modalForm.thirdRelateId"
-          placeholder="请输入考试ID"
-          clearable
-          @input="thirdRelateIdChange"
-        ></el-input>
-      </el-form-item>
-      <el-form-item label="考试名称:">
-        <el-input
-          v-model.trim="modalForm.thirdRelateName"
-          placeholder="请输入考试名称"
-          clearable
-          :disabled="!canEditThirdRelateName"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="thirdRelate"></el-form-item>
-    </el-form>
-    <el-form
-      v-else
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules1"
-      label-position="top"
-    >
-      <el-form-item prop="thirdRelateId" label="考试ID:">
-        <el-select
-          v-model="modalForm.thirdRelateId"
-          placeholder="请选择"
-          filterable
-          style="width:100%"
-        >
-          <el-option
-            v-for="(item, index) in exams"
-            :key="index"
-            :value="item.thirdRelateId"
-            :label="item.thirdRelateName"
-          >
-          </el-option>
-        </el-select>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button @click="cancel">取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { printPlanMergePush, printPlanSyncExamList } from "../api";
-
-const initModalForm = {
-  thirdRelateId: "",
-  thirdRelateName: ""
-};
-
-export default {
-  name: "merge-push-dialog",
-  props: {
-    ids: {
-      type: Array,
-      default() {
-        return [];
-      }
-    }
-  },
-  data() {
-    const thirdRelateValidator = (rule, value, callback) => {
-      if (!this.modalForm.thirdRelateId && !this.modalForm.thirdRelateName) {
-        return callback(new Error(`考试ID和名称至少填一项。`));
-      }
-
-      if (
-        this.modalForm.thirdRelateId &&
-        this.modalForm.thirdRelateId.length > 50
-      ) {
-        return callback(new Error("考试ID长度不能超过50"));
-      }
-      if (
-        this.modalForm.thirdRelateName &&
-        this.modalForm.thirdRelateName.length > 50
-      ) {
-        return callback(new Error("考试名称长度不能超过50"));
-      }
-
-      return callback();
-    };
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      exams: [],
-      canEditThirdRelateName: true,
-      modalForm: { ...initModalForm },
-      rules: {
-        thirdRelate: [
-          {
-            required: true,
-            validator: thirdRelateValidator,
-            trigger: "change"
-          }
-        ]
-      },
-      rules1: {
-        thirdRelateId: [
-          {
-            required: true,
-            message: "请选择考试ID",
-            trigger: "change"
-          }
-        ]
-      },
-      examType: "0",
-      EXAM_TYPE: {
-        0: "未同步考试",
-        1: "已同步考试"
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      this.modalForm = { ...initModalForm };
-      this.$nextTick(() => {
-        this.$refs.modalFormComp.clearValidate();
-      });
-    },
-    visibleChange() {
-      this.initData(this.instance);
-      this.getExamList();
-    },
-    async getExamList() {
-      const data = await printPlanSyncExamList();
-      this.exams = data || [];
-    },
-    thirdRelateIdChange() {
-      const exam = this.exams.find(
-        exam => this.modalForm.thirdRelateId === exam.thirdRelateId
-      );
-      if (!exam) {
-        this.modalForm.thirdRelateName = "";
-        this.canEditThirdRelateName = true;
-        return;
-      }
-      this.modalForm.thirdRelateName = exam.thirdRelateName;
-      this.canEditThirdRelateName = false;
-    },
-    selectMenu(val) {
-      this.examType = val;
-      this.modalForm = { ...initModalForm };
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      const data = await printPlanMergePush({
-        ...this.modalForm,
-        list: this.ids
-      }).catch(() => {
-        this.isSubmit = false;
-      });
-
-      if (!data) return;
-
-      this.isSubmit = false;
-      this.$message.success("提交成功!");
-      this.$emit("modified");
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 241
src/modules/base/components/ModifyCardInfo.vue

@@ -1,241 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-card-info"
-    :visible.sync="modalIsShow"
-    :title="title"
-    width="600px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      label-position="top"
-      :rules="rules"
-      :model="modalForm"
-    >
-      <el-form-item prop="title" label="题卡名称:">
-        <el-input
-          v-model.trim="modalForm.title"
-          placeholder="建议不超过30个字,题卡名称不允许重复"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="remark" label="备注:">
-        <el-input
-          v-model="modalForm.remark"
-          type="textarea"
-          resize="none"
-          :rows="2"
-          :maxlength="50"
-          clearable
-          show-word-limit
-          placeholder="建议不超过50个字"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="createMethod" label="题卡创建方式:">
-        <el-radio-group v-model="modalForm.createMethod" :disabled="isEdit">
-          <el-radio-button
-            v-for="(val, key) in CARD_CREATE_METHOD_TYPE"
-            :key="key"
-            :label="key"
-            >{{ val }}</el-radio-button
-          >
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item v-if="IS_UPLOAD" prop="attachmentId" label="上传模板文件:">
-        <upload-file-view
-          :upload-data="uploadData"
-          :upload-url="uploadUrl"
-          :format="format"
-          @valid-error="validError"
-          @upload-success="uploadSuccess"
-          ref="UploadFileView"
-        ></upload-file-view>
-      </el-form-item>
-      <el-form-item v-if="IS_STANDARD" prop="cardRuleId" label="题卡规则:">
-        <card-rule-select
-          ref="CardRuleSelect"
-          v-model.trim="modalForm.cardRuleId"
-          placeholder="请选择题卡规则"
-          clearable
-          class="width-full"
-          :disabled="isEdit"
-          :show-common-card="false"
-        ></card-rule-select>
-      </el-form-item>
-    </el-form>
-
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button @click="cancel">取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { updateCard } from "../api";
-import { attachmentDetail } from "../../login/api";
-import { CARD_CREATE_METHOD_TYPE } from "../../../constants/enumerate";
-import UploadFileView from "@/components/UploadFileView";
-
-const initModalForm = {
-  id: null,
-  title: "",
-  type: "GENERIC",
-  createMethod: "UPLOAD",
-  remark: "",
-  cardRuleId: "",
-  attachmentId: "",
-  status: "STAGE"
-};
-
-export default {
-  name: "modify-card-info",
-  components: { UploadFileView },
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.modalForm.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "题卡";
-    },
-    IS_GENGRIC() {
-      return this.modalForm.type === "GENERIC";
-    },
-    IS_UPLOAD() {
-      return this.modalForm.createMethod === "UPLOAD";
-    },
-    IS_STANDARD() {
-      return this.modalForm.createMethod === "STANDARD";
-    },
-    IS_FREE() {
-      return this.modalForm.createMethod === "FREE";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: {},
-      attachment: {},
-      format: ["html"],
-      CARD_CREATE_METHOD_TYPE,
-      rules: {
-        title: [
-          {
-            required: true,
-            message: "题卡名称不能超过30个字",
-            max: 30,
-            trigger: "change"
-          }
-        ],
-        createMethod: [
-          {
-            required: true,
-            message: "请选择题卡创建方式",
-            trigger: "change"
-          }
-        ],
-        attachmentId: [
-          {
-            required: true,
-            message: "请上传模板文件",
-            trigger: "change"
-          }
-        ],
-        cardRuleId: [
-          {
-            required: true,
-            message: "请选择题卡规则",
-            trigger: "change"
-          }
-        ]
-      },
-      // upload
-      uploadUrl: "/api/admin/common/file/upload",
-      uploadData: {
-        type: "UPLOAD"
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      this.modalForm = this.$objAssign(initModalForm, val);
-      if (val.id) {
-        if (this.modalForm.createMethod !== "UPLOAD") return;
-        this.getAttachment();
-      } else {
-        if (this.modalForm.createMethod !== "UPLOAD") return;
-        this.$nextTick(() => {
-          this.$refs.UploadFileView.setAttachmentName("");
-        });
-      }
-    },
-    async getAttachment() {
-      const data = await attachmentDetail(this.instance.attachmentId);
-      this.attachment = data;
-
-      this.$nextTick(() => {
-        this.$refs.UploadFileView.setAttachmentName(`${data.name}${data.type}`);
-      });
-    },
-    visibleChange() {
-      this.initData(this.instance);
-
-      this.$nextTick(() => {
-        this.$refs.modalFormComp.clearValidate();
-      });
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (!this.IS_UPLOAD && !this.isEdit) {
-        this.$emit("new-card", this.modalForm);
-        this.cancel();
-        return;
-      }
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      let datas = {
-        ...this.modalForm
-      };
-      const data = await updateCard(datas).catch(() => {});
-      this.isSubmit = false;
-      if (!data) return;
-
-      this.$message.success("保存成功!");
-      this.$emit("modified");
-      this.cancel();
-    },
-    validError(errorData) {
-      this.$message.error(errorData.message);
-    },
-    uploadSuccess(data) {
-      this.$message.success("上传成功!");
-
-      this.modalForm.attachmentId = data.id;
-      this.$refs.modalFormComp.validateField("attachmentId");
-    }
-  }
-};
-</script>

+ 0 - 386
src/modules/base/components/ModifyCardRule.vue

@@ -1,386 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-card-rule"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10px"
-    width="950px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      label-width="130px"
-      :rules="rules"
-      :model="modalForm"
-    >
-      <el-form-item prop="name" label="题卡规则名称:">
-        <el-input
-          v-model.trim="modalForm.name"
-          placeholder="建议不超过30个字,规则名称不允许重复"
-          style="width: 100%"
-          clearable
-          :disabled="!editable"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="remark" label="备注:">
-        <el-input
-          v-model="modalForm.remark"
-          type="textarea"
-          resize="none"
-          :rows="2"
-          :maxlength="50"
-          :disabled="!editable"
-          clearable
-          show-word-limit
-          placeholder="建议不超过50个字"
-        ></el-input>
-      </el-form-item>
-      <el-form-item
-        prop="examNumberStyle"
-        label="考号版式:"
-        class="inline-block"
-      >
-        <el-select
-          v-model="modalForm.examNumberStyle"
-          style="width: 142px;"
-          placeholder="请选择"
-          :disabled="!editable"
-          @change="numStyleChange"
-        >
-          <el-option
-            v-for="(val, key) in EXAM_NUMBER_STYLE"
-            :key="key"
-            :value="key"
-            :label="val"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item
-        v-if="modalForm.examNumberStyle === 'FILL'"
-        prop="examNumberDigit"
-        label="考号位数:"
-        class="inline-block"
-      >
-        <!-- <el-input-number
-          v-model="modalForm.examNumberDigit"
-          :min="5"
-          :max="15"
-          :step="1"
-          step-strictly
-          :controls="false"
-          style="width: 100px;"
-        ></el-input-number> -->
-        {{ modalForm.examNumberDigit }}
-      </el-form-item>
-      <el-form-item prop="paperType" label="AB卷版式:" class="inline-block">
-        <el-select
-          v-model="modalForm.paperType"
-          style="width: 142px;"
-          placeholder="请选择"
-          :disabled="!editable"
-        >
-          <el-option
-            v-for="(val, key) in PAPER_TYPE"
-            :key="key"
-            :value="key"
-            :label="val"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-checkbox v-model="modalForm.examAbsent" :disabled="!editable"
-          >启用“缺考填涂”</el-checkbox
-        >
-        <el-checkbox v-model="modalForm.discipline" :disabled="!editable"
-          >启用“违纪填涂”</el-checkbox
-        >
-        <el-checkbox
-          v-model="modalForm.writeSign"
-          :disabled="modalForm.examNumberStyle === 'FILL' || !editable"
-          >启用“手写签名”</el-checkbox
-        >
-      </el-form-item>
-      <div class="part-box part-box-pad part-box-border">
-        <h4 class="part-box-tips">题卡版头变量印刷字段配置:</h4>
-        <el-form-item label="必选字段:" label-width="115px" required>
-          <el-checkbox
-            v-for="column in modalForm.requiredFields"
-            :key="column.code"
-            v-model="column.enable"
-            disabled
-            >{{ column.name }}</el-checkbox
-          >
-        </el-form-item>
-        <el-form-item label="扩展字段:" label-width="115px">
-          <el-checkbox
-            v-for="column in modalForm.extendFields"
-            :key="column.code"
-            v-model="column.enable"
-            :disabled="!editable"
-            >{{ column.name }}</el-checkbox
-          >
-        </el-form-item>
-      </div>
-      <el-form-item prop="titleRule" label="题卡标题规则:">
-        <!-- <el-input
-            v-model="modalForm.titleRule"
-            :disabled="!editable"
-          ></el-input> -->
-        <card-title-rule-edit
-          v-model="modalForm.titleRule"
-          :disabled="!editable"
-          :field-sourses="fieldSourses"
-          v-if="fieldSourses.length"
-          ref="CardTitleRuleEdit"
-        ></card-title-rule-edit>
-      </el-form-item>
-      <el-form-item prop="attention" label="注意事项:">
-        <el-input
-          type="textarea"
-          :rows="4"
-          v-model="modalForm.attention"
-          :disabled="!editable"
-        ></el-input>
-        <p class="tips-info">
-          提示:换行之后,题卡注意事项会展示为多条内容,内容序号会被自动添加。
-        </p>
-      </el-form-item>
-      <el-form-item prop="objectiveAttention" label="客观题注意事项:">
-        <el-input
-          v-model="modalForm.objectiveAttention"
-          :disabled="!editable"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="subjectiveAttention" label="主观题注意事项:">
-        <el-input
-          v-model="modalForm.subjectiveAttention"
-          :disabled="!editable"
-        ></el-input>
-      </el-form-item>
-    </el-form>
-
-    <div slot="footer">
-      <el-button
-        v-if="editable"
-        type="primary"
-        :disabled="isSubmit"
-        @click="submit"
-        >确认</el-button
-      >
-      <el-button @click="cancel">取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { EXAM_NUMBER_STYLE, PAPER_TYPE } from "@/constants/enumerate";
-import { saveCardRule } from "../api";
-import CardTitleRuleEdit from "./CardTitleRuleEdit";
-
-const initModalForm = {
-  id: null,
-  name: "",
-  remark: "",
-  examNumberStyle: "",
-  examNumberDigit: 8,
-  paperType: "PRINT",
-  examAbsent: true,
-  discipline: true,
-  writeSign: true,
-  requiredFields: [],
-  extendFields: [],
-  titleRule: "",
-  attention: "",
-  objectiveAttention: "",
-  subjectiveAttention: ""
-};
-
-export default {
-  name: "modify-card-rule",
-  components: { CardTitleRuleEdit },
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    },
-    editType: {
-      type: String,
-      default: "ADD",
-      validator: val => ["ADD", "PREVIEW", "EDIT"].includes(val)
-    }
-  },
-  computed: {
-    title() {
-      const names = {
-        ADD: "新增题卡规则",
-        PREVIEW: "题卡规则详情",
-        EDIT: "编辑题卡规则"
-      };
-      return names[this.editType];
-    },
-    editable() {
-      return this.editType !== "PREVIEW";
-    }
-    // fieldSourses() {
-    //   return [
-    //     ...this.modalForm.requiredFields,
-    //     ...this.modalForm.extendFields
-    //   ].filter(item => item.enable);
-    // }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: { ...initModalForm },
-      EXAM_NUMBER_STYLE,
-      PAPER_TYPE,
-      dataReady: false,
-      rules: {
-        name: [
-          {
-            required: true,
-            message: "题卡规则名称不能超过30个字",
-            max: 30,
-            trigger: "change"
-          }
-        ],
-        examNumberStyle: [
-          {
-            required: true,
-            message: "请选择考号版式",
-            trigger: "change"
-          }
-        ],
-        examNumberDigit: [
-          {
-            required: true,
-            message: "请输入考号位数",
-            trigger: "change"
-          }
-        ],
-        paperType: [
-          {
-            required: true,
-            message: "请选择AB卷版式",
-            trigger: "change"
-          }
-        ],
-        titleRule: [
-          {
-            required: true,
-            message: "请输入题卡标题规则",
-            trigger: "change"
-          }
-        ],
-        attention: [
-          {
-            required: true,
-            message: "请输入注意事项",
-            trigger: "change"
-          },
-          {
-            validator: (rule, value, callback) => {
-              const val = value.replace(/\n/g, "");
-              if (val.length > 200) {
-                callback(new Error("注意事项最多只能输入200个字符"));
-              } else {
-                callback();
-              }
-            },
-            trigger: "change"
-          }
-        ],
-        objectiveAttention: [
-          {
-            required: true,
-            message: "请输入客观题注意事项",
-            trigger: "change"
-          },
-          {
-            max: 26,
-            message: "客观题注意事项最多只能输入26个汉字",
-            trigger: "change"
-          }
-        ],
-        subjectiveAttention: [
-          {
-            required: true,
-            message: "请输入主观题注意事项",
-            trigger: "change"
-          },
-          {
-            max: 26,
-            message: "主观题注意事项最多只能输入26个汉字",
-            trigger: "change"
-          }
-        ]
-      },
-      fieldSourses: [
-        {
-          code: "courseName",
-          enable: true,
-          name: "课程名称"
-        },
-        {
-          code: "schoolName",
-          enable: true,
-          name: "学校名称"
-        }
-      ]
-    };
-  },
-  methods: {
-    initData(val) {
-      this.modalForm = this.$objAssign(initModalForm, val);
-      this.modalForm.examNumberDigit =
-        this.modalForm.examNumberDigit || initModalForm.examNumberDigit;
-
-      if (val.id) {
-        this.modalForm.requiredFields = JSON.parse(val.requiredFields);
-        this.modalForm.extendFields = JSON.parse(val.extendFields);
-      }
-    },
-    visibleChange() {
-      this.initData(this.instance);
-
-      this.$nextTick(() => {
-        this.$refs.modalFormComp.clearValidate();
-      });
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    numStyleChange() {
-      this.modalForm.writeSign = this.modalForm.examNumberStyle !== "FILL";
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      let modals = {
-        ...this.modalForm
-      };
-      modals.requiredFields = JSON.stringify(modals.requiredFields);
-      modals.extendFields = JSON.stringify(modals.extendFields);
-      const data = await saveCardRule(modals).catch(() => {});
-      this.isSubmit = false;
-      if (!data) return;
-
-      this.$message.success("保存成功!");
-      this.$emit("modified");
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 136
src/modules/base/components/ModifyClazz.vue

@@ -1,136 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-clazz"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="448px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      :key="modalForm.id"
-      label-position="top"
-    >
-      <el-form-item prop="clazzName" label="班级名称:">
-        <el-input
-          v-model.trim="modalForm.clazzName"
-          placeholder="请输入班级名称"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="majorId" label="所属专业:">
-        <major-select
-          v-model.trim="modalForm.majorId"
-          style="width:100%;"
-          clearable
-        ></major-select>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button @click="cancel">取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { updateClazz } from "../api";
-
-const initModalForm = {
-  id: null,
-  clazzName: "",
-  majorId: ""
-};
-
-export default {
-  name: "modify-clazz",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "班级";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: { ...initModalForm },
-      rules: {
-        clazzName: [
-          {
-            required: true,
-            message: "请输入班级名称",
-            trigger: "change"
-          },
-          {
-            max: 30,
-            message: "班级名称不能超过30个字",
-            trigger: "change"
-          }
-        ],
-        majorId: [
-          {
-            required: true,
-            message: "请选择所属专业",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      if (val.id) {
-        this.modalForm = this.$objAssign(initModalForm, val);
-      } else {
-        this.modalForm = { ...initModalForm };
-      }
-    },
-    visibleChange() {
-      this.initData(this.instance);
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      let datas = { ...this.modalForm };
-      const data = await updateClazz(datas).catch(() => {
-        this.isSubmit = false;
-      });
-
-      if (!data) return;
-
-      this.isSubmit = false;
-      this.$message.success(this.title + "成功!");
-      this.$emit("modified");
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 150
src/modules/base/components/ModifyClazzSimple.vue

@@ -1,150 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-clazz"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="448px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      :key="modalForm.id"
-      label-position="top"
-    >
-      <el-form-item prop="teachClazzName" label="班级名称:">
-        <el-input
-          v-model.trim="modalForm.teachClazzName"
-          placeholder="请输入班级名称"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="teachCourseId" label="课程:">
-        <el-select
-          v-model="modalForm.teachCourseId"
-          placeholder="课程"
-          clearable
-          filterable
-          :disabled="isEdit"
-          class="width-full"
-        >
-          <el-option
-            v-for="item in courses"
-            :key="item.id"
-            :value="item.id"
-            :label="item.name"
-          >
-            <span>{{ `${item.name}(${item.code})` }}</span>
-          </el-option>
-        </el-select>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button @click="cancel">取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { updateClazzSimple } from "../api";
-
-const initModalForm = {
-  id: null,
-  teachClazzName: "",
-  teachCourseId: ""
-};
-
-export default {
-  name: "modify-clazz-simple",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    },
-    courses: {
-      type: Array,
-      default() {
-        return [];
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "班级";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: { ...initModalForm },
-      rules: {
-        teachClazzName: [
-          {
-            required: true,
-            message: "请输入班级名称",
-            trigger: "change"
-          },
-          {
-            max: 30,
-            message: "班级名称不能超过30个字",
-            trigger: "change"
-          }
-        ],
-        teachCourseId: [
-          {
-            required: true,
-            message: "请选择课程",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      this.modalForm = this.$objAssign(initModalForm, val);
-    },
-    visibleChange() {
-      this.initData(this.instance);
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      let datas = { ...this.modalForm };
-      const data = await updateClazzSimple(datas).catch(() => {
-        this.isSubmit = false;
-      });
-
-      if (!data) return;
-
-      this.isSubmit = false;
-      this.$message.success(this.title + "成功!");
-      this.$emit("modified");
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 207
src/modules/base/components/ModifyClazzSimpleStudent.vue

@@ -1,207 +0,0 @@
-<template>
-  <div>
-    <el-dialog
-      class="modify-clazz-simple-student page-dialog"
-      :visible.sync="modalIsShow"
-      :title="title"
-      :close-on-click-modal="false"
-      :close-on-press-escape="false"
-      append-to-body
-      fullscreen
-      destroy-on-close
-      @open="visibleChange"
-      @close="closed"
-    >
-      <div class="part-box part-box-filter part-box-flex">
-        <el-form
-          ref="FilterForm"
-          label-position="left"
-          label-width="85px"
-          inline
-        >
-          <el-form-item label="学生:">
-            <el-input
-              v-model="filter.studentInfo"
-              placeholder="请输入姓名或者学号"
-              clearable
-            ></el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="toPage(1)">查询</el-button>
-          </el-form-item>
-        </el-form>
-        <div class="part-box-action">
-          <el-button
-            type="danger"
-            icon="el-icon-circle-plus-outline"
-            @click="toBatchDelete"
-            >批量删除</el-button
-          >
-          <el-button
-            type="primary"
-            icon="el-icon-circle-plus-outline"
-            @click="toAdd"
-            >新增学生</el-button
-          >
-        </div>
-      </div>
-
-      <div class="part-box part-box-pad">
-        <el-table
-          ref="TableList"
-          :data="studentList"
-          @selection-change="handleSelectionChange"
-        >
-          <el-table-column
-            type="selection"
-            width="55"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            type="index"
-            label="序号"
-            width="70"
-            :index="indexMethod"
-          ></el-table-column>
-          <el-table-column prop="studentName" label="姓名"> </el-table-column>
-          <el-table-column prop="studentCode" label="学号"> </el-table-column>
-          <el-table-column prop="belongOrgName" label="院系"> </el-table-column>
-          <el-table-column prop="majorName" label="专业"> </el-table-column>
-          <el-table-column prop="clazzName" label="班级"> </el-table-column>
-          <el-table-column class-name="action-column" label="操作" width="80">
-            <template slot-scope="scope">
-              <el-button
-                class="btn-danger"
-                type="text"
-                @click="toDelete(scope.row)"
-                >移除</el-button
-              >
-            </template>
-          </el-table-column>
-        </el-table>
-        <div class="part-page">
-          <el-pagination
-            background
-            layout="total,prev, pager, next"
-            :current-page="current"
-            :total="total"
-            :page-size="size"
-            @current-change="toPage"
-          >
-          </el-pagination>
-        </div>
-      </div>
-    </el-dialog>
-
-    <!-- ModifyStudentSimple -->
-    <modify-student-simple
-      ref="ModifyStudentSimple"
-      :instance="curStudent"
-      @modified="getList"
-    ></modify-student-simple>
-  </div>
-</template>
-
-<script>
-import { studentSimpleListQuery, deleteStudentSimple } from "../api";
-import ModifyStudentSimple from "./ModifyStudentSimple";
-
-export default {
-  name: "modify-clazz-simple-student",
-  components: { ModifyStudentSimple },
-  props: {
-    clazz: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      filter: {
-        teachClazzId: "",
-        studentInfo: ""
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      multipleSelection: [],
-      studentList: [],
-      curStudent: {}
-    };
-  },
-  computed: {
-    title() {
-      return `学生管理-${this.clazz.teachClazzName}`;
-    }
-  },
-  methods: {
-    visibleChange() {
-      this.filter.teachClazzId = this.clazz.id;
-
-      this.toPage(1);
-    },
-    closed() {
-      this.$emit("modified");
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async getList() {
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      const data = await studentSimpleListQuery(datas);
-      this.studentList = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.multipleSelection = [];
-      this.current = page;
-      this.getList();
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val.map(item => item.id);
-    },
-    toAdd() {
-      this.curStudent = { teachClazzId: this.clazz.id };
-      this.$refs.ModifyStudentSimple.open();
-    },
-    toDelete(row) {
-      this.$confirm(`确定要移除学生【${row.studentName}】吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          await deleteStudentSimple([row.id]);
-          this.$message.success("操作成功!");
-          this.deletePageLastItem();
-        })
-        .catch(() => {});
-    },
-    toBatchDelete() {
-      if (!this.multipleSelection.length) {
-        this.$message.error("请选择要删除的学生");
-        return;
-      }
-
-      this.$confirm(`确定要删除选中的这些学生吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          await deleteStudentSimple(this.multipleSelection);
-          this.$message.success("操作成功!");
-          this.deletePageLastItem(this.multipleSelection.length);
-          this.multipleSelection = [];
-        })
-        .catch(() => {});
-    }
-  }
-};
-</script>

+ 0 - 155
src/modules/base/components/ModifyCourseSimple.vue

@@ -1,155 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-course"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="550px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      :key="modalForm.id"
-      label-position="top"
-    >
-      <el-form-item prop="basicCourseId" label="课程名称:">
-        <el-select
-          class="width-full"
-          v-model="modalForm.basicCourseId"
-          placeholder="课程"
-          clearable
-          filterable
-          @change="courseChange"
-        >
-          <el-option
-            v-for="item in courses"
-            :key="item.id"
-            :value="item.id"
-            :label="item.name"
-          >
-            <span>{{ `${item.name}(${item.code})` }}</span>
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item prop="basicCourseCode" label="课程编码:">
-        <el-input
-          v-model.trim="modalForm.basicCourseCode"
-          placeholder="课程编码"
-          readonly
-        ></el-input>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button @click="cancel">取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { updateCourseSimple, courseSimpleQuery } from "../api";
-
-const initModalForm = {
-  id: null,
-  basicCourseId: "",
-  basicCourseCode: ""
-};
-
-export default {
-  name: "modify-course-simple",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "课程";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: { ...initModalForm },
-      courses: [],
-      rules: {
-        basicCourseId: [
-          {
-            required: true,
-            message: "请选择课程",
-            trigger: "change"
-          }
-        ],
-        basicCourseCode: [
-          {
-            required: true,
-            message: "需要课程编码",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  mounted() {
-    this.getCourseSimple();
-  },
-  methods: {
-    async getCourseSimple() {
-      const data = await courseSimpleQuery();
-      this.courses = data || [];
-    },
-    initData(val) {
-      if (val.id) {
-        this.modalForm = this.$objAssign(initModalForm, val);
-      } else {
-        this.modalForm = { ...initModalForm };
-      }
-    },
-    visibleChange() {
-      this.initData(this.instance);
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    courseChange(val) {
-      const course = this.courses.find(item => item.id === val);
-      this.modalForm.basicCourseCode = course.code;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      let datas = { basicCourseId: this.modalForm.basicCourseId };
-      const data = await updateCourseSimple(datas).catch(() => {
-        this.isSubmit = false;
-      });
-
-      if (!data) return;
-
-      this.isSubmit = false;
-      this.$message.success(this.title + "成功!");
-      this.$emit("modified");
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 185
src/modules/base/components/ModifyExam.vue

@@ -1,185 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-exam"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="650px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      :key="modalForm.id"
-      label-width="100px"
-    >
-      <el-form-item prop="name" label="考试名称:">
-        <el-input
-          v-model.trim="modalForm.name"
-          placeholder="请输入考试名称"
-          clearable
-        ></el-input>
-        <p class="tips-info">示例:期末考试/期中考试/模拟考试</p>
-      </el-form-item>
-      <el-form-item prop="semesterId" label="学年学期:">
-        <semester-select
-          v-model="modalForm.semesterId"
-          placeholder="学年学期"
-          clearable
-          style="width:100%"
-        ></semester-select>
-      </el-form-item>
-      <el-form-item prop="category" label="考试类型:">
-        <el-radio-group v-model="modalForm.category">
-          <el-radio v-for="(val, key) in EXAM_TYPE" :key="key" :label="key">{{
-            val
-          }}</el-radio>
-        </el-radio-group>
-        <div class="tips-info">
-          <p>说明:</p>
-          <p>线下考试指纸笔传统考试,需要印刷试卷/题卡</p>
-          <p>线上考试指无纸化考试,如网考/机考</p>
-        </div>
-      </el-form-item>
-      <el-form-item
-        v-if="modalForm.category === 'OFFLINE'"
-        prop="examModel"
-        label=""
-      >
-        <p class="tips-info mb-2">请选择符合此考试的业务模式</p>
-        <el-radio-group v-model="modalForm.examModel">
-          <el-radio
-            v-for="(val, key) in EXAM_MODE_TYPE"
-            :key="key"
-            :label="key"
-            class="el-radio-v"
-            >{{ val }}</el-radio
-          >
-        </el-radio-group>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button @click="cancel">取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { updateExam } from "../api";
-import { EXAM_TYPE, EXAM_MODE_TYPE } from "@/constants/enumerate";
-
-const initModalForm = {
-  id: null,
-  name: "",
-  semesterId: "",
-  category: "OFFLINE",
-  examModel: "MODEL1"
-};
-
-export default {
-  name: "modify-exam",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "考试";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: { ...initModalForm },
-      EXAM_TYPE,
-      EXAM_MODE_TYPE,
-      rules: {
-        name: [
-          {
-            required: true,
-            message: "请输入考试名称",
-            trigger: "change"
-          },
-          {
-            message: "考试名称不能超过100个字符",
-            max: 100,
-            trigger: "change"
-          }
-        ],
-        semesterId: [
-          {
-            required: true,
-            message: "请选择学年学期",
-            trigger: "change"
-          }
-        ],
-        category: [
-          {
-            required: true,
-            message: "请选择考试类型",
-            trigger: "change"
-          }
-        ],
-        examModel: [
-          {
-            required: true,
-            message: "请选择考试模式",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      if (val.id) {
-        this.modalForm = this.$objAssign(initModalForm, val);
-      } else {
-        this.modalForm = { ...initModalForm };
-      }
-    },
-    visibleChange() {
-      this.initData(this.instance);
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      let datas = { ...this.modalForm };
-      const data = await updateExam(datas).catch(() => {
-        this.isSubmit = false;
-      });
-
-      if (!data) return;
-
-      this.isSubmit = false;
-      this.$message.success(this.title + "成功!");
-      this.$emit("modified", { isEdit: this.isEdit, exam: data });
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 253
src/modules/base/components/ModifyExamConfig.vue

@@ -1,253 +0,0 @@
-<template>
-  <div>
-    <el-dialog
-      class="modify-exam-config page-dialog"
-      :visible.sync="modalIsShow"
-      :title="title"
-      :close-on-click-modal="false"
-      :close-on-press-escape="false"
-      append-to-body
-      fullscreen
-      destroy-on-close
-      @open="visibleChange"
-    >
-      <div class="part-box part-box-filter part-box-flex">
-        <el-form
-          ref="FilterForm"
-          label-position="left"
-          label-width="85px"
-          inline
-        >
-          <el-form-item label="创建时间:">
-            <el-date-picker
-              v-model="createTime"
-              type="datetimerange"
-              :picker-options="pickerOptions"
-              range-separator="至"
-              start-placeholder="创建开始时间"
-              end-placeholder="创建结束时间"
-              value-format="timestamp"
-              align="right"
-              unlink-panels
-            >
-            </el-date-picker>
-          </el-form-item>
-          <el-form-item label="启用/禁用:" label-width="90px">
-            <el-select
-              v-model="filter.enable"
-              style="width: 120px;"
-              placeholder="启用/禁用"
-              clearable
-            >
-              <el-option
-                v-for="(val, key) in ABLE_TYPE"
-                :key="key"
-                :value="key * 1"
-                :label="val"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="toPage(1)">查询</el-button>
-          </el-form-item>
-        </el-form>
-        <div class="part-box-action">
-          <el-button
-            type="primary"
-            icon="el-icon-circle-plus-outline"
-            @click="toAdd"
-            >新增</el-button
-          >
-        </div>
-      </div>
-
-      <div class="part-box part-box-pad">
-        <el-table ref="TableList" :data="examConfigList">
-          <el-table-column
-            type="index"
-            label="序号"
-            width="70"
-            :index="indexMethod"
-          ></el-table-column>
-          <el-table-column prop="orgs" label="适用机构">
-            <template slot-scope="scope">
-              <more-text :data="scope.row.orgNames" :show-count="3"></more-text>
-            </template>
-          </el-table-column>
-          <el-table-column prop="createTime" label="创建时间">
-            <span slot-scope="scope">{{
-              scope.row.createTime | timestampFilter
-            }}</span>
-          </el-table-column>
-          <el-table-column prop="enable" label="启用/禁用">
-            <template slot-scope="scope">
-              {{ scope.row.enable | enableFilter }}
-            </template>
-          </el-table-column>
-          <el-table-column class-name="action-column" label="操作" width="160">
-            <template slot-scope="scope">
-              <el-button
-                class="btn-primary"
-                type="text"
-                @click="toEdit(scope.row)"
-                >编辑</el-button
-              >
-              <el-button
-                :class="scope.row.enable ? 'btn-danger' : 'btn-primary'"
-                type="text"
-                @click="toEnable(scope.row)"
-                >{{ scope.row.enable ? "禁用" : "启用" }}</el-button
-              >
-              <el-button
-                class="btn-danger"
-                type="text"
-                @click="toDelete(scope.row)"
-                >删除</el-button
-              >
-            </template>
-          </el-table-column>
-        </el-table>
-        <div class="part-page">
-          <el-pagination
-            background
-            layout="total,prev, pager, next"
-            :current-page="current"
-            :total="total"
-            :page-size="size"
-            @current-change="toPage"
-          >
-          </el-pagination>
-        </div>
-      </div>
-    </el-dialog>
-
-    <!-- ModifyExamConfigDetail -->
-    <modify-exam-config-detail
-      ref="ModifyExamConfigDetail"
-      :instance="curExamConfig"
-      @modified="examConfigDetailModified"
-    ></modify-exam-config-detail>
-  </div>
-</template>
-
-<script>
-import { ABLE_TYPE } from "@/constants/enumerate";
-import pickerOptions from "@/constants/datePickerOptions";
-import { examConfigQuery, deleteExamConfig, ableExamConfig } from "../api";
-import ModifyExamConfigDetail from "./ModifyExamConfigDetail";
-
-export default {
-  name: "modify-exam-config",
-  components: { ModifyExamConfigDetail },
-  props: {
-    exam: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      filter: {
-        examId: "",
-        createStartTime: "",
-        createEndTime: "",
-        enable: ""
-      },
-      ABLE_TYPE,
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      examConfigList: [],
-      curExamConfig: {},
-      usedOrgIds: [],
-      // date-picker
-      createTime: [],
-      pickerOptions
-    };
-  },
-  computed: {
-    title() {
-      return "配置管理-" + this.exam.name;
-    }
-  },
-  methods: {
-    visibleChange() {
-      this.filter.examId = this.exam.id;
-      this.toPage(1);
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    examConfigDetailModified() {
-      this.getList();
-    },
-    async getList() {
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      if (this.createTime) {
-        datas.createStartTime = this.createTime[0];
-        datas.createEndTime = this.createTime[1];
-      }
-      if (datas.enable !== null && datas.enable !== "")
-        datas.enable = !!datas.enable;
-
-      const data = await examConfigQuery(datas);
-      this.examConfigList = data.records.map(item => {
-        item.orgNames = item.orgs.map(org => org.name);
-        return item;
-      });
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    toAdd() {
-      this.curExamConfig = {
-        examId: this.filter.examId
-      };
-      this.$refs.ModifyExamConfigDetail.open();
-    },
-    toEdit(row) {
-      this.curExamConfig = { ...row, examId: this.filter.examId };
-      this.$refs.ModifyExamConfigDetail.open();
-    },
-    toDelete(row) {
-      this.$confirm(`确定要删除该配置吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          await deleteExamConfig(row.id);
-          this.$message.success("删除成功!");
-          this.deletePageLastItem();
-        })
-        .catch(() => {});
-    },
-    toEnable(row) {
-      const action = row.enable ? "禁用" : "启用";
-      this.$confirm(`确定要${action}该配置吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          const enable = !row.enable;
-          await ableExamConfig({
-            id: row.id,
-            enable
-          });
-          row.enable = enable;
-          this.$message.success("操作成功!");
-        })
-        .catch(() => {});
-    }
-  }
-};
-</script>

+ 0 - 694
src/modules/base/components/ModifyExamConfigDetail.vue

@@ -1,694 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-exam-config-detail"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="0"
-    width="800px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @opened="dialogOpened"
-    @close="dialogClose"
-  >
-    <el-form
-      ref="modalFormComp"
-      label-width="130px"
-      :rules="rules"
-      :model="modalForm"
-    >
-      <el-form-item prop="cardRuleId" label="题卡规则:">
-        <card-rule-select
-          ref="CardRuleSelect"
-          v-model.trim="modalForm.cardRuleId"
-          placeholder="请选择"
-          clearable
-        ></card-rule-select>
-        <div class="tips-info">
-          <p>说明:</p>
-          <p>
-            1、若选择全部通卡,则命题老师只能选择通卡,若选择题卡规则,则专卡和通卡均可选择
-          </p>
-          <p>
-            2、若选择题卡规则,命题老师在该考试下自主创建题卡时,版头样式及版头内容为该规则对应样式及版头。
-          </p>
-        </div>
-      </el-form-item>
-
-      <div class="part-box">
-        <h4 class="part-box-tips">
-          试卷&题卡印品:
-          <el-checkbox
-            v-show="infoShow"
-            v-model="allSelected"
-            label="全选"
-            @change="selectAll"
-          ></el-checkbox>
-        </h4>
-        <el-form-item prop="printContent" label="试卷、题卡:">
-          <el-checkbox-group
-            v-model="modalForm.printContent"
-            @change="() => checkSelectAll()"
-          >
-            <el-checkbox
-              v-for="(val, key) in PRINT_CONTENT_TYPE"
-              :key="key"
-              :label="key"
-              >{{ val }}</el-checkbox
-            >
-          </el-checkbox-group>
-        </el-form-item>
-        <el-form-item
-          v-if="modalForm.printContent.length"
-          prop="backupMethod"
-          label="备用数量:"
-        >
-          <el-select
-            v-model="modalForm.backupMethod"
-            class="mr-2"
-            size="small"
-            placeholder="请选择"
-          >
-            <el-option
-              v-for="(val, key) in PAPER_BACKUP_TYPE"
-              :key="key"
-              :value="key"
-              :label="val"
-            ></el-option>
-          </el-select>
-          <el-input-number
-            class="mr-1"
-            v-model="modalForm.backupCount"
-            size="small"
-            :min="0"
-            :max="200"
-            :step="1"
-            step-strictly
-            :controls="false"
-            style="width: 60px"
-          ></el-input-number>
-          <span>份</span>
-        </el-form-item>
-        <el-form-item
-          v-show="infoShow"
-          v-if="contentIncludesPaper"
-          prop="drawRule"
-          label="抽卷规则:"
-        >
-          <el-radio-group v-model="modalForm.drawRule">
-            <el-radio
-              v-for="(val, key) in DRAW_RULE_TYPE"
-              :label="key"
-              :key="key"
-              >{{ val }}</el-radio
-            >
-          </el-radio-group>
-          <div class="tips-info">
-            <p>说明:</p>
-            <p>
-              1.只抽取一次:不同印刷计划下,同一试卷编号下的卷型只能被抽取一次;
-            </p>
-            <p>
-              2.可反复抽取:不同印刷计划下,同一试卷编号下的卷型可重复抽取,系统默认优先抽取未曝光卷型。
-            </p>
-          </div>
-        </el-form-item>
-      </div>
-
-      <div class="part-box" v-show="infoShow">
-        <h4 class="part-box-tips">变量印品:</h4>
-        <el-form-item
-          v-for="(item, index) in modalForm.variableContent"
-          :key="item.type"
-          :label="`${TEMPLATE_CLASSIFY[item.type]}:`"
-          :prop="`variableContent.${index}.templateId`"
-          :rules="{
-            required: false,
-            validator: templateValidator,
-            trigger: 'change'
-          }"
-          :required="!!item.templateId.length"
-        >
-          <el-checkbox-group
-            v-model="item.templateId"
-            @change="vals => tempChange(vals, `variableContent.${index}`)"
-          >
-            <el-checkbox
-              v-for="temp in templateSources[item.type]"
-              :label="temp.id"
-              :key="temp.id"
-              >{{ temp.name }}</el-checkbox
-            >
-          </el-checkbox-group>
-          <div v-if="item.templateId.length">
-            <el-select
-              v-model="item.backupMethod"
-              class="mr-2"
-              size="small"
-              placeholder="请选择"
-            >
-              <el-option
-                v-for="(val, key) in PRINT_BACKUP_TYPE"
-                :key="key"
-                :value="key"
-                :label="val"
-              ></el-option>
-            </el-select>
-            <el-input-number
-              v-model="item.backupCount"
-              class="mr-1"
-              size="small"
-              :min="1"
-              :max="200"
-              :step="1"
-              step-strictly
-              :controls="false"
-              style="width: 60px"
-            ></el-input-number>
-            <span>份</span>
-          </div>
-        </el-form-item>
-      </div>
-
-      <div class="part-box" v-show="infoShow">
-        <h4 class="part-box-tips">普通印品:</h4>
-        <el-form-item
-          v-for="(item, index) in modalForm.ordinaryContent"
-          :key="item.type"
-          :label="`${TEMPLATE_CLASSIFY[item.type]}:`"
-          :prop="`ordinaryContent.${index}.templateId`"
-          :rules="{
-            required: false,
-            validator: templateValidator,
-            trigger: 'change'
-          }"
-          :required="!!item.templateId.length"
-        >
-          <el-checkbox-group
-            v-model="item.templateId"
-            @change="vals => tempChange(vals, `ordinaryContent.${index}`)"
-          >
-            <el-checkbox
-              v-for="temp in templateSources[item.type]"
-              :label="temp.id"
-              :key="temp.id"
-              >{{ temp.name }}</el-checkbox
-            >
-          </el-checkbox-group>
-          <div v-if="item.templateId.length">
-            <el-select
-              v-model="item.backupMethod"
-              class="mr-2"
-              size="small"
-              placeholder="请选择"
-            >
-              <el-option
-                v-for="(val, key) in PRINT_BACKUP_TYPE"
-                :key="key"
-                :value="key"
-                :label="val"
-              ></el-option>
-            </el-select>
-            <el-input-number
-              v-model="item.backupCount"
-              class="mr-1"
-              size="small"
-              :min="1"
-              :max="200"
-              :step="1"
-              step-strictly
-              :controls="false"
-              style="width: 60px"
-            ></el-input-number>
-            <span>份</span>
-          </div>
-        </el-form-item>
-      </div>
-
-      <el-form-item prop="selectedPrint"></el-form-item>
-
-      <el-form-item prop="orgIds" label="适用范围:">
-        <!-- <select-orgs v-model="modalForm.orgIds" ref="SelectOrgs"></select-orgs> -->
-        <div
-          v-if="orgDataReady"
-          class="select-orgs part-box part-box-pad part-box-border"
-        >
-          <el-tree
-            :data="orgs"
-            show-checkbox
-            default-expand-all
-            node-key="id"
-            ref="MenuTree"
-            :props="defaultProps"
-            check-on-click-node
-            :expand-on-click-node="false"
-            @check-change="checkChange"
-          >
-          </el-tree>
-        </div>
-      </el-form-item>
-    </el-form>
-
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button @click="cancel">取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import {
-  PRINT_CONTENT_TYPE,
-  DRAW_RULE_TYPE,
-  PRINT_BACKUP_TYPE,
-  PAPER_BACKUP_TYPE,
-  TEMPLATE_CLASSIFY
-} from "@/constants/enumerate";
-import { deepCopy } from "@/plugins/utils";
-import { updateExamConfig, listOrgsByExamId, organizationList } from "../api";
-import { printPlanTemplateList } from "../../print/api";
-
-const initModalForm = {
-  id: null,
-  examId: null,
-  cardRuleId: "",
-  orgIds: [],
-  printContent: [],
-  backupMethod: "ROOM",
-  backupCount: 1,
-  drawRule: "ONE",
-  variableContent: [
-    {
-      type: "SIGN",
-      templateId: [],
-      oldTemplateId: [],
-      backupMethod: "ROOM",
-      backupCount: 1
-    },
-    {
-      type: "PACKAGE",
-      templateId: [],
-      oldTemplateId: [],
-      backupMethod: "ROOM",
-      backupCount: 1
-    }
-  ],
-  ordinaryContent: [
-    {
-      type: "CHECK_IN",
-      templateId: [],
-      oldTemplateId: [],
-      backupMethod: "ROOM",
-      backupCount: 1
-    }
-  ]
-};
-
-export default {
-  name: "modify-exam-config-detail",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "考试配置";
-    },
-    contentIncludesPaper() {
-      return this.modalForm.printContent.includes("PAPER");
-    }
-  },
-  data() {
-    const printContentValidator = (rule, value, callback) => {
-      if (!this.modalForm.printContent.length) {
-        return callback(new Error("请选择试卷"));
-      }
-
-      callback();
-    };
-    const backupMethodValidator = (rule, value, callback) => {
-      if (!this.modalForm.printContent.length) {
-        return callback();
-      }
-      if (!value) {
-        return callback(new Error("请选择备份方式"));
-      }
-      if (!this.modalForm.backupCount && this.modalForm.backupCount !== 0) {
-        return callback(new Error("请输入备份数量"));
-      }
-
-      callback();
-    };
-    const selectedPrintValidator = (rule, value, callback) => {
-      const printInfo = [
-        ...this.modalForm.variableContent,
-        ...this.modalForm.ordinaryContent
-      ];
-      const hasPrintInfo = printInfo.some(item => item.templateId.length);
-
-      if (hasPrintInfo || this.modalForm.printContent.length) {
-        callback();
-      } else {
-        callback(new Error("必须选择一项印品"));
-      }
-    };
-
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: deepCopy(initModalForm),
-      PRINT_CONTENT_TYPE,
-      DRAW_RULE_TYPE,
-      PRINT_BACKUP_TYPE,
-      PAPER_BACKUP_TYPE,
-      TEMPLATE_CLASSIFY,
-      variableContent: [],
-      ordinaryContent: [],
-      templateSources: {},
-      oldPrintContent: [],
-      usedOrgIds: [],
-      allSelected: false,
-      infoShow: true,
-      rules: {
-        cardRuleId: [
-          {
-            required: true,
-            message: "请选择题卡规则",
-            trigger: "change"
-          }
-        ],
-        printContent: [
-          {
-            required: true,
-            validator: printContentValidator,
-            trigger: "change"
-          }
-        ],
-        backupMethod: [
-          {
-            required: true,
-            validator: backupMethodValidator,
-            trigger: "change"
-          }
-        ],
-        drawRule: [
-          {
-            required: true,
-            message: "请选择抽卷规则",
-            trigger: "change"
-          }
-        ],
-        selectedPrint: [
-          {
-            required: false,
-            validator: selectedPrintValidator,
-            trigger: "change"
-          }
-        ],
-        orgIds: [
-          {
-            required: true,
-            validator: (rule, value, callback) => {
-              if (value.length) {
-                callback();
-              } else {
-                callback(new Error("请选择适用范围"));
-              }
-            },
-            trigger: "change"
-          }
-        ]
-      },
-      // org select
-      orgDataReady: false,
-      orgs: [],
-      leafOrgIds: [],
-      defaultProps: {
-        label: "name"
-      }
-    };
-  },
-  mounted() {
-    this.getTemplates();
-    this.getOrgs();
-  },
-  methods: {
-    async dialogOpened() {
-      const data = await listOrgsByExamId({
-        examId: this.instance.examId,
-        id: this.instance.id
-      });
-      this.usedOrgIds = data || [];
-      this.setDisabledOrgs(this.usedOrgIds);
-      this.orgDataReady = true;
-
-      this.$nextTick(() => {
-        this.initData(this.instance);
-      });
-    },
-    dialogClose() {
-      this.orgDataReady = false;
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async getTemplates() {
-      const data = await printPlanTemplateList();
-      const templateSources = {};
-      const templates = [...data.variable, ...data.ordinary];
-      templates.forEach(item => {
-        templateSources[item.type] = item.template;
-      });
-      this.templateSources = templateSources;
-    },
-    initData(val) {
-      if (val.id) {
-        this.modalForm = this.$objAssign(deepCopy(initModalForm), val);
-        const transformInfo = item => {
-          const templateIds = item.templateId ? [item.templateId] : [];
-          return {
-            type: item.type,
-            templateId: templateIds,
-            oldTemplateId: templateIds,
-            backupMethod: item.backupMethod,
-            backupCount: item.backupCount
-          };
-        };
-        this.modalForm.variableContent = JSON.parse(val.variableContent).map(
-          transformInfo
-        );
-        this.modalForm.ordinaryContent = JSON.parse(val.ordinaryContent).map(
-          transformInfo
-        );
-        this.modalForm.printContent = JSON.parse(val.printContent);
-        this.modalForm.orgIds = val.orgs.map(item => item.id);
-      } else {
-        let modalForm = this.$objAssign(deepCopy(initModalForm), val);
-        modalForm.variableContent = modalForm.variableContent.filter(
-          item => this.templateSources[item.type]
-        );
-        modalForm.ordinaryContent = modalForm.ordinaryContent.filter(
-          item => this.templateSources[item.type]
-        );
-        this.modalForm = modalForm;
-      }
-
-      this.setCheckedNode(this.modalForm.orgIds);
-
-      if (!this.checkHasSelect()) {
-        this.allSelected = true;
-        this.selectAll(this.allSelected);
-      } else {
-        this.checkSelectAll();
-      }
-    },
-    getData() {
-      let data = deepCopy(this.modalForm);
-      const transformInfo = item => {
-        const templateId = item.templateId.join();
-        const template = this.templateSources[item.type].find(
-          temp => temp.id === templateId
-        );
-        return {
-          type: item.type,
-          templateId,
-          attachmentId: template && template.attachmentId,
-          backupMethod: item.backupMethod,
-          backupCount: item.backupCount
-        };
-      };
-      data.printContent = JSON.stringify(this.modalForm.printContent);
-      data.variableContent = JSON.stringify(
-        this.modalForm.variableContent.map(transformInfo)
-      );
-      data.ordinaryContent = JSON.stringify(
-        this.modalForm.ordinaryContent.map(transformInfo)
-      );
-
-      return data;
-    },
-    selectAll(selected) {
-      if (selected) {
-        this.modalForm.printContent = Object.keys(this.PRINT_CONTENT_TYPE);
-        this.modalForm.variableContent.forEach(item => {
-          if (item.templateId && item.templateId.length) return;
-
-          const source = this.templateSources[item.type][0];
-          item.templateId = source && [source.id];
-          item.oldTemplateId = source && [source.id];
-        });
-        this.modalForm.ordinaryContent.forEach(item => {
-          if (item.templateId && item.templateId.length) return;
-
-          const source = this.templateSources[item.type][0];
-          item.templateId = source && [source.id];
-          item.oldTemplateId = source && [source.id];
-        });
-      } else {
-        this.modalForm.printContent = [];
-        this.modalForm.variableContent.forEach(item => {
-          item.templateId = [];
-          item.oldTemplateId = [];
-        });
-        this.modalForm.ordinaryContent.forEach(item => {
-          item.templateId = [];
-          item.oldTemplateId = [];
-        });
-      }
-    },
-    checkSelectAll() {
-      const vNotSelected = this.modalForm.variableContent.some(
-        item => !item.templateId.length
-      );
-      const oNotSelected = this.modalForm.ordinaryContent.some(
-        item => !item.templateId.length
-      );
-      const pNotSelected =
-        this.modalForm.printContent.length <
-        Object.keys(this.PRINT_CONTENT_TYPE).length;
-
-      const selecteds = [vNotSelected, oNotSelected, pNotSelected];
-
-      this.allSelected = !selecteds.some(item => item);
-    },
-    checkHasSelect() {
-      const vSelected = this.modalForm.variableContent.some(
-        item => item.templateId.length
-      );
-      const oSelected = this.modalForm.ordinaryContent.some(
-        item => item.templateId.length
-      );
-      const pSelected = !!this.modalForm.printContent.length;
-
-      const selecteds = [vSelected, oSelected, pSelected];
-
-      return selecteds.some(item => item);
-    },
-    templateValidator(rule, value, callback) {
-      const [field, index] = rule.field.split(".");
-      const val = this.modalForm[field][index];
-      if (val.templateId.length) {
-        if (!val.backupMethod) {
-          return callback(new Error("请选择备份方式"));
-        }
-        if (!val.backupCount) {
-          return callback(new Error("请输入备份数量"));
-        }
-        callback();
-      } else {
-        callback();
-      }
-    },
-    tempChange(vals, name) {
-      const [field, index] = name.split(".");
-      const info = this.modalForm[field][index];
-      const newVals = vals.filter(item => !info.oldTemplateId.includes(item));
-      info.templateId = newVals;
-      info.oldTemplateId = newVals;
-
-      this.checkSelectAll();
-      this.$refs.modalFormComp.validateField("selectedPrint");
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-      console.log(valid);
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      let datas = this.getData();
-      const data = await updateExamConfig(datas).catch(() => {
-        this.isSubmit = false;
-      });
-
-      if (!data) return;
-
-      this.isSubmit = false;
-      this.$message.success(this.title + "成功!");
-      this.$emit("modified");
-      this.cancel();
-    },
-    // org select
-    async getOrgs() {
-      const orgs = await organizationList();
-      this.orgs = orgs || [];
-
-      if (this.orgs.length) {
-        this.orgs[0].children.sort((a, b) => {
-          if (a.type === "PRINTING_HOUSE") return 1;
-          if (b.type === "PRINTING_HOUSE") return -1;
-
-          return 0;
-        });
-      }
-
-      let leafOrgIds = [];
-      const getLeafOrg = orgs => {
-        orgs.forEach(org => {
-          org.disabled = false;
-          if (org["children"] && org["children"].length) {
-            getLeafOrg(org.children);
-          } else {
-            leafOrgIds.push(org.id);
-          }
-        });
-      };
-      getLeafOrg(this.orgs);
-      this.leafOrgIds = leafOrgIds;
-    },
-    setDisabledOrgs(disabledOrgIds) {
-      const updateInfo = orgs => {
-        orgs.forEach(org => {
-          org.disabled = disabledOrgIds.includes(org.id);
-          if (org["children"] && org["children"].length) {
-            updateInfo(org.children);
-          }
-        });
-      };
-      updateInfo(this.orgs);
-    },
-    setCheckedNode(selectedIds) {
-      const leafSelectedIds = selectedIds.filter(id =>
-        this.leafOrgIds.includes(id)
-      );
-      this.$refs.MenuTree.setCheckedKeys(leafSelectedIds);
-    },
-    checkChange() {
-      this.modalForm.orgIds = this.$refs.MenuTree.getCheckedKeys();
-      this.$refs.modalFormComp.validateField("orgIds");
-    }
-  }
-};
-</script>

+ 0 - 100
src/modules/base/components/ModifyField.vue

@@ -1,100 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-field"
-    :visible.sync="modalIsShow"
-    title="新增扩展字段"
-    top="10vh"
-    width="448px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @opened="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      label-position="top"
-    >
-      <el-form-item prop="name" label="字段名称:">
-        <el-input
-          v-model.trim="modalForm.name"
-          placeholder="请输入字段名称"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="code" label="字段变量名:">
-        <el-input
-          v-model.trim="modalForm.code"
-          placeholder="请输入字段变量名"
-          clearable
-        ></el-input>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" @click="submit">确认</el-button>
-      <el-button @click="cancel">取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-const initModalForm = {
-  name: "",
-  code: "",
-  enable: false
-};
-
-export default {
-  name: "modify-field",
-  data() {
-    return {
-      modalIsShow: false,
-      modalForm: {},
-      rules: {
-        name: [
-          {
-            required: true,
-            message: "请输入字段名称",
-            trigger: "change"
-          },
-          {
-            max: 20,
-            message: "字段名称不能超过20",
-            trigger: "change"
-          }
-        ],
-        code: [
-          {
-            required: true,
-            pattern: /^[a-zA-Z]{3,30}$/,
-            message: "字段变量名只能由字母组成,长度在3-30之间",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    visibleChange() {
-      this.modalForm = { ...initModalForm };
-      this.$nextTick(() => {
-        this.$refs.modalFormComp.clearValidate();
-      });
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      this.$emit("confirm", this.modalForm);
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 152
src/modules/base/components/ModifyFlow.vue

@@ -1,152 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-flow"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="500px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      label-position="top"
-    >
-      <el-form-item prop="name" label="流程名称:">
-        <el-input
-          style="width:100%"
-          v-model.trim="modalForm.name"
-          placeholder="请输入名称"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="type" label="流程类型:">
-        <el-select
-          v-model="modalForm.type"
-          style="width:100%"
-          placeholder="请选择流程类型"
-          :disabled="isEdit"
-        >
-          <el-option
-            v-for="(val, key) in FLOW_TYPE"
-            :key="key"
-            :value="key"
-            :label="val"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确定</el-button
-      >
-      <el-button @click="cancel">返回</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { FLOW_TYPE, FLOW_MODEL_TYPE } from "../../../constants/enumerate";
-import { updateFlowName } from "../api";
-
-const initModalForm = {
-  id: null,
-  name: "",
-  type: "ELECTRON_FLOW",
-  modelType: "USER_FIXED"
-};
-
-export default {
-  name: "modify-flow",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return this.isEdit ? "重命名流程" : "新增流程";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      FLOW_TYPE,
-      FLOW_MODEL_TYPE,
-      modalForm: {},
-      rules: {
-        name: [
-          {
-            required: true,
-            message: "请输入流程名称",
-            trigger: "change"
-          },
-          {
-            message: "流程名称不能超过100个字符",
-            max: 100,
-            trigger: "change"
-          }
-        ],
-        type: [
-          {
-            required: true,
-            message: "请选择流程类型",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      if (val.id) {
-        this.modalForm = this.$objAssign(initModalForm, val);
-      } else {
-        this.modalForm = { ...initModalForm };
-      }
-    },
-    visibleChange() {
-      this.initData(this.instance);
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (!this.isEdit) {
-        this.$emit("modified", { isEdit: this.isEdit, data: this.modalForm });
-        this.cancel();
-        return;
-      }
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      const data = await updateFlowName(this.modalForm).catch(() => {
-        this.isSubmit = false;
-      });
-
-      if (!data) return;
-
-      this.isSubmit = false;
-      this.$message.success(this.title + "成功!");
-      this.$emit("modified", { isEdit: this.isEdit, data });
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 736
src/modules/base/components/ModifyFlowDetail.vue

@@ -1,736 +0,0 @@
-<template>
-  <div>
-    <el-dialog
-      class="modify-flow-detail page-dialog"
-      :visible.sync="modalIsShow"
-      title="流程图编辑"
-      :close-on-click-modal="false"
-      :close-on-press-escape="false"
-      :show-close="false"
-      append-to-body
-      fullscreen
-      destroy-on-close
-      @open="visibleChange"
-    >
-      <div class="box-justify" slot="title">
-        <h4 class="el-dialog__title">流程图编辑:{{ instance.name }}</h4>
-        <div>
-          <el-button @click="cancel">取消</el-button>
-          <el-button type="primary" :disabled="isSubmit" @click="submit"
-            >发布</el-button
-          >
-        </div>
-      </div>
-
-      <div class="part-box part-box-pad" style="padding-bottom: 5px">
-        <el-form
-          ref="modalFormComp"
-          :model="flowInfo"
-          :rules="rules"
-          label-width="140px"
-        >
-          <el-form-item prop="modelType" label="指定审批人类型:">
-            <el-select
-              v-model="flowInfo.modelType"
-              placeholder="请选择流程指定审批人类型"
-              @change="initFlowNodes"
-            >
-              <el-option
-                v-for="(val, key) in FLOW_MODEL_TYPE"
-                :key="key"
-                :value="key"
-                :label="val"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-
-      <div class="flow-box">
-        <div class="flow-content">
-          <div class="flow-main">
-            <!-- nodes -->
-            <div
-              v-for="node in nodes"
-              :key="node.id"
-              :id="`node-${node.id}`"
-              :class="[
-                'flow-node',
-                `node-${node.type.toLowerCase()}`,
-                { 'is-active': curNode.id === node.id }
-              ]"
-              @click="toSelectNode(node)"
-            >
-              <div v-if="node.type === 'PROCESS'" class="flow-node-title">
-                <i
-                  v-if="node.type === 'PROCESS'"
-                  :class="nodeIcons['PROCESS']"
-                ></i
-                >审批人
-              </div>
-              <div v-if="node.type === 'PROCESS'" class="flow-node-content">
-                <template v-if="!IS_APPROVE_SET">
-                  <div v-if="node.property.approveUserType === 'USER'">
-                    <p>
-                      {{
-                        node.property.approveUsers
-                          .map(item => item.name)
-                          .join(",")
-                      }}
-                    </p>
-                    <p v-if="node.property.copyForUsers.length">
-                      抄送:{{
-                        node.property.copyForUsers
-                          .map(item => item.name)
-                          .join(",")
-                      }}
-                    </p>
-                  </div>
-                  <div v-else>
-                    <p>
-                      {{
-                        node.property.approveRoles
-                          .map(item => item.name)
-                          .join(",")
-                      }}
-                    </p>
-                  </div>
-                </template>
-                <template
-                  v-if="IS_APPROVE_SET && node.property.approveUserCountType"
-                >
-                  <p>
-                    方式:{{
-                      APPROVE_USER_COUNT_TYPE[
-                        node.property.approveUserCountType
-                      ]
-                    }}
-                  </p>
-                  <p>
-                    范围:{{
-                      APPROVE_USER_SELECT_RANGE[
-                        node.property.approveUserSelectRange
-                      ]
-                    }}
-                  </p>
-                  <p v-if="node.property.approveUserSelectRange === 'ROLE'">
-                    角色:{{
-                      node.property.approveUserSelectRoles
-                        .map(item => item.name)
-                        .join(",")
-                    }}
-                  </p>
-                </template>
-              </div>
-              <div v-else class="flow-node-content">
-                <span><i :class="nodeIcons[node.type]"></i></span>
-                <span>{{ node.content }}</span>
-              </div>
-              <div v-if="node.type !== 'END'" class="flow-link">
-                <div class="node-add" @click.stop="toAddNode(node.id)">
-                  <i class="el-icon-plus"></i>
-                </div>
-              </div>
-            </div>
-          </div>
-        </div>
-        <div class="flow-property">
-          <div v-if="curNode.id" class="flow-property-main" :key="curNode.id">
-            <h3 class="flow-property-title">节点属性</h3>
-            <!-- 管理员指定审批人 -->
-            <div v-if="!IS_APPROVE_SET" class="property-part">
-              <h4 class="property-part-title">设置审批人</h4>
-              <div class="flow-radio">
-                <el-radio-group
-                  v-model="curNode.property.approveUserType"
-                  size="small"
-                  @change="curNodeChange"
-                >
-                  <el-radio
-                    v-for="(val, key) in APPROVE_USER_TYPE"
-                    :key="key"
-                    :label="key"
-                    >{{ val }}</el-radio
-                  >
-                </el-radio-group>
-              </div>
-              <!-- 添加成员 -->
-              <div
-                v-if="curNode.property.approveUserType === 'USER'"
-                class="flow-users"
-              >
-                <el-button
-                  size="small"
-                  type="primary"
-                  @click="toAddUser('approveUsers')"
-                  >添加成员</el-button
-                >
-                <span class="tips-info">(最多添加5个)</span>
-                <div class="user-list">
-                  <el-tag
-                    v-for="user in curNode.property.approveUsers"
-                    :key="user.id"
-                    size="small"
-                    closable
-                    :disable-transitions="false"
-                    @close="deleteApproveUser('approveUsers', user)"
-                  >
-                    {{ user.name }}
-                  </el-tag>
-                  <el-button
-                    class="user-clear"
-                    type="danger"
-                    size="mini"
-                    plain
-                    @click="clearApproveUsers('approveUsers')"
-                    >清空</el-button
-                  >
-                </div>
-              </div>
-              <!-- 添加角色 -->
-              <div v-else class="flow-users">
-                <el-button
-                  size="small"
-                  type="primary"
-                  @click="toAddApproveRole('approveRoles')"
-                  >添加角色</el-button
-                >
-                <div class="user-list">
-                  <el-tag
-                    v-for="role in curNode.property.approveRoles"
-                    :key="role.id"
-                    size="small"
-                    closable
-                    :disable-transitions="false"
-                    @close="deleteApproveRole('approveRoles', role)"
-                  >
-                    {{ role.name }}
-                  </el-tag>
-                  <el-button
-                    class="user-clear"
-                    type="danger"
-                    size="mini"
-                    plain
-                    @click="clearApproveRole('approveRoles')"
-                    >清空</el-button
-                  >
-                </div>
-              </div>
-            </div>
-            <!-- 发起人指定审批人 -->
-            <div v-else class="property-part">
-              <h4 class="property-part-title">设置审批人</h4>
-              <el-form label-width="80px">
-                <el-form-item label="选择方式:">
-                  <el-select
-                    v-model="curNode.property.approveUserCountType"
-                    class="width-full"
-                    placeholder="请选择方式"
-                    @change="curNodeChange"
-                  >
-                    <el-option
-                      v-for="(val, key) in APPROVE_USER_COUNT_TYPE"
-                      :key="key"
-                      :value="key"
-                      :label="val"
-                    ></el-option>
-                  </el-select>
-                </el-form-item>
-                <el-form-item label="选择范围:">
-                  <el-select
-                    v-model="curNode.property.approveUserSelectRange"
-                    class="width-full"
-                    placeholder="请选择范围"
-                    @change="curNodeChange"
-                  >
-                    <el-option
-                      v-for="(val, key) in APPROVE_USER_SELECT_RANGE"
-                      :key="key"
-                      :value="key"
-                      :label="val"
-                    ></el-option>
-                  </el-select>
-                </el-form-item>
-                <el-form-item
-                  v-if="curNode.property.approveUserSelectRange === 'ROLE'"
-                  label="指定角色:"
-                >
-                  <el-button
-                    size="small"
-                    type="primary"
-                    @click="toAddApproveRole('approveUserSelectRoles')"
-                    >添加角色</el-button
-                  >
-                  <div class="user-list">
-                    <el-tag
-                      v-for="role in curNode.property.approveUserSelectRoles"
-                      :key="role.id"
-                      size="small"
-                      closable
-                      :disable-transitions="false"
-                      @close="deleteApproveRole('approveUserSelectRoles', role)"
-                    >
-                      {{ role.name }}
-                    </el-tag>
-                    <el-button
-                      class="user-clear"
-                      type="danger"
-                      size="mini"
-                      plain
-                      @click="clearApproveRole('approveUserSelectRoles')"
-                      >清空</el-button
-                    >
-                  </div>
-                </el-form-item>
-              </el-form>
-            </div>
-            <!-- 抄送人 -->
-            <div class="property-part">
-              <h4 class="property-part-title">设置抄送人</h4>
-              <div class="flow-users">
-                <el-button
-                  size="small"
-                  type="primary"
-                  @click="toAddUser('copyForUsers')"
-                  >添加成员</el-button
-                >
-                <span class="tips-info">(最多添加5个)</span>
-                <div class="user-list">
-                  <el-tag
-                    v-for="user in curNode.property.copyForUsers"
-                    :key="user.id"
-                    closable
-                    size="small"
-                    :disable-transitions="false"
-                    @close="deleteApproveUser('copyForUsers', user)"
-                  >
-                    {{ user.name }}
-                  </el-tag>
-                  <el-button
-                    class="user-clear"
-                    type="danger"
-                    size="mini"
-                    plain
-                    @click="clearApproveUsers('copyForUsers')"
-                    >清空</el-button
-                  >
-                </div>
-              </div>
-            </div>
-            <!-- 高级设置 -->
-            <div class="property-part">
-              <h4 class="property-part-title">高级设置</h4>
-              <p class="property-desc">多人审批时采用的审批方式</p>
-              <div class="flow-radio-v">
-                <el-radio-group
-                  v-model="curNode.property.multipleUserApproveType"
-                  size="small"
-                  @change="curNodeChange"
-                >
-                  <el-radio
-                    v-for="(val, key) in MULTIPLE_USER_APPROVE_TYPE"
-                    :key="key"
-                    :label="key"
-                    >{{ val }}</el-radio
-                  >
-                </el-radio-group>
-              </div>
-            </div>
-            <!-- 驳回设置 -->
-            <div class="property-part">
-              <h4 class="property-part-title">驳回设置</h4>
-              <p class="property-desc">允许驳回节点</p>
-              <div class="flow-radio-v">
-                <el-radio-group
-                  v-model="curNode.property.rejectType"
-                  size="small"
-                  @change="curNodeChange"
-                >
-                  <el-radio
-                    v-for="(val, key) in REJECT_TYPE"
-                    :key="key"
-                    :label="key"
-                    >{{ val }}</el-radio
-                  >
-                </el-radio-group>
-              </div>
-              <p class="property-desc">驳回后提交方式</p>
-              <div class="flow-radio-v">
-                <el-radio-group
-                  v-model="curNode.property.rejectResubmitType"
-                  size="small"
-                  @change="curNodeChange"
-                >
-                  <el-radio
-                    v-for="(val, key) in REJECT_RESUBMIT_TYPE"
-                    :key="key"
-                    :label="key"
-                    >{{ val }}</el-radio
-                  >
-                </el-radio-group>
-              </div>
-            </div>
-            <el-button size="mini" type="danger" plain @click="toDeleteNode"
-              >删除节点</el-button
-            >
-          </div>
-        </div>
-      </div>
-    </el-dialog>
-
-    <!-- SelectUserDialog -->
-    <select-user-dialog
-      ref="SelectUserDialog"
-      :users="curAddUsers"
-      @modified="userModified"
-    ></select-user-dialog>
-    <!-- SelectRoleDialog -->
-    <select-role-dialog
-      ref="SelectRoleDialog"
-      :data="curAddRoles"
-      @modified="roleModified"
-    ></select-role-dialog>
-  </div>
-</template>
-
-<script>
-import { deepCopy } from "../../../plugins/utils";
-import { flowDetail, updateFlowDetail } from "../api";
-import SelectUserDialog from "./SelectUserDialog";
-import SelectRoleDialog from "./SelectRoleDialog";
-import { FLOW_MODEL_TYPE } from "../../../constants/enumerate";
-
-const initFlowInfo = {
-  id: null,
-  name: "",
-  type: "ELECTRON_FLOW",
-  modelType: "USER_FIXED"
-};
-
-const DEFAULT_NODE = {
-  id: "",
-  type: "PROCESS", // 节点类型,START:开始节点,PROCESS:过程节点,END:结束节点
-  content: "",
-  w: 150,
-  h: 40,
-  x: 0,
-  y: 0,
-  property: {
-    approveUserType: "USER", // 审批用户类型,USER:成员,ROLE:角色
-    approveUsers: [], // 审批用户列表
-    approveRoles: [], // 审批角色列表
-    copyForUsers: [], // 抄送用户列表
-    multipleUserApproveType: "ORDER", // 审批用户类别,ORDER:依次审批,ALL:会签(所有人必须审批),SOME:或签(一名审批人同意或拒绝即可)
-    rejectType: "PREV", // 驳回类型,PREV:上一节点,START:发起人节点,PREV_ALL:该节点前全部节点
-    rejectResubmitType: "NORMAL", // 驳回再提交类型,NORMAL:按正常流程提交,PREV_STEP:提交到驳回节点
-    approveUserCountType: "ONE", // 选择方式,ONE:一个,MORE:多个
-    approveUserSelectRange: "ALL", // 选择范围,ALL:全单位,ROLE:角色
-    approveUserSelectRoles: [] // 指定角色范围
-  }
-};
-// 详细参数:https://doc.qmth.com.cn/pages/viewpage.action?pageId=40435764
-
-export default {
-  name: "modify-flow-detail",
-  components: { SelectUserDialog, SelectRoleDialog },
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      FLOW_MODEL_TYPE,
-      initNodes: [
-        {
-          id: "1",
-          type: "START",
-          content: "开始流程",
-          w: 150,
-          h: 40,
-          x: 0,
-          y: 0,
-          property: null
-        },
-        {
-          id: "2",
-          type: "END",
-          content: "结束流程",
-          w: 150,
-          h: 40,
-          x: 0,
-          y: 0,
-          property: null
-        }
-      ],
-      flowInfo: { ...initFlowInfo },
-      nodes: [],
-      curNode: {},
-      curAddUsers: [],
-      curAddUserType: "",
-      curAddRoles: [],
-      curAddRoleType: "",
-      nodeIcons: {
-        START: "el-icon-video-play",
-        END: "el-icon-switch-button",
-        PROCESS: "el-icon-circle-plus-outline"
-      },
-      APPROVE_USER_TYPE: {
-        USER: "成员",
-        ROLE: "角色"
-      },
-      MULTIPLE_USER_APPROVE_TYPE: {
-        ORDER: "依次审批",
-        ALL: "会签(所有人必须审批)",
-        SOME: "或签(一名审批人同意或拒绝即可)"
-      },
-      REJECT_TYPE: {
-        PREV: "上一节点",
-        START: "发起人节点",
-        PREV_ALL: "该节点前全部节点"
-      },
-      REJECT_RESUBMIT_TYPE: {
-        NORMAL: "按正常流程提交",
-        PREV_STEP: "提交到驳回节点"
-      },
-      APPROVE_USER_COUNT_TYPE: {
-        ONE: "一次选择一个人",
-        MORE: "一次选择多个人"
-      },
-      APPROVE_USER_SELECT_RANGE: {
-        ALL: "全单位",
-        ROLE: "指定角色"
-      },
-      rules: {
-        modelType: [
-          {
-            required: true,
-            message: "请选择流程指定审批人类型",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  computed: {
-    IS_APPROVE_SET() {
-      return this.flowInfo.modelType === "APPROVE_SET";
-    }
-  },
-  methods: {
-    async initData(val) {
-      if (val.id) {
-        const data = await flowDetail(val.id);
-        this.flowInfo = this.$objAssign(initFlowInfo, data);
-        this.flowInfo.id = data.customFlowId;
-        this.nodes = data.customFlowLists;
-        this.toSelectNode(this.nodes[1]);
-      } else {
-        this.flowInfo = this.$objAssign(initFlowInfo, val);
-        this.initFlowNodes();
-      }
-    },
-    initFlowNodes() {
-      this.nodes = deepCopy(this.initNodes);
-      this.toAddNode(this.nodes[0].id);
-    },
-    visibleChange() {
-      this.initData(this.instance);
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    getDefaultNode() {
-      const nodeId = this.nodes.length
-        ? Math.max.apply(
-            null,
-            this.nodes.map(item => item.id)
-          ) + 1
-        : 1;
-      return { ...deepCopy(DEFAULT_NODE), id: nodeId };
-    },
-    toAddNode(curNodeId) {
-      const newNode = this.getDefaultNode();
-      const pos = this.nodes.findIndex(node => node.id === curNodeId);
-      this.nodes.splice(pos + 1, 0, newNode);
-      this.toSelectNode(newNode);
-    },
-    toDeleteNode() {
-      const pos = this.nodes.findIndex(node => node.id === this.curNode.id);
-      this.nodes.splice(pos, 1);
-      if (this.nodes[pos] && this.nodes[pos].type === "PROCESS") {
-        this.toSelectNode(this.nodes[pos]);
-      } else {
-        let prevPos = pos - 1;
-        prevPos = Math.max(prevPos, 0);
-        this.toSelectNode(this.nodes[prevPos]);
-      }
-    },
-    toSelectNode(node) {
-      if (node.type === "START" || node.type === "END") {
-        this.curNode = {};
-        return;
-      }
-      this.curNode = node ? deepCopy(node) : {};
-    },
-    curNodeChange() {
-      const pos = this.nodes.findIndex(node => node.id === this.curNode.id);
-      this.nodes.splice(pos, 1, deepCopy(this.curNode));
-    },
-    // approveUser
-    toAddUser(curAddUserType) {
-      this.curAddUserType = curAddUserType;
-      this.curAddUsers = this.curNode.property[this.curAddUserType];
-      this.$refs.SelectUserDialog.open();
-    },
-    userModified(users) {
-      this.curNode.property[this.curAddUserType] = users;
-      this.curNodeChange();
-    },
-    deleteApproveUser(curAddUserType, user) {
-      console.log(user);
-      const pos = this.curNode.property[curAddUserType].findIndex(
-        item => item.id === user.id
-      );
-      this.curNode.property[curAddUserType].splice(pos, 1);
-      this.curNodeChange();
-    },
-    clearApproveUsers(curAddUserType) {
-      this.curNode.property[curAddUserType] = [];
-      this.curNodeChange();
-    },
-    // approveRole
-    toAddApproveRole(curAddRoleType) {
-      this.curAddRoleType = curAddRoleType;
-      this.curAddRoles = this.curNode.property[this.curAddRoleType];
-      this.$refs.SelectRoleDialog.open();
-    },
-    roleModified(roles) {
-      this.curNode.property[this.curAddRoleType] = roles;
-      this.curNodeChange();
-    },
-    deleteApproveRole(curAddRoleType, role) {
-      const pos = this.curNode.property[curAddRoleType].findIndex(
-        item => item.id === role.id
-      );
-      this.curNode.property[curAddRoleType].splice(pos, 1);
-      this.curNodeChange();
-    },
-    clearApproveRole(curAddRoleType) {
-      this.curNode.property[curAddRoleType] = [];
-      this.curNodeChange();
-    },
-    checkData() {
-      if (!this.nodes.some(node => node.type === "PROCESS")) {
-        this.$message.error("请设置过程节点");
-        return;
-      }
-
-      if (this.IS_APPROVE_SET) {
-        const nodeUserValid = !this.nodes
-          .filter(node => node.type === "PROCESS")
-          .some(node => {
-            if (node.property.approveUserSelectRange === "ROLE") {
-              return !node.property.approveUserSelectRoles.length;
-            } else {
-              return false;
-            }
-          });
-        if (!nodeUserValid) {
-          this.$message.error("请完成节点设置");
-          return;
-        }
-      } else {
-        const nodeUserValid = !this.nodes
-          .filter(node => node.type === "PROCESS")
-          .some(node => {
-            if (node.property.approveUserType === "USER") {
-              return !node.property.approveUsers.length;
-              // return !(
-              //   node.property.approveUsers.length &&
-              //   node.property.copyForUsers.length
-              // );
-            } else {
-              return !node.property.approveRoles.length;
-            }
-          });
-        if (!nodeUserValid) {
-          this.$message.error("请完成节点设置");
-          return;
-        }
-      }
-
-      return true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (!this.checkData()) return;
-
-      if (this.isSubmit) return;
-      const result = await this.$confirm(
-        `确定要发布流程【${this.instance.name}】吗?`,
-        "提示",
-        {
-          type: "warning"
-        }
-      ).catch(() => {});
-      if (result !== "confirm") return;
-
-      this.nodes.forEach(node => {
-        const dom = document.getElementById(`node-${node.id}`);
-        node.w = dom.clientWidth;
-        node.h = dom.clientHeight;
-        node.x = dom.offsetLeft;
-        node.y = dom.offsetTop;
-      });
-
-      const nodes = this.nodes.map((node, index) => {
-        let nnode = deepCopy(node);
-        nnode.id = index + 1;
-        if (node.property) {
-          if (this.IS_APPROVE_SET) {
-            if (node.property.approveUserSelectRange === "ALL") {
-              node.property.approveUserSelectRoles = [];
-            }
-          } else {
-            if (node.property.approveUserType === "USER") {
-              nnode.approveRoles = [];
-            } else {
-              nnode.approveUsers = [];
-            }
-          }
-        }
-
-        return nnode;
-      });
-
-      this.isSubmit = true;
-
-      const res = await updateFlowDetail({
-        customFlowId: this.flowInfo.id,
-        name: this.flowInfo.name,
-        type: this.flowInfo.type,
-        modelType: this.flowInfo.modelType,
-        publish: true,
-        customFlowLists: nodes
-      }).catch(() => {});
-      this.isSubmit = false;
-      if (!res) return;
-
-      this.$message.success("编辑成功!");
-      this.$emit("modified");
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 301
src/modules/base/components/ModifyPrintTemplate.vue

@@ -1,301 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-template"
-    :visible.sync="modalIsShow"
-    :title="title"
-    width="600px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      label-position="top"
-      :rules="rules"
-      :model="modalForm"
-    >
-      <el-form-item prop="name" label="模板名称:">
-        <el-input
-          v-model.trim="modalForm.name"
-          placeholder="建议不超过30个字,规则名称不允许重复"
-          style="width: 100%"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="remark" label="备注:">
-        <el-input
-          v-model="modalForm.remark"
-          type="textarea"
-          resize="none"
-          :rows="2"
-          :maxlength="50"
-          clearable
-          show-word-limit
-          placeholder="建议不超过50个字"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="classify" label="分类:">
-        <el-select v-model="modalForm.classify" placeholder="请选择" clearable>
-          <el-option
-            v-for="(val, key) in categories"
-            :key="key"
-            :value="key"
-            :label="val"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item
-        v-if="modalForm.classify === 'SIGN'"
-        label="显示字段:"
-        prop="fields"
-      >
-        <el-checkbox
-          v-for="field in signDatas.basic"
-          :key="field.code"
-          v-model="field.enable"
-          :disabled="field.disabled"
-          >{{ field.name }}</el-checkbox
-        >
-        <el-divider></el-divider>
-        <el-checkbox
-          v-for="field in signDatas.table"
-          :key="field.code"
-          v-model="field.enable"
-          :disabled="field.disabled"
-          >{{ field.name }}</el-checkbox
-        >
-      </el-form-item>
-      <el-form-item
-        v-else-if="modalForm.classify === 'PACKAGE'"
-        label="显示字段:"
-        prop="fields"
-      >
-        <el-checkbox
-          v-for="field in packageDatas"
-          :key="field.code"
-          v-model="field.enable"
-          :disabled="field.disabled"
-          >{{ field.name }}</el-checkbox
-        >
-      </el-form-item>
-      <el-form-item
-        v-else-if="modalForm.classify === 'CHECK_IN'"
-        prop="attachmentId"
-        label="上传模板文件:"
-      >
-        <upload-file-view
-          :upload-data="uploadData"
-          :upload-url="uploadUrl"
-          :format="format"
-          @valid-error="validError"
-          @upload-success="uploadSuccess"
-          ref="UploadFileView"
-        ></upload-file-view>
-      </el-form-item>
-    </el-form>
-
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button @click="cancel">取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { templateDetail, updateTemplate } from "../api";
-import { attachmentDetail } from "../../login/api";
-import UploadFileView from "@/components/UploadFileView";
-import { PACKAGE_DATA, SIGN_DATA } from "@/constants/printTemplateData";
-
-const initModalForm = {
-  id: null,
-  name: "",
-  type: "",
-  remark: "",
-  classify: "",
-  attachmentId: ""
-};
-
-export default {
-  name: "modify-print-template",
-  components: { UploadFileView },
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "模板";
-    }
-  },
-  data() {
-    const fieldsValidator = (rule, value, callback) => {
-      if (this.modalForm.classify === "PACKAGE") {
-        if (!this.packageDatas.some(item => item.enable)) {
-          return callback(new Error("请选择显示字段"));
-        }
-        return callback();
-      } else {
-        if (
-          !this.signDatas.basic.some(item => item.enable) ||
-          !this.signDatas.table.some(item => item.enable)
-        ) {
-          return callback(new Error("请选择显示字段"));
-        }
-        return callback();
-      }
-    };
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: {},
-      attachment: {},
-      format: ["ftl", "html", "pdf"],
-      categories: {
-        SIGN: "签到表",
-        PACKAGE: "卷袋贴",
-        CHECK_IN: "考试情况登记表"
-      },
-      rules: {
-        name: [
-          {
-            required: true,
-            message: "题卡规则名称不能超过30个字",
-            max: 30,
-            trigger: "change"
-          }
-        ],
-        classify: [
-          {
-            required: true,
-            message: "请选择分类",
-            trigger: "change"
-          }
-        ],
-        attachmentId: [
-          {
-            required: true,
-            message: "请上传模板文件",
-            trigger: "change"
-          }
-        ],
-        fields: [
-          {
-            required: true,
-            validator: fieldsValidator,
-            trigger: "change"
-          }
-        ]
-      },
-      packageDatas: [...PACKAGE_DATA],
-      signDatas: { ...SIGN_DATA },
-      // upload
-      uploadUrl: "/api/admin/common/file/upload",
-      uploadData: {
-        type: "UPLOAD"
-      }
-    };
-  },
-  methods: {
-    async initData(val) {
-      if (val.id) {
-        const data = await templateDetail(val.id);
-        this.modalForm = this.$objAssign(initModalForm, data);
-
-        const unAttachmentTemps = ["SIGN", "PACKAGE"];
-        if (unAttachmentTemps.includes(this.modalForm.classify)) {
-          this.initFieldData(data);
-        } else {
-          this.getAttachment();
-        }
-      } else {
-        this.modalForm = this.$objAssign(initModalForm, val);
-        this.packageDatas = [...PACKAGE_DATA];
-        this.signDatas = { ...SIGN_DATA };
-        // this.$nextTick(() => {
-        //   this.$refs.UploadFileView.setAttachmentName("");
-        // });
-      }
-    },
-    initFieldData(data) {
-      const displayRange = data.displayRange
-        ? JSON.parse(data.displayRange)
-        : null;
-      if (!displayRange) {
-        this.packageDatas = [...PACKAGE_DATA];
-        this.signDatas = { ...SIGN_DATA };
-        return;
-      }
-
-      if (data.classify === "PACKAGE") {
-        this.packageDatas = displayRange;
-      } else {
-        this.signDatas = displayRange;
-      }
-    },
-    async getAttachment() {
-      if (!this.instance.attachmentId) return;
-      const data = await attachmentDetail(this.instance.attachmentId);
-      this.attachment = data;
-
-      this.$nextTick(() => {
-        this.$refs.UploadFileView.setAttachmentName(`${data.name}${data.type}`);
-      });
-    },
-    visibleChange() {
-      this.initData(this.instance);
-
-      this.$nextTick(() => {
-        this.$refs.modalFormComp.clearValidate();
-      });
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      let datas = {
-        ...this.modalForm
-      };
-      if (this.modalForm.classify === "PACKAGE") {
-        datas.displayRange = this.packageDatas;
-      } else if (this.modalForm.classify === "SIGN") {
-        datas.displayRange = this.signDatas;
-      }
-      const data = await updateTemplate(datas).catch(() => {});
-      this.isSubmit = false;
-      if (!data) return;
-
-      this.$message.success("保存成功!");
-      this.$emit("modified");
-      this.cancel();
-    },
-    validError(errorData) {
-      this.$message.error(errorData.message);
-    },
-    uploadSuccess(data) {
-      this.$message.success("上传成功!");
-
-      this.modalForm.attachmentId = data.id;
-      this.$refs.modalFormComp.validateField("attachmentId");
-    }
-  }
-};
-</script>

+ 0 - 240
src/modules/base/components/ModifyStudentSimple.vue

@@ -1,240 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-student-simple"
-    :visible.sync="modalIsShow"
-    title="添加学生"
-    top="10px"
-    width="800px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    destroy-on-close
-    @open="visibleChange"
-  >
-    <div class="mb-4 tab-btns">
-      <el-button
-        v-for="tab in tabs"
-        :key="tab.val"
-        size="medium"
-        :type="curTab == tab.val ? 'primary' : 'default'"
-        @click="selectMenu(tab.val)"
-        >{{ tab.name }}
-      </el-button>
-    </div>
-    <!-- input -->
-    <div v-if="curTab === 'input'" class="tab-body">
-      <el-form
-        ref="modalFormComp"
-        :model="modalForm"
-        :rules="rules"
-        :key="modalForm.id"
-        label-position="top"
-      >
-        <el-form-item prop="studentName" label="姓名:">
-          <el-input
-            v-model.trim="modalForm.studentName"
-            placeholder="请输入姓名"
-            clearable
-          ></el-input>
-        </el-form-item>
-        <el-form-item prop="studentCode" label="学号:">
-          <el-input
-            v-model.trim="modalForm.studentCode"
-            placeholder="请输入学号"
-            clearable
-          ></el-input>
-        </el-form-item>
-      </el-form>
-    </div>
-    <!-- select -->
-    <div v-if="curTab === 'select'" class="tab-body">
-      <select-class-student
-        ref="SelectClassStudent"
-        v-model="selectedStudentIds"
-      ></select-class-student>
-    </div>
-    <!-- import -->
-    <div v-if="curTab === 'import'" class="tab-body">
-      <el-button type="success" icon="el-icon-download"
-        ><a :href="downloadUrl" :download="dfilename">模板下载</a></el-button
-      >
-      <upload-button
-        btn-icon="el-icon-circle-plus-outline"
-        btn-content="批量导入"
-        btn-type="success"
-        :upload-url="uploadUrl"
-        :upload-data="uploadData"
-        :format="['xls', 'xlsx']"
-        accept=".xls,.xlsx"
-        @valid-error="validError"
-        @upload-success="uploadSuccess"
-      >
-      </upload-button>
-    </div>
-
-    <div v-if="!IS_IMPORT" slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button @click="cancel">取消</el-button>
-    </div>
-    <div v-else slot="footer"></div>
-  </el-dialog>
-</template>
-
-<script>
-import { updateStudentSimple, batchAddStudentSimple } from "../api";
-import UploadButton from "../../../components/UploadButton";
-import SelectClassStudent from "./SelectClassStudent";
-
-const initModalForm = {
-  id: null,
-  teachClazzId: null,
-  studentName: "",
-  studentCode: ""
-};
-
-export default {
-  name: "modify-student-simple",
-  components: { UploadButton, SelectClassStudent },
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    IS_IMPORT() {
-      return this.curTab === "import";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      curTab: "select",
-      tabs: [
-        {
-          name: "手动添加",
-          val: "input"
-        },
-        {
-          name: "从课程班级添加",
-          val: "select"
-        },
-        {
-          name: "批量导入",
-          val: "import"
-        }
-      ],
-      modalForm: { ...initModalForm },
-      rules: {
-        studentName: [
-          {
-            required: true,
-            message: "请输入姓名",
-            trigger: "change"
-          },
-          {
-            message: "姓名不能超过50个字",
-            max: 50,
-            trigger: "change"
-          }
-        ],
-        studentCode: [
-          {
-            required: true,
-            message: "请输入学号",
-            trigger: "change"
-          },
-          {
-            message: "学号不能超过50个字",
-            max: 50,
-            trigger: "change"
-          }
-        ]
-      },
-      selectedStudentIds: [],
-      // import
-      uploadData: {},
-      uploadUrl: "/api/admin/teach/student/import",
-      downloadUrl: "/temps/clazzSimpleStudentTemplate.xlsx",
-      dfilename: "教学班级学生导入模板.xlsx"
-    };
-  },
-  methods: {
-    initData(val) {
-      this.modalForm = this.$objAssign(initModalForm, val);
-      this.uploadData = {
-        teachClazzId: val.teachClazzId
-      };
-    },
-    visibleChange() {
-      this.initData(this.instance);
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    selectMenu(tab) {
-      this.curTab = tab;
-    },
-    submit() {
-      const submitFunc = {
-        input: this.submitInput,
-        select: this.submitSelect
-      };
-      submitFunc[this.curTab]();
-    },
-    async submitInput() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      const data = await updateStudentSimple(this.modalForm).catch(() => {});
-      this.isSubmit = false;
-
-      if (!data) return;
-
-      this.$message.success("添加成功!");
-      this.$emit("modified");
-      this.modalForm = this.$objAssign(initModalForm, this.instance);
-    },
-    async submitSelect() {
-      if (!this.selectedStudentIds.length) {
-        this.$message.error("请选择学生");
-        return;
-      }
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      const data = await batchAddStudentSimple({
-        teachClazzId: this.instance.teachClazzId,
-        basicStudentIdSet: this.selectedStudentIds
-      }).catch(() => {});
-      this.isSubmit = false;
-
-      if (!data) return;
-
-      this.$message.success("添加成功!");
-      this.$emit("modified");
-      this.selectedStudentIds = [];
-      this.$refs.SelectClassStudent.clearSelection();
-    },
-    // import
-    validError(errorData) {
-      this.$message.error(errorData.message);
-    },
-    uploadSuccess(data) {
-      this.$message.success(data.data || "学生导入成功!");
-      this.$emit("modified");
-      this.cancel();
-    }
-  }
-};
-</script>

+ 0 - 145
src/modules/base/components/RegistFlowDialog.vue

@@ -1,145 +0,0 @@
-<template>
-  <el-dialog
-    class="regist-flow-dialog"
-    :visible.sync="modalIsShow"
-    title="新增流程"
-    top="10vh"
-    width="500px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      label-position="top"
-    >
-      <el-form-item prop="name" label="名称:">
-        <el-input
-          style="width:100%"
-          v-model.trim="modalForm.name"
-          placeholder="请输入名称"
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="uploadData" label="上传文件:">
-        <upload-fetch-file
-          input-width="320px"
-          :format="format"
-          @valid-change="validChange"
-          @file-change="fileChange"
-          ref="UploadFetchFile"
-        ></upload-fetch-file>
-        <p class="tips-info">
-          上传的文件只支持{{ format.join(",") }},大小不超过2M
-        </p>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="confirm"
-        >确定</el-button
-      >
-      <el-button @click="cancel">返回</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import UploadFetchFile from "@/components/UploadFetchFile";
-import { flowRegister } from "../api";
-
-export default {
-  name: "regist-flow-dialog-view",
-  props: {
-    data: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  components: { UploadFetchFile },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: {
-        name: "",
-        publish: true
-      },
-      rules: {
-        name: [
-          {
-            required: true,
-            message: "请输入名称",
-            trigger: "change"
-          }
-        ],
-        uploadData: [
-          {
-            required: true,
-            validator: (rule, value, callback) => {
-              if (this.uploadData) {
-                callback();
-              } else {
-                return callback(new Error(`请选择合适的文件`));
-              }
-            },
-            trigger: "change"
-          }
-        ]
-      },
-      // upload
-      format: ["bpmn"],
-      maxSize: 2 * 1024 * 1024,
-      uploadData: null
-    };
-  },
-  methods: {
-    visibleChange() {
-      this.modalForm = { name: "", publish: false };
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    validChange(result) {
-      if (!result.success) {
-        this.uploadData = null;
-        this.$notify.error({ title: "错误提示", message: result.message });
-        this.$refs.modalFormComp.validateField("uploadData");
-      }
-    },
-    fileChange(data) {
-      this.uploadData = data;
-      this.$refs.modalFormComp.validateField("uploadData");
-    },
-    async confirm() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-
-      let formData = new FormData();
-      Object.entries(this.modalForm).forEach(([k, v]) => {
-        formData.append(k, v);
-      });
-      formData.append("file", this.uploadData.file);
-
-      const data = await flowRegister(formData, {
-        md5: this.uploadData.md5
-      }).catch(() => {});
-      this.isSubmit = false;
-      if (!data) return;
-
-      this.$message.success("添加成功!");
-      this.cancel();
-      this.$emit("modified");
-    }
-  }
-};
-</script>

+ 0 - 188
src/modules/base/components/RuleExam.vue

@@ -1,188 +0,0 @@
-<template>
-  <div class="rule-exam part-box part-box-pad part-box-border">
-    <h4 class="part-box-tips">变量印刷考务字段配置:</h4>
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      label-width="170px"
-    >
-      <el-form-item label="必选字段:" required>
-        <el-checkbox
-          v-for="field in modalForm.requiredFields"
-          :key="field.code"
-          v-model="field.enable"
-          disabled
-          >{{ field.name }}</el-checkbox
-        >
-      </el-form-item>
-      <el-form-item label="扩展字段:">
-        <div class="part-box part-box-pad part-box-border">
-          <div class="label-edit">
-            <div
-              v-for="field in modalForm.extendFields"
-              :key="field.code"
-              class="label-item"
-            >
-              <el-checkbox
-                v-model="field.enable"
-                class="label-item-content"
-                @change="validateExtendFields"
-                >{{ field.name }}</el-checkbox
-              >
-              <i
-                class="label-item-delete el-icon-error"
-                @click="deleteField(field)"
-              ></i>
-            </div>
-            <div class="label-add" @click="toAddField">
-              <i class="el-icon-plus"></i><i>添加</i>
-            </div>
-          </div>
-        </div>
-      </el-form-item>
-      <el-form-item prop="examNumberDigit" label="考号位数:" required>
-        <el-input-number
-          v-model="modalForm.examNumberDigit"
-          :min="5"
-          :max="15"
-          :step="1"
-          step-strictly
-          :controls="false"
-          style="width: 100px;"
-        ></el-input-number>
-      </el-form-item>
-      <el-form-item label="是否启用入库审核:" required>
-        <el-switch v-model="modalForm.review" inactive-color="#dcdfe6">
-        </el-switch>
-      </el-form-item>
-      <el-form-item label="入库强制包含试卷:" required>
-        <el-switch v-model="modalForm.includePaper" inactive-color="#dcdfe6">
-        </el-switch>
-        <p class="tips-info">
-          注意:若入库时非强制包含试卷,适用于同时有课程要求打印试卷,有的课程不打印试卷的场景。因此,印刷计划里即使勾选了“试卷”,有试卷则打印,否则不打印。
-        </p>
-      </el-form-item>
-      <el-form-item label="提交印刷方式:" required>
-        <el-radio-group v-model="modalForm.printMethod">
-          <el-radio
-            v-for="(val, key) in CONFIRM_PRINT_TYPE"
-            :key="key"
-            :label="key"
-            >{{ val }}</el-radio
-          >
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item>
-        <el-button
-          type="primary"
-          :disabled="isSubmit"
-          style="width: 140px"
-          @click="submit"
-          >保存</el-button
-        >
-      </el-form-item>
-    </el-form>
-
-    <!-- ModifyField -->
-    <modify-field ref="ModifyField" @confirm="addField"></modify-field>
-  </div>
-</template>
-
-<script>
-import ModifyField from "../components/ModifyField";
-import { CONFIRM_PRINT_TYPE } from "@/constants/enumerate";
-import { examRuleDetail, saveExamRule } from "../api";
-import { getEnums } from "../../login/api";
-
-const initModalForm = {
-  id: null,
-  review: true,
-  includePaper: true,
-  examNumberDigit: 8,
-  printMethod: "AUTO",
-  requiredFields: "[]",
-  extendFields: "[]"
-};
-
-export default {
-  name: "rule-exam",
-  components: { ModifyField },
-  data() {
-    return {
-      modalForm: { ...initModalForm },
-      isSubmit: false,
-      CONFIRM_PRINT_TYPE,
-      rules: {
-        examNumberDigit: [
-          {
-            required: true,
-            message: "请输入考号位数",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  mounted() {
-    this.init();
-  },
-  methods: {
-    async init() {
-      const requiredFields = await getEnums("REQUIRED_FIELDS");
-      const examRule = await examRuleDetail();
-      this.modalForm = Object.assign({}, initModalForm, examRule || {});
-      this.modalForm.examNumberDigit =
-        this.modalForm.examNumberDigit || initModalForm.examNumberDigit;
-
-      this.modalForm.requiredFields = requiredFields.map(item => {
-        return {
-          code: item.code,
-          name: item.desc,
-          enable: true
-        };
-      });
-      // console.log(this.modalForm.extendFields);
-      this.modalForm.extendFields = JSON.parse(this.modalForm.extendFields);
-    },
-    validateRequiredFields() {
-      this.$refs.modalFormComp.validateField("requiredFields");
-    },
-    validateExtendFields() {
-      this.$refs.modalFormComp.validateField("extendFields");
-    },
-    toAddField() {
-      this.$refs.ModifyField.open();
-    },
-    addField(field) {
-      this.modalForm.extendFields.push({ ...field });
-    },
-    deleteField(field) {
-      const index = this.modalForm.extendFields.findIndex(
-        item => item.code === field.code
-      );
-      if (index !== -1) this.modalForm.extendFields.splice(index, 1);
-      this.validateExtendFields();
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      let datas = {
-        ...this.modalForm
-      };
-      datas.requiredFields = JSON.stringify(datas.requiredFields);
-      datas.extendFields = JSON.stringify(datas.extendFields);
-      const data = await saveExamRule(datas).catch(() => {});
-      this.isSubmit = false;
-      if (!data) return;
-
-      this.modalForm.id = data;
-
-      this.$message.success("保存成功!");
-    }
-  }
-};
-</script>

+ 0 - 158
src/modules/base/components/SelectClassStudent.vue

@@ -1,158 +0,0 @@
-<template>
-  <div class="select-class-student">
-    <el-form ref="FilterForm" label-position="left" inline label-width="0px">
-      <el-form-item>
-        <college-select
-          v-model="filter.collegeId"
-          class="width-200"
-          placeholder="学院"
-          @change="collegeChange"
-        ></college-select>
-      </el-form-item>
-      <el-form-item>
-        <major-select
-          v-model="filter.majorId"
-          class="width-200"
-          :college-id="filter.collegeId"
-          cascader
-          placeholder="专业"
-          @change="majorChange"
-        ></major-select>
-      </el-form-item>
-      <el-form-item>
-        <class-select
-          v-model="filter.clazzId"
-          class="width-200"
-          :major-id="filter.majorId"
-          cascader
-          placeholder="班级"
-          @change="classChange"
-        ></class-select>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" :disabled="!canSearch" @click="toPage(1)"
-          >查询</el-button
-        >
-      </el-form-item>
-    </el-form>
-    <div class="box-justify mb-2">
-      <p>
-        全部共<span class="mlr-1">{{ dataList.length }}</span
-        >人
-      </p>
-      <p>
-        已选<span class="mlr-1">{{ multipleSelection.length }}</span
-        >人
-      </p>
-    </div>
-    <el-table
-      ref="TableList"
-      :data="dataList"
-      border
-      max-height="440"
-      @selection-change="handleSelectionChange"
-    >
-      <el-table-column
-        type="selection"
-        width="55"
-        align="center"
-      ></el-table-column>
-      <el-table-column
-        type="index"
-        label="序号"
-        width="70"
-        :index="indexMethod"
-      ></el-table-column>
-      <el-table-column prop="studentName" label="姓名"></el-table-column>
-      <el-table-column prop="studentCode" label="学号"></el-table-column>
-      <el-table-column prop="collegeName" label="机构"></el-table-column>
-      <el-table-column prop="majorName" label="专业"></el-table-column>
-      <el-table-column prop="clazzName" label="班级"></el-table-column>
-    </el-table>
-  </div>
-</template>
-
-<script>
-// import { studentListQuery } from "../api";
-import { unitQueryByType } from "../../base/api";
-
-export default {
-  name: "select-class-student",
-  props: {
-    value: {
-      type: Array,
-      default() {
-        return [];
-      }
-    }
-  },
-  data() {
-    return {
-      filter: {
-        collegeId: "",
-        majorId: "",
-        clazzId: ""
-      },
-      filterNames: {
-        collegeName: "",
-        majorName: "",
-        clazzName: ""
-      },
-      dataList: [],
-      multipleSelection: []
-    };
-  },
-  computed: {
-    canSearch() {
-      return (
-        this.filter.collegeId && this.filter.majorId && this.filter.clazzId
-      );
-    }
-  },
-  methods: {
-    async getList() {
-      const datas = {
-        ...this.filter
-      };
-      const data = await unitQueryByType(datas, "STUDENT");
-      this.dataList = data || [];
-      this.dataList = this.dataList.map(item => {
-        return {
-          id: item.id,
-          studentName: item.name,
-          studentCode: item.code,
-          ...this.filterNames
-        };
-      });
-    },
-    toPage(page) {
-      if (!this.canSearch) return;
-
-      this.current = page;
-      this.getList();
-      this.multipleSelection = [];
-      this.emitChange();
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val.map(item => item.id);
-      this.emitChange();
-    },
-    collegeChange(val) {
-      this.filterNames.collegeName = val.name;
-    },
-    majorChange(val) {
-      this.filterNames.majorName = val.name;
-    },
-    classChange(val) {
-      this.filterNames.clazzName = val.name;
-    },
-    emitChange() {
-      this.$emit("input", this.multipleSelection);
-      this.$emit("change", this.multipleSelection);
-    },
-    clearSelection() {
-      this.$refs.TableList.clearSelection();
-    }
-  }
-};
-</script>

+ 0 - 1969
src/modules/base/components/privilege/navs.json

@@ -1,1969 +0,0 @@
-[
-  {
-    "id": "1",
-    "name": "基础配置",
-    "url": "base",
-    "type": "MENU",
-    "parentId": "-1",
-    "sequence": 1,
-    "children": [
-      {
-        "id": "2",
-        "name": "用户管理",
-        "url": "user",
-        "type": "MENU",
-        "parentId": "1",
-        "sequence": 1,
-        "children": [
-          {
-            "id": "4",
-            "name": "组织架构",
-            "url": "OrganizationManage",
-            "type": "MENU",
-            "parentId": "2",
-            "sequence": 1,
-            "children": [],
-            "buttons": [
-              {
-                "id": "224",
-                "name": "组织架构-添加",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "4",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "225",
-                "name": "组织架构-+子部门",
-                "url": "Add",
-                "type": "LINK",
-                "parentId": "4",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "226",
-                "name": "组织架构-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "4",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "227",
-                "name": "组织架构-删除",
-                "url": "Delete",
-                "type": "LINK",
-                "parentId": "4",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "228",
-                "name": "组织架构-树形列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "4",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "389",
-                "name": "课程管理-机构列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "4",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "234",
-                "name": "组织架构-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "4",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "5",
-            "name": "用户管理",
-            "url": "UserManage",
-            "type": "MENU",
-            "parentId": "2",
-            "sequence": 2,
-            "children": [],
-            "buttons": [
-              {
-                "id": "217",
-                "name": "用户管理-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "5",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "218",
-                "name": "用户管理-添加用户",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "5",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "243",
-                "name": "用户管理-批量导入",
-                "url": "Export",
-                "type": "BUTTON",
-                "parentId": "5",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "219",
-                "name": "用户管理-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "5",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "220",
-                "name": "用户管理-启用&禁用",
-                "url": "Enable",
-                "type": "LINK",
-                "parentId": "5",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "223",
-                "name": "用户管理-重置",
-                "url": "Reset",
-                "type": "LINK",
-                "parentId": "5",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "221",
-                "name": "用户管理-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "5",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "222",
-                "name": "用户管理-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "5",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "6",
-            "name": "角色管理",
-            "url": "RoleManage",
-            "type": "MENU",
-            "parentId": "2",
-            "sequence": 3,
-            "children": [],
-            "buttons": [
-              {
-                "id": "229",
-                "name": "角色管理-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "6",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "230",
-                "name": "角色管理-添加角色",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "6",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "231",
-                "name": "角色管理-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "6",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "232",
-                "name": "角色管理-删除",
-                "url": "Delete",
-                "type": "LINK",
-                "parentId": "6",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "233",
-                "name": "角色管理-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "6",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "235",
-                "name": "角色管理-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "6",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          }
-        ]
-      },
-      {
-        "id": "3",
-        "name": "配置管理",
-        "url": "rule",
-        "type": "MENU",
-        "parentId": "1",
-        "sequence": 2,
-        "children": [
-          {
-            "id": "8",
-            "name": "通用规则",
-            "url": "CommonRule",
-            "type": "MENU",
-            "parentId": "3",
-            "sequence": 1,
-            "children": [],
-            "buttons": [
-              {
-                "id": "236",
-                "name": "考务规则-考务规则配置",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "8",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "9",
-            "name": "题卡规则管理",
-            "url": "CardRuleManage",
-            "type": "MENU",
-            "parentId": "3",
-            "sequence": 2,
-            "children": [],
-            "buttons": [
-              {
-                "id": "237",
-                "name": "题卡规则-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "9",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "238",
-                "name": "题卡规则-添加",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "9",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "342",
-                "name": "题卡规则-预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "9",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "343",
-                "name": "题卡规则-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "9",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "345",
-                "name": "题卡规则-启用&禁用",
-                "url": "Enable",
-                "type": "LINK",
-                "parentId": "9",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "240",
-                "name": "题卡规则-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "9",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "239",
-                "name": "题卡规则-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "9",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "10",
-            "name": "通卡模板",
-            "url": "CommonCardTemplate",
-            "type": "MENU",
-            "parentId": "3",
-            "sequence": 3,
-            "children": [],
-            "buttons": [
-              {
-                "id": "241",
-                "name": "通卡模版-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "10",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "242",
-                "name": "通卡模版-添加模版",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "10",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "244",
-                "name": "通卡模版-预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "10",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "245",
-                "name": "通卡模版-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "10",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "246",
-                "name": "通卡模版-启用&禁用",
-                "url": "Enable",
-                "type": "LINK",
-                "parentId": "10",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "248",
-                "name": "通卡模版-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "10",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "247",
-                "name": "通卡模版-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "10",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "11",
-            "name": "变量印品模板",
-            "url": "ParamPrintTemplate",
-            "type": "MENU",
-            "parentId": "3",
-            "sequence": 4,
-            "children": [],
-            "buttons": [
-              {
-                "id": "249",
-                "name": "变量印品模版-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "11",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "250",
-                "name": "变量印品模版-添加模版",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "11",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "251",
-                "name": "变量印品模版-预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "11",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "252",
-                "name": "变量印品模版-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "11",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "253",
-                "name": "变量印品模版-启用&禁用",
-                "url": "Enable",
-                "type": "LINK",
-                "parentId": "11",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "255",
-                "name": "变量印品模版-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "11",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "254",
-                "name": "变量印品模版-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "11",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "12",
-            "name": "普通印品模板",
-            "url": "CommonPrintTemplate",
-            "type": "MENU",
-            "parentId": "3",
-            "sequence": 5,
-            "children": [],
-            "buttons": [
-              {
-                "id": "256",
-                "name": "普通印品模版-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "12",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "257",
-                "name": "普通印品模版-添加模版",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "12",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "258",
-                "name": "普通印品模版-预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "12",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "259",
-                "name": "普通印品模版-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "12",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "260",
-                "name": "普通印品模版-启用&禁用",
-                "url": "Enable",
-                "type": "LINK",
-                "parentId": "12",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "262",
-                "name": "普通印品模版-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "12",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "261",
-                "name": "普通印品模版-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "12",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "13",
-            "name": "课程管理",
-            "url": "CourseManage",
-            "type": "MENU",
-            "parentId": "3",
-            "sequence": 6,
-            "children": [],
-            "buttons": [
-              {
-                "id": "263",
-                "name": "课程管理-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "264",
-                "name": "课程管理-批量禁用",
-                "url": "BatchEnable",
-                "type": "BUTTON",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "265",
-                "name": "课程管理-模版下载",
-                "url": "TempleteDownload",
-                "type": "BUTTON",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              },
-              {
-                "id": "266",
-                "name": "课程管理-批量导入",
-                "url": "Export",
-                "type": "BUTTON",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 4,
-                "enable": true
-              },
-              {
-                "id": "267",
-                "name": "课程管理-新增课程",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 5,
-                "enable": true
-              },
-              {
-                "id": "383",
-                "name": "课程管理-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "385",
-                "name": "课程管理-新增",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "388",
-                "name": "课程管理-批量导入",
-                "url": "Import",
-                "type": "BUTTON",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "268",
-                "name": "课程管理-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "269",
-                "name": "课程管理-删除",
-                "url": "Delete",
-                "type": "LINK",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "386",
-                "name": "课程管理-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "387",
-                "name": "课程管理-删除",
-                "url": "Delete",
-                "type": "LINK",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "271",
-                "name": "课程管理-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "384",
-                "name": "课程管理-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "270",
-                "name": "课程管理-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "13",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ]
-          }
-        ]
-      },
-      {
-        "id": "356",
-        "name": "字典管理",
-        "url": "dictionary",
-        "type": "MENU",
-        "parentId": "1",
-        "sequence": 1,
-        "children": [
-          {
-            "id": "358",
-            "name": "学生管理",
-            "url": "StudentManage",
-            "type": "MENU",
-            "parentId": "356",
-            "sequence": 2,
-            "children": [],
-            "buttons": [
-              {
-                "id": "377",
-                "name": "学生管理-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "358",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "379",
-                "name": "学生管理-新增",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "358",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "382",
-                "name": "学生管理-批量导入",
-                "url": "Import",
-                "type": "BUTTON",
-                "parentId": "358",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "380",
-                "name": "学生管理-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "358",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "381",
-                "name": "学生管理-删除",
-                "url": "Delete",
-                "type": "LINK",
-                "parentId": "358",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "378",
-                "name": "学生管理-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "358",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          }
-        ]
-      }
-    ]
-  },
-  {
-    "id": "14",
-    "name": "考试中心",
-    "url": "exam",
-    "type": "MENU",
-    "parentId": "-1",
-    "sequence": 2,
-    "children": [
-      {
-        "id": "15",
-        "name": "我的工作台",
-        "url": "work",
-        "type": "MENU",
-        "parentId": "14",
-        "sequence": 1,
-        "children": [
-          {
-            "id": "16",
-            "name": "待办任务",
-            "url": "WaitTask",
-            "type": "MENU",
-            "parentId": "15",
-            "sequence": 1,
-            "children": []
-          }
-        ]
-      },
-      {
-        "id": "37",
-        "name": "命题管理",
-        "url": "paper",
-        "type": "MENU",
-        "parentId": "14",
-        "sequence": 2,
-        "children": [
-          {
-            "id": "39",
-            "name": "命题任务管理",
-            "url": "ExamTaskManage",
-            "type": "MENU",
-            "parentId": "37",
-            "sequence": 1,
-            "children": [],
-            "buttons": [
-              {
-                "id": "272",
-                "name": "命题任务管理-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "39",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "273",
-                "name": "命题任务管理-批量新建命题任务",
-                "url": "BatchAdd",
-                "type": "BUTTON",
-                "parentId": "39",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "274",
-                "name": "命题任务管理-新建命题任务",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "39",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "275",
-                "name": "命题任务管理-预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "39",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "276",
-                "name": "命题任务管理-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "39",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "277",
-                "name": "命题任务管理-取消任务",
-                "url": "Cancel",
-                "type": "LINK",
-                "parentId": "39",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "279",
-                "name": "命题任务管理-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "39",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "278",
-                "name": "命题任务管理-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "39",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "40",
-            "name": "入库申请",
-            "url": "TaskApplyManage",
-            "type": "MENU",
-            "parentId": "37",
-            "sequence": 2,
-            "children": [],
-            "buttons": [
-              {
-                "id": "280",
-                "name": "入库申请-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "40",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "307",
-                "name": "入库申请-新建命题申请",
-                "url": "AddTask",
-                "type": "BUTTON",
-                "parentId": "40",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "281",
-                "name": "入库申请-预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "40",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "282",
-                "name": "入库申请-撤销申请",
-                "url": "End",
-                "type": "LINK",
-                "parentId": "40",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "283",
-                "name": "入库申请-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "40",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "285",
-                "name": "入库申请-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "40",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "284",
-                "name": "入库申请-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "40",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "41",
-            "name": "入库审核",
-            "url": "TaskReviewManage",
-            "type": "MENU",
-            "parentId": "37",
-            "sequence": 3,
-            "children": [],
-            "buttons": [
-              {
-                "id": "288",
-                "name": "入库审核-未审核查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "41",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "289",
-                "name": "入库审核-未审核导出审核样本",
-                "url": "Export",
-                "type": "BUTTON",
-                "parentId": "41",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "290",
-                "name": "入库审核-未审核批量不通过",
-                "url": "BatchNotPass",
-                "type": "BUTTON",
-                "parentId": "41",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              },
-              {
-                "id": "291",
-                "name": "入库审核-未审核批量通过",
-                "url": "BatchPass",
-                "type": "BUTTON",
-                "parentId": "41",
-                "schoolId": "2",
-                "sequence": 4,
-                "enable": true
-              },
-              {
-                "id": "295",
-                "name": "入库审核-已审核查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "41",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "292",
-                "name": "入库审核-未审核编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "41",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "296",
-                "name": "入库审核-已审核预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "41",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "294",
-                "name": "入库审核-未审核列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "41",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "298",
-                "name": "入库审核-已审核列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "41",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "293",
-                "name": "入库审核-未审核查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "41",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "297",
-                "name": "入库审核-已审核查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "41",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "42",
-            "name": "卷库查询",
-            "url": "TaskPaperManage",
-            "type": "MENU",
-            "parentId": "37",
-            "sequence": 4,
-            "children": [],
-            "buttons": [
-              {
-                "id": "299",
-                "name": "卷库查询-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "42",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "300",
-                "name": "卷库查询-批量下载试卷题卡",
-                "url": "BatchDownload",
-                "type": "BUTTON",
-                "parentId": "42",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "301",
-                "name": "卷库查询-预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "42",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "302",
-                "name": "卷库查询-启用&禁用",
-                "url": "Enable",
-                "type": "LINK",
-                "parentId": "42",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "303",
-                "name": "卷库查询-下载",
-                "url": "Download",
-                "type": "LINK",
-                "parentId": "42",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              },
-              {
-                "id": "306",
-                "name": "卷库查询-发布印刷任务",
-                "url": "Publish",
-                "type": "LINK",
-                "parentId": "42",
-                "schoolId": "2",
-                "sequence": 4,
-                "enable": true
-              },
-              {
-                "id": "308",
-                "name": "卷库查询-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "42",
-                "schoolId": "2",
-                "sequence": 4,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "305",
-                "name": "卷库查询-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "42",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "304",
-                "name": "卷库查询-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "42",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          }
-        ]
-      },
-      {
-        "id": "38",
-        "name": "印刷管理",
-        "url": "print",
-        "type": "MENU",
-        "parentId": "14",
-        "sequence": 3,
-        "children": [
-          {
-            "id": "43",
-            "name": "印刷计划管理",
-            "url": "PrintPlanManage",
-            "type": "MENU",
-            "parentId": "38",
-            "sequence": 1,
-            "children": [],
-            "buttons": [
-              {
-                "id": "309",
-                "name": "印刷计划管理-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "43",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "310",
-                "name": "印刷计划管理-新建印刷计划",
-                "url": "Add",
-                "type": "BUTTON",
-                "parentId": "43",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "311",
-                "name": "印刷计划管理-预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "43",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "312",
-                "name": "印刷计划管理-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "43",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "313",
-                "name": "印刷计划管理-删除",
-                "url": "Delete",
-                "type": "LINK",
-                "parentId": "43",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "315",
-                "name": "印刷计划管理-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "43",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "314",
-                "name": "印刷计划管理-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "43",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "44",
-            "name": "考务数据导入",
-            "url": "BusinessDataExport",
-            "type": "MENU",
-            "parentId": "38",
-            "sequence": 2,
-            "children": [],
-            "buttons": [
-              {
-                "id": "316",
-                "name": "考务数据导入-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "44",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "317",
-                "name": "考务数据导入-考务数据模版下载",
-                "url": "TempleteDownload",
-                "type": "BUTTON",
-                "parentId": "44",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "318",
-                "name": "考务数据导入-导出查询结果",
-                "url": "Export",
-                "type": "BUTTON",
-                "parentId": "44",
-                "schoolId": "2",
-                "sequence": 3,
-                "enable": true
-              },
-              {
-                "id": "319",
-                "name": "考务数据导入-导入",
-                "url": "Import",
-                "type": "BUTTON",
-                "parentId": "44",
-                "schoolId": "2",
-                "sequence": 4,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "320",
-                "name": "考务数据导入-预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "44",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "322",
-                "name": "考务数据导入-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "44",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "321",
-                "name": "考务数据导入-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "44",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "45",
-            "name": "考务明细查询",
-            "url": "BusinessDataDetail",
-            "type": "MENU",
-            "parentId": "38",
-            "sequence": 3,
-            "children": [],
-            "buttons": [
-              {
-                "id": "323",
-                "name": "考务明细查询-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "45",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "324",
-                "name": "考务明细查询-预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "45",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "326",
-                "name": "考务明细查询-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "45",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "325",
-                "name": "考务明细查询-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "45",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "46",
-            "name": "关联试卷管理",
-            "url": "PlanLinkPaper",
-            "type": "MENU",
-            "parentId": "38",
-            "sequence": 4,
-            "children": [],
-            "buttons": [
-              {
-                "id": "327",
-                "name": "关联试卷管理-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "46",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "328",
-                "name": "关联试卷管理-编辑",
-                "url": "Edit",
-                "type": "LINK",
-                "parentId": "46",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "330",
-                "name": "关联试卷管理-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "46",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "329",
-                "name": "关联试卷管理-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "46",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          },
-          {
-            "id": "47",
-            "name": "印刷任务管理",
-            "url": "PrintTaskManage",
-            "type": "MENU",
-            "parentId": "38",
-            "sequence": 5,
-            "children": [],
-            "buttons": [
-              {
-                "id": "331",
-                "name": "印刷任务管理-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "47",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "336",
-                "name": "印刷任务管理-批量下载PDF",
-                "url": "BatchDownload",
-                "type": "BUTTON",
-                "parentId": "47",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "332",
-                "name": "印刷任务管理-下载",
-                "url": "Download",
-                "type": "LINK",
-                "parentId": "47",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "335",
-                "name": "印刷任务管理-撤回",
-                "url": "End",
-                "type": "LINK",
-                "parentId": "47",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "334",
-                "name": "印刷任务管理-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "47",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "333",
-                "name": "印刷任务管理-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "47",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          }
-        ]
-      },
-      {
-        "id": "112",
-        "name": "数据管理",
-        "url": "data",
-        "type": "MENU",
-        "parentId": "14",
-        "sequence": 4,
-        "children": [
-          {
-            "id": "113",
-            "name": "任务管理",
-            "url": "DataTaskManage",
-            "type": "MENU",
-            "parentId": "112",
-            "sequence": 1,
-            "children": [],
-            "buttons": [
-              {
-                "id": "337",
-                "name": "任务管理-查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "113",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "338",
-                "name": "任务管理-导出日志",
-                "url": "Export",
-                "type": "LINK",
-                "parentId": "113",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "339",
-                "name": "任务管理-下载文件",
-                "url": "Download",
-                "type": "LINK",
-                "parentId": "113",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "341",
-                "name": "任务管理-列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "113",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "340",
-                "name": "任务管理-查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "113",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          }
-        ]
-      }
-    ]
-  },
-  {
-    "id": "170",
-    "name": "客服制卡",
-    "url": "customer",
-    "type": "MENU",
-    "parentId": "-1",
-    "sequence": 4,
-    "children": [
-      {
-        "id": "171",
-        "name": "客服制卡",
-        "url": "customer",
-        "type": "MENU",
-        "parentId": "170",
-        "sequence": 1,
-        "children": [
-          {
-            "id": "172",
-            "name": "题卡审核",
-            "url": "CustomerCard",
-            "type": "MENU",
-            "parentId": "171",
-            "sequence": 1,
-            "children": [],
-            "buttons": [
-              {
-                "id": "346",
-                "name": "题卡审核-待审核查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "172",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "347",
-                "name": "题卡审核-待审核批量下载试卷文件",
-                "url": "BatchDownload",
-                "type": "BUTTON",
-                "parentId": "172",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "352",
-                "name": "题卡审核-已审核查询",
-                "url": "Select",
-                "type": "BUTTON",
-                "parentId": "172",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "links": [
-              {
-                "id": "350",
-                "name": "题卡审核-待审核预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "172",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "351",
-                "name": "题卡审核-待审核设计题卡",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "172",
-                "schoolId": "2",
-                "sequence": 2,
-                "enable": true
-              },
-              {
-                "id": "355",
-                "name": "题卡审核-已审核预览",
-                "url": "Preview",
-                "type": "LINK",
-                "parentId": "172",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "lists": [
-              {
-                "id": "349",
-                "name": "题卡审核-待审核列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "172",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "354",
-                "name": "题卡审核-已审核列表",
-                "url": "List",
-                "type": "LIST",
-                "parentId": "172",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ],
-            "conditions": [
-              {
-                "id": "348",
-                "name": "题卡审核-待审核查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "172",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              },
-              {
-                "id": "353",
-                "name": "题卡审核-已审核查询条件",
-                "url": "Condition",
-                "type": "CONDITION",
-                "parentId": "172",
-                "schoolId": "2",
-                "sequence": 1,
-                "enable": true
-              }
-            ]
-          }
-        ]
-      }
-    ]
-  },
-  {
-    "id": "199",
-    "name": "客户端",
-    "url": "client",
-    "type": "MENU",
-    "parentId": "-1",
-    "sequence": 22,
-    "children": []
-  }
-]

+ 1 - 83
src/modules/base/router.js

@@ -2,25 +2,13 @@
 import OrganizationManage from "./views/OrganizationManage.vue";
 import RoleManage from "./views/RoleManage.vue";
 import UserManage from "./views/UserManage.vue";
-// rule
-import CommonRule from "./views/CommonRule.vue";
-import CardRuleManage from "./views/CardRuleManage.vue";
-import PrintTemplateManage from "./views/PrintTemplateManage.vue";
-import PrintPlanPushManage from "./views/PrintPlanPushManage.vue";
-import FlowManage from "./views/FlowManage.vue";
-import ApproveRecordManage from "./views/ApproveRecordManage.vue";
-import SmsManage from "./views/SmsManage.vue";
-import CardManage from "./views/CardManage.vue";
+
 // dict
 import StudentManage from "./views/StudentManage.vue";
 import CourseManage from "./views/CourseManage.vue";
-import ClazzManage from "./views/ClazzManage.vue";
 import SemesterManage from "./views/SemesterManage.vue";
 import MajorManage from "./views/MajorManage.vue";
 import CollegeManage from "./views/CollegeManage.vue";
-import ExamManage from "./views/ExamManage.vue";
-import CourseSimpleManage from "./views/CourseSimpleManage.vue";
-import ClazzSimpleManage from "./views/ClazzSimpleManage.vue";
 
 export default [
   {
@@ -38,46 +26,6 @@ export default [
     name: "UserManage",
     component: UserManage
   },
-  {
-    path: "/base/common-rule",
-    name: "CommonRule",
-    component: CommonRule
-  },
-  {
-    path: "/base/card-rule-manage",
-    name: "CardRuleManage",
-    component: CardRuleManage
-  },
-  {
-    path: "/base/print-template-manage",
-    name: "PrintTemplateManage",
-    component: PrintTemplateManage
-  },
-  {
-    path: "/base/param-print-template",
-    name: "ParamPrintTemplate",
-    component: PrintTemplateManage
-  },
-  {
-    path: "/base/common-print-template",
-    name: "CommonPrintTemplate",
-    component: PrintTemplateManage
-  },
-  {
-    path: "/base/print-plan-push-manage",
-    name: "PrintPlanPushManage",
-    component: PrintPlanPushManage
-  },
-  {
-    path: "/base/flow-manage",
-    name: "FlowManage",
-    component: FlowManage
-  },
-  {
-    path: "/base/approve-record-manage",
-    name: "ApproveRecordManage",
-    component: ApproveRecordManage
-  },
   {
     path: "/base/course-manage",
     name: "CourseManage",
@@ -88,11 +36,6 @@ export default [
     name: "StudentManage",
     component: StudentManage
   },
-  {
-    path: "/base/clazz-manage",
-    name: "ClazzManage",
-    component: ClazzManage
-  },
   {
     path: "/base/semester-manage",
     name: "SemesterManage",
@@ -107,30 +50,5 @@ export default [
     path: "/base/college-manage",
     name: "CollegeManage",
     component: CollegeManage
-  },
-  {
-    path: "/base/sms-manage",
-    name: "SmsManage",
-    component: SmsManage
-  },
-  {
-    path: "/base/exam-manage",
-    name: "ExamManage",
-    component: ExamManage
-  },
-  {
-    path: "/base/course-simple-manage",
-    name: "CourseSimpleManage",
-    component: CourseSimpleManage
-  },
-  {
-    path: "/base/clazz-simple-manage/:teachCourseId?",
-    name: "ClazzSimpleManage",
-    component: ClazzSimpleManage
-  },
-  {
-    path: "/base/card-manage",
-    name: "CardManage",
-    component: CardManage
   }
 ];

+ 0 - 230
src/modules/base/views/ApproveRecordManage.vue

@@ -1,230 +0,0 @@
-<template>
-  <div class="approve-record-manage">
-    <div class="part-box part-box-filter part-box-border">
-      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
-        <template v-if="checkPrivilege('condition', 'condition')">
-          <el-form-item label="状态:">
-            <el-select
-              v-model="filter.status"
-              style="width: 120px;"
-              placeholder="请选择状态"
-              clearable
-            >
-              <el-option
-                v-for="(val, key) in AUDITING_STATUS"
-                :key="key"
-                :value="key"
-                :label="val"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="机构:">
-            <org-select
-              v-model="filter.teachingRoomId"
-              style="width:100%;"
-              placeholder="所属机构"
-            ></org-select>
-          </el-form-item>
-          <el-form-item label="提交人:">
-            <el-input
-              style="width: 142px;"
-              v-model.trim="filter.teacherUserName"
-              placeholder="请输入提交人"
-              clearable
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="提交时间:">
-            <el-date-picker
-              v-model="createTime"
-              type="datetimerange"
-              :picker-options="pickerOptions"
-              range-separator="至"
-              start-placeholder="提交开始时间"
-              end-placeholder="提交结束时间"
-              value-format="timestamp"
-              align="right"
-              unlink-panels
-            >
-            </el-date-picker>
-          </el-form-item>
-          <el-form-item label="当前处理人:">
-            <el-input
-              style="width: 142px;"
-              v-model.trim="filter.pendApproveUserName"
-              placeholder="请输入当前处理人"
-              clearable
-            ></el-input>
-          </el-form-item>
-        </template>
-        <el-form-item label-width="0px">
-          <el-button
-            v-if="checkPrivilege('button', 'select')"
-            type="primary"
-            @click="toPage(1)"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-    </div>
-
-    <div class="part-box part-box-pad">
-      <el-table ref="TableList" :data="dataList">
-        <el-table-column
-          type="index"
-          label="序号"
-          width="70"
-          :index="indexMethod"
-        ></el-table-column>
-        <el-table-column
-          prop="teacherUserName"
-          label="提交人"
-          min-width="120"
-        ></el-table-column>
-        <el-table-column prop="createTime" label="提交时间" width="170">
-          <span slot-scope="scope">{{
-            scope.row.createTime | timestampFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column prop="statusStr" label="流程状态"></el-table-column>
-        <el-table-column prop="setupStr" label="当前节点"></el-table-column>
-        <el-table-column
-          prop="pendApproveUserName"
-          label="当前处理人"
-          min-width="120"
-        >
-        </el-table-column>
-        <el-table-column
-          class-name="action-column"
-          label="操作"
-          width="100"
-          fixed="right"
-        >
-          <template slot-scope="scope">
-            <el-button
-              v-if="checkPrivilege('link', 'preview')"
-              class="btn-primary"
-              type="text"
-              @click="toPreview(scope.row)"
-              >查看</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'delete')"
-              class="btn-danger"
-              type="text"
-              @click="toDelete(scope.row)"
-              >删除</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-
-    <!-- ModifyTaskApply -->
-    <modify-task-apply
-      v-if="checkPrivilege('link', 'preview')"
-      ref="ModifyTaskApply"
-      edit-type="PREVIEW"
-      :instance="curExamTask"
-    ></modify-task-apply>
-  </div>
-</template>
-
-<script>
-import { approveRecordListPage, deleteApproveRecord } from "../api";
-import { examTaskGetOne } from "../../exam/api";
-import { AUDITING_STATUS } from "@/constants/enumerate";
-import pickerOptions from "@/constants/datePickerOptions";
-import ModifyTaskApply from "../../exam/components/ModifyTaskApply";
-
-export default {
-  name: "approve-record-manage",
-  components: { ModifyTaskApply },
-  data() {
-    return {
-      filter: {
-        status: "",
-        teachingRoomId: "",
-        teacherUserName: "",
-        pendApproveUserName: "",
-        startTime: null,
-        endTime: null
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      dataList: [],
-      AUDITING_STATUS,
-      curExamTask: {},
-      // date-picker
-      createTime: [],
-      pickerOptions
-    };
-  },
-  mounted() {
-    this.toPage(1);
-  },
-  methods: {
-    async getList() {
-      if (!this.checkPrivilege("list", "list")) return;
-
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      if (this.createTime) {
-        datas.startTime = this.createTime[0];
-        datas.endTime = this.createTime[1];
-      }
-      const data = await approveRecordListPage(datas);
-      this.dataList = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    async toPreview(row) {
-      const types = {
-        exam_task: this.previewExmaTask
-      };
-
-      const func = types[row.objectTable];
-      if (!func) {
-        this.$message.error("操作错误!");
-        return;
-      }
-      func(row);
-    },
-    async previewExmaTask(data) {
-      this.curExamTask = await examTaskGetOne(data.objectId);
-      this.$refs.ModifyTaskApply.open();
-    },
-    toDelete(row) {
-      this.$confirm(`确定要删除当前记录吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          await deleteApproveRecord({
-            id: row.id,
-            enable: 0
-          });
-          this.$message.success("操作成功!");
-          this.getList();
-        })
-        .catch(() => {});
-    }
-  }
-};
-</script>

+ 0 - 268
src/modules/base/views/CardManage.vue

@@ -1,268 +0,0 @@
-<template>
-  <div class="card-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
-        <template v-if="checkPrivilege('condition', 'condition')">
-          <el-form-item label="题卡名称:">
-            <el-input
-              v-model.trim="filter.title"
-              placeholder="名称"
-              clearable
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="创建方式:" label-width="90px">
-            <el-select
-              v-model="filter.createMethod"
-              style="width: 120px;"
-              placeholder="创建方式"
-              clearable
-            >
-              <el-option
-                v-for="(val, key) in CARD_CREATE_METHOD_TYPE"
-                :key="key"
-                :value="key"
-                :label="val"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="创建时间:">
-            <el-date-picker
-              v-model="createTime"
-              type="datetimerange"
-              :picker-options="pickerOptions"
-              range-separator="至"
-              start-placeholder="创建开始时间"
-              end-placeholder="创建结束时间"
-              value-format="timestamp"
-              align="right"
-              unlink-panels
-            >
-            </el-date-picker>
-          </el-form-item>
-        </template>
-        <el-form-item>
-          <el-button
-            v-if="checkPrivilege('button', 'select')"
-            type="primary"
-            @click="toPage(1)"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-      <div class="part-box-action">
-        <el-button
-          v-if="checkPrivilege('button', 'add')"
-          type="primary"
-          icon="el-icon-circle-plus-outline"
-          @click="toAdd"
-          >添加题卡</el-button
-        >
-      </div>
-    </div>
-    <div class="part-box part-box-pad">
-      <el-table ref="TableList" :data="cardList">
-        <el-table-column
-          type="index"
-          label="序号"
-          width="70"
-          :index="indexMethod"
-        ></el-table-column>
-        <el-table-column
-          prop="title"
-          label="题卡名称"
-          min-width="120"
-        ></el-table-column>
-        <el-table-column prop="type" label="类型" width="100">
-          <span slot-scope="scope">{{ scope.row.type | cardTypeFilter }}</span>
-        </el-table-column>
-        <el-table-column prop="createMethod" label="创建方式" width="100">
-          <span slot-scope="scope">{{
-            scope.row.createMethod | cardCreateMethodTypeFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column prop="status" label="状态" width="100">
-          <span
-            :class="{ 'color-danger': scope.row.status !== 'SUBMIT' }"
-            slot-scope="scope"
-            >{{ scope.row.status === "SUBMIT" ? "提交" : "暂存" }}</span
-          >
-        </el-table-column>
-        <el-table-column prop="remark" label="备注" min-width="80">
-          <span slot-scope="scope">{{
-            scope.row.remark | defaultFieldFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column prop="createTime" label="创建时间" width="170">
-          <span slot-scope="scope">{{
-            scope.row.createTime | timestampFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column
-          class-name="action-column"
-          label="操作"
-          width="140"
-          fixed="right"
-        >
-          <template slot-scope="scope">
-            <el-button
-              v-if="!checkPrivilege('link', 'preview')"
-              class="btn-primary"
-              type="text"
-              @click="toPreview(scope.row)"
-              >查看</el-button
-            >
-            <el-button
-              v-if="
-                checkPrivilege('link', 'edit') &&
-                  scope.row.createMethod !== 'UPLOAD'
-              "
-              class="btn-primary"
-              type="text"
-              @click="toEditCard(scope.row)"
-              >编辑题卡</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'edit')"
-              class="btn-primary"
-              type="text"
-              @click="toEditInfo(scope.row)"
-              >编辑信息</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'delete')"
-              class="btn-danger"
-              type="text"
-              @click="toDelete(scope.row)"
-              >删除</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-
-    <!-- ModifyCardInfo -->
-    <modify-card-info
-      ref="ModifyCardInfo"
-      :instance="curCard"
-      @new-card="toNewCard"
-      @modified="getList"
-    ></modify-card-info>
-    <!-- ModifyCard -->
-    <modify-card ref="ModifyCard" @modified="getList"></modify-card>
-  </div>
-</template>
-
-<script>
-import { CARD_CREATE_METHOD_TYPE } from "../../../constants/enumerate";
-import { cardListPage, deleteCard } from "../api";
-import ModifyCardInfo from "../components/ModifyCardInfo";
-import pickerOptions from "@/constants/datePickerOptions";
-import ModifyCard from "../../card/components/ModifyCard";
-
-export default {
-  name: "card-manage",
-  components: { ModifyCardInfo, ModifyCard },
-  data() {
-    return {
-      filter: {
-        title: "",
-        createMethod: "",
-        createStartTime: "",
-        createEndTime: ""
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      CARD_CREATE_METHOD_TYPE,
-      cardList: [],
-      curCard: {},
-      // date-picker
-      createTime: [],
-      pickerOptions
-    };
-  },
-  mounted() {
-    this.getList();
-  },
-  methods: {
-    async getList() {
-      if (!this.checkPrivilege("list", "list")) return;
-
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      if (this.createTime) {
-        datas.createStartTime = this.createTime[0];
-        datas.createEndTime = this.createTime[1];
-      }
-      const data = await cardListPage(datas);
-      this.cardList = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    toAdd() {
-      this.curCard = {};
-      this.$refs.ModifyCardInfo.open();
-    },
-    toPreview(row) {
-      window.open(
-        this.getRouterPath({
-          name: "CardPreview",
-          params: {
-            cardId: row.id,
-            viewType: "view"
-          }
-        })
-      );
-    },
-    toNewCard(data) {
-      this.$ls.set("prepareTcPCard", data);
-      this.$refs.ModifyCard.open();
-    },
-    toEditCard(row) {
-      this.curCard = row;
-      this.$ls.set("prepareTcPCard", {
-        id: row.id,
-        title: row.title,
-        type: row.type,
-        createMethod: row.createMethod,
-        remark: row.remark,
-        cardRuleId: row.cardRuleId,
-        attachmentId: row.attachmentId
-      });
-      this.$refs.ModifyCard.open();
-    },
-    toEditInfo(row) {
-      this.curCard = row;
-      this.$refs.ModifyCardInfo.open();
-    },
-    toDelete(row) {
-      this.$confirm(`确定要删除题卡【${row.title}】吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          await deleteCard(row.id);
-          this.$message.success("删除成功!");
-          this.deletePageLastItem();
-        })
-        .catch(() => {});
-    }
-  }
-};
-</script>

+ 0 - 316
src/modules/base/views/CardRuleManage.vue

@@ -1,316 +0,0 @@
-<template>
-  <div class="card-rule-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
-        <template v-if="checkPrivilege('condition', 'condition')">
-          <el-form-item label="规则名称:">
-            <el-input
-              style="width: 142px;"
-              v-model.trim="filter.name"
-              placeholder="规则名称"
-              clearable
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="创建时间:">
-            <el-date-picker
-              v-model="createTime"
-              type="datetimerange"
-              :picker-options="pickerOptions"
-              range-separator="至"
-              start-placeholder="创建开始时间"
-              end-placeholder="创建结束时间"
-              value-format="timestamp"
-              align="right"
-              unlink-panels
-            >
-            </el-date-picker>
-          </el-form-item>
-          <el-form-item label="启用/禁用:" label-width="90px">
-            <el-select
-              v-model="filter.enable"
-              style="width: 120px;"
-              placeholder="启用/禁用"
-              clearable
-            >
-              <el-option
-                v-for="(val, key) in ABLE_TYPE"
-                :key="key"
-                :value="key * 1"
-                :label="val"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-        </template>
-        <el-form-item>
-          <el-button
-            v-if="checkPrivilege('button', 'select')"
-            type="primary"
-            @click="toPage(1)"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-      <div class="part-box-action">
-        <el-button
-          v-if="checkPrivilege('button', 'add')"
-          type="primary"
-          icon="el-icon-circle-plus-outline"
-          @click="toAdd"
-          >添加</el-button
-        >
-      </div>
-    </div>
-    <div class="part-box part-box-pad">
-      <el-table ref="TableList" :data="rules">
-        <el-table-column
-          type="index"
-          label="序号"
-          width="70"
-          :index="indexMethod"
-        ></el-table-column>
-        <el-table-column
-          prop="name"
-          label="题卡规则名称"
-          min-width="200"
-        ></el-table-column>
-        <el-table-column prop="remark" label="备注">
-          <span slot-scope="scope">{{
-            scope.row.remark | defaultFieldFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column prop="enable" label="启用/禁用" width="100">
-          <template slot-scope="scope">
-            {{ scope.row.enable | enableFilter }}
-          </template>
-        </el-table-column>
-        <el-table-column prop="createTime" label="创建时间" width="170">
-          <span slot-scope="scope">{{
-            scope.row.createTime | timestampFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column class-name="action-column" label="操作" width="140">
-          <template slot-scope="scope">
-            <el-button
-              v-if="checkPrivilege('link', 'preview')"
-              class="btn-primary"
-              type="text"
-              @click="toDetail(scope.row)"
-              >查看</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'edit')"
-              class="btn-primary"
-              type="text"
-              @click="toEdit(scope.row)"
-              >编辑</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'delete')"
-              class="btn-danger"
-              type="text"
-              @click="toDelete(scope.row)"
-              >删除</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'enable')"
-              :class="scope.row.enable ? 'btn-danger' : 'btn-primary'"
-              type="text"
-              @click="toEnable(scope.row)"
-              >{{ scope.row.enable ? "禁用" : "启用" }}</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-    <!-- ModifyCardRule -->
-    <modify-card-rule
-      ref="ModifyCardRule"
-      :instance="curRule"
-      :edit-type="editType"
-      @modified="getList"
-    ></modify-card-rule>
-  </div>
-</template>
-
-<script>
-import { ABLE_TYPE } from "@/constants/enumerate";
-import {
-  examRuleDetail,
-  cardRuleListPage,
-  ableCardRule,
-  deleteCardRule
-} from "../api";
-import { getEnums } from "../../login/api";
-import pickerOptions from "@/constants/datePickerOptions";
-
-import ModifyCardRule from "../components/ModifyCardRule";
-
-export default {
-  name: "card-rule-manage",
-  components: {
-    ModifyCardRule
-  },
-  data() {
-    return {
-      filter: {
-        enable: null,
-        name: "",
-        createStartTime: null,
-        createEndTime: null
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      rules: [],
-      examRule: {},
-      curRule: {},
-      editType: "ADD",
-      cardRequiredFields: [],
-      cardExtendFields: [],
-      ABLE_TYPE,
-      // date-picker
-      createTime: [],
-      pickerOptions
-    };
-  },
-  mounted() {
-    this.getList();
-    this.getExamRule();
-  },
-  methods: {
-    async getExamRule() {
-      if (!this.checkPrivilege("button", "add")) return;
-
-      const examRequiredFields = await getEnums("REQUIRED_FIELDS");
-      this.cardRequiredFields = await getEnums("CARD_REQUIRED_FIELDS");
-      const cardRequiredFieldCodes = this.cardRequiredFields.map(
-        item => item.code
-      );
-      const extendFields = examRequiredFields
-        .filter(field => !cardRequiredFieldCodes.includes(field.code))
-        .map(item => {
-          return {
-            code: item.code,
-            name: item.desc
-          };
-        });
-      let examRule = await examRuleDetail();
-      if (!examRule) {
-        this.$notify.error({
-          title: "错误",
-          message: "请先设置通用考务规则配置"
-        });
-        return;
-      }
-      this.examRule = examRule;
-
-      this.cardExtendFields = [
-        ...extendFields,
-        ...JSON.parse(examRule.extendFields).filter(item => item.enable)
-      ];
-    },
-    async getList() {
-      if (!this.checkPrivilege("list", "list")) return;
-
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      if (this.createTime) {
-        datas.createStartTime = this.createTime[0];
-        datas.createEndTime = this.createTime[1];
-      }
-      if (datas.enable !== null && datas.enable !== "")
-        datas.enable = !!datas.enable;
-      const data = await cardRuleListPage(datas);
-      this.rules = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    toAdd() {
-      this.curRule = {
-        examNumberDigit: this.examRule.examNumberDigit,
-        requiredFields: this.cardRequiredFields.map(item => {
-          return {
-            code: item.code,
-            name: item.desc,
-            enable: true
-          };
-        }),
-        extendFields: this.cardExtendFields.map(item => {
-          return {
-            code: item.code,
-            name: item.name,
-            enable: false
-          };
-        })
-      };
-      this.editType = "ADD";
-      this.$refs.ModifyCardRule.open();
-    },
-    toEdit(row) {
-      this.curRule = row;
-      this.editType = "EDIT";
-      this.$refs.ModifyCardRule.open();
-    },
-    toDetail(row) {
-      // this.curRule = row;
-      // this.editType = "PREVIEW";
-      // this.$refs.ModifyCardRule.open();
-      window.open(
-        this.getRouterPath({
-          name: "CardRulePreview",
-          params: {
-            cardRuleId: row.id
-          }
-        })
-      );
-    },
-    toEnable(row) {
-      const action = row.enable ? "禁用" : "启用";
-
-      this.$confirm(`确定要${action}题卡规则【${row.name}】吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          const enable = !row.enable;
-          await ableCardRule({
-            id: row.id,
-            enable
-          });
-          row.enable = enable;
-          this.$message.success("操作成功!");
-        })
-        .catch(() => {});
-    },
-    async toDelete(row) {
-      const confirm = await this.$confirm(
-        `确定要删除题卡规则【${row.name}】吗?`,
-        "提示",
-        {
-          type: "warning"
-        }
-      ).catch(() => {});
-      if (confirm !== "confirm") return;
-      await deleteCardRule(row.id);
-      this.$message.success("删除成功!");
-      this.deletePageLastItem();
-    }
-  }
-};
-</script>

+ 0 - 187
src/modules/base/views/ClazzManage.vue

@@ -1,187 +0,0 @@
-<template>
-  <div class="clazz-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
-        <template v-if="checkPrivilege('condition', 'condition')">
-          <el-form-item label="班级名称:">
-            <el-input
-              style="width: 142px;"
-              v-model.trim="filter.queryParams"
-              placeholder="班级名称"
-              clearable
-            ></el-input>
-          </el-form-item>
-        </template>
-        <el-form-item>
-          <el-button
-            v-if="checkPrivilege('button', 'select')"
-            type="primary"
-            @click="toPage(1)"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-      <div class="part-box-action">
-        <el-button
-          v-if="checkPrivilege('button', 'delete')"
-          type="danger"
-          icon="el-icon-delete"
-          @click="toBatchDelete"
-          >批量删除</el-button
-        >
-        <el-button
-          v-if="checkPrivilege('button', 'add')"
-          type="primary"
-          icon="el-icon-circle-plus-outline"
-          @click="toAdd"
-          >新增班级</el-button
-        >
-      </div>
-    </div>
-    <div class="part-box part-box-pad">
-      <el-table
-        ref="TableList"
-        :data="dataList"
-        @selection-change="handleSelectionChange"
-      >
-        <el-table-column
-          type="selection"
-          width="55"
-          align="center"
-        ></el-table-column>
-        <el-table-column
-          type="index"
-          label="序号"
-          width="70"
-          :index="indexMethod"
-        ></el-table-column>
-        <el-table-column prop="clazzName" label="班级名称"></el-table-column>
-        <el-table-column prop="majorName" label="所属专业"></el-table-column>
-        <el-table-column prop="createTime" label="创建时间" width="170">
-          <span slot-scope="scope">{{
-            scope.row.createTime | timestampFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column class-name="action-column" label="操作" width="120px">
-          <template slot-scope="scope">
-            <el-button
-              v-if="checkPrivilege('link', 'edit')"
-              class="btn-primary"
-              type="text"
-              @click="toEdit(scope.row)"
-              >编辑</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'delete')"
-              class="btn-danger"
-              type="text"
-              @click="toDelete(scope.row)"
-              >删除</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-
-    <modify-clazz
-      :instance="curRow"
-      @modified="getList"
-      ref="ModifyClazz"
-    ></modify-clazz>
-  </div>
-</template>
-
-<script>
-import { clazzListQuery, deleteClazz } from "../api";
-import ModifyClazz from "../components/ModifyClazz";
-
-export default {
-  name: "clazz-manage",
-  components: { ModifyClazz },
-  data() {
-    return {
-      filter: {
-        queryParams: ""
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      dataList: [],
-      multipleSelection: [],
-      curRow: {}
-    };
-  },
-  mounted() {
-    this.getList();
-  },
-  methods: {
-    async getList() {
-      if (!this.checkPrivilege("list", "list")) return;
-
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      const data = await clazzListQuery(datas);
-      this.dataList = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.multipleSelection = [];
-      this.current = page;
-      this.getList();
-    },
-    toAdd() {
-      this.curRow = {};
-      this.$refs.ModifyClazz.open();
-    },
-    toEdit(row) {
-      this.curRow = row;
-      this.$refs.ModifyClazz.open();
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val.map(item => item.id);
-    },
-    toBatchDelete() {
-      if (!this.multipleSelection.length) {
-        this.$message.error("请选择要删除的数据");
-        return;
-      }
-
-      this.$confirm(`确定要删除选中的这些数据吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          await deleteClazz(this.multipleSelection);
-          this.$message.success("删除成功!");
-          this.deletePageLastItem(this.multipleSelection.length);
-          this.multipleSelection = [];
-        })
-        .catch(() => {});
-    },
-    toDelete(row) {
-      this.$confirm(`确定要删除班级【${row.clazzName}】吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          await deleteClazz([row.id]);
-          this.$message.success("删除成功!");
-          this.deletePageLastItem();
-        })
-        .catch(() => {});
-    }
-  }
-};
-</script>

+ 0 - 212
src/modules/base/views/ClazzSimpleManage.vue

@@ -1,212 +0,0 @@
-<template>
-  <div class="clazz-simple-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
-        <template v-if="checkPrivilege('condition', 'condition')">
-          <el-form-item label="课程:">
-            <el-select
-              v-model="filter.teachCourseId"
-              placeholder="课程"
-              filterable
-            >
-              <el-option
-                v-for="item in courses"
-                :key="item.id"
-                :value="item.id"
-                :label="item.name"
-              >
-                <span>{{ `${item.name}(${item.code})` }}</span>
-              </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="班级名称:">
-            <el-input
-              v-model.trim="filter.teachClazzName"
-              placeholder="班级名称"
-              clearable
-            ></el-input>
-          </el-form-item>
-        </template>
-        <el-form-item>
-          <el-button
-            v-if="checkPrivilege('button', 'select')"
-            type="primary"
-            :disabled="!filter.teachCourseId"
-            @click="toPage(1)"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-      <div class="part-box-action">
-        <el-button
-          v-if="checkPrivilege('button', 'add')"
-          type="primary"
-          icon="el-icon-circle-plus-outline"
-          @click="toAdd"
-          >新增班级</el-button
-        >
-      </div>
-    </div>
-    <div class="part-box part-box-pad">
-      <el-table ref="TableList" :data="dataList">
-        <el-table-column
-          type="index"
-          label="序号"
-          width="70"
-          :index="indexMethod"
-        ></el-table-column>
-        <el-table-column
-          prop="teachClazzName"
-          label="班级名称"
-        ></el-table-column>
-        <el-table-column
-          prop="teachStudentCount"
-          label="学生人数"
-        ></el-table-column>
-        <el-table-column prop="createTime" label="创建时间" width="170">
-          <span slot-scope="scope">{{
-            scope.row.createTime | timestampFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column class-name="action-column" label="操作" width="170px">
-          <template slot-scope="scope">
-            <el-button
-              v-if="checkPrivilege('link', 'edit')"
-              class="btn-primary"
-              type="text"
-              @click="toEdit(scope.row)"
-              >重命名</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'Window')"
-              class="btn-primary"
-              type="text"
-              @click="toEditStudent(scope.row)"
-              >人员管理</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'delete')"
-              class="btn-danger"
-              type="text"
-              @click="toDelete(scope.row)"
-              >删除</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-
-    <!-- ModifyClazzSimple -->
-    <modify-clazz-simple
-      :instance="curRow"
-      :courses="courses"
-      @modified="getList"
-      ref="ModifyClazzSimple"
-    ></modify-clazz-simple>
-    <!-- ModifyClazzSimpleStudent -->
-    <modify-clazz-simple-student
-      ref="ModifyClazzSimpleStudent"
-      :clazz="curRow"
-      @modified="getList"
-    ></modify-clazz-simple-student>
-  </div>
-</template>
-
-<script>
-import {
-  clazzSimpleListPage,
-  clazzTeachCourseQuery,
-  deleteClazzSimple
-} from "../api";
-import ModifyClazzSimple from "../components/ModifyClazzSimple";
-import ModifyClazzSimpleStudent from "../components/ModifyClazzSimpleStudent";
-
-export default {
-  name: "clazz-simple-manage",
-  components: { ModifyClazzSimple, ModifyClazzSimpleStudent },
-  data() {
-    return {
-      filter: {
-        teachCourseId: "",
-        teachClazzName: ""
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      courses: [],
-      dataList: [],
-      curRow: {}
-    };
-  },
-  mounted() {
-    this.initData();
-  },
-  methods: {
-    async initData() {
-      if (this.$route.params.teachCourseId) {
-        this.filter.teachCourseId = this.$route.params.teachCourseId;
-        this.getCourseSimple();
-        this.getList();
-      } else {
-        await this.getCourseSimple();
-        this.filter.teachCourseId = this.courses[0] && this.courses[0].id;
-        this.getList();
-      }
-    },
-    async getList() {
-      if (!this.checkPrivilege("list", "list")) return;
-
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      const data = await clazzSimpleListPage(datas);
-      this.dataList = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    async getCourseSimple() {
-      const data = await clazzTeachCourseQuery();
-      this.courses = data || [];
-    },
-    toAdd() {
-      this.curRow = { teachCourseId: this.filter.teachCourseId };
-      this.$refs.ModifyClazzSimple.open();
-    },
-    toEdit(row) {
-      this.curRow = row;
-      this.$refs.ModifyClazzSimple.open();
-    },
-    toEditStudent(row) {
-      this.curRow = row;
-      this.$refs.ModifyClazzSimpleStudent.open();
-    },
-    toDelete(row) {
-      this.$confirm(`确定要删除班级【${row.teachClazzName}】吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          await deleteClazzSimple([row.id]);
-          this.$message.success("删除成功!");
-          this.deletePageLastItem();
-        })
-        .catch(() => {});
-    }
-  }
-};
-</script>

+ 0 - 17
src/modules/base/views/CommonCardTemplate.vue

@@ -1,17 +0,0 @@
-<template>
-  <template-manage
-    class="common-card-template"
-    template-type="GENERIC"
-  ></template-manage>
-</template>
-
-<script>
-import TemplateManage from "./TemplateManage";
-
-export default {
-  name: "common-card-template",
-  components: {
-    TemplateManage
-  }
-};
-</script>

+ 0 - 17
src/modules/base/views/CommonPrintTemplate.vue

@@ -1,17 +0,0 @@
-<template>
-  <template-manage
-    class="common-print-template"
-    template-type="ORDINARY"
-  ></template-manage>
-</template>
-
-<script>
-import TemplateManage from "./TemplateManage";
-
-export default {
-  name: "common-print-template",
-  components: {
-    TemplateManage
-  }
-};
-</script>

+ 0 - 43
src/modules/base/views/CommonRule.vue

@@ -1,43 +0,0 @@
-<template>
-  <div class="common-rule">
-    <div class="mb-4 tab-btns">
-      <el-button
-        v-for="item in menus"
-        :key="item.id"
-        size="medium"
-        :type="item.id == curMenu.id ? 'primary' : 'default'"
-        @click="selectMenu(item)"
-        >{{ item.name }}</el-button
-      >
-    </div>
-    <component
-      v-if="checkPrivilege('button', 'add')"
-      :is="curMenu.component"
-    ></component>
-  </div>
-</template>
-
-<script>
-import RuleExam from "../components/RuleExam";
-
-export default {
-  name: "common-rule",
-  components: {
-    RuleExam
-  },
-  data() {
-    return {
-      menus: [{ id: "1", name: "考务规则配置", component: "rule-exam" }],
-      curMenu: {}
-    };
-  },
-  created() {
-    this.curMenu = this.menus[0];
-  },
-  methods: {
-    selectMenu(item) {
-      this.curMenu = item;
-    }
-  }
-};
-</script>

+ 0 - 160
src/modules/base/views/CourseSimpleManage.vue

@@ -1,160 +0,0 @@
-<template>
-  <div class="course-simple-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
-        <template v-if="checkPrivilege('condition', 'condition')">
-          <el-form-item label="课程名称:">
-            <el-input
-              v-model.trim="filter.courseName"
-              placeholder="课程名称"
-              clearable
-            ></el-input>
-          </el-form-item>
-        </template>
-        <el-form-item>
-          <el-button
-            v-if="checkPrivilege('button', 'select')"
-            type="primary"
-            @click="toPage(1)"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-      <div class="part-box-action">
-        <el-button
-          v-if="checkPrivilege('button', 'add')"
-          type="primary"
-          icon="el-icon-circle-plus-outline"
-          @click="toAdd"
-          >新增课程</el-button
-        >
-      </div>
-    </div>
-
-    <div class="part-box part-box-pad">
-      <el-table ref="TableList" :data="courses">
-        <el-table-column
-          type="index"
-          label="序号"
-          width="70"
-          :index="indexMethod"
-        ></el-table-column>
-        <el-table-column prop="courseName" label="课程名称"></el-table-column>
-        <el-table-column prop="courseCode" label="课程编码"></el-table-column>
-        <el-table-column prop="createTime" label="创建时间" width="170">
-          <span slot-scope="scope">{{
-            scope.row.createTime | timestampFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column class-name="action-column" label="操作" width="160">
-          <template slot-scope="scope">
-            <el-button
-              v-if="checkPrivilege('link', 'Link')"
-              class="btn-primary"
-              type="text"
-              @click="toEditClazz(scope.row)"
-              >班级管理</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'Delete')"
-              class="btn-danger"
-              type="text"
-              @click="toDelete(scope.row)"
-              >删除</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-
-    <!-- ModifyCourseSimple -->
-    <modify-course-simple
-      v-if="checkPrivilege('button', 'add')"
-      ref="ModifyCourseSimple"
-      :instance="curCourse"
-      @modified="getList"
-    ></modify-course-simple>
-  </div>
-</template>
-
-<script>
-import { courseSimpleListPage, deleteCourseSimple } from "../api";
-import ModifyCourseSimple from "../components/ModifyCourseSimple";
-
-export default {
-  name: "course-simple-manage",
-  components: { ModifyCourseSimple },
-  data() {
-    return {
-      filter: {
-        courseName: ""
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      courses: [],
-      curCourse: {}
-    };
-  },
-  mounted() {
-    this.getList();
-  },
-  methods: {
-    async getList() {
-      if (!this.checkPrivilege("list", "list")) return;
-
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-
-      const data = await courseSimpleListPage(datas);
-      this.courses = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    toAdd() {
-      this.curCourse = {};
-      this.$refs.ModifyCourseSimple.open();
-    },
-    toEdit(row) {
-      this.curCourse = row;
-      this.$refs.ModifyCourseSimple.open();
-    },
-    toEditClazz(row) {
-      this.$router.push({
-        name: "ClazzSimpleManage",
-        params: {
-          teachCourseId: row.id
-        }
-      });
-    },
-    toDelete(row) {
-      this.$confirm(`确定要删除课程【${row.courseName}】吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          await deleteCourseSimple([row.id]);
-          this.$message.success("删除成功!");
-          this.deletePageLastItem();
-        })
-        .catch(() => {});
-    }
-  }
-};
-</script>

+ 0 - 236
src/modules/base/views/ExamManage.vue

@@ -1,236 +0,0 @@
-<template>
-  <div class="exam-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
-        <template v-if="checkPrivilege('condition', 'condition')">
-          <el-form-item label="学期:">
-            <semester-select
-              v-model="filter.semesterId"
-              placeholder="学期"
-              clearable
-            ></semester-select>
-          </el-form-item>
-          <el-form-item label="启用/禁用:" label-width="90px">
-            <el-select
-              v-model="filter.enable"
-              style="width: 120px;"
-              placeholder="启用/禁用"
-              clearable
-            >
-              <el-option
-                v-for="(val, key) in ABLE_TYPE"
-                :key="key"
-                :value="key * 1"
-                :label="val"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-        </template>
-        <el-form-item>
-          <el-button
-            v-if="checkPrivilege('button', 'select')"
-            type="primary"
-            @click="toPage(1)"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-      <div class="part-box-action">
-        <el-button
-          v-if="checkPrivilege('button', 'add')"
-          type="primary"
-          icon="el-icon-circle-plus-outline"
-          @click="toAdd"
-          >新增</el-button
-        >
-      </div>
-    </div>
-    <div class="part-box part-box-pad">
-      <el-table ref="TableList" :data="exams">
-        <el-table-column
-          type="index"
-          label="序号"
-          width="70"
-          :index="indexMethod"
-        ></el-table-column>
-        <el-table-column prop="name" label="考试名称"></el-table-column>
-        <el-table-column prop="semesterName" label="学年学期"></el-table-column>
-        <el-table-column prop="category" label="考试类型" width="100">
-          <span slot-scope="scope">
-            {{ scope.row.category | examTypeFilter }}
-          </span>
-        </el-table-column>
-        <el-table-column prop="createTime" label="创建时间" width="170">
-          <span slot-scope="scope">{{
-            scope.row.createTime | timestampFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column prop="enable" label="启用/禁用" width="100">
-          <template slot-scope="scope">
-            {{ scope.row.enable | enableFilter }}
-          </template>
-        </el-table-column>
-        <el-table-column
-          class-name="action-column"
-          label="操作"
-          width="180px"
-          fixed="right"
-        >
-          <template slot-scope="scope">
-            <el-button
-              v-if="checkPrivilege('link', 'edit')"
-              class="btn-primary"
-              type="text"
-              @click="toEdit(scope.row)"
-              >编辑</el-button
-            >
-            <el-button
-              v-if="
-                checkPrivilege('link', 'Set') &&
-                  scope.row.category === 'OFFLINE'
-              "
-              class="btn-primary"
-              type="text"
-              @click="toEditConfig(scope.row)"
-              >设置</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'Enable')"
-              :class="scope.row.enable ? 'btn-danger' : 'btn-primary'"
-              type="text"
-              @click="toEnable(scope.row)"
-              >{{ scope.row.enable ? "禁用" : "启用" }}</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'Delete')"
-              class="btn-danger"
-              type="text"
-              @click="toDelete(scope.row)"
-              >删除</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-
-    <!-- modify-exam -->
-    <modify-exam
-      ref="ModifyExam"
-      v-if="checkPrivilege('link', 'edit')"
-      :instance="curExam"
-      @modified="examModified"
-    ></modify-exam>
-    <!-- modify-exam-config -->
-    <modify-exam-config
-      ref="ModifyExamConfig"
-      v-if="checkPrivilege('link', 'Set')"
-      :exam="curExam"
-    ></modify-exam-config>
-  </div>
-</template>
-
-<script>
-import { examListQuery, deleteExam, ableExam } from "../api";
-import { ABLE_TYPE } from "@/constants/enumerate";
-import ModifyExam from "../components/ModifyExam";
-import ModifyExamConfig from "../components/ModifyExamConfig";
-
-export default {
-  name: "exam-manage",
-  components: { ModifyExam, ModifyExamConfig },
-  data() {
-    return {
-      filter: {
-        semesterId: "",
-        enable: ""
-      },
-      ABLE_TYPE,
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      exams: [],
-      curExam: {}
-    };
-  },
-  mounted() {
-    this.getList();
-  },
-  methods: {
-    async getList() {
-      if (!this.checkPrivilege("list", "list")) return;
-
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      if (datas.enable !== null && datas.enable !== "")
-        datas.enable = !!datas.enable;
-
-      const data = await examListQuery(datas);
-      this.exams = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    toAdd() {
-      this.curExam = {};
-      this.$refs.ModifyExam.open();
-    },
-    toEdit(row) {
-      this.curExam = row;
-      this.$refs.ModifyExam.open();
-    },
-    examModified({ isEdit, exam }) {
-      if (!isEdit && exam.category === "OFFLINE") {
-        this.toEditConfig(exam);
-      }
-      this.getList();
-    },
-    toEditConfig(row) {
-      this.curExam = row;
-      this.$refs.ModifyExamConfig.open();
-    },
-    toDelete(row) {
-      this.$confirm(`确定要删除考试【${row.name}】吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          await deleteExam(row.id);
-          this.$message.success("删除成功!");
-          this.deletePageLastItem();
-        })
-        .catch(() => {});
-    },
-    toEnable(row) {
-      const action = row.enable ? "禁用" : "启用";
-      this.$confirm(`确定要${action}考试【${row.name}】吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          const enable = !row.enable;
-          await ableExam({
-            id: row.id,
-            enable
-          });
-          row.enable = enable;
-          this.$message.success("操作成功!");
-        })
-        .catch(() => {});
-    }
-  }
-};
-</script>

+ 0 - 175
src/modules/base/views/FlowManage.vue

@@ -1,175 +0,0 @@
-<template>
-  <div class="flow-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
-        <template v-if="checkPrivilege('condition', 'condition')">
-          <el-form-item label="名称:">
-            <el-input
-              style="width: 200px;"
-              v-model.trim="filter.name"
-              placeholder="请输入内容"
-              clearable
-            ></el-input>
-          </el-form-item>
-        </template>
-        <el-form-item>
-          <el-button
-            v-if="checkPrivilege('button', 'select')"
-            type="primary"
-            @click="toPage(1)"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-      <div class="part-box-action">
-        <el-button
-          v-if="!checkPrivilege('button', 'add')"
-          type="primary"
-          icon="el-icon-circle-plus-outline"
-          @click="toAdd"
-          >添加流程</el-button
-        >
-      </div>
-    </div>
-    <div class="part-box part-box-pad">
-      <el-table ref="TableList" :data="dataList">
-        <el-table-column
-          type="index"
-          label="序号"
-          width="70"
-          :index="indexMethod"
-        ></el-table-column>
-        <el-table-column prop="name" label="流程名称"></el-table-column>
-        <el-table-column prop="type" label="流程类型" width="160">
-          <span slot-scope="scope">{{ scope.row.type | flowTypeFilter }}</span>
-        </el-table-column>
-        <el-table-column class-name="action-column" label="操作" width="160">
-          <template slot-scope="scope">
-            <el-button
-              v-if="checkPrivilege('link', 'edit')"
-              class="btn-primary"
-              type="text"
-              @click="toEditDetail(scope.row)"
-              >编辑</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'edit')"
-              class="btn-primary"
-              type="text"
-              @click="toEdit(scope.row)"
-              >重命名</el-button
-            >
-            <el-button
-              v-if="checkPrivilege('link', 'delete')"
-              class="btn-danger"
-              type="text"
-              @click="toDelete(scope.row)"
-              >删除</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-    <!-- ModifyFlow -->
-    <modify-flow
-      ref="ModifyFlow"
-      :instance="curFlow"
-      @modified="flowModified"
-    ></modify-flow>
-    <!-- ModifyFlowDetail -->
-    <modify-flow-detail
-      ref="ModifyFlowDetail"
-      :instance="curFlow"
-      @modified="getList"
-    ></modify-flow-detail>
-  </div>
-</template>
-
-<script>
-import { flowListPage, flowDelete } from "../api";
-import ModifyFlow from "../components/ModifyFlow";
-import ModifyFlowDetail from "../components/ModifyFlowDetail";
-
-export default {
-  name: "flow-manage",
-  components: {
-    ModifyFlow,
-    ModifyFlowDetail
-  },
-  data() {
-    return {
-      filter: {
-        name: ""
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      dataList: [],
-      curFlow: {}
-    };
-  },
-  mounted() {
-    this.toPage(1);
-  },
-  methods: {
-    async getList() {
-      if (!this.checkPrivilege("list", "list")) return;
-
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      const data = await flowListPage(datas);
-      this.dataList = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    toAdd() {
-      this.curFlow = {};
-      this.$refs.ModifyFlow.open();
-    },
-    toEdit(row) {
-      this.curFlow = { ...row };
-      this.$refs.ModifyFlow.open();
-    },
-    toEditDetail(row) {
-      this.curFlow = { ...row };
-      this.$refs.ModifyFlowDetail.open();
-    },
-    flowModified({ isEdit, data }) {
-      if (!isEdit) {
-        this.curFlow = data;
-        this.$refs.ModifyFlowDetail.open();
-        return;
-      }
-      this.getList();
-    },
-    toDelete(row) {
-      this.$confirm(`确定要删除流程【${row.name}】吗?`, "提示", {
-        type: "warning"
-      })
-        .then(async () => {
-          await flowDelete({ id: row.id, enable: 0 });
-          this.$message.success("操作成功!");
-          this.getList();
-        })
-        .catch(() => {});
-    }
-  }
-};
-</script>

+ 0 - 17
src/modules/base/views/ParamPrintTemplate.vue

@@ -1,17 +0,0 @@
-<template>
-  <template-manage
-    class="param-card-template"
-    template-type="VARIABLE"
-  ></template-manage>
-</template>
-
-<script>
-import TemplateManage from "./TemplateManage";
-
-export default {
-  name: "param-card-template",
-  components: {
-    TemplateManage
-  }
-};
-</script>

+ 0 - 294
src/modules/base/views/PrintPlanPushManage.vue

@@ -1,294 +0,0 @@
-<template>
-  <div class="print-plan-push-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
-        <el-form-item label="使用学期:">
-          <el-select
-            v-model.trim="filter.semesterId"
-            placeholder="请选择使用学期"
-            clearable
-            filterable
-          >
-            <el-option
-              v-for="item in semesters"
-              :key="item.id"
-              :value="item.id"
-              :label="item.name"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="考试:">
-          <exam-select
-            v-model="filter.examId"
-            :semester-id="filter.semesterId"
-          ></exam-select>
-        </el-form-item>
-        <el-form-item label="印刷计划:">
-          <print-plan-select
-            v-model.trim="filter.printPlanId"
-            placeholder="印刷计划"
-            clearable
-          ></print-plan-select>
-        </el-form-item>
-        <el-form-item label-width="0px">
-          <el-button type="primary" @click="search">查询</el-button>
-        </el-form-item>
-      </el-form>
-      <div class="part-box-action">
-        <el-button
-          icon="el-icon-circle-plus-outline"
-          type="primary"
-          :disabled="loading"
-          @click="toBatchPush"
-        >
-          批量推送
-        </el-button>
-        <el-button icon="el-icon-circle-plus-outline" @click="toMergePush">
-          合并推送印刷计划
-        </el-button>
-      </div>
-    </div>
-
-    <div class="part-box part-box-pad">
-      <el-table
-        ref="TableList"
-        :data="dataList"
-        @selection-change="handleSelectionChange"
-      >
-        <el-table-column
-          type="selection"
-          width="55"
-          align="center"
-          :selectable="row => row.canPush"
-        ></el-table-column>
-        <el-table-column
-          prop="name"
-          label="印刷计划"
-          min-width="180"
-        ></el-table-column>
-        <el-table-column prop="examStartTime" label="考试开始时间" width="170">
-          <span slot-scope="scope">{{
-            scope.row.examStartTime | timestampFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column prop="examEndTime" label="考试结束时间" width="170">
-          <span slot-scope="scope">{{
-            scope.row.examEndTime | timestampFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column prop="status" label="计划状态" width="100">
-          <span slot-scope="scope">
-            {{ scope.row.status | printPlanStatusFilter }}
-          </span>
-        </el-table-column>
-        <el-table-column prop="totalGates" label="总门次" width="70">
-        </el-table-column>
-        <el-table-column prop="totalSubjects" label="总科次" width="70">
-        </el-table-column>
-        <el-table-column prop="totalPackages" label="总卷袋数" width="80">
-        </el-table-column>
-        <el-table-column prop="createTime" label="创建时间" width="170">
-          <span slot-scope="scope">{{
-            scope.row.createTime | timestampFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column
-          prop="createName"
-          label="创建人"
-          min-width="80"
-        ></el-table-column>
-        <el-table-column
-          prop="thirdRelateName"
-          label="考试名称"
-          min-width="180"
-        >
-          <span slot-scope="scope">{{
-            scope.row.thirdRelateName | defaultFieldFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column prop="thirdRelateId" label="考试ID" min-width="80">
-          <span slot-scope="scope">{{
-            scope.row.thirdRelateId | defaultFieldFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column prop="syncStatus" label="同步状态" width="100">
-          <span slot-scope="scope">{{
-            scope.row.syncStatus | syncPrintStatusFilter
-          }}</span>
-        </el-table-column>
-        <el-table-column
-          class-name="action-column"
-          label="操作"
-          width="100"
-          fixed="right"
-        >
-          <template slot-scope="scope">
-            <el-button
-              class="btn-primary"
-              type="text"
-              @click="toPreview(scope.row)"
-              >查看</el-button
-            >
-            <el-button
-              v-if="scope.row.canPush"
-              class="btn-primary"
-              type="text"
-              :disabled="loading"
-              @click="toPush(scope.row)"
-              >推送</el-button
-            >
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-
-    <!-- MergePushDialog -->
-    <merge-push-dialog
-      ref="MergePushDialog"
-      :ids="multipleSelection"
-      @modified="mergePushed"
-    ></merge-push-dialog>
-    <!-- ModifyPrintPlan -->
-    <modify-print-plan
-      ref="ModifyPrintPlan"
-      :instance="curPrintPlan"
-      edit-type="PREVIEW"
-    ></modify-print-plan>
-  </div>
-</template>
-
-<script>
-import {
-  printPlanPushListQuery,
-  printPlanBatchPush,
-  printPlanPush
-} from "../api";
-import { examSemesterList } from "../../base/api";
-import MergePushDialog from "../components/MergePushDialog";
-import ModifyPrintPlan from "../../print/components/ModifyPrintPlan";
-
-export default {
-  name: "print-plan-push-manage",
-  components: { MergePushDialog, ModifyPrintPlan },
-  data() {
-    return {
-      filter: {
-        semesterId: "",
-        printPlanId: "",
-        examId: ""
-      },
-      current: 1,
-      size: this.GLOBAL.pageSize,
-      total: 0,
-      loading: false,
-      semesters: [],
-      dataList: [],
-      curPrintPlan: {},
-      multipleSelection: []
-    };
-  },
-  mounted() {
-    this.initData();
-  },
-  methods: {
-    async initData() {
-      await this.getSemesters();
-      await this.getList();
-    },
-    async getList() {
-      const datas = {
-        ...this.filter,
-        pageNumber: this.current,
-        pageSize: this.size
-      };
-      const data = await printPlanPushListQuery(datas);
-      this.dataList = data.records;
-      this.total = data.total;
-    },
-    toPage(page) {
-      this.multipleSelection = [];
-      this.current = page;
-      this.getList();
-    },
-    search() {
-      this.toPage(1);
-    },
-    async getSemesters() {
-      const res = await examSemesterList({});
-      this.semesters = res || [];
-      if (!this.semesters.length) return;
-
-      let curSemester = this.semesters.find(item => item.inUsed);
-      curSemester = curSemester || this.semesters[0];
-      this.filter.semesterId = curSemester.id;
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val.map(item => item.id);
-    },
-    async toBatchPush() {
-      if (this.loading) return;
-      if (!this.multipleSelection.length) {
-        this.$message.error("请选择要批量推送的数据");
-        return;
-      }
-      const result = await this.$confirm("确定要推送选中的计划吗?", "提示", {
-        type: "warning"
-      }).catch(() => {});
-      if (result !== "confirm") return;
-
-      this.loading = true;
-      const data = await printPlanBatchPush(
-        this.multipleSelection
-      ).catch(() => {});
-      this.loading = false;
-      if (!data) return;
-
-      this.$message.success("提交成功!");
-      this.toPage(this.current);
-    },
-    toMergePush() {
-      if (!this.multipleSelection.length) {
-        this.$message.error("请选择要合并推送的数据");
-        return;
-      }
-      this.$refs.MergePushDialog.open();
-    },
-    mergePushed() {
-      this.toPage(this.current);
-    },
-    toPreview(row) {
-      this.curPrintPlan = row;
-      this.$refs.ModifyPrintPlan.open();
-    },
-    async toPush(row) {
-      if (this.loading) return;
-      const result = await this.$confirm("确定要推送当前计划吗?", "提示", {
-        type: "warning"
-      }).catch(() => {});
-      if (result !== "confirm") return;
-
-      this.loading = true;
-      const data = await printPlanPush({
-        printPlanId: row.id,
-        thirdRelateId: row.thirdRelateId
-      }).catch(() => {});
-      this.loading = false;
-      if (!data) return;
-
-      this.$message.success("提交成功!");
-      this.toPage(this.current);
-    }
-  }
-};
-</script>

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff