dedsudiyu 2 年之前
父節點
當前提交
c6b53b6da3

+ 17 - 0
src/api/system/user_student.js

@@ -193,4 +193,21 @@ export function getStudentInfo(userId) {
   })
 }
 
+//批量获取学生数据
+export function studentBatchSelect(data) {
+  return request({
+    url: 'system/user/student/batchSelect/'+data,
+    method: 'post',
+  })
+}
+
+//批量修改学生卡号
+export function studentUpdateCardNum(data) {
+  return request({
+    url: '/system/user/student/updateCardNum',
+    method: 'put',
+    data: data
+  })
+}
+
 

+ 17 - 0
src/api/system/user_teacher.js

@@ -284,3 +284,20 @@ export function treeselect(query) {
     params: query
   })
 }
+
+//批量获取老师数据
+export function teacherBatchSelect(data) {
+  return request({
+    url: 'system/user/teacher/batchSelect/'+data,
+    method: 'post',
+  })
+}
+
+//批量修改老师卡号
+export function teacherUpdateCardNum(data) {
+  return request({
+    url: '/system/user/teacher/updateCardNum',
+    method: 'put',
+    data: data
+  })
+}

+ 0 - 14
src/assets/styles/ZDpageCss.scss

@@ -158,20 +158,6 @@
 
   width:340px!important;
 }
-//识别器管理
-.recognizer .el-form-item__label{
-  width:90px!important;
-}
-.recognizer-dialog-box .el-form-item__label{
-  width:130px!important;
-}
-.recognizer-dialog-box .el-input--medium{
-  width:340px!important;
-}
-.recognizer-dialog-box .el-input-number--medium{
-
-  width:340px!important;
-}
 //硬件管理
 .hardware-dialog{
   .el-form-item__label{

+ 8 - 0
src/views/comprehensive/laboratoryManagement/subject/index.vue

@@ -1409,6 +1409,7 @@ export default {
               }
             }
           }
+
         }
         .null-data-img{
           width:137px;
@@ -1416,6 +1417,13 @@ export default {
           display: block;
           margin:10px auto;
         }
+        .null-text-p{
+          text-align: center;
+          font-size:16px;
+          color:#999;
+          line-height:50px;
+          margin:0 30px;
+        }
       }
     }
   }

+ 1 - 1
src/views/comprehensive/laboratoryManagement/subject/infoPage.vue

@@ -196,7 +196,7 @@
       </div>
       <!--展示实验室二维码-->
       <el-dialog title="实验室二维码" :visible.sync="codeType" width="500px" append-to-body>
-        <vue-qr style="display: block;height:460px;width:460px;cursor:pointer;margin:0 auto;" :text="newData.qrCode" :size="200"></vue-qr>
+        <vue-qr style="display: block;height:460px;width:460px;cursor:pointer;margin:0 auto;" :text="newData.qrCodeUrl" :size="200"></vue-qr>
       </el-dialog>
       <!--播放文字窗口-->
       <el-dialog title="广播系统" :visible.sync="open" width="500px" append-to-body>

+ 1 - 1
src/views/comprehensive/laboratoryManagement/subject/infoPageOne.vue

@@ -197,7 +197,7 @@
       </div>
       <!--展示实验室二维码-->
       <el-dialog title="实验室二维码" :visible.sync="codeType" width="500px" append-to-body>
-        <vue-qr style="display: block;height:460px;width:460px;cursor:pointer;margin:0 auto;" :text="newData.qrCode" :size="200"></vue-qr>
+        <vue-qr style="display: block;height:460px;width:460px;cursor:pointer;margin:0 auto;" :text="newData.qrCodeUrl" :size="200"></vue-qr>
       </el-dialog>
       <!--播放文字窗口-->
       <el-dialog title="广播系统" :visible.sync="open" width="500px" append-to-body>

+ 3 - 3
src/views/comprehensive/personnel/student/addPage.vue

@@ -25,7 +25,7 @@
           <el-input
             :disabled="editType"
             style="width:218px;"
-            maxlength="10"
+            maxlength="50"
             v-model="form.nickName"
             placeholder="请输入姓名"
             clearable
@@ -197,8 +197,8 @@
           <el-input
             :disabled="editType"
             style="width:218px;"
-            onkeyup="this.value=this.value.replace(/[^\d.]/g,'')"
-            maxlength="50"
+            onkeyup="this.value=this.value.replace(/^\s*|\s*$/g,'')"
+            maxlength="30"
             v-model="form.cardNum"
             placeholder="请输入校园卡号"
             clearable

+ 244 - 0
src/views/comprehensive/personnel/student/bindingCardPage.vue

