Просмотр исходного кода

Merge branch 'release_v4.0.1' of http://git.qmth.com.cn/examcloud-frontend/examcloud-admin-web into release_v4.0.1

lideyin 4 лет назад
Родитель
Сommit
79c443bf58

+ 21 - 6
src/modules/basic/view/sys_login_rule_list.vue

@@ -104,6 +104,7 @@
       stripe
     >
       <el-table-column label="学校ID" prop="rootOrgId" width="110px" sortable />
+      <el-table-column label="学校名称" prop="rootOrgName" sortable />
 
       <el-table-column label="规则类型" width="150px">
         <template slot-scope="scope">
@@ -111,14 +112,24 @@
         >
       </el-table-column>
 
-      <el-table-column label="是否例外(白名单)" width="150px">
+      <el-table-column label="是否例外(白名单)" width="150px">
         <template slot-scope="scope">
           <span>{{ scope.row.allow ? "是" : "否" }}</span>
         </template>
       </el-table-column>
 
-      <el-table-column label="创建时间" prop="creationTime" sortable />
-      <el-table-column label="更新时间" prop="updateTime" sortable />
+      <el-table-column
+        label="创建时间"
+        prop="creationTime"
+        width="160px"
+        sortable
+      />
+      <el-table-column
+        label="更新时间"
+        prop="updateTime"
+        width="160px"
+        sortable
+      />
 
       <el-table-column label="操作" width="180px">
         <template slot-scope="scope">
@@ -157,7 +168,7 @@
 
     <el-dialog
       :title="this.isCreate ? '规则新增' : '规则修改'"
-      width="380px"
+      width="390px"
       :visible.sync="loginRuleDialog"
       @close="loginRuleDialogClose"
     >
@@ -206,7 +217,7 @@
           </el-select>
         </el-form-item>
 
-        <el-form-item label="是否白名单" prop="allow">
+        <el-form-item label="是否例外" prop="allow">
           <el-radio-group v-model="loginRuleForm.allow" class="w180">
             <el-radio :label="true">是</el-radio>
             <el-radio :label="false">否</el-radio>
@@ -260,7 +271,11 @@ export default {
           { required: true, message: "请选择规则类型!", trigger: "change" }
         ],
         allow: [
-          { required: true, message: "请选择是否白名单!", trigger: "change" }
+          {
+            required: true,
+            message: "请选择是否例外!",
+            trigger: "change"
+          }
         ]
       },
       topLoginRuleList: [],

+ 42 - 47
src/modules/reports/views/ExamStudentOnline.vue

@@ -10,38 +10,33 @@
         <div class="left-div">
           <div class="row-div">
             <div class="total-div">
-              <span style="width: 85px; height: 85px; display: block;">
-                <v-icon
-                  name="users"
-                  style="height: 50px; width: 50px;"
-                /> </span
-              ><span style="display: block; margin-left: 10px;">
-                <span
-                  style="display: block; font-weight: bold; font-size: 40px;"
-                  >{{ totalStudent }}</span
-                >
-                <span style="display: block;">注册学生</span>
+              <span style="width: 85px;height: 85px;display:block;">
+                <v-icon name="users" style="height: 50px;width: 50px;" /> </span
+              ><span style="display:block;margin-left: 10px;">
+                <span style="display:block;font-weight:bold;font-size:40px">{{
+                  totalStudent
+                }}</span>
+                <span style="display:block;">注册学生</span>
               </span>
             </div>
             <div class="online-div">
-              <span style="width: 85px; height: 85px; display: block;">
+              <span style="width: 85px;height: 85px;display:block;">
                 <v-icon
                   name="user-check"
-                  style="height: 50px; width: 50px;"
+                  style="height: 50px;width: 50px;"
                 /> </span
-              ><span style="display: block; margin-left: 10px;">
-                <span
-                  style="display: block; font-weight: bold; font-size: 40px;"
-                  >{{ totalOnlineStudent }}</span
-                >
-                <span style="display: block;">在线学生</span>
+              ><span style="display:block;margin-left: 10px;">
+                <span style="display:block;font-weight:bold;font-size:40px">{{
+                  totalOnlineStudent
+                }}</span>
+                <span style="display:block;">在线学生</span>
               </span>
             </div>
           </div>
           <div class="tb-div">
             <div class="row-div">
