Parcourir la source

Merge remote-tracking branch 'remotes/origin/VERSIONS-menJin' into leb-web-dev

dedsudiyu il y a 1 semaine
Parent
commit
e9aeb8ee48

+ 42 - 0
src/api/integratedManagement/index.js

@@ -861,3 +861,45 @@ export function laboratoryCameraRecordGetCameraRecord(data) {
     data: data
   })
 }
+//门禁授权列表
+export function laboratoryHaikangUserSubList(data) {
+  return request({
+    url: '/laboratory/haikang/user/subList',
+    method: 'post',
+    data: data
+  })
+}
+//门禁授权日志列表
+export function laboratoryLabHaikangUserLogList(data) {
+  return request({
+    url: '/laboratory/labHaikangUserLog/list',
+    method: 'post',
+    data: data
+  })
+}
+//查看门禁已授权列表
+export function laboratoryHaikangUserUserList(data) {
+  return request({
+    url: '/laboratory/haikang/user/userList',
+    method: 'post',
+    data: data
+  })
+}
+
+//人员授权同步
+export function laboratoryHaikangUserRetryAccredit(data) {
+  return request({
+    url: '/laboratory/haikang/user/retryAccredit',
+    method: 'post',
+    data: data
+  })
+}
+
+//实验室授权同步
+export function laboratoryHaikangUserSynchFaceCard(data) {
+  return request({
+    url: '/laboratory/haikang/user/synchFaceCard',
+    method: 'post',
+    data: data
+  })
+}

+ 16 - 9
src/views/integratedManagement/laboratoryManagement/accessAuthorization/application.vue

@@ -26,15 +26,22 @@
           <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
         </el-form>
         <el-table class="table-box" v-loading="loading" border :data="tableList">
-          <el-table-column label="名称" align="center" prop="nickName" show-overflow-tooltip/>
-          <el-table-column label="类别" align="center" prop="userType" show-overflow-tooltip/>
+          <el-table-column label="名称" align="center" prop="joinUserName" show-overflow-tooltip/>
+          <el-table-column label="类别" align="center" prop="userType" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.userType == 0?'系统':(scope.row.userType == 1?'教职工':(scope.row.userType == 2?'学生':(scope.row.userType == 3?'大屏':'')))}}</span>
+            </template>
+          </el-table-column>
           <el-table-column label="门禁" align="center" prop="hardName" show-overflow-tooltip/>
           <el-table-column label="实验室" align="center" prop="subName" show-overflow-tooltip/>
           <el-table-column label="实验室所属学院" align="center" prop="deptName" show-overflow-tooltip/>
-          <el-table-column label="实验室位置" align="center" prop="posi"  width="160px" show-overflow-tooltip/>
           <el-table-column label="操作内容" align="center" prop="remark"  width="160px" show-overflow-tooltip/>
-          <el-table-column label="操作时间" align="center" prop="createTime"  width="160px" show-overflow-tooltip/>
-          <el-table-column label="操作人" align="center" prop="createBy"  width="160px" show-overflow-tooltip/>
+          <el-table-column label="操作时间" align="center" prop="createTime"  width="160px" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{parseTime(scope.row.createTime,'{y}-{m}-{d} {h}:{i}')}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作人" align="center" prop="createName"  width="160px" show-overflow-tooltip/>
         </el-table>
         <pagination :page-sizes="[20, 30, 40, 50]"
                     v-show="total>0"
@@ -48,7 +55,7 @@
 </template>
 
 <script>
