zhangjie 4 лет назад
Родитель
Сommit
8298756a18

+ 0 - 1
src/assets/styles/common-component.less

@@ -241,7 +241,6 @@
 // import-file
 .cc-import-file {
   &-tips {
-    height: 20px;
     line-height: 20px;
   }
   &-body {

+ 3 - 0
src/assets/styles/main.less

@@ -50,6 +50,9 @@
   &-title {
     font-size: 32px;
     line-height: 44px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
   }
   &-actions {
     position: absolute;

+ 2 - 2
src/modules/client-set/ClientAccountSet.vue

@@ -116,8 +116,8 @@ export default {
         size: this.size
       };
       const data = await clientUserPageList(datas);
-      this.users = data;
-      this.total = 10;
+      this.users = data.data;
+      this.total = data.totalCount;
     },
     toPage(page) {
       this.current = page;

+ 1 - 1
src/modules/client-set/components/ModifyClientUser.vue

@@ -77,7 +77,7 @@ export default {
         loginName: [
           {
             required: true,
-            pattern: /^[a-zA-Z0-9_-]{2,19}$/,
+            pattern: /^[a-zA-Z0-9_-]{3,20}$/,
             message: "账号只能包含字母、数字、下划线以及短横线,长度3-20位",
             trigger: "change"
           }

+ 2 - 2
src/modules/grading-set/GradingLevelSet.vue

@@ -17,8 +17,8 @@
         <th>典型值</th>
         <th>类型</th>
         <th>给分项</th>
-        <th>考区值%</th>
-        <th>占比值%</th>
+        <th>考区值%</th>
+        <th>占比值%</th>
         <th>操作</th>
       </tr>
       <template v-for="(level, index) in levels">

+ 6 - 13
src/modules/main/StudentManage.vue

@@ -32,6 +32,7 @@
             v-model="filter.areaCode"
             @on-change="areaChange"
             placeholder="考区"
+            clearable
           >
             <Option
               v-for="area in cascadeList"
@@ -46,6 +47,7 @@
             v-model="filter.school"
             @on-change="schoolChange"
             placeholder="学校"
+            clearable
           >
             <Option
               v-for="(item, index) in schools"
@@ -56,7 +58,7 @@
           </Select>
         </FormItem>
         <FormItem>
-          <Select v-model="filter.examRoom" placeholder="考场">
+          <Select v-model="filter.examRoom" placeholder="考场" clearable>
             <Option
               v-for="(room, index) in rooms"
               :key="index"
@@ -65,7 +67,6 @@
             ></Option>
           </Select>
         </FormItem>
-
         <FormItem>
           <InputNumber
             v-model="filter.startNumber"
@@ -102,7 +103,7 @@
           </Select>
         </FormItem>
         <FormItem>
-          <Select v-model="filter.upload" placeholder="是否上传">
+          <Select v-model="filter.upload" placeholder="是否上传" clearable>
             <Option
               v-for="(val, key) in PAPER_UPLOAD_TYPE"
               :key="key"
@@ -336,14 +337,6 @@ export default {
       this.total = data.totalCount;
     },
     toPage(page) {
-      if (
-        !this.filter.areaCode ||
-        !this.filter.school ||
-        !this.filter.examRoom
-      ) {
-        this.$Message.error("请选择考区、学校和考场!");
-        return;
-      }
       this.current = page;
       this.getList();
     },
@@ -366,7 +359,7 @@ export default {
       const curArea = this.cascadeList.find(
         item => item.areaCode === this.filter.areaCode
       );
-      this.schools = curArea.schools;
+      this.schools = curArea ? curArea.schools : [];
       this.rooms = [];
       this.filter.school = null;
       this.filter.examRoom = null;
@@ -379,7 +372,7 @@ export default {
       const curSchool = this.schools.find(
         item => item.school === this.filter.school
       );
-      this.rooms = curSchool.rooms;
+      this.rooms = curSchool ? curSchool.rooms : [];
       this.filter.examRoom = null;
     },
     toEdit(row) {

+ 4 - 0
src/modules/main/WorkManage.vue

@@ -143,6 +143,10 @@ export default {
         this.$Message.error("请输入工作名称!");
         return;
       }
+      if (this.modalForm.name.length > 100) {
+        this.$Message.error("工作名称长度不能超过100个字符!");
+        return;
+      }
 
       await createWork(this.modalForm);
       this.$Message.success("创建工作成功!");

+ 11 - 1
src/modules/main/components/ModifyStudent.vue

@@ -173,7 +173,7 @@ export default {
       this.$refs.modalFormComp.resetFields();
       if (val.id) {
         this.modalForm = this.$objAssign(initModalForm, val);
-        // TODO:复现信息
+        this.reviewInfo();
       } else {
         this.modalForm = { ...initModalForm };
       }
@@ -183,6 +183,16 @@ export default {
         this.initData(this.instance);
       }
     },
+    reviewInfo() {
+      const curArea = this.cascadeList.find(
+        item => item.areaCode === this.modalForm.areaCode
+      );
+      this.schools = curArea.schools;
+      const curSchool = this.schools.find(
+        item => item.school === this.modalForm.school
+      );
+      this.rooms = curSchool.rooms;
+    },
     areaChange() {
       const curArea = this.cascadeList.find(
         item => item.areaCode === this.modalForm.areaCode

+ 1 - 0
src/plugins/axios.js

@@ -40,6 +40,7 @@ const errorCallback = error => {
   }
 
   content = content.indexOf("###") !== -1 ? "参数错误" : content;
+  content = content.length > 100 ? content.slice(0, 100) + "..." : content;
   ViewUI.Notice.error({ title: "错误提示", desc: content });
   return error;
 };