zhangjie 4 yıl önce
ebeveyn
işleme
234fe83913

+ 2 - 2
card/api.js

@@ -49,6 +49,6 @@ export const cardDetail = cardId => {
   return $postParam("/api/admin/exam/card/get_one", { cardId });
 };
 
-export const saveCard = datas => {
-  return $post("/api/admin/exam/card/save", datas);
+export const saveCard = (datas, config = {}) => {
+  return $post("/api/admin/exam/card/save", datas, config);
 };

+ 0 - 1
card/assets/styles/card-design.scss

@@ -516,7 +516,6 @@
   .el-form-item__label,
   .el-checkbox {
     color: #999;
-    font-weight: bold;
   }
   .column-btn {
     width: 32px;

+ 9 - 3
card/elements/card-head/CardHead.vue

@@ -9,6 +9,7 @@
           v-model="cardTitle"
           size="small"
           placeholder="请输入题卡标题"
+          :disabled="disabledEditCardName"
           @blur="nameChange"
         >
         </el-input>
@@ -31,7 +32,7 @@
     </div>
 
     <template v-if="data.columnNumber === 2">
-      <div class="card-head-body" v-if="data.examNumberStyle !== 'fill'">
+      <div class="card-head-body" v-if="data.examNumberStyle !== 'FILL'">
         <div class="grid-container">
           <div class="grid-row">
             <div class="grid-col grid-col-dash">
@@ -66,7 +67,7 @@
     </template>
 
     <template v-if="data.columnNumber > 2">
-      <div class="card-head-body" v-if="data.examNumberStyle !== 'fill'">
+      <div class="card-head-body" v-if="data.examNumberStyle !== 'FILL'">
         <head-stdno class="card-head-part" :data="data"></head-stdno>
         <head-stdinfo class="card-head-part" :data="data"></head-stdinfo>
         <head-dynamic
@@ -100,7 +101,7 @@ import HeadNotice from "./cardHeadSpin/HeadNotice";
 import HeadStdinfo from "./cardHeadSpin/HeadStdinfo";
 import HeadStdno from "./cardHeadSpin/HeadStdno";
 import CardHeadBodyAutoResize from "./CardHeadBodyAutoResize";
-import { mapMutations } from "vuex";
+import { mapMutations, mapState } from "vuex";
 
 export default {
   name: "card-head",
@@ -127,6 +128,7 @@ export default {
     };
   },
   computed: {
+    ...mapState("card", ["cardConfig"]),
     classes() {
       return [
         "page-element",
@@ -146,6 +148,10 @@ export default {
           : !this.data.missAndFill && !this.data.writeSign && !this.data.aOrB;
 
       return !noDynamic;
+    },
+    disabledEditCardName() {
+      // 客服制卡不可修改标题
+      return this.cardConfig["makeMethod"] === "CUST";
     }
   },
   methods: {

+ 28 - 4
card/views/CardDesign.vue

@@ -358,6 +358,17 @@ export default {
       }
       this.addWatch();
     },
+    getCardTitle(titleRule) {
+      const fieldMap = {
+        courseCode: this.prepareTcPCard.courseCode,
+        courseName: this.prepareTcPCard.courseName,
+        schoolName: this.prepareTcPCard.schoolName
+      };
+      Object.entries(fieldMap).forEach(([key, val]) => {
+        titleRule = titleRule.replace("${" + key + "}", val);
+      });
+      return titleRule;
+    },
     async getCardTempDetail() {
       const detData = await cardDetail(this.cardId);
       // this.canSave = !detData.operateStatus;
@@ -402,7 +413,8 @@ export default {
           columnNumber: 2,
           columnGap: 20,
           showForbidArea: true,
-          cardDesc: ""
+          cardDesc: "",
+          makeMethod: this.prepareTcPCard.makeMethod
         }
       };
       config.aOrB = this.prepareTcPCard["paperType"]
@@ -410,7 +422,7 @@ export default {
         : false;
       config.requiredFields = JSON.parse(config.requiredFields);
       config.extendFields = JSON.parse(config.extendFields);
-      config.cardTitle = config.titleRule;
+      config.cardTitle = this.getCardTitle(config.titleRule);
       this.setCardConfig(config);
     },
     addNewTopic(item) {
@@ -488,6 +500,15 @@ export default {
       if (this.cardId) data.id = this.cardId;
       return data;
     },
+    getRequestConfig() {
+      return this.prepareTcPCard.makeMethod === "CUST"
+        ? {
+            headers: {
+              schoolId: this.prepareTcPCard.schoolId
+            }
+          }
+        : {};
+    },
     checkElementCovered() {
       let elements = [];
       this.pages.forEach(page => {
@@ -540,7 +561,7 @@ export default {
       if (!this.checkCardValid()) return;
       let datas = this.getCardData("", this.getModel());
       datas.status = "STAGE";
-      const result = await saveCard(datas);
+      const result = await saveCard(datas, this.getRequestConfig());
       this.cardId = result;
       this.$ls.set("cardId", this.cardId);
       return true;
@@ -581,7 +602,10 @@ export default {
       window.submitCardTemp = async (htmlContent, model) => {
         const datas = this.getCardData(htmlContent, model);
         datas.status = "SUBMIT";
-        const result = await saveCard(datas).catch(() => {});
+        const result = await saveCard(
+          datas,
+          this.getRequestConfig()
+        ).catch(() => {});
         this.cardPreviewUrl = "";
         this.isSubmit = false;
         window.cardData = null;

+ 2 - 3
src/assets/styles/base.scss

@@ -116,7 +116,6 @@ body {
   -moz-osx-font-smoothing: grayscale;
   font-size: $--font-size-base;
   color: $--color-text-primary;
-  font-weight: bold;
 }
 
 /* part */
@@ -198,13 +197,13 @@ body {
   border-radius: 20px;
 
   th {
-    padding: 17px;
+    padding: 10px;
     line-height: 20px;
     letter-spacing: 1px;
     border: 1px solid $--border-color-light;
   }
   td {
-    padding: 17px;
+    padding: 10px;
     line-height: 20px;
     border: 1px solid $--border-color-light;
 

+ 7 - 10
src/assets/styles/element-ui-costom.scss

@@ -12,7 +12,6 @@
   background-color: #f6f6f6;
   .el-dialog__title {
     color: #666666;
-    font-weight: bold;
     font-size: 16px;
     line-height: 19px;
   }
@@ -24,12 +23,10 @@
   border-top: 1px solid #e5e5e5;
 
   .el-form-item__label {
-    font-weight: bold;
     color: #545454;
     padding-right: 2px;
   }
   .el-input-tips {
-    font-weight: bold;
     color: rgba(187, 187, 187, 1);
     margin-left: 13px;
   }
@@ -91,7 +88,6 @@
   &-item {
     &__error {
       font-size: 12px;
-      font-weight: bold;
       color: rgba(254, 108, 105, 1);
     }
     &__content {
@@ -277,7 +273,6 @@
 // table
 .el-table {
   color: $--color-text-primary;
-  font-weight: bold;
 
   &--border {
     border-radius: $--border-radius;
@@ -286,7 +281,7 @@
 
   &__header thead {
     // font-size: 16px;
-    color: $--color-text-regular;
+    color: $--color-text-primary;
     font-weight: bold;
   }
   tr.el-table__row {
@@ -348,7 +343,6 @@
   }
   .el-checkbox__label {
     color: $--color-text-regular !important;
-    font-weight: bold;
   }
 }
 .el-radio {
@@ -384,7 +378,6 @@
   }
   .el-radio__label {
     color: $--color-text-regular !important;
-    font-weight: bold;
   }
   &.is-disabled {
     .el-radio__label {
@@ -417,7 +410,6 @@
 
     .el-pager li {
       color: $--color-text-regular;
-      font-weight: bold;
       margin: 0 5px;
       padding: 0 8px;
       line-height: 32px;
@@ -495,6 +487,7 @@
     }
   }
 }
+
 .alert-message {
   .el-message-box__btns {
     text-align: center;
@@ -506,7 +499,11 @@
     }
   }
 }
-
+// .el-message
+.el-message-loading {
+  border-color: mix($--color-white, $--color-success, 80%);
+  background-color: mix($--color-white, $--color-success, 90%);
+}
 // el-date-editor
 .el-date-editor {
   .el-range-separator {

+ 0 - 3
src/assets/styles/home.scss

@@ -59,7 +59,6 @@
     color: $--color-text-secondary;
     font-size: 16px;
     line-height: 20px;
-    font-weight: bold;
     border-bottom: 1px solid #e9e9e9;
     > i {
       margin-right: 6px;
@@ -84,7 +83,6 @@
       line-height: 20px;
       position: relative;
       cursor: pointer;
-      font-weight: bold;
       &-act,
       &:hover {
         color: $--color-primary;
@@ -263,7 +261,6 @@
   padding: 15px 20px;
   .el-breadcrumb {
     line-height: 30px;
-    font-weight: bold;
 
     .el-breadcrumb__item {
       .el-breadcrumb__inner {

+ 1 - 0
src/main.js

@@ -57,6 +57,7 @@ axios.interceptors.request.use(
     // 显示loading提示
     if (!queue.length) {
       load = ElementUI.Message({
+        customClass: "el-message-loading",
         iconClass: "el-message__icon el-icon-loading",
         message: "Loading...",
         duration: 0

+ 7 - 7
src/modules/admin/views/AdminUserManage.vue

@@ -71,6 +71,13 @@
           width="120px"
         >
           <template slot-scope="scope">
+            <el-button
+              class="btn-table-icon"
+              type="text"
+              icon="icon icon-edit"
+              @click="toEdit(scope.row)"
+              title="编辑"
+            ></el-button>
             <el-button
               class="btn-table-icon"
               type="text"
@@ -82,13 +89,6 @@
               @click="toEnable(scope.row)"
               :title="scope.row.enable ? '禁用' : '启用'"
             ></el-button>
-            <el-button
-              class="btn-table-icon"
-              type="text"
-              icon="icon icon-edit"
-              @click="toEdit(scope.row)"
-              title="编辑"
-            ></el-button>
             <el-button
               class="btn-table-icon"
               type="text"

+ 6 - 6
src/modules/base/views/CardRuleManage.vue

@@ -85,16 +85,16 @@
             <el-button
               class="btn-table-icon"
               type="text"
-              icon="icon icon-edit"
-              @click="toEdit(scope.row)"
-              title="编辑"
+              icon="icon icon-circle-right"
+              @click="toDetail(scope.row)"
+              title="查看"
             ></el-button>
             <el-button
               class="btn-table-icon"
               type="text"
-              icon="icon icon-circle-right"
-              @click="toDetail(scope.row)"
-              title="查看"
+              icon="icon icon-edit"
+              @click="toEdit(scope.row)"
+              title="编辑"
             ></el-button>
             <el-button
               class="btn-table-icon"

+ 6 - 6
src/modules/base/views/TemplateManage.vue

@@ -100,16 +100,16 @@
             <el-button
               class="btn-table-icon"
               type="text"
-              icon="icon icon-edit"
-              @click="toEdit(scope.row)"
-              title="编辑"
+              icon="icon icon-circle-right"
+              @click="toDetail(scope.row)"
+              title="查看"
             ></el-button>
             <el-button
               class="btn-table-icon"
               type="text"
-              icon="icon icon-circle-right"
-              @click="toDetail(scope.row)"
-              title="查看"
+              icon="icon icon-edit"
+              @click="toEdit(scope.row)"
+              title="编辑"
             ></el-button>
             <el-button
               class="btn-table-icon"

+ 7 - 7
src/modules/base/views/UserManage.vue

@@ -101,6 +101,13 @@
           width="120px"
         >
           <template slot-scope="scope">
+            <el-button
+              class="btn-table-icon"
+              type="text"
+              icon="icon icon-edit"
+              @click="toEdit(scope.row)"
+              title="编辑"
+            ></el-button>
             <el-button
               class="btn-table-icon"
               type="text"
@@ -112,13 +119,6 @@
               @click="toEnable(scope.row)"
               :title="scope.row.enable ? '禁用' : '启用'"
             ></el-button>
-            <el-button
-              class="btn-table-icon"
-              type="text"
-              icon="icon icon-edit"
-              @click="toEdit(scope.row)"
-              title="编辑"
-            ></el-button>
             <el-button
               class="btn-table-icon"
               type="text"

+ 4 - 6
src/modules/customer/views/CustomerCard.vue

@@ -93,11 +93,7 @@
           align="center"
           :index="indexMethod"
         ></el-table-column>
-        <el-table-column
-          prop="paperNumber"
-          label="试卷编号"
-          width="120"
-        ></el-table-column>
+        <el-table-column prop="paperNumber" label="试卷编号"></el-table-column>
         <el-table-column prop="schoolName" label="学校名称"></el-table-column>
         <el-table-column prop="orgName" label="所属部门"> </el-table-column>
         <el-table-column
@@ -284,8 +280,10 @@ export default {
         examTaskId: row.examTaskId,
         courseCode: row.courseCode,
         courseName: row.courseName,
+        schoolName: row.schoolName,
         makeMethod: "CUST",
-        cardRuleId: row.cardRuleId
+        cardRuleId: row.cardRuleId,
+        schoolId: row.schoolId
       });
       // 打开题卡编辑页,创建题卡,并预设需要绑定的任务
       this.$router.push({

+ 3 - 6
src/modules/exam/components/BatchAddExamTask.vue

@@ -59,18 +59,14 @@
         </el-form-item>
         <el-form-item label="指派命题老师:">
           <el-table class="el-table--noback" :data="tasks" border>
-            <el-table-column prop="courseName" label="科目(代码)">
+            <el-table-column prop="courseName" label="课程(代码)">
               <span slot-scope="scope">
                 {{ scope.row.courseName }}({{ scope.row.courseCode }})
               </span>
             </el-table-column>
             <el-table-column prop="paperNumber" label="试卷编号">
               <template slot-scope="scope">
-                <el-input
-                  v-model.trim="scope.row.paperNumber"
-                  placeholder="请输入"
-                  clearable
-                ></el-input>
+                {{ scope.row.paperNumber | defaultFieldFilter }}
               </template>
             </el-table-column>
             <el-table-column prop="specialty" label="适用专业(方向)">
@@ -89,6 +85,7 @@
                   size="small"
                   style="width: 150px;"
                   placeholder="请选择"
+                  clearable
                 >
                   <el-option
                     v-for="user in scope.row.users"

+ 14 - 16
src/modules/exam/components/CardOptionDialog.vue

@@ -5,7 +5,7 @@
       :visible.sync="modalIsShow"
       title="选择制卡方式"
       top="10vh"
-      width="560px"
+      width="600px"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
       append-to-body
@@ -63,29 +63,26 @@
             :rules="applyRules"
             label-width="90px"
           >
-            <el-form-item prop="title" label="文件标题:">
+            <el-form-item prop="title" label="题卡标题:">
               <el-input
                 style="width:300px"
                 v-model.trim="applyModalForm.title"
-                placeholder="请输入文件标题"
+                placeholder="请输入题卡标题"
               ></el-input>
             </el-form-item>
-            <el-form-item prop="attachmentId">
-              <upload-button
-                btn-icon="icon icon-upload"
-                btn-type="default"
-                btn-content="选择上传文件"
+            <el-form-item prop="attachmentId" label="上传文件:">
+              <upload-file-view
+                input-width="300px"
                 :upload-url="uploadUrl"
                 :upload-data="uploadData"
                 :format="format"
-                :max-size="maxSize"
                 @upload-error="uplaodError"
                 @upload-success="uploadSuccess"
-                style="margin: 0;"
-              ></upload-button>
-              <span style="margin-left: 10px;"
-                >上传的单个试卷文件大小不超过20M</span
-              >
+                ref="UploadFileView"
+              ></upload-file-view>
+              <p class="tips-info">
+                上传的文件只支持{{ format.join(",") }},大小不超过20M
+              </p>
             </el-form-item>
           </el-form>
         </div>
@@ -104,7 +101,7 @@
 import { cardForSelectList } from "../api";
 import { applyCustomerCard } from "../../customer/api";
 import { CARD_SOURCE_TYPE, COMMON_CARD_RULE_ID } from "@/constants/enumerate";
-import UploadButton from "@/components/UploadButton";
+import UploadFileView from "@/components/UploadFileView";
 
 const initModalForm = {
   examTaskId: "",
@@ -128,7 +125,7 @@ export default {
       }
     }
   },
-  components: { UploadButton },
+  components: { UploadFileView },
   data() {
     return {
       modalIsShow: false,
@@ -272,6 +269,7 @@ export default {
           examTaskId: this.modalForm.examTaskId,
           courseCode: this.modalForm.courseCode,
           courseName: this.modalForm.courseName,
+          schoolName: this.$ls.get("schoolName"),
           makeMethod: this.modalForm.makeMethod,
           cardRuleId: this.modalForm.cardRuleId,
           paperType: this.modalForm.paperType

+ 4 - 1
src/modules/exam/components/WaitTaskAudit.vue

@@ -35,7 +35,10 @@
           <el-tag :type="task.residueTips.status" effect="dark">
             {{ task.residueTips.title }}
           </el-tag>
-          <span class="task-action" @click="toDo(task)"
+          <span
+            v-if="task.endTime > task.systemCurrentTime"
+            class="task-action"
+            @click="toDo(task)"
             >立即处理 <i class="el-icon-arrow-right"></i
           ></span>
         </div>

+ 4 - 1
src/modules/exam/components/WaitTaskExam.vue

@@ -27,7 +27,10 @@
           <el-tag :type="task.residueTips.status" effect="dark">
             {{ task.residueTips.title }}
           </el-tag>
-          <span class="task-action" @click="toDo(task)"
+          <span
+            v-if="task.endTime > task.systemCurrentTime"
+            class="task-action"
+            @click="toDo(task)"
             >立即处理 <i class="el-icon-arrow-right"></i
           ></span>
         </div>

+ 4 - 1
src/modules/exam/components/WaitTaskExamTask.vue

@@ -27,7 +27,10 @@
           <el-tag :type="task.residueTips.status" effect="dark">
             {{ task.residueTips.title }}
           </el-tag>
-          <span class="task-action" @click="toDo(task)"
+          <span
+            v-if="task.endTime > task.systemCurrentTime"
+            class="task-action"
+            @click="toDo(task)"
             >立即处理 <i class="el-icon-arrow-right"></i
           ></span>
         </div>

+ 15 - 19
src/modules/exam/views/ExamTaskManage.vue

@@ -104,11 +104,7 @@
           align="center"
           :index="indexMethod"
         ></el-table-column>
-        <el-table-column
-          prop="paperNumber"
-          label="试卷编号"
-          width="120"
-        ></el-table-column>
+        <el-table-column prop="paperNumber" label="试卷编号"></el-table-column>
         <el-table-column prop="courseName" label="课程(代码)">
           <template slot-scope="scope">
             {{ scope.row.courseName }}({{ scope.row.courseCode }})
@@ -154,19 +150,11 @@
         >
           <template slot-scope="scope">
             <el-button
-              v-if="
-                scope.row.status !== 'FINISH' &&
-                  scope.row.createId === curUserId
-              "
               class="btn-table-icon"
               type="text"
-              :icon="
-                scope.row.enable
-                  ? 'icon icon-circle-stop'
-                  : 'icon icon-circle-caret-right'
-              "
-              @click="toEnable(scope.row)"
-              :title="scope.row.enable ? '禁用' : '启用'"
+              icon="icon icon-circle-right"
+              @click="toPreview(scope.row)"
+              title="查看"
             ></el-button>
             <el-button
               v-if="
@@ -181,11 +169,19 @@
               :title="scope.row.status === 'NEW' ? '指派' : '更改'"
             ></el-button>
             <el-button
+              v-if="
+                scope.row.status !== 'FINISH' &&
+                  scope.row.createId === curUserId
+              "
               class="btn-table-icon"
               type="text"
-              icon="icon icon-circle-right"
-              @click="toPreview(scope.row)"
-              title="查看"
+              :icon="
+                scope.row.enable
+                  ? 'icon icon-circle-stop'
+                  : 'icon icon-circle-caret-right'
+              "
+              @click="toEnable(scope.row)"
+              :title="scope.row.enable ? '禁用' : '启用'"
             ></el-button>
           </template>
         </el-table-column>

+ 9 - 13
src/modules/exam/views/TaskApplyManage.vue

@@ -87,11 +87,7 @@
           align="center"
           :index="indexMethod"
         ></el-table-column>
-        <el-table-column
-          prop="paperNumber"
-          label="试卷编号"
-          width="120"
-        ></el-table-column>
+        <el-table-column prop="paperNumber" label="试卷编号"></el-table-column>
         <el-table-column prop="courseName" label="课程(代码)">
           <template slot-scope="scope">
             {{ scope.row.courseName }}({{ scope.row.courseCode }})
@@ -135,6 +131,14 @@
           width="120px"
         >
           <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.auditStatus || scope.row.reviewStatus"
+              class="btn-table-icon"
+              type="text"
+              icon="icon icon-circle-right"
+              @click="toPreview(scope.row)"
+              title="查看详情"
+            ></el-button>
             <el-button
               v-if="!scope.row.auditStatus && !scope.row.reviewStatus"
               class="btn-table-icon"
@@ -165,14 +169,6 @@
               @click="toCancel(scope.row)"
               title="撤销申请"
             ></el-button>
-            <el-button
-              v-if="scope.row.auditStatus || scope.row.reviewStatus"
-              class="btn-table-icon"
-              type="text"
-              icon="icon icon-circle-right"
-              @click="toPreview(scope.row)"
-              title="查看详情"
-            ></el-button>
           </template>
         </el-table-column>
       </el-table>

+ 8 - 12
src/modules/exam/views/TaskPaperManage.vue

@@ -49,11 +49,7 @@
           align="center"
           :index="indexMethod"
         ></el-table-column>
-        <el-table-column
-          prop="paperNumber"
-          label="试卷编号"
-          width="120"
-        ></el-table-column>
+        <el-table-column prop="paperNumber" label="试卷编号"></el-table-column>
         <el-table-column prop="courseName" label="课程(代码)">
           <template slot-scope="scope">
             {{ scope.row.courseName }}({{ scope.row.courseCode }})
@@ -100,6 +96,13 @@
           width="120px"
         >
           <template slot-scope="scope">
+            <el-button
+              class="btn-table-icon"
+              type="text"
+              icon="icon icon-circle-right"
+              @click="toPreview(scope.row)"
+              title="查看"
+            ></el-button>
             <el-button
               class="btn-table-icon"
               type="text"
@@ -111,13 +114,6 @@
               @click="toEnable(scope.row)"
               :title="scope.row.enable ? '禁用' : '启用'"
             ></el-button>
-            <el-button
-              class="btn-table-icon"
-              type="text"
-              icon="icon icon-circle-right"
-              @click="toPreview(scope.row)"
-              title="查看"
-            ></el-button>
             <el-button
               class="btn-table-icon"
               type="text"

+ 10 - 7
src/modules/exam/views/TaskReviewManage.vue

@@ -171,17 +171,19 @@
               v-if="auditStatus === 'NOT_AUDITED'"
               class="btn-table-icon"
               type="text"
-              icon="icon icon-edit"
-              @click="toEdit(scope.row)"
-              title="审核"
+              icon="icon icon-circle-right"
+              @click="toPreview(scope.row)"
+              title="查看详情"
             ></el-button>
             <el-button
-              v-else
+              v-if="
+                auditStatus === 'AUDITED' && scope.row.createId === curUserId
+              "
               class="btn-table-icon"
               type="text"
-              icon="icon icon-circle-right"
-              @click="toPreview(scope.row)"
-              title="查看详情"
+              icon="icon icon-edit"
+              @click="toEdit(scope.row)"
+              title="审核"
             ></el-button>
           </template>
         </el-table-column>
@@ -279,6 +281,7 @@ export default {
       curExamTask: {},
       multipleSelection: [],
       loading: false,
+      curUserId: this.$ls.get("user", { id: "" }).id,
       // audit-dialog
       auditDialogShow: false,
       auditModal: { reason: "" },

+ 1 - 0
src/modules/login/views/Login.vue

@@ -147,6 +147,7 @@ export default {
     async getSchool() {
       const data = await getSchoolInfo(ORG_CODE);
       this.$ls.set("schoolLogo", data.logo);
+      this.$ls.set("schoolName", data.name);
       this.schoolLogo = data.logo;
     },
     async submit(name) {

+ 30 - 9
src/modules/print/components/ModifyPlanPaper.vue

@@ -46,8 +46,8 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="试卷编号:">
-              <!-- <el-select
+            <el-form-item prop="paperNumber" label="试卷编号:">
+              <el-select
                 v-model="modalForm.paperNumber"
                 placeholder="请选择"
                 @change="paperChange"
@@ -58,8 +58,8 @@
                   :value="item.paperNumber"
                   :label="item.paperNumber"
                 ></el-option>
-              </el-select> -->
-              <span>{{ instance.paperNumber }}</span>
+              </el-select>
+              <!-- <span>{{ instance.paperNumber }}</span> -->
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -167,6 +167,13 @@ export default {
       paperAttachments: [],
       cardId: "",
       rules: {
+        paperNumber: [
+          {
+            required: true,
+            message: "请选择试卷编号",
+            trigger: "change"
+          }
+        ],
         relatePaperType: [
           {
             required: true,
@@ -185,17 +192,30 @@ export default {
         : [];
       this.cardId = data.cardId;
     },
-    async getPaperTypes() {
-      const papers = await linkPaperNumberList({
+    // async getPaperTypes() {
+    //   const papers = await linkPaperNumberList({
+    //     examTaskId: this.instance.id,
+    //     printPlanId: this.instance.printPlanId
+    //   });
+
+    //   if (papers && papers[0]) this.paperTypes = papers[0].paperTypes;
+    // },
+    async getPapers() {
+      this.papers = await linkPaperNumberList({
         examTaskId: this.instance.id,
-        printPlanId: this.instance.printPlanId
+        printPlanId: this.instance.printPlanId,
+        courseCode: this.instance.courseCode
       });
 
-      if (papers && papers[0]) this.paperTypes = papers[0].paperTypes;
+      const paper = this.papers.find(
+        item => item.paperNumber === this.modalForm.paperNumber
+      );
+      if (paper) this.paperTypes = paper.paperTypes;
     },
     visibleChange() {
       this.modalForm = this.$objAssign(initModalForm, this.instance);
-      this.getPaperTypes();
+      this.getPapers();
+      // this.getPaperTypes();
       this.getAttachments();
 
       this.$nextTick(() => {
@@ -240,6 +260,7 @@ export default {
       const datas = {
         examTaskId: this.modalForm.id,
         relatePaperType: this.modalForm.relatePaperType,
+        paperNumber: this.modalForm.paperNumber,
         printPlanId: this.instance.printPlanId
       };
       const data = await updatePlanLinkPaper(datas).catch(() => {});

+ 1 - 5
src/modules/print/views/PlanLinkPaper.vue

@@ -59,11 +59,7 @@
           prop="printPlanName"
           label="印刷计划"
         ></el-table-column>
-        <el-table-column
-          prop="paperNumber"
-          label="试卷编号"
-          width="120"
-        ></el-table-column>
+        <el-table-column prop="paperNumber" label="试卷编号"></el-table-column>
         <el-table-column prop="courseName" label="课程(代码)">
           <span slot-scope="scope"
             >{{ scope.row.courseName }}({{ scope.row.courseCode }})</span

+ 7 - 7
src/modules/print/views/PrintPlanManage.vue

@@ -102,17 +102,17 @@
             <el-button
               class="btn-table-icon"
               type="text"
-              icon="icon icon-edit"
-              @click="toEdit(scope.row)"
-              title="修改"
-              v-if="scope.row.createId === curUserId"
+              icon="icon icon-circle-right"
+              @click="toPreview(scope.row)"
+              title="查看"
             ></el-button>
             <el-button
               class="btn-table-icon"
               type="text"
-              icon="icon icon-circle-right"
-              @click="toPreview(scope.row)"
-              title="查看"
+              icon="icon icon-edit"
+              @click="toEdit(scope.row)"
+              title="修改"
+              v-if="scope.row.createId === curUserId"
             ></el-button>
             <el-button
               class="btn-table-icon"

+ 10 - 14
src/modules/print/views/PrintTaskManage.vue

@@ -154,11 +154,7 @@
         ></el-table-column>
         <el-table-column prop="courseNameCode" label="课程(代码)" width="160">
         </el-table-column>
-        <el-table-column
-          prop="paperNumber"
-          label="试卷编号"
-          width="120"
-        ></el-table-column>
+        <el-table-column prop="paperNumber" label="试卷编号"></el-table-column>
         <el-table-column prop="examPlace" label="考点"></el-table-column>
         <el-table-column prop="examRoom" label="考场"></el-table-column>
         <el-table-column
@@ -204,6 +200,13 @@
           fixed="right"
         >
           <template slot-scope="scope">
+            <el-button
+              class="btn-table-icon"
+              type="text"
+              icon="icon icon-download-act"
+              @click="toViewPdf(scope.row)"
+              title="查看pdf"
+            ></el-button>
             <el-button
               v-if="scope.row.status === 'READY'"
               class="btn-table-icon"
@@ -230,20 +233,13 @@
               @click="toCancel(scope.row)"
               title="撤回提交"
             ></el-button>
-            <el-button
+            <!-- <el-button
               class="btn-table-icon"
               type="text"
               icon="icon icon-circle-right"
               @click="toPreview(scope.row)"
               title="查看印品模板"
-            ></el-button>
-            <el-button
-              class="btn-table-icon"
-              type="text"
-              icon="icon icon-download-act"
-              @click="toViewPdf(scope.row)"
-              title="查看pdf"
-            ></el-button>
+            ></el-button> -->
           </template>
         </el-table-column>
       </el-table>