-import { applyList, entranceUserLogList } from '@/apiDemo/laboratory/subject'
+import { laboratoryLabHaikangUserLogList } from '@/api/integratedManagement/index'
 export default {
   name: "application",
   data(){
@@ -107,9 +114,9 @@ export default {
         this.queryParamsData.startTime = null;
         this.queryParamsData.endTime = null;
       }
-      entranceUserLogList(this.queryParamsData).then(response => {
-        this.tableList = response.rows;
-        this.total = response.total
+      laboratoryLabHaikangUserLogList(this.queryParamsData).then(response => {
+        this.tableList = response.data.records;
+        this.total = response.data.total
       });
     },
   }

+ 22 - 21
src/views/integratedManagement/laboratoryManagement/accessAuthorization/authorize.vue

@@ -1,6 +1,6 @@
 <!--门禁授权-->
 <template>
-  <div class="authorize">
+  <div class="app-container authorize">
     <div class="authorize-page" v-if="pageType == 1">
       <div class="title-box">
         <div>
@@ -32,37 +32,31 @@
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="zgType">
-            <el-select v-model="queryParamsData.state" placeholder="请选择分类" clearable size="small">
-              <el-option label="全部" value="" />
-              <el-option label="授权验证成功" :value=true />
-              <el-option label="授权验证失败" :value=false />
-            </el-select>
-          </el-form-item>
           <p class="page-inquire-common-style-button" @click="handleQuery" style="margin-right:10px;">查询</p>
           <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
         </el-form>
         <el-table class="table-box" v-loading="loading" border :data="tableList">
           <el-table-column label="所属学院" align="left" prop="deptName" show-overflow-tooltip/>
           <el-table-column label="实验室" align="left" prop="subName" show-overflow-tooltip/>
-          <el-table-column label="位置" align="left" prop="posi"  show-overflow-tooltip/>
           <el-table-column label="实验室负责人" align="left" prop="adminName" show-overflow-tooltip/>
           <el-table-column label="门禁" align="left" prop="hardName" />
           <el-table-column label="授权人数" align="left" prop="available"  />
           <el-table-column label="验证方式失败数" align="left" prop="failNum"  />
-          <el-table-column label="状态" align="left" prop="operate" >
-            <template slot-scope="scope" v-if="scope.row.operate">
-              <span>{{scope.row.operate.name}}</span>
+          <el-table-column label="状态" align="left" prop="online" >
+            <template slot-scope="scope">
+              <span>{{scope.row.online?'在线':'离线'}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="操作" align="left" class-name="small-padding fixed-width"  width="120">
+          <el-table-column label="操作" align="left" class-name="small-padding fixed-width"  width="200">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
-                   v-hasPermiRouter="['haikang:user:list']"
                    @click="handleClick('',scope.row,'detail')"
                 >查看授权</p>
+                <p class="table-button-p"
+                   @click="tableButton(scope.row)"
+                >同步数据</p>
                 <p class="table-button-null"></p>
               </div>
             </template>
@@ -81,7 +75,7 @@
 </template>
 
 <script>
-import { getHaikangList } from '@/apiDemo/laboratory/subject'
+import { laboratoryHaikangUserSubList,laboratoryHaikangUserSynchFaceCard } from '@/api/integratedManagement/index'
 import lookImpower from "./lookImpower.vue";
 export default {
   name: "authorize",
@@ -108,7 +102,7 @@ export default {
       total:10,
       tableList:[{}],
       //审批状态
-      optionsListTwo:[{code:null,name:'全部'},{code:0,name:'离线'},{code:2,name:'在线'}],
+      optionsListTwo:[{code:null,name:'全部'},{code:false,name:'离线'},{code:true,name:'在线'}],
       //详情
       pageData:{},
     }
@@ -120,15 +114,22 @@ export default {
     this.getList();
   },
   methods:{
+    tableButton(row){
+      let obj = {
+        hardId:row.hardId
+      };
+      laboratoryHaikangUserSynchFaceCard(obj).then(response => {
+        this.msgSuccess(response.message)
+        this.getList();
+      })
+    },
     handleClick(index,row,doType){
       if(doType=='detail'){
         this.pageType=2
-
         this.pageData=row
       }else if(doType=='back'){
         this.pageType=1
       }
-
     },
     //操作接口
     goPageButton(){
@@ -153,9 +154,9 @@ export default {
     //获取数据列表
     getList(){
       this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-      getHaikangList(this.queryParamsData).then(response => {
-        this.tableList = response.rows;
-        this.total = response.total
+      laboratoryHaikangUserSubList(this.queryParamsData).then(response => {
+        this.tableList = response.data.records;
+        this.total = response.data.total
       });
     },
   }

Fichier diff supprimé car celui-ci est trop grand
+ 155 - 808
src/views/integratedManagement/laboratoryManagement/accessAuthorization/lookImpower.vue


+ 53 - 2
src/views/integratedManagement/laboratoryManagement/subject/addSubject.vue

@@ -86,8 +86,8 @@
             style="width:320px;"
             v-model="form.subArea"
             placeholder="请输入面积"
-            oninput="value=value.replace(/[^0-9.]/g,'')"
-            maxlength="4"
+            @input="handleAreaInput"
+            @blur="blurInput"
             size="small">
             <template slot="append">M²</template>
           </el-input>
@@ -488,6 +488,57 @@ import { chemicalMsdsEdit } from '@/api/chemicalManage'
         }
       },
       methods:{
+        blurInput(){
+          let filteredValue = this.form.subArea
+          // 2. 拆分整数和小数部分
+          const parts = filteredValue.split('.');
+          // 3. 处理小数部分规则
+          if (parts.length > 1) {
+            const decimalPart = parts[1].slice(0, 2);
+            // 规则1:小数部分不能是00
+            // 规则2:小数点后必须有数字
+            if (decimalPart === '0') {
+              filteredValue = parts[0];  // 转为整数
+            }else if (decimalPart === '00') {
+              filteredValue = parts[0];  // 转为整数
+            } else if (decimalPart === '') {
+              filteredValue = parts[0];  // 移除单独的小数点
+            } else {
+              filteredValue = `${parts[0]}.${decimalPart}`;
+            }
+          }
+          // 4. 处理纯0开头的整数(如00.12 → 0.12)
+          if (/^0+[1-9]/.test(filteredValue)) {
+            filteredValue = filteredValue.replace(/^0+/, '');
+          }
+
+          // 5. 更新数据
+          this.$nextTick(() => {
+            this.form.subArea = filteredValue;
+          });
+        },
+        handleAreaInput(value) {
+          // 1. 过滤非法字符并处理多个小数点
+          let filteredValue = value
+            .replace(/[^\d.]/g, '')            // 只保留数字和小数点
+            .replace(/(\..*)\./g, '$1')        // 禁止输入多个小数点
+            .replace(/^\./g, '0.')             // 小数点开头自动补零
+            .replace(/(-\d+\.\d{2})\d+/, '$1') // 禁止输入超过两位小数
+            .replace(/^(\d{4})\d+/, '$1') // 限制整数部分最多4位
+
+          // 2. 分离整数和小数部分处理
+          const parts = filteredValue.split('.')
+          if (parts.length > 1) {
+            // 截断小数部分到两位
+            parts[1] = parts[1].slice(0, 2)
+            filteredValue = parts.join('.')
+          }
+
+          // 3. 更新模型数据(需要 nextTick 保持光标位置)
+          this.$nextTick(() => {
+            this.form.subArea = filteredValue
+          })
+        },
         LevelClick(){
           if(!this.form.dynamicLeveling){
             this.$set(this,'dialogLevelVisible',true);