deason 6 jaren geleden
bovenliggende
commit
02b6ec6c45

+ 14 - 14
src/modules/print/constants/constants.js

@@ -13,21 +13,21 @@ export const coursePaperStatusList = [
   { value: 2, label: "已有" }
 ];
 
-/* 用户角色信息 */
-export const userRole = {
-  /* 是否为印刷总负责人 */
-  isSuperLeader: false,
-  /* 是否为项目经理 */
-  isPM: false,
-  /* 是否为印刷供应商 */
-  isSupplier: false,
-  /* 是否为印刷学校管理员 */
-  isSchoolLeader: false,
-  /* 其它 */
-  isOther: false
-};
-
 Vue.prototype.loadUserRole = function(user) {
+  /* 当前用户角色信息 */
+  this.curUserRole = {
+    /* 是否为印刷总负责人 */
+    isSuperLeader: false,
+    /* 是否为项目经理 */
+    isPM: false,
+    /* 是否为印刷供应商 */
+    isSupplier: false,
+    /* 是否为印刷学校管理员 */
+    isSchoolLeader: false,
+    /* 其它 */
+    isOther: false
+  };
+
   let roles = user.roleList;
   for (let role of roles) {
     let roleCode = role.roleCode;

+ 12 - 3
src/modules/print/view/CourseStatistic.vue

@@ -154,7 +154,7 @@
           <el-table-column width="80" label="试卷P数" prop="paperP" />
           <el-table-column width="100" label="考生人数" prop="totalStudent" />
 
-          <el-table-column width="180" label="操作" :context="_self">
+          <el-table-column width="285" label="操作" :context="_self">
             <template slot-scope="scope">
               <el-button
                 size="mini"
@@ -171,6 +171,15 @@
                 @click="openExportDialog(scope.row);"
                 >下载
               </el-button>
+
+              <el-button
+                size="mini"
+                icon="el-icon-menu"
+                :disabled="!hasPermit"
+                v-show="scope.row.paperStatus > 1"
+                @click="openAllotDialog(scope.row);"
+                >试卷指定
+              </el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -416,7 +425,7 @@
 
 <script>
 import { CORE_API, PRINT_API } from "@/constants/constants";
-import { userRole, coursePaperStatusList } from "../constants/constants.js";
+import { coursePaperStatusList } from "../constants/constants.js";
 import { mapState } from "vuex";
 import { checkEmptyStr, checkEmptyNumber } from "../utils/common.js";
 
@@ -432,7 +441,7 @@ export default {
         pageNo: 1,
         pageSize: 10
       },
-      curUserRole: userRole,
+      curUserRole: {},
       hasPermit: false,
       totalElements: 0,
       loading: false,

+ 2 - 2
src/modules/print/view/ExamStructure.vue

@@ -284,7 +284,7 @@
 
 <script>
 import { PRINT_API } from "@/constants/constants";
-import { userRole } from "../constants/constants.js";
+import {} from "../constants/constants.js";
 import { mapState } from "vuex";
 import { checkEmptyNumber } from "../utils/common.js";
 
@@ -345,7 +345,7 @@ export default {
         pageNo: 1,
         pageSize: 10
       },
-      curUserRole: userRole,
+      curUserRole: {},
       hasPermit: false,
       totalElements: 0,
       loading: false,

+ 4 - 2
src/modules/print/view/Project.vue

@@ -327,7 +327,7 @@
 
 <script>
 import { CORE_API, PRINT_API } from "@/constants/constants";
-import { userRole } from "../constants/constants.js";
+import {} from "../constants/constants.js";
 import { mapState } from "vuex";
 import { checkEmptyStr, checkEmptyNumber, formatGMT } from "../utils/common.js";
 
@@ -408,7 +408,7 @@ export default {
         pageNo: 1,
         pageSize: 10
       },
-      curUserRole: userRole,
+      curUserRole: {},
       hasPermit: false,
       totalElements: 0,
       loading: false,
@@ -803,9 +803,11 @@ export default {
     } else if (this.curUserRole.isPM) {
       this.hasPermit = false;
       this.loadPmInfo(this.user);
+      this.loadSupplierList();
       this.formSearch.pmId = this.user.userId;
     } else if (this.curUserRole.isSupplier) {
       this.hasPermit = false;
+      this.loadPmList();
       this.loadSupplierInfo(this.user);
       this.formSearch.supplierId = this.user.userId;
     } else {

+ 2 - 3
src/modules/print/view/ProjectStatistic.vue

@@ -65,7 +65,6 @@
               size="small"
               type="primary"
               icon="el-icon-refresh"
-              :disabled="!hasPermit"
               v-show="!checkEmptyNumber(formSearch.examId)"
               @click="refreshStatistic"
               >刷新
@@ -285,7 +284,7 @@
 
 <script>
 import { PRINT_API } from "@/constants/constants";
-import { userRole, groupTypeList } from "../constants/constants.js";
+import { groupTypeList } from "../constants/constants.js";
 import { mapState } from "vuex";
 import { checkEmptyStr, checkEmptyNumber } from "../utils/common.js";
 
@@ -390,7 +389,7 @@ export default {
         orgId: "",
         examId: ""
       },
-      curUserRole: userRole,
+      curUserRole: {},
       groupTypeList: groupTypeList,
       loaded: false,
       hasPermit: false,

+ 2 - 2
src/modules/print/view/ProjectTemplate.vue

@@ -117,7 +117,7 @@
 
 <script>
 import { PRINT_API } from "@/constants/constants";
-import { userRole } from "../constants/constants.js";
+import {} from "../constants/constants.js";
 import { mapState } from "vuex";
 import { checkEmptyStr, checkEmptyNumber } from "../utils/common.js";
 
@@ -128,7 +128,7 @@ export default {
         orgId: "",
         examId: ""
       },
-      curUserRole: userRole,
+      curUserRole: {},
       hasPermit: false,
       loading: false,
       tableData: [],