-              <span style="float: left;"> 学校在线学生</span
-              ><span style="float: right;"
+              <span style="float:left;"> 学校在线学生</span
+              ><span style="float:right;"
                 ><el-button
                   size="small"
                   type="primary"
@@ -51,7 +46,7 @@
                   详情
                 </el-button></span
               >
-              <span style="float: right; margin-right: 10px;"
+              <span style="float:right;margin-right: 10px;"
                 ><el-button
                   size="small"
                   type="primary"
@@ -105,7 +100,7 @@
         <div class="right-div">
           <div class="row-div">近5日在线学生</div>
           <div class="row-div">
-            <v-charts style="width: 500px;" :options="lastNdayData"></v-charts>
+            <v-charts style="width:500px;" :options="lastNdayData"></v-charts>
           </div>
         </div>
       </div>
@@ -118,32 +113,32 @@ import { mapState } from "vuex";
 import ECharts from "vue-echarts/components/ECharts";
 export default {
   components: {
-    "v-charts": ECharts,
+    "v-charts": ECharts
   },
   name: "ExamStudentOnline",
   data() {
     return {
       lastNdayData: {
         tooltip: {
-          trigger: "axis",
+          trigger: "axis"
         },
         xAxis: {
           axisLabel: {
             interval: 0,
-            rotate: 20,
+            rotate: 20
           },
           type: "category",
-          data: [],
+          data: []
         },
         yAxis: {
-          type: "value",
+          type: "value"
         },
         series: [
           {
             data: [],
-            type: "line",
-          },
-        ],
+            type: "line"
+          }
+        ]
       },
       totalStudent: 0,
       totalOnlineStudent: 0,
@@ -152,19 +147,19 @@ export default {
       tableData: [],
       currentPage: 1,
       pageSize: 10,
-      total: 10,
+      total: 10
     };
   },
   computed: {
-    ...mapState({ user: (state) => state.user }),
+    ...mapState({ user: state => state.user }),
     isSuperAdmin() {
-      return this.user.roleList.some((role) => role.roleCode == "SUPER_ADMIN");
-    },
+      return this.user.roleList.some(role => role.roleCode == "SUPER_ADMIN");
+    }
   },
   methods: {
     toInfoPage() {
       this.$router.push({
-        path: "/reports/online-detail",
+        path: "/reports/online-detail"
       });
     },
     refresh() {
@@ -197,12 +192,12 @@ export default {
         this.pageSize;
       this.$httpWithMsg
         .get(url)
-        .then((response) => {
+        .then(response => {
           this.tableData = response.data.list;
           this.total = response.data.total;
           this.loading = false;
 
-          this.$nextTick(function () {
+          this.$nextTick(function() {
             this.paginationShow = true;
           });
         })
@@ -210,34 +205,34 @@ export default {
     },
     async searchTotalStudent() {
       var url = REPORTS_API + "/studentTotalCount/getSumTotalCount";
-      this.$httpWithMsg.get(url).then((response) => {
+      this.$httpWithMsg.get(url).then(response => {
         this.totalStudent = response.data;
       });
     },
     async searchTotalOnlineStudent() {
       var url = REPORTS_API + "/studentCount/getSumOnlineCount";
-      this.$httpWithMsg.get(url).then((response) => {
+      this.$httpWithMsg.get(url).then(response => {
         this.totalOnlineStudent = response.data;
       });
     },
     async searchLastNDayData() {
       var url =
         REPORTS_API + "/studentCumulativeCount/getLastNdayOnlineCount?nday=5";
-      this.$httpWithMsg.get(url).then((response) => {
+      this.$httpWithMsg.get(url).then(response => {
         let xdata = [];
-        response.data.forEach((e) => {
+        response.data.forEach(e => {
           xdata.push(e.reportDay);
         });
         this.lastNdayData.xAxis.data = xdata;
         let ydata = [];
-        response.data.forEach((e) => {
+        response.data.forEach(e => {
           ydata.push(e.totalCount);
         });
         this.lastNdayData.series = [
           {
             data: ydata,
-            type: "line",
-          },
+            type: "line"
+          }
         ];
       });
     },
@@ -246,12 +241,12 @@ export default {
       this.searchLastNDayData();
       this.searchTotalOnlineStudent();
       this.searchForm();
-    },
+    }
   },
   //初始化查询
   created() {
     this.init();
-  },
+  }
 };
 </script>