@@ -0,0 +1,244 @@
+<template>
+    <div class="bindingCardPage">
+      <div class="title-box">
+        <p>批量绑定校园卡</p>
+      </div>
+      <div class="watch-head-box">
+        <p>姓名</p>
+        <p>学号</p>
+        <p>学院</p>
+        <p>手机号码</p>
+        <p>校园卡号</p>
+      </div>
+      <div class="center-max-big-box scrollbar-box">
+        <div class="watch-data-list" v-for="(item,index) in watchList" :key="index">
+          <p>{{item.nickName}}</p>
+          <p>{{item.userName}}</p>
+          <p>{{item.deptName}}</p>
+          <p>{{item.phonenumber}}</p>
+          <div class="input-big-box">
+            <el-input class="input-box" type="text"
+                      maxLength="30"
+                      v-model="item.cardNum"
+                      clearable
+                      placeholder="请输入或读取校园卡号"
+            />
+            <p class="input-msg-p">{{item.cardType==1?'卡号已存在':(item.cardType==2?'卡号重复':'')}}</p>
+          </div>
+        </div>
+      </div>
+      <div class="button-box">
+        <p></p>
+        <p class="reset-button-one" @click="outPageButton">返回</p>
+        <p class="add-button-one-90" @click="setButton">保存</p>
+      </div>
+    </div>
+</template>
+
+<script>
+  import { studentBatchSelect, studentUpdateCardNum } from "@/api/system/user_student";
+  export default {
+    name: 'bindingCardPage',
+    props:{
+      ids:{},
+    },
+    data(){
+      return{
+        watchList:[],
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+      this.studentBatchSelect();
+    },
+    methods:{
+      //批量获取老师数据
+      studentBatchSelect(){
+        studentBatchSelect(this.ids).then(response => {
+          this.watchList = response.data;
+          this.getInitialization();
+        })
+      },
+      //返回
+      outPageButton(){
+        this.$parent.outPage(1);
+      },
+      //提交
+      setButton(){
+        let self = this
+        if(this.setVerification()){
+          let list = [];
+          for(let i=0;i<self.watchList.length;i++){
+            if(self.watchList[i].cardNum){
+              let obj = {
+                userId:self.watchList[i].userId,
+                cardNum:self.watchList[i].cardNum,
+              }
+              list.push(obj);
+            }
+          }
+          studentUpdateCardNum(list).then(response => {
+            if(response.data.repeatCard == 0){
+              this.msgSuccess(response.msg);
+              this.$parent.handleQuery();
+            }else{
+              this.repeatMark(response.data.repeatList);
+            }
+          })
+        }
+      },
+      //提交验证
+      setVerification(){
+        let self = this;
+        for(let i=0;i<self.watchList.length;i++){
+          self.watchList[i].cardType = 0;
+          if (self.watchList[i].cardNum){
+            self.watchList[i].cardNum = self.watchList[i].cardNum.replace(/^\s*|\s*$/g,"");
+          }
+        }
+        let num = 0;
+        for(let i=0;i<self.watchList.length;i++){
+          for(let o=0;o<self.watchList.length;o++){
+            if(self.watchList[i].cardNum == self.watchList[o].cardNum &&
+               self.watchList[i].userId != self.watchList[o].userId &&
+              self.watchList[i].cardNum && self.watchList[o].cardNum){
+              self.$set(self.watchList[i],'cardType',2);
+              self.$set(self.watchList[o],'cardType',2);
+              num++
+            }
+          }
+        }
+        this.$forceUpdate();
+        return num == 0;
+      },
+      //数据初始化
+      getInitialization(){
+        let self = this;
+        for(let i=0;i<self.watchList.length;i++){
+          self.watchList[i].cardType = 0;
+        }
+        this.$forceUpdate();
+      },
+      //重复标记
+      repeatMark(list){
+        let self = this;
+        for(let i=0;i<list.length;i++){
+          for(let o=0;o<self.watchList.length;o++){
+            if(list[i] == self.watchList[o].cardNum){
+              self.watchList[o].cardType = 1;
+            }
+          }
+        }
+        this.$forceUpdate();
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  *{
+    margin:0;
+    padding:0;
+    font-weight:500;
+    color:#333;
+  }
+  .bindingCardPage{
+    display: flex;
+    flex-direction: column;
+    flex:1;
+    overflow: hidden;
+    .title-box{
+      border-bottom:1px solid #E0E0E0;
+      p{
+        color:#0045AF;
+        line-height:60px;
+        margin-left:24px;
+        font-size:18px;
+      }
+    }
+    .watch-head-box{
+      padding:10px 40px 10px;
+      display: flex;
+      p{
+        line-height:40px;
+        font-size:16px;
+        font-weight: 600;
+      }
+      p:nth-child(1){
+        width:200px;
+      }
+      p:nth-child(2){
+        width:200px;
+      }
+      p:nth-child(3){
+        width:200px;
+      }
+      p:nth-child(4){
+        width:300px;
+      }
+      input{
+        width:300px;
+      }
+    }
+    .center-max-big-box{
+      flex:1;
+      padding:0 40px;
+      .watch-data-list{
+        display: flex;
+        margin-bottom:10px;
+        p{
+          line-height:40px;
+          font-size:16px;
+        }
+        p:nth-child(1){
+          width:200px;
+        }
+        p:nth-child(2){
+          width:200px;
+        }
+        p:nth-child(3){
+          width:200px;
+        }
+        p:nth-child(4){
+          width:300px;
+        }
+        .input-big-box{
+          display: flex;
+          flex:1;
+          .input-box{
+            width:300px;
+          }
+          .input-msg-p{
+            margin-left:20px;
+            width:100px;
+            color:#FF6666;
+            font-size:14px;
+          }
+        }
+      }
+    }
+    .button-box{
+      height:80px;
+      display: flex;
+      border-top:1px solid #E0E0E0;
+      p{
+        margin-top:20px;
+      }
+      p:nth-child(1){
+        flex:1;
+      }
+      p:nth-child(2){
+        width:80px;
+        margin-right:20px;
+        font-size:16px;
+      }
+      p:nth-child(3){
+        width:80px;
+        margin-right:20px;
+        font-size:16px;
+      }
+    }
+  }
+</style>

+ 61 - 39
src/views/comprehensive/personnel/student/index.vue

@@ -1,10 +1,10 @@
 <!--学生管理-->
 <template>
   <div class="app-container student">
-    <div v-if="pageType == 1" class="student-one-box">
+    <div v-show="pageType == 1" class="student-one-box">
       <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" v-show="showSearch">
         <!--v-hasPermi="['laboratory:plan:add']"-->
-        <el-form-item label="关键字" prop="searchValue" label-width="58px">
+        <el-form-item label="关键字" prop="searchValue" label-width="54px">
           <el-input
             maxLength="20"
             v-model="queryParams.searchValue"
@@ -14,19 +14,10 @@
             style="width: 240px"
           />
         </el-form-item>
-        <el-form-item label="专业" prop="majorId" label-width="60px">
-          <el-select v-model="queryParams.majorId" clearable placeholder="请选择专业">
-            <el-option
-              v-for="item in professionOptions"
-              :key="item.id"
-              :label="item.majorName"
-              :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="学院" prop="deptId" label-width="80px">
+        <el-form-item label="学院" prop="deptId" label-width="50px">
           <el-select v-model="queryParams.deptId" clearable placeholder="请选择学院">
             <el-option
+              style="width:80px;"
               v-for="item in collegeOptions"
               :key="item.deptId"
               :label="item.deptName"
@@ -34,12 +25,22 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="状态" prop="status" label-width="60px">
+        <el-form-item label="状态" prop="status" label-width="50px">
           <el-select v-model="queryParams.status" clearable placeholder="请选择状态">
             <el-option :key="0" label="启用" :value="0"></el-option>
             <el-option :key="1" label="停用" :value="1"></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="校园卡" prop="cardNumSimple" label-width="54px">
+          <el-select v-model="queryParams.cardNumSimple" clearable placeholder="请选择">
+            <el-option
+              v-for="item in professionOptions"
+              :key="item.postId"
+              :label="item.postName"
+              :value="item.postId">
+            </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item>
           <el-dropdown @command="importButton" v-hasPermi="['system:user_student:import']">
             <div class="form-dropdown-box">
@@ -73,13 +74,20 @@
             ><i class="el-icon-plus"></i>新增</p>
           </el-col>
         </el-form-item>
+        <el-form-item style="float: right;">
+          <el-col :span="1.5" v-hasPermi="['system:user_student:check']">
+            <p class="add-button-one-90"
+               @click="bindingCard"
+            >批量绑卡</p>
+          </el-col>
+        </el-form-item>
         <el-form-item>
           <p class="inquire-button-one" @click="handleQuery">查询</p>
           <p class="reset-button-one" @click="resetQuery">重置</p>
         </el-form-item>
       </el-form>
       <el-table  border :data="userList" @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
-        <el-table-column type="selection" width="50" align="center"/>
+        <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
         <el-table-column label="序号"  width="50" align="center"  type="index"/>
         <el-table-column label="姓名" align="left" prop="nickName"/>
         <el-table-column label="学号" align="left" prop="userName" width="180">
@@ -149,6 +157,7 @@
       </div>
     </div>
     <add-page v-if="pageType == 2" :editType="editType" :propsData="propsData" :titleName="titleName"></add-page>
+    <binding-card-page v-if="pageType == 3" :ids="ids"></binding-card-page>
     <!--重置密码-->
     <el-dialog title="重置密码" :visible.sync="reviseOpen" width="600px" append-to-body class="teacher-revise-dialog-box">
       <el-form :model="passwordForm" ref="passwordForm" :inline="true" :rules="rules" class="addCheckPage-min">
@@ -214,11 +223,13 @@ import { treeselect } from "@/api/system/dept";
 import {listMajorAll} from "@/api/system/major";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import addPage from "./addPage.vue"
+import bindingCardPage from "./bindingCardPage.vue"
 
 export default {
   name: "User",
   components: {
-    addPage
+    addPage,
+    bindingCardPage
   },
   data() {
     const equalToPassword = (rule, value, callback) => {
@@ -255,7 +266,16 @@ export default {
       // 部门树选项
       deptOptions: undefined,
       //专业列表
-      professionOptions:[],
+      professionOptions:[
+        {
+          postName:"未绑定",
+          postId:"0",
+        },
+        {
+          postName:"已绑定",
+          postId:"1",
+        },
+      ],
       //学院列表
       collegeOptions:[],
       // 是否显示弹出层
@@ -375,16 +395,25 @@ export default {
   },
   created() {
     this.getList();
-    this.getListAll();
+    // this.getListAll();
     this.listDepartments();
-    this.getDicts("sys_user_sex").then(response => {
-
-    });
-    this.getConfigKey("sys.user.initPassword").then(response => {
-
-    });
+    this.getDicts("sys_user_sex").then(response => {});
+    this.getConfigKey("sys.user.initPassword").then(response => {});
   },
   methods: {
+    //批量绑卡页面跳转与数量检测
+    bindingCard(){
+      let self = this;
+      if(self.ids.length<1){
+        self.msgError('请先勾选人员')
+        return
+      }
+      if(self.ids.length>50){
+        self.msgError('批量绑卡最多只可选中50条数据,当前选中了'+self.ids.length+'条.')
+        return
+      }
+      this.pageType = 3;
+    },
     //关闭重置密码页面
     reviseOpenOff(){
       this.reviseOpen = false;
@@ -479,31 +508,21 @@ export default {
       }
     },
     //=========表格扩展选择器方法---开始=========
-    //选择本页
-    selectPage(){
-      console.log(this.$refs.multipleTable)
-      this.$refs.multipleTable.toggleAllSelection()
-      // console.log(this.$refs.multipleTable.selection)
-    },
-    //清除选择
-    clearSelection(){
-      this.$refs.multipleTable.clearSelection()
-    },
     /*===记录勾选数据===
       需要再el-table 添加  :row-key="getRowKeys"
       需要在selection 添加 :reserve-selection="true"
     */
     getRowKeys(row) {
-      return row.id
+      return row.userId
     },
     //=========表格扩展选择器方法---结束=========
     /** 查询用户列表 */
     getList() {
-      // this.loading = true;
+      this.loading = true;
       listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.userList = response.rows;
+          this.$set(this,'userList',response.rows);
           this.total = response.total;
-          // this.loading = false;
+          this.loading = false;
         }
       );
     },
@@ -533,7 +552,10 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      this.pageType = 1;
       this.queryParams.pageNum = 1;
+      this.$set(this,"selectedNum",0);
+      this.$refs.multipleTable.clearSelection()
       this.getList();
     },
     /** 重置按钮操作 */
@@ -544,7 +566,7 @@ export default {
         pageNum: 1,
         pageSize:20,
         searchValue: "",
-        majorId: "",
+        cardNumSimple: "",
         deptId: "",
         status: "",
       });

+ 3 - 3
src/views/comprehensive/personnel/teacher/addPage.vue

@@ -26,7 +26,7 @@
             <el-input
               :disabled="editType"
               style="width:218px;"
-              maxlength="10"
+              maxlength="50"
               v-model="form.nickName"
               placeholder="请输入名称"
               clearable
@@ -126,8 +126,8 @@
             <el-input
               :disabled="editType"
               style="width:218px;"
-              onkeyup="this.value=this.value.replace(/[^\d.]/g,'')"
-              maxlength="50"
+              onkeyup="this.value=this.value.replace(/^\s*|\s*$/g,'')"
+              maxlength="30"
               v-model="form.cardNum"
               placeholder="请输入校园卡号"
               clearable

+ 244 - 0
src/views/comprehensive/personnel/teacher/bindingCardPage.vue

@@ -0,0 +1,244 @@
+<template>
+    <div class="bindingCardPage">
+      <div class="title-box">
+        <p>批量绑定校园卡</p>
+      </div>
+      <div class="watch-head-box">
+        <p>姓名</p>
+        <p>工号</p>
+        <p>部门</p>
+        <p>手机号码</p>
+        <p>校园卡号</p>
+      </div>
+      <div class="center-max-big-box scrollbar-box">
+        <div class="watch-data-list" v-for="(item,index) in watchList" :key="index">
+          <p>{{item.nickName}}</p>
+          <p>{{item.userName}}</p>
+          <p>{{item.deptName}}</p>
+          <p>{{item.phonenumber}}</p>
+          <div class="input-big-box">
+            <el-input class="input-box" type="text"
+                      maxLength="30"
+                      v-model="item.cardNum"
+                      clearable
+                      placeholder="请输入或读取校园卡号"
+            />
+            <p class="input-msg-p">{{item.cardType==1?'卡号已存在':(item.cardType==2?'卡号重复':'')}}</p>
+          </div>
+        </div>
+      </div>
+      <div class="button-box">
+        <p></p>
+        <p class="reset-button-one" @click="outPageButton">返回</p>
+        <p class="add-button-one-90" @click="setButton">保存</p>
+      </div>
+    </div>
+</template>
+
+<script>
+  import { teacherBatchSelect, teacherUpdateCardNum } from "@/api/system/user_teacher";
+  export default {
+    name: 'bindingCardPage',
+    props:{
+      ids:{},
+    },
+    data(){
+      return{
+        watchList:[],
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+      this.teacherBatchSelect();
+    },
+    methods:{
+      //批量获取老师数据
+      teacherBatchSelect(){
+        teacherBatchSelect(this.ids).then(response => {
+          this.watchList = response.data;
+          this.getInitialization();
+        })
+      },
+      //返回
+      outPageButton(){
+        this.$parent.outPage(1);
+      },
+      //提交
+      setButton(){
+        let self = this
+        if(this.setVerification()){
+          let list = [];
+          for(let i=0;i<self.watchList.length;i++){
+            if(self.watchList[i].cardNum){
+              let obj = {
+                userId:self.watchList[i].userId,
+                cardNum:self.watchList[i].cardNum,
+              }
+              list.push(obj);
+            }
+          }
+          teacherUpdateCardNum(list).then(response => {
+            if(response.data.repeatCard == 0){
+              this.msgSuccess(response.msg);
+              this.$parent.handleQuery();
+            }else{
+              this.repeatMark(response.data.repeatList);
+            }
+          })
+        }
+      },
+      //提交验证
+      setVerification(){
+        let self = this;
+        for(let i=0;i<self.watchList.length;i++){
+          self.watchList[i].cardType = 0;
+          if (self.watchList[i].cardNum){
+            self.watchList[i].cardNum = self.watchList[i].cardNum.replace(/^\s*|\s*$/g,"");
+          }
+        }
+        let num = 0;
+        for(let i=0;i<self.watchList.length;i++){
+          for(let o=0;o<self.watchList.length;o++){
+            if(self.watchList[i].cardNum == self.watchList[o].cardNum &&
+               self.watchList[i].userId != self.watchList[o].userId &&
+              self.watchList[i].cardNum && self.watchList[o].cardNum){
+              self.$set(self.watchList[i],'cardType',2);
+              self.$set(self.watchList[o],'cardType',2);
+              num++
+            }
+          }
+        }
+        this.$forceUpdate();
+        return num == 0;
+      },
+      //数据初始化
+      getInitialization(){
+        let self = this;
+        for(let i=0;i<self.watchList.length;i++){
+          self.watchList[i].cardType = 0;
+        }
+        this.$forceUpdate();
+      },
+      //重复标记
+      repeatMark(list){
+        let self = this;
+        for(let i=0;i<list.length;i++){
+          for(let o=0;o<self.watchList.length;o++){
+            if(list[i] == self.watchList[o].cardNum){
+              self.watchList[o].cardType = 1;
+            }
+          }
+        }
+        this.$forceUpdate();
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  *{
+    margin:0;
+    padding:0;
+    font-weight:500;
+    color:#333;
+  }
+  .bindingCardPage{
+    display: flex;
+    flex-direction: column;
+    flex:1;
+    overflow: hidden;
+    .title-box{
+      border-bottom:1px solid #E0E0E0;
+      p{
+        color:#0045AF;
+        line-height:60px;
+        margin-left:24px;
+        font-size:18px;
+      }
+    }
+    .watch-head-box{
+      padding:10px 40px 10px;
+      display: flex;
+      p{
+        line-height:40px;
+        font-size:16px;
+        font-weight: 600;
+      }
+      p:nth-child(1){
+        width:200px;
+      }
+      p:nth-child(2){
+        width:200px;
+      }
+      p:nth-child(3){
+        width:200px;
+      }
+      p:nth-child(4){
+        width:300px;
+      }
+      input{
+        width:300px;
+      }
+    }
+    .center-max-big-box{
+      flex:1;
+      padding:0 40px;
+      .watch-data-list{
+        display: flex;
+        margin-bottom:10px;
+        p{
+          line-height:40px;
+          font-size:16px;
+        }
+        p:nth-child(1){
+          width:200px;
+        }
+        p:nth-child(2){
+          width:200px;
+        }
+        p:nth-child(3){
+          width:200px;
+        }
+        p:nth-child(4){
+          width:300px;
+        }
+        .input-big-box{
+          display: flex;
+          flex:1;
+          .input-box{
+            width:300px;
+          }
+          .input-msg-p{
+            margin-left:20px;
+            width:100px;
+            color:#FF6666;
+            font-size:14px;
+          }
+        }
+      }
+    }
+    .button-box{
+      height:80px;
+      display: flex;
+      border-top:1px solid #E0E0E0;
+      p{
+        margin-top:20px;
+      }
+      p:nth-child(1){
+        flex:1;
+      }
+      p:nth-child(2){
+        width:80px;
+        margin-right:20px;
+        font-size:16px;
+      }
+      p:nth-child(3){
+        width:80px;
+        margin-right:20px;
+        font-size:16px;
+      }
+    }
+  }
+</style>

+ 64 - 43
src/views/comprehensive/personnel/teacher/index.vue

@@ -1,7 +1,7 @@
 <!--教职工管理-->
 <template>
   <div class="app-container teacher">
-    <div v-if="pageType == 1" class="teacher-one-box">
+    <div v-show="pageType == 1" class="teacher-one-box">
       <div class="top-max-box">
         <div class="left-max-box ">
           <div class="top-button-max-box">
@@ -56,39 +56,19 @@
           <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" v-show="showSearch">
             <!--v-hasPermi="['laboratory:plan:add']"-->
 
-            <el-form-item label="关键字" prop="searchValue" label-width="60px">
+            <el-form-item label="关键字" prop="searchValue" label-width="54px">
               <el-input
                 maxLength="20"
                 v-model="queryParams.searchValue"
-                placeholder="姓名/工号/联系方式"
-                clearable
-                size="small"
-                style="width: 150px"
+                placeholder="姓名/工号/电话"
+                style="width: 130px"
               />
             </el-form-item>
-            <el-form-item label="身份" prop="position" label-width="50px">
-              <el-select
-                v-model="queryParams.position"
-                placeholder="请选择"
-                clearable
-                size="small"
-                style="width: 100px"
-              >
-                <el-option
-                  v-for="dict in postionList"
-                  :key="dict.postId"
-                  :label="dict.postName"
-                  :value="dict.postId"
-                />
-              </el-select>
-            </el-form-item>
-            <el-form-item label="状态" prop="nature" label-width="50px">
+            <el-form-item label="状态" prop="nature" label-width="40px">
               <el-select
                 v-model="queryParams.nature"
                 placeholder="请选择"
                 clearable
-                size="small"
-                style="width: 100px"
               >
                 <el-option
                   v-for="dict in workClass"
@@ -98,13 +78,11 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="检查者" prop="isCheck" label-width="60px">
+            <el-form-item label="检查者" prop="isCheck" label-width="54px">
               <el-select
                 v-model="queryParams.isCheck"
                 placeholder="请选择"
                 clearable
-                size="small"
-                style="width: 240px"
               >
                 <el-option
                   v-for="dict in userTypeList"
@@ -114,9 +92,23 @@
                 />
               </el-select>
             </el-form-item>
+            <el-form-item label="校园卡" prop="cardNumSimple" label-width="54px">
+              <el-select
+                v-model="queryParams.cardNumSimple"
+                placeholder="请选择"
+                clearable
+              >
+                <el-option
+                  v-for="dict in postionList"
+                  :key="dict.postId"
+                  :label="dict.postName"
+                  :value="dict.postId"
+                />
+              </el-select>
+            </el-form-item>
             <el-form-item>
               <el-dropdown @command="importButton" v-hasPermi="['system:user_teacher:import']">
-                <div class="form-dropdown-box">
+                <div class="form-dropdown-box" style="margin-left:5px;">
                   <img src="@/assets/ZDimages/personnelManagement/icon_jzgxx_dr.png">
                   <p>导入</p>
                   <img src="@/assets/ZDimages/personnelManagement/icon_jzggl_xljt.png">
@@ -147,6 +139,13 @@
                 ><i class="el-icon-plus"></i>新增</p>
               </el-col>
             </el-form-item>
+            <el-form-item style="float: right;">
+              <el-col :span="1.5" v-hasPermi="['system:user_teacher:check']">
+                <p class="add-button-one-90"
+                   @click="bindingCard"
+                >批量绑卡</p>
+              </el-col>
+            </el-form-item>
             <el-form-item>
               <p class="inquire-button-one" @click="handleQuery">查询</p>
               <p class="reset-button-one" @click="resetQuery">重置</p>
@@ -254,6 +253,7 @@
       </div>
     </div>
     <add-page v-if="pageType == 2" :editType="editType" :propsData="propsData" :titleName="titleName"></add-page>
+    <binding-card-page v-if="pageType == 3" :ids="ids"></binding-card-page>
     <!--重置密码-->
     <el-dialog title="重置密码" :visible.sync="reviseOpen" width="600px" append-to-body class="teacher-revise-dialog-box">
       <p class="teacher-text-p">确定要重置该账号的密码吗?</p>
@@ -370,13 +370,15 @@
   import { Message } from 'element-ui'
   import userList from "./userList.vue"
   import addPage from "./addPage.vue"
+  import bindingCardPage from "./bindingCardPage.vue"
 
   export default {
     name: "User",
     components: {
       Treeselect,
       userList,
-      addPage
+      addPage,
+      bindingCardPage
     },
     data() {
       return {
@@ -448,7 +450,7 @@
           pageNum: 1,
           pageSize:20,
           searchValue: "",
-          position: "",
+          cardNumSimple: "",
           nature: "",
           isCheck: "",
         },
@@ -504,7 +506,16 @@
         //学院列表
         deptList:[],
         //职位列表
-        postionList: [],
+        postionList: [
+          {
+            postName:"未绑定",
+            postId:"0",
+          },
+          {
+            postName:"已绑定",
+            postId:"1",
+          },
+        ],
         //文化程度
         educationList:[],
         // 新增学生开关
@@ -557,7 +568,7 @@
       this.getList();
       this.getTreeselect();
       this.getDeptList();
-      this.getPostionList();
+      // this.getPostionList();
       // //职称
       // this.getDicts("professional").then(response => {
       //   this.professional = response.data;
@@ -579,6 +590,19 @@
       });
     },
     methods: {
+      //批量绑卡页面跳转与数量检测
+      bindingCard(){
+        let self = this;
+        if(self.ids.length<1){
+          self.msgError('请先勾选人员')
+          return
+        }
+        if(self.ids.length>50){
+          self.msgError('批量绑卡最多只可选中50条数据,当前选中了'+self.ids.length+'条.')
+          return
+        }
+        this.pageType = 3;
+      },
       //人员添加接口
       takeUserData(ids,idsData){
         let list = [];
@@ -925,13 +949,7 @@
       getList() {
         this.loading = true;
         listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-            for(let i=0;i<response.rows.length;i++){
-              if(response.rows[i].position == "未定"){
-                response.rows[i].position = "";
-              }
-            }
             this.$set(this,'userList',response.rows);
-            // this.userList = response.rows;
             this.total = response.total;
             this.loading = false;
           }
@@ -991,7 +1009,10 @@
       },
       /** 搜索按钮操作 */
       handleQuery() {
+        this.pageType = 1;
         this.queryParams.pageNum = 1;
+        this.$set(this,"selectedNum",0);
+        this.$refs.multipleTable.clearSelection()
         this.getList();
       },
       /** 重置按钮操作 */
@@ -1002,7 +1023,7 @@
           pageNum: 1,
           pageSize:20,
           searchValue: "",
-          position: "",
+          cardNumSimple: "",
           nature: "",
           isCheck: "",
         });
@@ -1333,9 +1354,9 @@
   .right-max-box{
     .form-box{
       .el-select{
-        width:100px !important;
+        width:90px !important;
         > .el-input{
-          width:100px !important;
+          width:90px !important;
         }
       }
     }
@@ -1345,7 +1366,7 @@
       .form-dropdown-box{
         display: flex;
         margin:0;
-        padding:0 10px;
+        padding:0 5px 0 0;
         cursor: pointer;
         height:40px;
         img:nth-child(1){

+ 4 - 3
src/views/creditViolation/violation/violation/index.vue

@@ -493,8 +493,8 @@ export default {
       },
       addRules:{
         userId:[
-          {required: true, message: '请输入检索内容选择学生', trigger: 'blur'},
-          { required: true, message: "请输入检索内容选择学生", validator: this.spaceJudgment, trigger: "blur" }
+          {required: true, message: '请输入姓名', trigger: 'blur'},
+          { required: true, message: "请输入姓名", validator: this.spaceJudgment, trigger: "blur" }
         ],
         laboratoryId:[
           {required: true, message: '请选择实验室', trigger: 'blur'}
@@ -965,7 +965,8 @@ export default {
       if (query !== '' && query.length>1) {
         this.loading = true;
         let obj = {
-          nickName : query
+          nickName : query,
+          userType: 22,
         };
         selectListUser(obj).then(response => {
           this.optionsUser = response.data;

+ 100 - 32
src/views/gasManage3_0/manage/recognizerManage/recognizerManage.vue

@@ -26,10 +26,11 @@
     </el-form>
 
     <el-table border v-loading="loading" :data="sensorList">
-      <el-table-column label="设备编号" align="left" prop="hardwareNum" />
-      <el-table-column label="学院" align="center" prop="deptName" width="250"/>
+      <el-table-column label="设备名称" align="left" prop="deviceName" show-overflow-tooltip/>
+      <el-table-column label="设备编号" align="left" prop="hardwareNum" show-overflow-tooltip/>
+      <el-table-column label="学院" align="center" prop="deptName" width="200" show-overflow-tooltip/>
       <el-table-column label="位置" align="center" prop="position" width="250" show-overflow-tooltip/>
-      <el-table-column label="设备状态" align="center" prop="status">
+      <el-table-column label="设备状态" align="center" prop="status" width="120">
         <template slot-scope="scope">
           <el-switch
             v-hasPermi="['laboratory:hardware7:changeStatus']"
@@ -44,9 +45,9 @@
           </el-switch>
         </template>
       </el-table-column>
-      <el-table-column label="创建时间" align="center" prop="createTime" width="250"/>
-      <el-table-column label="创建人" align="center" prop="createBy" width="250"/>
-      <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="220">
+      <el-table-column label="创建时间" align="center" prop="createTime" width="200" show-overflow-tooltip/>
+      <el-table-column label="创建人" align="center" prop="createBy" width="200" show-overflow-tooltip/>
+      <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="150">
         <template slot-scope="scope">
           <div class="button-box">
             <p class="table-min-button"
@@ -72,10 +73,13 @@
       @pagination="getList"
     />
     <!-- 添加或修改传感器对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body class="recognizer add-hardware-dialog-box">
-      <el-form ref="form" :model="form" :rules="rules" :inline="true">
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body class="recognizer recognizer-manage add-hardware-dialog-box">
+      <el-form ref="form" :model="form" :rules="rules" :inline="true" label-width="130px">
+        <el-form-item label="设备名称" prop="deviceName">
+          <el-input v-model="form.deviceName" maxlength="30" placeholder="请输入识别器编号" style="width: 400px"/>
+        </el-form-item>
         <el-form-item label="识别器编号" prop="hardwareNum">
-          <el-input v-model="form.hardwareNum" placeholder="请输入识别器编号" style="width: 400px"/>
+          <el-input v-model="form.hardwareNum" maxlength="30" placeholder="请输入识别器编号" style="width: 400px"/>
         </el-form-item>
         <el-form-item label="所属实验室" prop="subjectId">
           <el-select v-model="form.subjectId" placeholder="请选择实验室" style="width: 400px">
@@ -87,23 +91,28 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="IP地址" >
-          <el-input v-model="form.ipAddress" placeholder="请输入IP地址" style="width: 400px"/>
-        </el-form-item>
-        <el-form-item label="连接方式">
+        <div class="form-input-ip-box">
+          <el-form-item label="IP地址" label-width="130px" prop="ipAddress" class="form-ip">
+            <el-input v-model="form.ipAddress" maxlength="30" placeholder="请输入IP地址"/>
+          </el-form-item>
+          <el-form-item label="端口" label-width="54px" prop="port" class="form-port">
+            <el-input style="width:120px;" maxlength="5" v-model="form.port" placeholder="请输入端口"/>
+          </el-form-item>
+        </div>
+        <el-form-item label="连接方式" prop="manufacturerType">
           <el-select v-model="form.manufacturerType" placeholder="请选择" style="width:400px;" >
             <el-option :label="item.dictLabel" :value="item.dictValue" v-for="(item,index) in materialTypeList" :key="index"></el-option>
           </el-select>
         </el-form-item>
 
-        <el-form-item label="推送频率" >
+        <el-form-item label="推送频率" prop="sessionIndex">
           <el-select v-model="form.sessionIndex" placeholder="请选择设备推送频率"  style="width:400px;">
             <el-option  label="最大" value="0"></el-option>
             <el-option  label="中等" value="1"></el-option>
             <el-option  label="最小" value="2"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="天线数量" >
+        <el-form-item label="天线数量" prop="channels">
           <el-select v-model="form.channels" placeholder="请选择信道数量" @change="antennaNumFun()"  style="width:400px;">
             <el-option  label="1" value="1"></el-option>
             <el-option  label="2" value="2"></el-option>
@@ -115,7 +124,7 @@
         <el-row  v-for="(item,index) in antennaNum" :key="index">
           <el-col :span="12">
             <el-form-item :label="(index+1)+'号天线感应距离'">
-              <el-input-number v-model="uniformPower[index]" placeholder="请输入设备输出频率" style="width:140px;"/>
+              <el-input-number v-model="uniformPower[index]" maxlength="10" placeholder="请输入设备输出频率" style="width:140px;"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -162,6 +171,20 @@ export default {
   name: "Sensor",
   components: { Treeselect },
   data() {
+    const ipVerification  = (rule, value, callback) => {
+      if(!/^((2((5[0-5])|([0-4]\d)))|([0-1]?\d{1,2}))(\.((2((5[0-5])|([0-4]\d)))|([0-1]?\d{1,2}))){3}$/.test(value)) {
+        callback(new Error("IP地址错误"));
+      } else {
+        callback()
+      }
+    };
+    const portVerification  = (rule, value, callback) => {
+      if(!/^[0-9]+$/.test(value)) {
+        callback(new Error("端口号错误"));
+      } else {
+        callback()
+      }
+    };
     return {
       // 遮罩层
       loading: true,
@@ -185,14 +208,16 @@ export default {
       // 表单参数
       form: {
         id:'',
+        deviceName:'',
         hardwareNum:'',
         subjectId:'',
         deviceType:'7',
         ipAddress:'',//ip地址
+        port:'',//ip地址
         channels:4,//信道
         sessionIndex:0,//设备推送频率
         uniformPower:'',//设备推送频率
-        manufacturerType:'',//供应商
+        manufacturerType:null,//连接方式
       },
       materialTypeList:[],
       uniformPower:[20,20,20,20],
@@ -201,15 +226,32 @@ export default {
       detectionArr:[],//检测类型数组
       // 表单校验
       rules: {
-        name:[
-          {required: true, message: '识别器名称不能为空', trigger: 'blur'}
+        deviceName:[
+          {required: true, message: '设备名称不能为空', trigger: 'blur'}
         ],
         hardwareNum:[
           {required: true, message: '识别器编号不能为空', trigger: 'blur'}
         ],
         subjectId:[
           {required: true, message: '所属实验室不能为空', trigger: 'blur'}
-        ]
+        ],
+        ipAddress:[
+          {required: true, message: 'IP地址不能为空', trigger: 'blur'},
+          { required: true, validator: ipVerification, trigger: "blur" },
+        ],
+        port:[
+          {required: true, message: '端口不能为空', trigger: 'blur'},
+          { required: true, validator: portVerification, trigger: "blur" },
+        ],
+        manufacturerType:[
+          {required: true, message: '请选择连接方式', trigger: 'blur'},
+        ],
+        sessionIndex:[
+          {required: true, message: '请选择推送频率', trigger: 'blur'},
+        ],
+        channels:[
+          {required: true, message: '请选择天线数量', trigger: 'blur'},
+        ],
       },
     };
   },
@@ -309,9 +351,12 @@ export default {
         id: null,
         name: null,
         deviceType:'7',
+        deviceName:null,
         hardwareNum: null,
         subjectId: null,
         ipAddress: null,
+        port: null,
+        manufacturerType:null,
         channels: '4',
         sessionIndex: '0',
         uniformPower: '',
@@ -351,14 +396,16 @@ export default {
       let _this=this;
       this.open = true;
       this.title = "修改识别器";
-      this.form.id=row.id
-      this.form.deviceType='7'
-      this.form.hardwareNum=row.hardwareNum
-      this.form.subjectId=row.subjectId
-      this.form.ipAddress=row.ipAddress
-      this.form.channels=row.channels+''
-      this.form.sessionIndex=row.sessionIndex+''
-      this.form.manufacturerType=row.manufacturerType+''
+      this.form.id=row.id;
+      this.form.deviceType='7';
+      this.form.deviceName=row.deviceName;
+      this.form.hardwareNum=row.hardwareNum;
+      this.form.subjectId=row.subjectId;
+      this.form.ipAddress=row.ipAddress;
+      this.form.port=row.port;
+      this.form.channels=row.channels+'';
+      this.form.sessionIndex=row.sessionIndex+'';
+      this.form.manufacturerType=row.manufacturerType+'';
       //this.uniformPower=row.uniformPower.split(',')
       this.antennaNum=[];
       this.uniformPower=[];
@@ -373,7 +420,7 @@ export default {
         _this.uniformPower.push(item.split(':')[0])
         _this.detection.push(item.split(':')[1])
       })
-
+      this.$forceUpdate();
     },
     /** 提交按钮 */
     submitForm() {
@@ -481,9 +528,9 @@ export default {
     left: 21%!important;
   }
 }
-.recognizer{
-  .el-form-item__label{
-    width:130px!important;
+.recognizer-manage{
+  .el-form-item__error {
+    left: 0 !important;
   }
   //.el-input--suffix{
   //  width:340px!important;
@@ -497,6 +544,27 @@ export default {
   //.el-input-number--medium{
   //  width:240px!important;
   //}
+  .form-input-ip-box{
+    display: flex;
+    width:550px;
+    .form-ip{
+      margin-right:0;
+      width:340px;
+      input{
+        width:200px;
+      }
+    }
+    .form-port{
+      margin-right:0;
+      flex:1;
+      input{
+        width:136px;
+      }
+      input{
+        /*width:120px;*/
+      }
+    }
+  }
 }
 </style>
 

+ 1 - 1
src/views/safetyEducationExam/safeLearning/el_category/index.vue

@@ -55,7 +55,7 @@
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="分类名称" prop="title">
-          <el-input v-model="form.title" placeholder="请输入分类名称" />
+          <el-input v-model="form.title" placeholder="请输入分类名称" maxLength="50"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">

+ 5 - 4
src/views/safetyEducationExam/securityExam/exam_my/index.vue

@@ -189,11 +189,12 @@ export default {
               // 需要完成安全培训
               this.$confirm(response.msg)
                 .then(_ => {
+                  localStorage.setItem('startLearningInfoId',response.data.courseId);
                   this.$router.push({
-                    path: `/safe/mytrain`,
-                    query:{
-                      id: response.data,
-                    }
+                    path: `/safetyEducationExam/safeLearning/safeLearning`,
+                    // query:{
+                    //   id: response.data.courseId,
+                    // }
                   })
                 })
                 .catch(_ => {});

+ 12 - 0
src/views/safetyEducationExam/securityExam/myResultInquiry/infoList.vue

@@ -488,6 +488,18 @@
       .exam-right-max-box{
         flex:1;
         padding:50px 60px;
+        word-wrap:break-word;
+        word-break:break-all;
+        overflow: hidden;
+        ::v-deep .el-radio{
+          margin-bottom:20px;
+        }
+        ::v-deep .el-radio__label {
+          width: 100% !important;
+          text-overflow: ellipsis;
+          white-space: normal;
+          line-height: 18px;
+        }
         .right-title-p{
           margin-bottom:40px;
           font-size:16px;

+ 3 - 0
src/views/safetyEducationExam/securityExam/qu/addTopic.vue

@@ -93,6 +93,7 @@
           placeholder="请输入题目名称"
           clearable
           size="small"
+          maxLength="1500"
         />
       </el-form-item>
       <el-form-item
@@ -129,6 +130,7 @@
             placeholder="请输入选项内容"
             clearable
             size="small"
+            maxLength="1500"
           />
           <i class="el-icon-remove del-i-box" @click="delOptions(index)"></i>
         </el-form-item>
@@ -201,6 +203,7 @@
           placeholder="请输入答案解析"
           clearable
           size="small"
+          maxLength="1500"
         />
       </el-form-item>
     </el-form>