Quellcode durchsuchen

锁定站与隔离点关联 绑定隔离点与解绑隔离点修复 作业票左下角缩略点位与放大点位修复

pm vor 8 Monaten
Ursprung
Commit
63fc5778f9

+ 3 - 3
src/api/mes/lotoStation/lotoStation.js

@@ -9,7 +9,7 @@ export function listLoto(query) {
   })
 }
 // 解绑的数据集合
-export function unbundlePointPage(data) {
+export function updatePointsBindingLoto(data) {
   return request({
     url: '/iscs/station/updatePointsBindingLoto',
     method: 'post',
@@ -18,14 +18,14 @@ export function unbundlePointPage(data) {
 }
 
 // 查询电柜详细
-export function getLotoInfo(deptId) {
+export function selectIsLotoStationById(deptId) {
   return request({
     url: '/iscs/station/selectIsLotoStationById?lotoId=' + deptId,
     method: 'get'
   })
 }
 // 查询电柜地图转换数据
-export function getLotoMapInfo(deptId) {
+export function selectLotoMapById(deptId) {
   return request({
     url: '/iscs/station/selectLotoMapById?lotoId=' + deptId,
     method: 'get'

+ 8 - 0
src/api/system/mappoint.js

@@ -42,4 +42,12 @@ export function deleteIsMapPointByIds(ids) {
     method: 'post'
   })
 }
+// /dev-api/iscs/map-point/updateMapPointList 地图点位数据变更(绑定 位移 解绑)
+export function updateMapPointList(data) {
+  return request({
+    url: '/iscs/map-point/updateMapPointList',
+    method: 'post',
+    data: data
+  })
+}
 

+ 15 - 0
src/api/system/user.js

@@ -125,3 +125,18 @@ export function updateAuthRole(data) {
     params: data
   })
 }
+//查询人脸或者指纹列表
+export function getSysUserCharacteristicPage(query) {
+  return request({
+    url: '/system/user/characteristic/getSysUserCharacteristicPage',
+    method: 'get',
+    params: query
+  })
+}
+//删除人脸或者指纹数据
+export function deleteSysUserCharacteristicByRecordIds(recordIds) {
+  return request({
+    url: '/system/user/characteristic/deleteSysUserCharacteristicByRecordIds?recordIds='+recordIds,
+    method: 'post',
+  })
+}

BIN
src/assets/images/MapImage.png


+ 193 - 82
src/views/mes/dv/lotoStation/MapData.vue

@@ -85,13 +85,13 @@
 <script>
 import Konva from 'konva'
 import {
-  getLotoMapInfo,
-  getLotoInfo,
+  selectLotoMapById,
+  selectIsLotoStationById,
   updateLoto,
-  unbundlePointPage
+  updatePointsBindingLoto
 } from '@/api/mes/lotoStation/lotoStation'
 import { getIsIsolationPointPage } from '@/api/mes/spm/segregationPoint'
-import { getIsMapPointPage, selectIsMapPointById } from '@/api/system/mappoint'
+import { getIsMapPointPage, selectIsMapPointById, updateMapPointList } from '@/api/system/mappoint'
 import { selectIsMapById } from '@/api/system/mapconfig'
 
 export default {
@@ -124,7 +124,12 @@ export default {
       height: '',//底图高
       x: '',//底图横坐标
       y: '',//底图纵坐标
-      pointList:null,//接口给的所有点位数据
+      mapId: null,//地图Id
+      mapType: 2,//地图类型
+      pointList: null,//接口给的所有点位数据
+      newbindingPoints: [],//给地图点位界面更新的绑定隔离点
+      newmovePoints: [],//给地图点位界面更新位置
+      newunbindingPoints: []//给地图点位界面更新解绑数据
     }
   },
   // watch: {
@@ -152,19 +157,19 @@ export default {
   // },
 
   created() {
-    this.getIsIsolationPointPage()
+    // this.getIsIsolationPointPage()
     this.isInitialized = true
   },
   beforeRouteEnter(to, from, next) {
     next((vm) => {
-      vm.getIsIsolationPointPage()
+      // vm.getIsIsolationPointPage()
       vm.addPointsToRightPointsBox()
     })
   },
   mounted() {
     this.$nextTick(() => {
-      this.getIsIsolationPointPage()
       this.getInfo()
+      this.getIsIsolationPointPage()
       this.addPointsToRightPointsBox()
     })
     console.log(this.$route.query.lotoId, 'lotoId')
@@ -175,9 +180,11 @@ export default {
       const lotoId = this.$route.query.lotoId
       const sopId = ''
       const ticketId = ''
-      getLotoInfo(lotoId).then((response) => {
+      selectIsLotoStationById(lotoId).then((response) => {
         console.log(response, '作业区域信息')
         this.form = response.data
+        this.mapId = response.data.mapId
+
         // 获取不同底图 如地图或者柜子
         selectIsMapById(response.data.mapId).then((response) => {
           console.log(response, '获取底图')
@@ -186,13 +193,14 @@ export default {
           this.height = response.data.height
           this.x = response.data.x
           this.y = response.data.y
-          this.pointList=response.data.pointList
+          this.pointList = response.data.pointList
           this.initKonva()
         })
+
       })
 
       // 获取map-json
-      getLotoMapInfo(lotoId, sopId, ticketId).then((response) => {
+      selectLotoMapById(lotoId, sopId, ticketId).then((response) => {
         console.log(response, '作业区域预览接口调用')
         this.form.map = response.data
         this.filterData = response.data
@@ -204,33 +212,45 @@ export default {
         getIsIsolationPointPage(data).then((res) => {
           const data1 = res.data.records
           const data2 = this.filterData
-          console.log(data1, data2, '隔离点获取左侧列表啊哈哈哈哈')
+          console.log(data1, '该柜子或地图所有点', data2, '该柜子里json拿到的点位')
+
           // 创建一个 Set 来存储 data2 中的 pointId
           const data2PointIds = new Set(data2.map((item) => item.pointId))
+
+          // 创建一个 Set 来存储 this.pointList 中的 pointId
+          const pointListIds = new Set(this.pointList.map((item) => item.pointId))
+
+          // 过滤掉 data2 和 this.pointList 中已经存在的点位
           const filterData = data1.filter(
-            (item) => !data2PointIds.has(item.pointId)
+            (item) => !data2PointIds.has(item.pointId) && !pointListIds.has(item.pointId)
           )
 
-          this.leftPoints = filterData.map((item) => {
-            return {
-              pointId: item.pointId,
-              pointName: item.pointName,
-              remark: item.remark,
-              prePointId: item.prePointId,
-              pointType: item.pointType,
-              pointTypeName: item.pointTypeName,
-              powerType: item.powerType,
-              powerTypeName: item.powerTypeName,
-              pointIcon: item.pointIcon,
-              status: false,
-              pointPicture: item.pointPicture,
-              mapImg: null
-            }
-          })
-          this.addPointsToLeftPointsBox(filterData)
+          console.log(filterData, 'filterData-交叉数据')
+          //这里与pointList相同的数据就不渲染了 因为pointList会直接渲染出来的
+          // this.leftPoints = filterData.map((item) => {
+          //   return {
+          //     pointId: item.pointId,
+          //     entityId: item.pointId,
+          //     entityName: item.pointName,
+          //     pointName: item.pointName,
+          //     remark: item.remark,
+          //     prePointId: item.prePointId,
+          //     pointType: item.pointType,
+          //     pointTypeName: item.pointTypeName,
+          //     powerType: item.powerType,
+          //     powerTypeName: item.powerTypeName,
+          //     pointIcon: item.pointIcon,
+          //     status: false,
+          //     pointPicture: item.pointPicture,
+          //     mapImg: null
+          //   }
+          // })
+          // this.addPointsToLeftPointsBox(filterData)
           this.orgLeftPoints = res.data.records.map((item) => {
             return {
               pointId: item.pointId,
+              entityId: item.pointId,
+              entityName: item.pointName,
               pointName: item.pointName,
               remark: item.remark,
               prePointId: item.prePointId,
@@ -256,8 +276,9 @@ export default {
       })
 
     },
-    // 获取所有隔离点
+    // 获取未绑定的所有隔离点
     getIsIsolationPointPage() {
+
       //   拿到解绑的隔离点数据
       const data1 = {
         current: 1,
@@ -267,6 +288,8 @@ export default {
       getIsIsolationPointPage(data1).then((res) => {
         this.rightPoints = res.data.records.map((item) => {
           return {
+            entityId: item.pointId,
+            entityName: item.pointName,
             pointId: item.pointId,
             pointName: item.pointName,
             remark: item.remark,
@@ -278,11 +301,15 @@ export default {
             pointIcon: item.pointIcon,
             status: false,
             pointPicture: item.pointPicture,
-            mapImg: null
+            mapImg: null,
+            mapId: this.mapId,
+            mapType: this.mapType
           }
         })
         this.orgRightPoints = res.data.records.map((item) => {
           return {
+            entityId: item.pointId,
+            entityName: item.pointName,
             pointId: item.pointId,
             pointName: item.pointName,
             remark: item.remark,
@@ -294,7 +321,9 @@ export default {
             pointIcon: item.pointIcon,
             status: false,
             pointPicture: item.pointPicture,
-            mapImg: null
+            mapImg: null,
+            mapId: this.mapId,
+            mapType: this.mapType
           }
         })
       })
@@ -343,6 +372,7 @@ export default {
               map: mapData
             }
             console.log(formData, 'map')
+
             updateLoto(formData).then((response) => {
               console.log(response, '修改车间区域地图')
               this.$message({
@@ -351,13 +381,22 @@ export default {
               })
             })
 
+            let dataMap = {
+              bindingPoints: this.leftPoints,
+              movePoints: JSON.parse(this.value),
+              unbindingPoints: this.rightPoints
+            }
+            console.log(dataMap, '先拿到数据看看再说')
+            updateMapPointList(dataMap).then((res) => {
+              console.log(res, '拿到的新绑定数据')
+            })
             const data = {
               bindingPointIds: this.bindingPointIds,
               lotoId: this.$route.query.lotoId,
               unbindPointIds: this.unbindPointIds
             }
             console.log(data, '解绑与绑定数据参数')
-            unbundlePointPage(data).then((res) => {
+            updatePointsBindingLoto(data).then((res) => {
               console.log(res, '解绑接口返回值')
               this.bindingPointIds = []
               this.unbindPointIds = []
@@ -495,6 +534,7 @@ export default {
       this.layer.draw()
     },
 
+    // 绘制柜内所有点
     renderGrid(imageSrc) {
       this.selectedStates = [] // 用数组来存储选中状态
       this.rects = []
@@ -505,8 +545,23 @@ export default {
       this.selectedText = []
 
       // const positions = JSON.parse(this.value)
-      const positions=this.pointList
-      console.log(positions,'positions')
+      const positions = this.pointList.map(item => ({
+        row: item.x, // 假设 row 是一个固定的值,如果不是,请根据实际情况调整
+        col: item.y, // 假设 col 是一个固定的值,如果不是,请根据实际情况调整
+        id: item.id,
+        pointId: item.entityId, // 假设 pointId 对应的是 entityId,如果不是,请根据实际情况调整
+        pointName: item.entityName, // 假设 pointName 对应的是 entityName,如果不是,请根据实际情况调整
+        entityId: item.entityId,
+        entityName: item.entityName,
+        mapId: item.mapId,
+        mapType: parseInt(item.mapType), // 假设 mapType 需要转换为数字类型
+        x: item.x, // 假设 x 需要转换为数字类型
+        y: item.y, // 假设 y 需要转换为数字类型
+        remark: item.remark,
+        pointIcon: item.pointIcon,
+        pointPicture: item.pointPicture
+      }))
+      console.log(positions, 'positions')
       positions.forEach((pos, index) => {
         // console.log(pos,'单条数据');
         const x = pos.x * 50 // 每个单元格宽度为50
@@ -613,24 +668,24 @@ export default {
 
             // 查找并删除对应的点数据
             const indexToRemove = positions.findIndex(
-              (item) => item.pointName === labelText
+              (item) => item.entityName === labelText
             )
 
             if (indexToRemove !== -1) {
               // 从 positions 中移除并获取移动的点
               // const movedPoint = positions.splice(indexToRemove, 1)[0];
-              const movedPoint = positions.find((item) => item.pointName == labelText)
+              const movedPoint = positions.find((item) => item.entityName == labelText)
 
               if (movedPoint) {
                 // 如果点位在物资柜外但不在右侧列表中,进行位置更新
                 if (!isInCabinet && !isInRightBox) {
                   // 更新位置为新的列和行
-                  const newCol = Math.round(groupPos.x / 50) // 四舍五入到最近的列
-                  const newRow = Math.round(groupPos.y / 50) // 四舍五入到最近的行
+                  const newCol = Math.round(groupPos.y / 50) // 四舍五入到最近的列
+                  const newRow = Math.round(groupPos.x / 50) // 四舍五入到最近的行
 
                   // 限制列和行的范围,防止超出网格边界
-                  const maxCols = Math.floor(1200 / 50) - 1 // 最大列索引
-                  const maxRows = Math.floor(860 / 50) - 1 // 最大行索引
+                  const maxCols = Math.floor(860 / 50) - 1 // 最大列索引
+                  const maxRows = Math.floor(1200 / 50) - 1 // 最大行索引
 
                   const boundedCol = Math.max(0, Math.min(newCol, maxCols)) // 限制列范围
                   const boundedRow = Math.max(0, Math.min(newRow, maxRows)) // 限制行范围
@@ -639,10 +694,15 @@ export default {
                   const updatedPosition = {
                     row: boundedRow,
                     col: boundedCol,
-                    pointId: movedPoint.pointId,
-                    pointName: movedPoint.pointName,
-                    remark: movedPoint.remark,
-                    prePointId: movedPoint.prePointId,
+                    id: movedPoint.id,
+                    pointId: movedPoint.entityId,
+                    entityId: movedPoint.entityId,
+                    entityName: movedPoint.entityName,
+                    pointName: movedPoint.entityName,
+                    mapId: this.mapId,
+                    mapType: this.mapType,
+                    x: boundedRow,
+                    y: boundedCol,
                     pointType: movedPoint.pointType,
                     pointTypeName: movedPoint.pointTypeName,
                     powerType: movedPoint.powerType,
@@ -668,7 +728,7 @@ export default {
                   // 确保点位没有被重复添加到 rightPoints 中
                   if (
                     !this.rightPoints.find(
-                      (point) => point.pointName == movedPoint.pointName
+                      (point) => point.entityName == movedPoint.entityName
                     )
                   ) {
                     // console.log(isInRightBox,'进入右侧盒子');
@@ -681,7 +741,7 @@ export default {
 // 遍历 positions 数组
                     for (let i = 0; i < positions.length; i++) {
                       // 找到当前移动的元素
-                      if (positions[i].pointName === movedPoint.pointName) {
+                      if (positions[i].entityName === movedPoint.entityName) {
                         // 使用 splice 删除该元素
                         positions.splice(i, 1)
 
@@ -695,10 +755,10 @@ export default {
                     this.rightPoints.push(movedPoint)
 
                     // 将 pointId 添加到 unbindPointIds 数组
-                    this.unbindPointIds.push(movedPoint.pointId)
+                    this.unbindPointIds.push(movedPoint.entityId)
                     // 从 bindingPointIds 中移除该 pointId
                     const bindingIndex = this.bindingPointIds.indexOf(
-                      movedPoint.pointId
+                      movedPoint.entityId
                     )
                     if (bindingIndex !== -1) {
                       this.bindingPointIds.splice(bindingIndex, 1)
@@ -708,12 +768,12 @@ export default {
                 // 如果是从物资柜内拿出来并移到柜外但不进入右侧列表
                 else if (isInCabinet && !isInRightBox) {
                   // 更新位置并保存
-                  const newCol = Math.round(groupPos.x / 50) // 四舍五入到最近的列
-                  const newRow = Math.round(groupPos.y / 50) // 四舍五入到最近的行
+                  const newCol = Math.round(groupPos.y / 50) // 四舍五入到最近的列
+                  const newRow = Math.round(groupPos.x / 50) // 四舍五入到最近的行
 
                   // 限制列和行的范围,防止超出网格边界
-                  const maxCols = Math.floor(1200 / 50) - 1 // 最大列索引
-                  const maxRows = Math.floor(860 / 50) - 1 // 最大行索引
+                  const maxCols = Math.floor(860 / 50) - 1 // 最大列索引
+                  const maxRows = Math.floor(1200 / 50) - 1 // 最大行索引
 
                   const boundedCol = Math.max(0, Math.min(newCol, maxCols)) // 限制列范围
                   const boundedRow = Math.max(0, Math.min(newRow, maxRows)) // 限制行范围
@@ -722,8 +782,15 @@ export default {
                   const updatedPosition = {
                     row: boundedRow,
                     col: boundedCol,
-                    pointId: movedPoint.pointId,
-                    pointName: movedPoint.pointName,
+                    id: movedPoint.id,
+                    pointId: movedPoint.entityId,
+                    pointName: movedPoint.entityName,
+                    entityId: movedPoint.entityId,
+                    entityName: movedPoint.entityName,
+                    mapId: this.mapId,
+                    mapType: this.mapType,
+                    x: boundedRow,
+                    y: boundedCol,
                     remark: movedPoint.remark,
                     prePointId: movedPoint.prePointId,
                     pointType: movedPoint.pointType,
@@ -748,7 +815,7 @@ export default {
             } else {
               // 如果点不在 positions 中,从柜子移动到右侧
               const rightIndex = this.rightPoints.findIndex(
-                (item) => item.pointName === labelText
+                (item) => item.entityName === labelText
               )
 
               if (rightIndex !== -1) {
@@ -758,12 +825,12 @@ export default {
                 // 如果点不在右侧列表中且不在物资柜中,更新位置
                 if (!isInRightBox && !isInCabinet) {
                   // 更新位置为新的列和行
-                  const newCol = Math.round(groupPos.x / 50) // 四舍五入到最近的列
-                  const newRow = Math.round(groupPos.y / 50) // 四舍五入到最近的行
+                  const newCol = Math.round(groupPos.y / 50) // 四舍五入到最近的列
+                  const newRow = Math.round(groupPos.x / 50) // 四舍五入到最近的行
 
                   // 限制列和行的范围,防止超出网格边界
-                  const maxCols = Math.floor(1200 / 50) - 1 // 最大列索引
-                  const maxRows = Math.floor(860 / 50) - 1 // 最大行索引
+                  const maxCols = Math.floor(860 / 50) - 1 // 最大列索引
+                  const maxRows = Math.floor(1200 / 50) - 1 // 最大行索引
 
                   const boundedCol = Math.max(0, Math.min(newCol, maxCols)) // 限制列范围
                   const boundedRow = Math.max(0, Math.min(newRow, maxRows)) // 限制行范围
@@ -772,8 +839,15 @@ export default {
                   const updatedPosition = {
                     row: boundedRow,
                     col: boundedCol,
-                    pointId: movedPoint.pointId,
-                    pointName: movedPoint.pointName,
+                    id: movedPoint.id,
+                    pointId: movedPoint.entityId,
+                    pointName: movedPoint.entityName,
+                    entityId: movedPoint.entityId,
+                    entityName: movedPoint.entityName,
+                    mapId: this.mapId,
+                    mapType: this.mapType,
+                    x: boundedRow,
+                    y: boundedCol,
                     remark: movedPoint.remark,
                     prePointId: movedPoint.prePointId,
                     pointType: movedPoint.pointType,
@@ -798,12 +872,12 @@ export default {
                 // 如果点从右侧拖拽到物资柜内
                 if (isInCabinet) {
                   // 更新位置为新的列和行
-                  const newCol = Math.round(groupPos.x / 50) // 四舍五入到最近的列
-                  const newRow = Math.round(groupPos.y / 50) // 四舍五入到最近的行
+                  const newCol = Math.round(groupPos.y / 50) // 四舍五入到最近的列
+                  const newRow = Math.round(groupPos.x / 50) // 四舍五入到最近的行
 
                   // 限制列和行的范围,防止超出网格边界
-                  const maxCols = Math.floor(1200 / 50) - 1 // 最大列索引
-                  const maxRows = Math.floor(860 / 50) - 1 // 最大行索引
+                  const maxCols = Math.floor(860 / 50) - 1 // 最大列索引
+                  const maxRows = Math.floor(1200 / 50) - 1 // 最大行索引
 
                   const boundedCol = Math.max(0, Math.min(newCol, maxCols)) // 限制列范围
                   const boundedRow = Math.max(0, Math.min(newRow, maxRows)) // 限制行范围
@@ -812,8 +886,15 @@ export default {
                   const updatedPosition = {
                     row: boundedRow,
                     col: boundedCol,
-                    pointId: movedPoint.pointId,
-                    pointName: movedPoint.pointName,
+                    id: movedPoint.id,
+                    pointId: movedPoint.entityId,
+                    pointName: movedPoint.entityName,
+                    entityId: movedPoint.entityId,
+                    entityName: movedPoint.entityName,
+                    mapId: this.mapId,
+                    mapType: this.mapType,
+                    x: boundedRow,
+                    y: boundedCol,
                     remark: movedPoint.remark,
                     prePointId: movedPoint.prePointId,
                     pointType: movedPoint.pointType,
@@ -833,21 +914,21 @@ export default {
                   // 确保点位没有被重复添加到 leftPoints 中
                   if (
                     !this.leftPoints.find(
-                      (point) => point.pointName === movedPoint.pointName
+                      (point) => point.entityName === movedPoint.entityName
                     )
                   ) {
                     this.leftPoints.push(movedPoint)
                   }
                   // 从 unbindPointIds 中移除该 pointId
                   const unbindIndex = this.unbindPointIds.indexOf(
-                    movedPoint.pointId
+                    movedPoint.entityId
                   )
                   if (unbindIndex !== -1) {
                     this.unbindPointIds.splice(unbindIndex, 1)
                   }
 
                   // 将 pointId 添加到 bindingPointIds 数组
-                  this.bindingPointIds.push(movedPoint.pointId)
+                  this.bindingPointIds.push(movedPoint.entityId)
                 }
               }
             }
@@ -904,6 +985,7 @@ export default {
 
     // 渲染每个点
     renderPoint(point) {
+
       const x = point.col * 50 // 每个单元格宽度为50
       const y = point.row * 50 // 每个单元格高度为50
 
@@ -1031,6 +1113,7 @@ export default {
       this.value = JSON.stringify(updatedData, null, 4)
 
       // console.log('Updated value after removal:', this.value)
+      console.log('removePointFromJson', updatedData)
     },
 
     // 更新 JSON 中对应点的位置
@@ -1043,8 +1126,12 @@ export default {
       const updatedPosition = {
         row: newRow,
         col: newCol,
+        x: newRow,
+        y: newCol,
         pointId: point.pointId,
         pointName: point.pointName,
+        entityId: point.pointId,
+        entityName: point.pointName,
         remark: point.remark,
         prePointId: point.prePointId,
         pointType: point.pointType,
@@ -1075,9 +1162,9 @@ export default {
         this.value = JSON.stringify(positions, null, 4)
       }
 
-      console.log('Updated value after update:', this.value)
+      // console.log('Updated value after update:', this.value)
     },
-
+    // 解绑隔离点函数
     addPointsToRightPointsBox(rightPointsBox) {
       if (this.rightPoints && this.rightPoints.length > 0) {
         const boxWidth = rightPointsBox.width()
@@ -1182,6 +1269,8 @@ export default {
                 row: row,
                 col: col,
                 pointId: point.pointId,
+                entityId: point.entityId,
+                entityName: point.entityName,
                 pointName: point.pointName,
                 remark: point.remark,
                 prePointId: point.prePointId,
@@ -1212,7 +1301,11 @@ export default {
               ) {
                 // 进入右侧盒子区域
                 console.log('进入右侧盒子区域')
-
+// 更新 point 对象的 col 和 row 值
+                point.row = col
+                point.col = row
+                point.x = col
+                point.y = row
                 // 如果之前已在右侧区域,需要移除值,并更新绑定点ID
                 const index = valueArray.findIndex(
                   (item) => item.pointId === point.pointId
@@ -1232,15 +1325,27 @@ export default {
 
                 // 将点重新添加到 rightPoints
                 this.rightPoints.push(point)
-              } else if (
-                snappedX >= cabinetBounds.x &&
-                snappedX <= cabinetBounds.x + cabinetBounds.width &&
-                snappedY >= cabinetBounds.y &&
-                snappedY <= cabinetBounds.y + cabinetBounds.height
+              }
+                //   这里的if判断是为了 移动在物资柜内部才做的操作 现在我只要离开右侧 就做这个操作
+                //    if (
+                //   snappedX >= cabinetBounds.x &&
+                //   snappedX <= cabinetBounds.x + cabinetBounds.width &&
+                //   snappedY >= cabinetBounds.y &&
+                //   snappedY <= cabinetBounds.y + cabinetBounds.height
+              // )
+              else if (snappedX < rightBoxBounds.x ||
+                snappedX > rightBoxBounds.x + rightBoxBounds.width ||
+                snappedY < rightBoxBounds.y ||
+                snappedY > rightBoxBounds.y + rightBoxBounds.height
               ) {
+
                 // 进入物资柜区域
                 console.log('进入物资柜区域')
-
+                // 更新 point 对象的 col 和 row 值
+                point.row = col
+                point.col = row
+                point.x = col
+                point.y = row
                 // 检查点是否已经存在于 valueArray 中
                 const index = valueArray.findIndex(
                   (item) => item.pointId === point.pointId
@@ -1258,10 +1363,16 @@ export default {
                 this.rightPoints = this.rightPoints.filter(
                   (item) => item.pointId !== point.pointId
                 )
+                this.leftPoints.push(point)
+                console.log(point, '左侧区域绑定柜子了')
               } else {
                 // 未进入任何目标区域,保持原状态
                 console.log('未进入目标区域,保持原状态')
-
+// 更新 point 对象的 col 和 row 值
+                point.row = col
+                point.col = row
+                point.x = col
+                point.y = row
                 // 如果点不在目标区域,从 valueArray 中移除
                 // this.value = JSON.stringify(
                 //   valueArray.filter((item) => item.pointId !== point.pointId),

+ 2 - 2
src/views/mes/dv/lotoStation/index.vue

@@ -228,7 +228,7 @@
 <script>
 import {
   listLoto,
-  getLotoInfo,
+  selectIsLotoStationById,
   addLoto,
   updateLoto,
   delLoto
@@ -451,7 +451,7 @@ export default {
     handleUpdate(row) {
       this.reset();
       this.EditId = row.lotoId || this.ids;
-      getLotoInfo(this.EditId).then((response) => {
+      selectIsLotoStationById(this.EditId).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改锁定站信息";

+ 5 - 5
src/views/mes/dv/technology/technologyDetail/MapData.vue

@@ -47,7 +47,7 @@
 
 <script>
 import Konva from 'konva'
-import { getLotoMapInfo, getLotoInfo, updateLoto } from '@/api/mes/lotoStation/lotoStation'
+import { selectLotoMapById, selectIsLotoStationById, updateLoto } from '@/api/mes/lotoStation/lotoStation'
 import { getTechnologyInfo, saveMachineryPoints } from '@/api/system/machinery'
 import { selectIsMapById } from '@/api/system/mapconfig'
 export default {
@@ -85,7 +85,7 @@ export default {
   },
   mounted() {
     this.$nextTick(() => {
-      this.getLoToInfo()
+      this.selectIsLotoStationById()
     })
 
   },
@@ -97,13 +97,13 @@ export default {
     close() {
       this.$router.push('/technology/technologyList')
     },
-    getLoToInfo() {
+    selectIsLotoStationById() {
       const machineryId = this.machineryId
       getTechnologyInfo(machineryId).then((response) => {
         const lotoId = response.data.lotoId
         const sopId = ''
         const ticketId = ''
-        getLotoMapInfo(lotoId, sopId, ticketId).then(response => {
+        selectLotoMapById(lotoId, sopId, ticketId).then(response => {
           console.log(response, '电柜预览接口调用')
           this.form.map = response.data
           if (response.data) {
@@ -115,7 +115,7 @@ export default {
             }
           }
         })
-        getLotoInfo(lotoId).then((response) => {
+        selectIsLotoStationById(lotoId).then((response) => {
           console.log(response, '电柜信息')
           this.form = response.data
           // 获取不同底图 如地图或者柜子

+ 6 - 6
src/views/mes/dv/technology/technologyList/MapData.vue

@@ -36,7 +36,7 @@
 
 <script>
 import Konva from "konva";
-import {getLotoMapInfo,getLotoInfo,updateLoto} from '@/api/mes/lotoStation/lotoStation'
+import {selectLotoMapById,selectIsLotoStationById,updateLoto} from '@/api/mes/lotoStation/lotoStation'
 import { getTechnologyInfo, saveMachineryPoints } from '@/api/system/machinery'
 
 export default {
@@ -62,7 +62,7 @@ export default {
     '$route.query.lotoId':{
       handler(newValue){
         if(newValue){
-          this.getLoToInfo()
+          this.selectIsLotoStationById()
           this.initKonva();
         }
       }
@@ -70,7 +70,7 @@ export default {
   },
   mounted() {
     this.$nextTick(()=>{
-      this.getLoToInfo()
+      this.selectIsLotoStationById()
     })
     console.log(this.$route.query.lotoId,'lotoId');
   },
@@ -82,15 +82,15 @@ export default {
     close(){
       this.$router.push('/technology/technologyList');
     },
-    getLoToInfo(){
+    selectIsLotoStationById(){
       const lotoId=this.$route.query.lotoId;
       const sopId=''
       const ticketId=''
-      getLotoInfo(lotoId).then((response) => {
+      selectIsLotoStationById(lotoId).then((response) => {
         console.log(response,'电柜信息')
         this.form=response.data
       })
-      getLotoMapInfo(lotoId,sopId,ticketId).then(response => {
+      selectLotoMapById(lotoId,sopId,ticketId).then(response => {
         console.log(response,'电柜预览接口调用');
         this.form.map=response.data;
 

+ 10 - 10
src/views/mes/job/jobm/LockDetail.vue

@@ -7,7 +7,7 @@
 
 <script>
 import Konva from 'konva'
-import { getLotoMapInfo, getLotoInfo } from '@/api/mes/lotoStation/lotoStation'
+import { selectLotoMapById, selectIsLotoStationById } from '@/api/mes/lotoStation/lotoStation'
 import { getTechnologyInfo } from '@/api/system/machinery'
 import { selectIsMapById } from '@/api/system/mapconfig'
 
@@ -47,7 +47,7 @@ export default {
       handler(newValue) {
         if (newValue) {
           console.log(this.machineryId, 'Mapdata拿到的父组件machineryId')
-          this.getLoToInfo()
+          this.selectIsLotoStationById()
         }
       },
       immediate: true
@@ -56,7 +56,7 @@ export default {
   mounted() {
     this.$nextTick(() => {
       if (this.machineryId) {
-        this.getLoToInfo()
+        this.selectIsLotoStationById()
         const machineryId = this.machineryId
         console.log(machineryId, 'Mapdata拿到的父组件传递数据')
       }
@@ -64,13 +64,13 @@ export default {
   },
 
   methods: {
-    getLoToInfo() {
+    selectIsLotoStationById() {
       const machineryId = this.machineryId
       getTechnologyInfo(machineryId).then((response) => {
         const lotoId = response.data.lotoId
         const sopId = ''
         const ticketId = ''
-        getLotoInfo(lotoId).then((response) => {
+        selectIsLotoStationById(lotoId).then((response) => {
           console.log(response, '电柜信息')
           this.form = response.data
           // 获取不同底图 如地图或者柜子
@@ -85,7 +85,7 @@ export default {
             this.initKonva()
           })
         })
-        getLotoMapInfo(lotoId, sopId, ticketId).then(response => {
+        selectLotoMapById(lotoId, sopId, ticketId).then(response => {
           console.log(response, '电柜预览接口调用')
           this.form.map = response.data
 
@@ -222,10 +222,10 @@ export default {
 
         if (this.width > 1000) {
           // 直接使用 positions 中的 x 和 y 坐标
-          const col = pos.x  // 当前点位的列
-          const row = pos.y  // 当前点位的行
-          x = col * cellWidth - 700 // 调整偏移量,使其向左移动
-          y = row * cellHeight - 20 // 调整偏移量,使其向上移动
+          const col = pos.y  // 当前点位的列
+          const row = pos.x  // 当前点位的行
+          x = row * 2 * 18 // 调整偏移量,使其向左移动
+          y = col * 2 * 18 // 调整偏移量,使其向上移动
           console.log(pos, '位置信息')
         } else {
           // 计算点位的实际位置,确保它们位于柜子显示区域内

+ 29 - 22
src/views/mes/job/jobm/Mapdata.vue

@@ -6,7 +6,7 @@
 
 <script>
 import Konva from "konva";
-import { getLotoMapInfo, getLotoInfo } from "@/api/mes/lotoStation/lotoStation";
+import { selectLotoMapById, selectIsLotoStationById } from "@/api/mes/lotoStation/lotoStation";
 import { getTechnologyInfo } from "@/api/system/machinery";
 import { selectIsMapById } from '@/api/system/mapconfig'
 export default {
@@ -45,7 +45,7 @@ export default {
       handler(newValue) {
         if (newValue) {
           console.log(this.machineryId, "Mapdata拿到的父组件machineryId");
-          this.getLoToInfo();
+          this.selectIsLotoStationById();
         }
       },
       immediate: true,
@@ -54,21 +54,24 @@ export default {
   mounted() {
     this.$nextTick(() => {
       if (this.machineryId) {
-        this.getLoToInfo();
+        this.selectIsLotoStationById();
         const machineryId = this.machineryId;
         console.log(machineryId, "Mapdata拿到的父组件传递数据");
       }
     });
   },
-
+  beforeDestroy() { // Vue 2
+    this.imageUrl='';
+    this.pointList=null
+  },
   methods: {
-    getLoToInfo() {
+    selectIsLotoStationById() {
       const machineryId = this.machineryId;
       getTechnologyInfo(machineryId).then((response) => {
         const lotoId = response.data.lotoId;
         const sopId = "";
         const ticketId = "";
-        getLotoInfo(lotoId).then((response) => {
+        selectIsLotoStationById(lotoId).then((response) => {
           console.log(response, "电柜信息");
           this.form = response.data;
           // 获取不同底图 如地图或者柜子
@@ -83,7 +86,7 @@ export default {
             this.initKonva()
           })
         });
-        getLotoMapInfo(lotoId, sopId, ticketId).then((response) => {
+        selectLotoMapById(lotoId, sopId, ticketId).then((response) => {
           console.log(response, "电柜预览接口调用");
           this.form.map = response.data;
 
@@ -125,7 +128,7 @@ export default {
             x: this.x,
             y: this.y,
             image: bgImage,
-            width: this.width/2,
+            width: this.width/2.1,
             height: this.height/2,
             draggable: false,
           });
@@ -177,40 +180,44 @@ export default {
 
       // const positions = JSON.parse(this.value); // 获取点位数据
       const positions=this.pointList
+      console.log(positions,'positions');
       // **计算柜子的布局范围**
       const cabinetWidth = this.stage.width(); // 柜子的宽度
       const cabinetHeight = this.stage.height(); // 柜子的高度
-      const cols = Math.max(...positions.map((p) => p.x)) + 1; // 根据数据动态计算总列数
-      const rows = Math.max(...positions.map((p) => p.y)) + 1; // 根据数据动态计算总行数
+      const rows = Math.max(...positions.map((p) => p.x)) + 1; // 根据数据动态计算总行数
+      const cols = Math.max(...positions.map((p) => p.y)) + 1; // 根据数据动态计算总列数
+
       // 调整横向和纵向间距
       let horizontalSpacingFactor
       let verticalSpacingFactor
       if(this.width>1000){
-        horizontalSpacingFactor = 1; // 横向间距放大倍数
-        verticalSpacingFactor = 0.43; // 纵向间距缩小倍数
+        horizontalSpacingFactor = 0.4; // 横向间距放大倍数
+        verticalSpacingFactor = 0.4; // 纵向间距缩小倍数
       }else{
-        horizontalSpacingFactor = 0.7; // 横向间距放大倍数
-        verticalSpacingFactor = 0.49; // 纵向间距缩小倍数
+        horizontalSpacingFactor = 0.6; // 横向间距放大倍数
+        verticalSpacingFactor = 0.6; // 纵向间距缩小倍数
       }
 
 
-      const cellWidth = (cabinetWidth / cols) * horizontalSpacingFactor; // 调整横向间距
-      const cellHeight = (cabinetHeight / rows) * verticalSpacingFactor; // 调整纵向间距
+      const cellWidth = (cabinetWidth / rows) * horizontalSpacingFactor; // 调整横向间距
+      const cellHeight = (cabinetHeight / cols) * verticalSpacingFactor; // 调整纵向间距
 
       // 遍历点位,按行列布局计算位置
       positions.forEach((pos) => {
-        const col = pos.x; // 当前点位的列
-        const row = pos.y; // 当前点位的行
+        const col = pos.y; // 当前点位的列
+        const row = pos.x; // 当前点位的行
 
         // 计算点位的实际位置,确保它们位于柜子显示区域内
         let x
         let y
         if(this.width>1000){
-          x = col * cellWidth - 250;
-          y = row * cellHeight - 0;
+          // 计算柜子的布局范围
+          x = row * 2 * 12;
+          y = col * 2 * 12 ;
+          console.log(pos.x,pos.y,x,y,'我打印了')
         }else{
-          x = col * cellWidth - 100;
-          y = row * cellHeight + 15;
+          x = row *  cellWidth - 60;
+          y = col *  cellHeight + 12;
         }
 
 

+ 49 - 33
src/views/mes/job/jobm/NewMarsJob.vue

@@ -137,7 +137,7 @@
         style="width: 35%; display: flex; flex-direction: column"
       >
         <div class="left-top">
-          <el-card class="box-card" style="margin: 10px">
+          <el-card class="box-card" style="margin: 10px" v-loading="loading">
             <div slot="header" class="clearfix">
               <span>工艺/设备 工艺图</span>
             </div>
@@ -145,7 +145,7 @@
           </el-card>
         </div>
         <div class="left-bottom">
-          <el-card class="box-card" style="height: 100%; margin: 10px">
+          <el-card class="box-card" style="height: 100%; margin: 10px" v-loading="loading">
             <div slot="header" class="clearfix">
               <span>锁定站信息</span>
               <i
@@ -163,31 +163,31 @@
               <MapData
                 :machineryId="this.machineryId"
               ></MapData>
-<!--              <el-col :span="9">-->
-<!--                <el-table-->
-<!--                  :data="selectPointList"-->
-<!--                  :show-header="false"-->
-<!--                  height="200"-->
-<!--                  @row-click="handleChangeTable"-->
-<!--                  v-if="tableVisible"-->
-<!--                >-->
-<!--                  <el-table-column prop="pointName" label=""></el-table-column>-->
-<!--                  <el-table-column prop="remark" label=""></el-table-column>-->
-<!--                </el-table>-->
-<!--                <span-->
-<!--                  v-if="!tableVisible"-->
-<!--                  style="color: #53a3ef; cursor: pointer"-->
-<!--                  @click="handleChangeTable"-->
-<!--                >锁定站</span-->
-<!--                >-->
-<!--                <img-->
-<!--                  src="@/assets/images/MapImage.png"-->
-<!--                  style="width: 200px; height: 130px; margin-top: 10px"-->
-<!--                />-->
-<!--              </el-col>-->
-<!--              <el-col :span="8">-->
-
-<!--              </el-col>-->
+              <!--              <el-col :span="9">-->
+              <!--                <el-table-->
+              <!--                  :data="selectPointList"-->
+              <!--                  :show-header="false"-->
+              <!--                  height="200"-->
+              <!--                  @row-click="handleChangeTable"-->
+              <!--                  v-if="tableVisible"-->
+              <!--                >-->
+              <!--                  <el-table-column prop="pointName" label=""></el-table-column>-->
+              <!--                  <el-table-column prop="remark" label=""></el-table-column>-->
+              <!--                </el-table>-->
+              <!--                <span-->
+              <!--                  v-if="!tableVisible"-->
+              <!--                  style="color: #53a3ef; cursor: pointer"-->
+              <!--                  @click="handleChangeTable"-->
+              <!--                >锁定站</span-->
+              <!--                >-->
+              <!--                <img-->
+              <!--                  src="@/assets/images/MapImage.png"-->
+              <!--                  style="width: 200px; height: 130px; margin-top: 10px"-->
+              <!--                />-->
+              <!--              </el-col>-->
+              <!--              <el-col :span="8">-->
+
+              <!--              </el-col>-->
             </el-row>
           </el-card>
         </div>
@@ -711,6 +711,7 @@
       title="锁定站信息"
       width="1200px"
       append-to-body
+      class="elDialog"
     >
       <!--      这里为了没有地图数据而设置的-->
       <el-row>
@@ -759,7 +760,7 @@ import {
 import MapData from '@/views/mes/job/jobm/Mapdata.vue'
 import { getUserList } from '@/api/mes/workCard'
 import { getJobPlayTicketInfo } from '@/api/mes/jobplay/jobplay'
-import { getLotoInfo, getLotoMapInfo } from '@/api/mes/lotoStation/lotoStation'
+import { selectIsLotoStationById, selectLotoMapById } from '@/api/mes/lotoStation/lotoStation'
 import LockDetail from '@/views/mes/job/jobm/LockDetail.vue'
 import { selectIsMapById } from '@/api/system/mapconfig'
 import { getIsMapPointPage } from '@/api/system/mappoint'
@@ -842,7 +843,9 @@ export default {
         top: 480,
         width: 65,
         height: 25
-      }
+      },
+      loading: false,
+      LoadStatus: ''//给LockDetail加弹窗加载
     }
   },
   computed: {
@@ -859,6 +862,12 @@ export default {
         this.sopId = null
         this.getList()
       }
+      if (val == 'third') {
+        this.loading = true
+        setTimeout(() => {
+          this.loading = false
+        }, 3000)
+      }
     },
     'dialogForm.locker': function(val) {
       if (val) {
@@ -883,6 +892,13 @@ export default {
       //   name:'LockDetail',params: { machineryId: this.machineryId }
       // },)
       this.LockDetailvisible = true
+      this.LoadStatus = this.$loading({
+        target: '.elDialog .el-dialog '
+      })
+      setTimeout(() => {
+        this.LoadStatus.close()
+      }, 3000)
+
     },
     // 内部人员搜索
     filterInsideTable() {
@@ -965,7 +981,7 @@ export default {
         const lotoId = res.data.lotoId
         const selectPointsIds = res.data.pointIdList
 
-        getLotoMapInfo(lotoId).then((response) => {
+        selectLotoMapById(lotoId).then((response) => {
           console.log(response, '电柜信息--NewMarsJob')
           this.selectPointList = response.data.filter((item) =>
             selectPointsIds.includes(item.pointId)
@@ -1012,10 +1028,10 @@ export default {
         console.log(res, '作业票地图 图片数据')
         this.jobconfig = res.data
       })
-      const dataMap={
+      const dataMap = {
         pages: 1,
         size: -1,
-        mapId:1
+        mapId: 1
       }
       getIsMapPointPage(dataMap).then((res) => {
         console.log(res, '作业票地图岗位位置信息接口')
@@ -1087,7 +1103,7 @@ export default {
               const lotoId = res.data.lotoId
               const selectPointsIds = res.data.pointIdList
 
-              getLotoMapInfo(lotoId).then((response) => {
+              selectLotoMapById(lotoId).then((response) => {
                 console.log(response, '电柜信息--NewMarsJob')
                 this.selectPointList = response.data.filter((item) =>
                   selectPointsIds.includes(item.pointId)

+ 9 - 9
src/views/system/mapconfig/index.vue

@@ -27,16 +27,16 @@
                    v-hasPermi="['iscs:map:add']"
         >新增</el-button>
       </el-col>
-      <el-button
-        v-no-more-click
-        type="info"
-        plain
-        icon="el-icon-upload2"
-        size="mini"
-        @click="handleOpenImport"
+<!--      <el-button-->
+<!--        v-no-more-click-->
+<!--        type="info"-->
+<!--        plain-->
+<!--        icon="el-icon-upload2"-->
+<!--        size="mini"-->
+<!--        @click="handleOpenImport"-->
 
-      >导入</el-button
-      >
+<!--      >导入</el-button-->
+<!--      >-->
       <el-col :span="1.5">
         <el-button v-no-more-click
                    type="danger"

+ 7 - 7
src/views/system/mappoint/index.vue

@@ -38,14 +38,14 @@
         >删除
         </el-button>
       </el-col>
-      <el-button v-no-more-click
-                 type="info"
-                 plain
-                 icon="el-icon-upload2"
-                 size="mini"
-                 @click="handleImport"
+<!--      <el-button v-no-more-click-->
+<!--                 type="info"-->
+<!--                 plain-->
+<!--                 icon="el-icon-upload2"-->
+<!--                 size="mini"-->
+<!--                 @click="handleImport"-->
 
-      >导入</el-button>
+<!--      >导入</el-button>-->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 

+ 189 - 3
src/views/system/user/index.vue

@@ -289,6 +289,32 @@
               >
             </template>
           </el-table-column>
+          <el-table-column
+            label="指纹"
+            align="center"
+            prop=""
+            v-if="columns[2].visible"
+            :show-overflow-tooltip="true"
+          >
+            <template slot-scope="scope">
+              <el-button type="text" @click="HandleLookFaceOrFinger(scope.row,1)"
+              >查看</el-button
+              >
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="人脸"
+            align="center"
+            prop=""
+            v-if="columns[2].visible"
+            :show-overflow-tooltip="true"
+          >
+            <template slot-scope="scope">
+              <el-button type="text" @click="HandleLookFaceOrFinger(scope.row,2)"
+              >查看</el-button
+              >
+            </template>
+          </el-table-column>
           <!--          <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />-->
           <el-table-column
             label="状态"
@@ -609,6 +635,67 @@
         >
       </div>
     </el-dialog>
+<!--    查看用户人脸和指纹弹窗-->
+    <el-dialog :title="title2" :visible.sync="open2" width="780px" append-to-body  @close="handleDialogClose">
+      <el-button
+        v-no-more-click
+        type="danger"
+        plain
+        icon="el-icon-delete"
+        size="mini"
+        :disabled="multiple"
+        @click="handleDeleteFaceOrFinger"
+        v-hasPermi="['system:user:remove']"
+      >删除</el-button
+      >
+      <el-table :data="FaceOrFingerTableData" height="600" @selection-change="handleSelectionChange2">
+        <el-table-column type="selection" width="50" align="center"></el-table-column>
+        <el-table-column label="序号"  width="100" type="index" :index='(index)=>{return (index+1) + (this.current-1)*this.size}'> </el-table-column>
+        <el-table-column :label="this.title2=='人员指纹数据'?'指纹':'人脸'" align="center"  prop="imageUrl">
+          <template slot-scope="scope">
+            <div  class="img-box" >
+              <el-image
+                style="width: 50px; height: 50px;"
+                :preview-teleported="true"
+                class="images"
+                :hide-on-click-modal=true
+                :src="scope.row.imageUrl"
+                :zoom-rate="1.2"
+                :preview-src-list="[scope.row.imageUrl]"
+                :initial-index="1"
+              >
+              </el-image>
+              <i class="el-icon-zoom-in" id="eyeicon"></i>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="操作"
+          align="center"
+          width="160"
+          class-name="small-padding fixed-width"
+        >
+          <template slot-scope="scope">
+            <el-button
+              v-no-more-click
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteFaceOrFinger(scope.row)"
+            >删除</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination
+
+        :total="total2"
+        :page.sync="current"
+        :limit.sync="size"
+        @pagination="getFaceOrFingerList"
+      />
+    </el-dialog>
   </div>
 </template>
 
@@ -620,19 +707,20 @@ import {
   addUser,
   updateUser,
   resetUserPwd,
-  changeUserStatus,
-} from "@/api/system/user";
+  changeUserStatus, getSysUserCharacteristicPage, deleteSysUserCharacteristicByRecordIds
+} from '@/api/system/user'
 import { listMarsDept } from "@/api/system/marsdept";
 import { getToken } from "@/utils/auth";
 import { treeselect } from "@/api/system/dept";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { listUnit } from "@/api/system/unit";
+import Template from '@/views/print/printtemplate/list.vue'
 
 export default {
   name: "User",
   dicts: ["sys_normal_disable", "sys_user_sex"],
-  components: { Treeselect },
+  components: { Template, Treeselect },
   data() {
     return {
       // 遮罩层
@@ -764,6 +852,14 @@ export default {
       selectTreeValue: [], //玛氏
       selectTreeArrIds: [], //玛氏
       filterText: "", //玛氏
+      title2:'',//人脸或指纹弹框
+      open2:false,//人脸或指纹弹窗
+      FaceOrFingerTableData:[],//人脸或指纹
+      total2:0,//人脸
+      current:1,//人脸
+      size:10,//人脸
+      type:null,//人脸
+      userId:undefined,//人脸
     };
   },
   watch: {
@@ -833,6 +929,48 @@ export default {
         );
       });
     },
+    //查看人脸关闭弹窗前清空数据
+    handleDialogClose(){
+      this.FaceOrFingerTableData=[]
+    },
+    // 查看人脸或者指纹弹框打开函数
+    HandleLookFaceOrFinger(row,type){
+      this.open2 = true;
+      if(type=='1'){
+        this.title2='人员指纹数据'
+      }else if(type=='2'){
+        this.title2='人员面部数据'
+      }
+      this.userId=row.userId;
+      this.type=type;
+      const data={
+        current:this.current,
+        size:this.size,
+        userId: this.userId,
+        type:this.type,
+      }
+
+      // 查看人员相应数据
+      getSysUserCharacteristicPage(data).then((response) => {
+        console.log(response,'人脸');
+        this.FaceOrFingerTableData = response.data.records;
+        this.total2=response.data.total;
+      })
+    },
+    getFaceOrFingerList(){
+      //  type 1 指纹 2 人脸
+      const data={
+        current:this.current,
+        size:this.size,
+        userId: this.userId,
+        type:this.type,
+      }
+      // 查看人员相应数据
+      getSysUserCharacteristicPage(data).then((response) => {
+        this.FaceOrFingerTableData = response.data.records;
+        this.total2=response.data.total;
+      })
+    },
     //mars新增岗位数据转换
     transformDataToTree(data) {
       // 创建一个映射,用于快速查找节点
@@ -978,6 +1116,12 @@ export default {
       this.single = selection.length != 1;
       this.multiple = !selection.length;
     },
+    // 人脸指纹弹窗批量删除
+    handleSelectionChange2(selection) {
+      this.ids = selection.map((item) => item.recordId);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
+    },
     // 更多操作触发
     handleCommand(command, row) {
       switch (command) {
@@ -1183,6 +1327,20 @@ export default {
         })
         .catch(() => {});
     },
+    // 人脸指纹删除
+    handleDeleteFaceOrFinger(row) {
+      const userIds = row.recordId || this.ids;
+      this.$modal
+        .confirm("是否确认删除所选数据项?")
+        .then(function () {
+          return deleteSysUserCharacteristicByRecordIds(userIds);
+        })
+        .then(() => {
+          this.getFaceOrFingerList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
     /** 导出按钮操作 */
     handleExport() {
       this.download(
@@ -1243,4 +1401,32 @@ export default {
     padding: 6px;
   }
 }
+//图片放大
+.img-box {
+  width: 50px;
+  height: 50px;
+  position: relative;
+  margin-left: 45%;
+  #eyeicon {
+    display: none;
+  }
+}
+
+.img-box:hover {
+  background: #000;
+
+  .images {
+    opacity: 0.6;
+  }
+
+  #eyeicon {
+    display: block;
+    position: absolute;
+    top: 40%;
+    left: 32%;
+    z-index: 100;
+    color: white;
+    pointer-events: none;
+  }
+}
 </style>