dedsudiyu 1 rok pred
rodič
commit
1d5176c575

+ 4 - 4
.env.production

@@ -6,17 +6,17 @@ ENV = 'production'
 
 # ####################版本差异字段####################
 
-# VUE_APP_VERSION_DIFFERENCE_FIELD = 'kuangYeDaXue_nanHu'
+VUE_APP_VERSION_DIFFERENCE_FIELD = 'kuangYeDaXue_nanHu'
 # VUE_APP_VERSION_DIFFERENCE_FIELD = 'suZhouDaXue'
-VUE_APP_VERSION_DIFFERENCE_FIELD = 'xiBeiNongLinDaXue'
+# VUE_APP_VERSION_DIFFERENCE_FIELD = 'xiBeiNongLinDaXue'
 
 # ####################外网接口配置####################
 
-VUE_APP_BASE_API = 'lab.sxitdlc.com/labAppTest'
+VUE_APP_BASE_API = 'lab-demo.sxitdlc.com/appTest'
 
 
 
 # ####################内网接口配置####################
 
-VUE_APP_BASE_LOCAL_API = '192.168.1.43/labSystem'
+VUE_APP_BASE_LOCAL_API = '192.168.1.88/labSystem'
 

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1405 - 0
src/views/comprehensive/personnel/visitor/addPage.vue


+ 244 - 0
src/views/comprehensive/personnel/visitor/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>

+ 78 - 0
src/views/comprehensive/personnel/visitor/differenceComponent/addPageSubPagePublic.vue

@@ -0,0 +1,78 @@
+<template>
+  <p class="inquire-button-one" @click="upDataClick">提交</p>
+</template>
+
+<script>
+  import { addUserStudent,putUserStudent } from "@/api/system/user_student";
+  export default {
+    name: 'addPageSubPagePublic',
+    methods:{
+      upDataClick(){
+        this.$parent.upDataClick();
+        // let self = this;
+        // self.$parent.$refs["form"].validate(valid => {
+        //   if (valid) {
+        //     if(self.$parent.form.email){
+        //       let re = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
+        //       if(!re.test(self.$parent.form.email)){
+        //         self.msgError('请输入正确的邮箱地址')
+        //         return
+        //       }
+        //     }
+        //     let obj = JSON.parse(JSON.stringify(self.$parent.form));
+        //     // obj.position = obj.position+'';
+        //     if(self.$parent.propsData.userId){
+        //       //编辑
+        //       obj.userId = self.$parent.propsData.userId
+        //       obj.roleIds = self.$parent.form.position?self.$parent.form.roleIds:[];
+        //       putUserStudent(obj).then(response => {
+        //         if(response.code==200){
+        //           self.msgSuccess(response.msg)
+        //           self.$parent.outPageButton()
+        //         }else if(response.code==205){
+        //           self.$confirm(response.msg, "警告", {
+        //             confirmButtonText: "确定",
+        //             cancelButtonText: "取消",
+        //             type: "warning"
+        //           }).then(() => {
+        //             //  确定
+        //             self.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization' });
+        //           }).catch(function() {
+        //             //  取消
+        //             self.$parent.outPageButton();
+        //           });
+        //         }
+        //
+        //       });
+        //     }else{
+        //       //新增
+        //       addUserStudent(obj).then(response => {
+        //         if(response.code==200){
+        //           self.msgSuccess(response.msg)
+        //           self.$parent.outPageButton()
+        //         }else if(response.code==205){
+        //           self.$confirm(response.msg, "警告", {
+        //             confirmButtonText: "确定",
+        //             cancelButtonText: "取消",
+        //             type: "warning"
+        //           }).then(() => {
+        //             //  确定
+        //             self.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization' });
+        //           }).catch(function() {
+        //             //  取消
+        //             self.$parent.outPageButton();
+        //           });
+        //         }
+        //
+        //       });
+        //     }
+        //   }
+        // })
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 48 - 0
src/views/comprehensive/personnel/visitor/differenceComponent/addPageSubPageSZDX.vue

@@ -0,0 +1,48 @@
+<template>
+  <p class="inquire-button-one" @click="upDataClick">提交</p>
+</template>
+
+<script>
+  import { addUserStudent,putUserStudent } from "@/api/system/user_student";
+  export default {
+    name: 'addPageSubPageSZDX',
+    methods:{
+      upDataClick(){
+        this.$parent.upDataClick();
+        // let self = this;
+        // self.$parent.$refs["form"].validate(valid => {
+        //   if (valid) {
+        //     if(self.$parent.form.email){
+        //       let re = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
+        //       if(!re.test(self.$parent.form.email)){
+        //         self.msgError('请输入正确的邮箱地址')
+        //         return
+        //       }
+        //     }
+        //     let obj = JSON.parse(JSON.stringify(self.$parent.form));
+        //     obj.roleIds = self.$parent.form.position?self.$parent.form.roleIds:[];
+        //     // obj.position = obj.position+'';
+        //     if(self.$parent.propsData.userId){
+        //       //编辑
+        //       obj.userId = self.$parent.propsData.userId
+        //       putUserStudent(self.$parent.form).then(response => {
+        //         self.msgSuccess(response.msg)
+        //         self.$parent.outPageButton()
+        //       });
+        //     }else{
+        //       //新增
+        //       addUserStudent(obj).then(response => {
+        //         self.msgSuccess(response.msg)
+        //         self.$parent.outPageButton()
+        //       });
+        //     }
+        //   }
+        // });
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1033 - 0
src/views/comprehensive/personnel/visitor/index.vue