Pārlūkot izejas kodu

fix: Merge branch 'dev' of http://192.168.0.115:3000/bill/traffic-laser into dev

bill 1 gadu atpakaļ
vecāks
revīzija
93ef930e71

+ 51 - 44
public/static/lib/potree/potree.js

@@ -75616,7 +75616,7 @@ void main()
 	    depTexLocBindDataset: true,//是否在pano模式下,使用深度图得到intersect的话,改intersect能属于该pano所在的点云。也就相当于在全景模式下intersect的点属于该全景图
 
 	    notAdditiveBlending:false, //点云是否使用普通的blend, 否则会曝光过渡
-	    precision:2,  // 两位小数 
+	    precision:0,  //  位小数 
 	    useV4url:true, //v4的全景图等路径不一样 scene_view_data
 	    
 	    useRTskybox:true,  //直接使用rtEDL绘制到屏幕,当是全景模式时. 在降4倍时能给render节省1毫秒,gpu时间未测 
@@ -82052,7 +82052,7 @@ void main()
 	            this.setEdgeLabelPos(label,p1,p2);
 	 
 	            distance = distance == void 0 ? p1.distanceTo(p2) : distance; 
-	            var text = this.labelText || viewer.unitConvert.convert(distance, 'distance', Potree.settings.precision, this.unitSystem, 0.1 , true);//distance要传0.1 这个factor
+	            var text = this.labelText || viewer.unitConvert.convert(distance, 'distance',  Potree.settings.precision , this.unitSystem, 0.001 , true, true);//distance要传0.1 这个factor
 	            label.setText(text);
 	          
 	        };
@@ -96318,24 +96318,32 @@ ENDSEC
 	    getCeilHeight(){//天花板高度值   (假设不存在depth为0的点,所有为0的要么是在盲区,要么是无穷远。)
 	         
 	        if(this.ceilZ == void 0){
-	            const depthTiming = Potree.timeCollect.depthSampler.median;    //pc firefox达到4.  chrome为0.01
+	            //const depthTiming = Potree.timeCollect.depthSampler.median    //pc firefox达到4.  chrome为0.01
 	                     
 	            
 	            //用三个间隔120度散开,和中心垂直线成一定夹角的三个向量去求 最高高度 (不求平均的原因:万一是0不好算)
 	            
 	            let rotMat = new Matrix4().makeRotationX((Potree.config.depthTexUVyLimit+0.01)*Math.PI);// 角度不能小于天花板中空的半径 
 	            
+	            let dir0 = new Vector3(0,0,1).applyMatrix4(rotMat);
 	            
 	            
-	            let dirs = [new Vector3(0,0,1).applyMatrix4(rotMat)];
-	            if(depthTiming < 1){
-	                let rotMat1 = new Matrix4().makeRotationZ(Math.PI*2 / 3);
-	                dirs.push(dirs[0].clone().applyMatrix4(rotMat1));
+	            let dirs = [
+	                dir0, 
+	                dir0.clone().applyMatrix4(new Matrix4().makeRotationZ(Math.PI*2 / 3)),
+	                dir0.clone().applyMatrix4(new Matrix4().makeRotationZ(-Math.PI*2 / 3))
+	            ];
+	             
+	            
+	            /* if(depthTiming < 1){
+	                let rotMat1 = new THREE.Matrix4().makeRotationZ(Math.PI*2 / 3);
+	                dirs.push(dirs[0].clone().applyMatrix4(rotMat1))
 	            }
 	            if(depthTiming < 0.3){
-	                let rotMat2 = new Matrix4().makeRotationZ(-Math.PI*2 / 3);
+	                let rotMat2 = new THREE.Matrix4().makeRotationZ(-Math.PI*2 / 3);
 	                dirs.push(dirs[0].clone().applyMatrix4(rotMat2)); 
-	            }
+	            } */
+	             
 	             
 	            let zs = dirs.map(dir_=>{ 
 	                let dir = dir_.clone().applyMatrix4(this.panoMatrix2);  //pano不一定是垂直的, 需要把之前的dirInPano先转成真实的dir,防止超出角度限制
@@ -97444,7 +97452,7 @@ ENDSEC
 	  
 
 
-	    isNeighbour(pano0, pano1, dontCompute, onlyUseTex,  computeDirFirst){//是否之间没有遮挡(在加载visibles之前,自己算) 最好pano0是currentPano
+	    isNeighbour(pano0, pano1, {dontCompute, onlyUseTex,  computeDirFirst, computeTwoDir}={}){//是否之间没有遮挡(在加载visibles之前,自己算) 最好pano0是currentPano
 	         
 	        if(!pano0 || !pano1 )return
 	        
@@ -97489,7 +97497,7 @@ ENDSEC
 	            }
 	        }; 
 	           
-	        if( map0[pano1.id] == void 0 && !ifNeighbour ) {//主方向为空且不为邻居
+	        if(!ifNeighbour && (map0[pano1.id] == void 0 || (computeTwoDir && map1[pano0.id] == void 0))) {//主方向为空且不为邻居
 	            let simpleJudge = pano0.position.distanceToSquared(pano1.position) > 300; //在远处去掉对floorPosition的判断
 	            if(pano0.depthTex || pano1.depthTex){
 	                             
@@ -98154,10 +98162,13 @@ ENDSEC
 	             
 	            for(let a=0, b=g.length; a<b; a++){
 	                let item = g[a];
-	                if(this.isNeighbour(pano, item.item,  true) != void 0) continue
+	                if(item.item == pano)continue  
+	                if(this.isNeighbour(pano,item.item,{dontCompute:true}) || this.neighbourMap[pano.id][item.item.id]!= void 0 && this.neighbourMap[item.item.id][pano.id]!= void 0)continue //为true或两个方向都算了的
 	                
+	                //console.log('check isNeighbour', pano.id, item.item.id)
+	                 
 	                let byCloud = !pano.pointcloud.hasDepthTex;
-	                let result = this.isNeighbour(pano, item.item,  false, !byCloud, true);//计算 
+	                let result = this.isNeighbour(pano, item.item,  {onlyUseTex: !byCloud, computeDirFirst:true, computeTwoDir:true});//计算 
 	                
 	                if(result != void 0){//计算了 
 	                    //console.log('提前计算neighbor', pano.id,  item.item.id)
@@ -102924,9 +102935,9 @@ ENDSEC
 	        return  this.convert(t, n, precision, r, minFactor)
 	    }
 	    
-	    convert(number, domain, precision = 2, system, minFactor, ifEighths = !1) { 
+	    convert(number, domain, precision = 2, system, minFactor, ifEighths = !1, ifRestrictFactor) { 
 	        if (!number) return "";
-	        var s = this.getMostRelevantMeasurement(domain, system || this.UnitService.currentSystem, number, minFactor);
+	        var s = this.getMostRelevantMeasurement(domain, system || this.UnitService.currentSystem, number, minFactor, ifRestrictFactor);
 	        return this.getFormattedMeasurementString(s[0], s[1], precision, ifEighths)
 	    }
 	    
@@ -102976,7 +102987,7 @@ ENDSEC
 	        return  0 !== r ? r + "' " + s + a + '"' : "" + s + a + '"'
 	    }
 	    
-	    getMostRelevantMeasurement(domain, system, number, minFactor=0) {
+	    getMostRelevantMeasurement(domain, system, number, minFactor=0, ifRestrictFactor) {
 	        /* var a = r.values(UnitsOfMeasurement.getUnitsOfMeasurementByDomainAndSystem(domain, system))
 	          , s = r.filter(a, function(t) {  
 	            return t.factor >= i
@@ -102988,9 +102999,12 @@ ENDSEC
 	        let u = UnitsOfMeasurement.getUnitsOfMeasurementByDomainAndSystem(domain, system);
 	        for(let i in u){a.push(u[i]);}
 	         
-	        let s = a.filter(m=>m.factor >= minFactor); 
-	         
-	        
+	        let s;   
+	        if(ifRestrictFactor){
+	            s = a.filter(m=>m.factor == minFactor);  
+	        }else {
+	            s = a.filter(m=>m.factor >= minFactor);
+	        } 
 	       
 	        let c = s.reduce(function(prev, currentValue) {//reduce最终值是最后一次return的值 ( 没看懂这句话作用) 
 	            return currentValue.fromBase(number) < prev.fromBase(number) && currentValue.fromBase(number) >= 1 ? currentValue : prev
@@ -103474,17 +103488,15 @@ ENDSEC
 	            }
 	        }) */
 	        //viewer.setControls(viewer.orbitControls);
-	        viewer.setLimitFar(false); 
+	        //viewer.setLimitFar(false) 
 	          
-	        /* 
-	        Potree.settings.unableNavigate = true
-	        Potree.settings.ifShowMarker = false
-	        Potree.Utils.updateVisible(viewer.measuringTool.scene, 'clipModel', false)   
-	        //Potree.Utils.updateVisible(viewer.mapViewer.cursor, 'clipModel', false)//隐藏地图游标
-	        viewer.inputHandler.toggleSelection(this.box);
-	        viewer.inputHandler.fixSelection = true
-	        viewer.transformationTool.frame.material.color.set(Potree.config.clip.color)//navvis 15899953 
-	        viewer.setPointStandardMat(true)  */
+	         
+	        //Potree.settings.unableNavigate = true
+	        //Potree.settings.ifShowMarker = false
+	        Potree.Utils.updateVisible(viewer.measuringTool.scene, 'clipModel', false);   
+	         
+	        
+	        //viewer.setPointStandardMat(true)   
 	        
 	        {  
 	            this.events = {
@@ -103521,13 +103533,13 @@ ENDSEC
 	        
 	        //viewer.setControls(viewer.fpControls);
 	        
-	        Potree.settings.unableNavigate = false;
-	        Potree.settings.ifShowMarker = this.previousView.ifShowMarker;
+	        //Potree.settings.unableNavigate = false
+	        //Potree.settings.ifShowMarker = this.previousView.ifShowMarker
 	        Potree.Utils.updateVisible(viewer.measuringTool.scene, 'clipModel', true);  
 	        //Potree.Utils.updateVisible(viewer.mapViewer.cursor, 'clipModel', true) 
-	        viewer.setView(this.previousView); 
+	        //viewer.setView(this.previousView) 
 	        //viewer.setClipState(true)
-	        viewer.controls.setTarget(null);
+	        //viewer.controls.setTarget(null)
 	         
 	        this.editing = false;
 	    },
@@ -133599,17 +133611,12 @@ ENDSEC
 	                depthSampler : {minCount:400, median: 25}, //median预置一个中等值,以防止cpu过低的设备首次卡顿  
 	                 
 	            };
+	            for(let i in Potree.timeCollect){
+	                Potree.timeCollect[i].measures = [];
+	                Potree.timeCollect[i].sum = 0;
+	                Potree.timeCollect[i].start = true;                
+	            }
 	            
-	            setTimeout(()=>{
-	                for(let i in Potree.timeCollect){
-	                    Potree.timeCollect[i].measures = [];
-	                    Potree.timeCollect[i].sum = 0;
-	                    Potree.timeCollect[i].start = true;
-	                }
-	                /* setTimeout(()=>{
-	                    console.log('timeCollect', Potree.timeCollect.depthSampler.median, Potree.timeCollect.depthSampler.ave, Potree.timeCollect.depthSampler.measures.length)
-	                },10000) */
-	            },2000);
 	        }
 	         
 	  
@@ -134301,7 +134308,7 @@ ENDSEC
 	    computeShelter(){
 	        //先算用深度图的,然后再点云;
 	        
-	        let depthTiming = Potree.timeCollect.depthSampler.median; 
+	        //let depthTiming = Potree.timeCollect.depthSampler.median 
 	        let byTex=0,  byCloud=0;
 	        let len = shelterHistory.length;
 	        let waitCloud = [];

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
public/static/lib/potree/potree.js.map


+ 2 - 1
src/graphic/History/HistoryUtil.js

@@ -150,7 +150,8 @@ export default class HistoryUtil {
       road1.endId == road2.endId &&
       road1.leftEdgeId == road2.leftEdgeId &&
       road1.rightEdgeId == road2.rightEdgeId &&
-      road1.way == road2.way
+      road1.way == road2.way &&
+      road1.roadWidthTipsPos == road2.roadWidthTipsPos 
     ) {
       if (road1.way == Constant.oneWay) {
         if (

+ 79 - 299
src/graphic/Layer.js

@@ -159,11 +159,7 @@ export default class Layer {
         stateService.setEventName(LayerEvents.MovePoint);
         const newPoint = addPoint.buildPoint(position);
         if (newPoint) {
-          stateService.setSelectItem(
-            newPoint.vectorId,
-            VectorType.Point,
-            SelectState.Select
-          );
+          stateService.setSelectItem(newPoint.vectorId, VectorType.Point, SelectState.Select);
           this.renderer.autoRedraw();
         }
         break;
@@ -175,11 +171,7 @@ export default class Layer {
       case LayerEvents.AddText:
         stateService.setEventName(LayerEvents.MoveText);
         addText.buildText(position);
-        stateService.setSelectItem(
-          addText.newText.vectorId,
-          VectorType.Text,
-          SelectState.Select
-        );
+        stateService.setSelectItem(addText.newText.vectorId, VectorType.Text, SelectState.Select);
         addText.clear();
         break;
       case LayerEvents.AddSVG:
@@ -193,11 +185,7 @@ export default class Layer {
       case LayerEvents.AddMagnifier:
         stateService.setEventName(LayerEvents.MoveMagnifier);
         addMagnifier.buildMagnifier(position);
-        stateService.setSelectItem(
-          addMagnifier.newMagnifier.vectorId,
-          VectorType.Magnifier,
-          SelectState.Select
-        );
+        stateService.setSelectItem(addMagnifier.newMagnifier.vectorId, VectorType.Magnifier, SelectState.Select);
         addMagnifier.clear();
         break;
       case VectorEvents.AddLane:
@@ -208,17 +196,9 @@ export default class Layer {
             selectAddLaneFlag = true;
             let roadLanCount = road.getLanesCount(selectItem.dir);
             if (selectItem.dir == "left") {
-              roadService.updateForAddSubtractLanesCount(
-                road.vectorId,
-                roadLanCount + 1,
-                selectItem.dir
-              );
+              roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount + 1, selectItem.dir);
             } else {
-              roadService.updateForAddSubtractLanesCount(
-                road.vectorId,
-                roadLanCount + 1,
-                selectItem.dir
-              );
+              roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount + 1, selectItem.dir);
             }
             roadService.initRoadWidthTipsPos(road);
 
@@ -236,17 +216,9 @@ export default class Layer {
               selectAddLaneFlag = true;
               let curveRoadLanCount = road.getLanesCount(selectItem.dir);
               if (selectItem.dir == "left") {
-                curveRoadService.updateForAddSubtractLanesCount(
-                  road.vectorId,
-                  curveRoadLanCount + 1,
-                  selectItem.dir
-                );
+                curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount + 1, selectItem.dir);
               } else {
-                curveRoadService.updateForAddSubtractLanesCount(
-                  road.vectorId,
-                  curveRoadLanCount + 1,
-                  selectItem.dir
-                );
+                curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount + 1, selectItem.dir);
               }
               let leftEdge = dataService.getRoadEdge(road.leftEdgeId);
               let rightEdge = dataService.getRoadEdge(road.rightEdgeId);
@@ -274,17 +246,9 @@ export default class Layer {
             selectDelLaneFlag = true;
             let roadLanCount = road.getLanesCount(selectItem.dir);
             if (selectItem.dir == "left") {
-              roadService.updateForAddSubtractLanesCount(
-                road.vectorId,
-                roadLanCount - 1,
-                selectItem.dir
-              );
+              roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount - 1, selectItem.dir);
             } else {
-              roadService.updateForAddSubtractLanesCount(
-                road.vectorId,
-                roadLanCount - 1,
-                selectItem.dir
-              );
+              roadService.updateForAddSubtractLanesCount(road.vectorId, roadLanCount - 1, selectItem.dir);
             }
             let leftEdge = dataService.getRoadEdge(road.leftEdgeId);
             let rightEdge = dataService.getRoadEdge(road.rightEdgeId);
@@ -300,17 +264,9 @@ export default class Layer {
               selectDelLaneFlag = true;
               let curveRoadLanCount = road.getLanesCount(selectItem.dir);
               if (selectItem.dir == "left") {
-                curveRoadService.updateForAddSubtractLanesCount(
-                  road.vectorId,
-                  curveRoadLanCount - 1,
-                  selectItem.dir
-                );
+                curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount - 1, selectItem.dir);
               } else {
-                curveRoadService.updateForAddSubtractLanesCount(
-                  road.vectorId,
-                  curveRoadLanCount - 1,
-                  selectItem.dir
-                );
+                curveRoadService.updateForAddSubtractLanesCount(road.vectorId, curveRoadLanCount - 1, selectItem.dir);
               }
               let leftEdge = dataService.getRoadEdge(road.leftEdgeId);
               let rightEdge = dataService.getRoadEdge(road.rightEdgeId);
@@ -334,18 +290,12 @@ export default class Layer {
         if (focusItem && focusItem.vectorId) {
           if (focusItem.type == VectorType.CurveRoad) {
             const curveRoad = dataService.getCurveRoad(focusItem.vectorId);
-            let index = mathUtil.getIndexForCurvesPoints(
-              position,
-              curveRoad.points
-            );
+            let index = mathUtil.getIndexForCurvesPoints(position, curveRoad.points);
             if (index != -1) {
               curveRoadService.addCPoint(curveRoad, position, index);
             } else {
               const dis1 = mathUtil.getDistance(curveRoad.points[0], position);
-              const dis2 = mathUtil.getDistance(
-                curveRoad.points[curveRoad.points.length - 1],
-                position
-              );
+              const dis2 = mathUtil.getDistance(curveRoad.points[curveRoad.points.length - 1], position);
               if (dis1 > dis2) {
                 index = curveRoad.points.length - 2;
               } else {
@@ -372,18 +322,12 @@ export default class Layer {
             curveLine.setStyle(style);
           } else if (focusItem.type == VectorType.CurveLine) {
             let curveLine = dataService.getCurveLine(focusItem.vectorId);
-            let index = mathUtil.getIndexForCurvesPoints(
-              position,
-              curveLine.points
-            );
+            let index = mathUtil.getIndexForCurvesPoints(position, curveLine.points);
             if (index != -1) {
               lineService.addCPoint(position, index, focusItem.vectorId);
             } else {
               const dis1 = mathUtil.getDistance(curveLine.points[0], position);
-              const dis2 = mathUtil.getDistance(
-                curveLine.points[curveLine.points.length - 1],
-                position
-              );
+              const dis2 = mathUtil.getDistance(curveLine.points[curveLine.points.length - 1], position);
               if (dis1 > dis2) {
                 index = curveLine.points.length - 2;
               } else {
@@ -417,11 +361,7 @@ export default class Layer {
     selectItem = stateService.getSelectItem();
     stateService.setDraggingItem(selectItem);
     stateService.clearFocusItem();
-    if (
-      selectItem &&
-      this.uiControl.focusVector &&
-      selectItem.vectorId == this.uiControl.focusVector.vectorId
-    ) {
+    if (selectItem && this.uiControl.focusVector && selectItem.vectorId == this.uiControl.focusVector.vectorId) {
     } else {
       this.uiControl.clearFocusVector();
     }
@@ -486,24 +426,14 @@ export default class Layer {
       y: position.y,
     };
     const eventName = stateService.getEventName();
-    if (
-      !this.dragging &&
-      Math.abs(X - this.startX) < minDragDis &&
-      Math.abs(Y - this.startY) < minDragDis
-    ) {
+    if (!this.dragging && Math.abs(X - this.startX) < minDragDis && Math.abs(Y - this.startY) < minDragDis) {
       return;
     }
     this.dragging = true;
-    if (
-      Math.abs(X - this.startX) > minDragDis ||
-      Math.abs(Y - this.startY) > minDragDis
-    ) {
+    if (Math.abs(X - this.startX) > minDragDis || Math.abs(Y - this.startY) > minDragDis) {
       // 是否拖拽了
       if (eventName != null) {
-        if (
-          eventName == LayerEvents.MoveMagnifier &&
-          stateService.getSelectItem().state != 0
-        ) {
+        if (eventName == LayerEvents.MoveMagnifier && stateService.getSelectItem().state != 0) {
         } else {
           stateService.clearFocusItem();
           this.uiControl.clearFocusVector();
@@ -530,10 +460,8 @@ export default class Layer {
       case LayerEvents.PanBackGround:
         stateService.clearItems();
         let center = {};
-        center.x =
-          coordinate.center.x - (dx * coordinate.defaultZoom) / coordinate.zoom;
-        center.y =
-          coordinate.center.y + (dy * coordinate.defaultZoom) / coordinate.zoom;
+        center.x = coordinate.center.x - (dx * coordinate.defaultZoom) / coordinate.zoom;
+        center.y = coordinate.center.y + (dy * coordinate.defaultZoom) / coordinate.zoom;
         let tempCenter = {};
         mathUtil.clonePoint(tempCenter, coordinate.center);
         mathUtil.clonePoint(coordinate.center, center);
@@ -548,10 +476,7 @@ export default class Layer {
       case LayerEvents.AddRoad:
         needAutoRedraw = true;
         listenLayer.start(position);
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.hasOwnProperty("x")
-        ) {
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
           position = {
             x: listenLayer.modifyPoint.x,
             y: listenLayer.modifyPoint.y,
@@ -566,10 +491,7 @@ export default class Layer {
       case LayerEvents.AddLine:
         needAutoRedraw = true;
         listenLayer.start(position);
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.hasOwnProperty("x")
-        ) {
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
           position = {
             x: listenLayer.modifyPoint.x,
             y: listenLayer.modifyPoint.y,
@@ -583,10 +505,7 @@ export default class Layer {
       case LayerEvents.AddCurveLine:
         needAutoRedraw = true;
         listenLayer.start(position);
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.hasOwnProperty("x")
-        ) {
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
           position = {
             x: listenLayer.modifyPoint.x,
             y: listenLayer.modifyPoint.y,
@@ -600,10 +519,7 @@ export default class Layer {
       case LayerEvents.AddCircle:
         needAutoRedraw = true;
         listenLayer.start(position);
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.hasOwnProperty("x")
-        ) {
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
           position = {
             x: listenLayer.modifyPoint.x,
             y: listenLayer.modifyPoint.y,
@@ -625,10 +541,7 @@ export default class Layer {
         //   addRoad.startInfo.linkedRoadPointId
         // });
 
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.hasOwnProperty("x")
-        ) {
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
           position = {
             x: listenLayer.modifyPoint.x,
             y: listenLayer.modifyPoint.y,
@@ -670,10 +583,7 @@ export default class Layer {
           exceptLineIds: exceptLineId,
           exceptPointId: exceptPointId,
         });
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.hasOwnProperty("x")
-        ) {
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
           position = {
             x: listenLayer.modifyPoint.x,
             y: listenLayer.modifyPoint.y,
@@ -703,10 +613,7 @@ export default class Layer {
           exceptCurveLineId: exceptCurveLineId,
           exceptCurvePointId: exceptCurvePointId,
         });
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.hasOwnProperty("x")
-        ) {
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
           position = {
             x: listenLayer.modifyPoint.x,
             y: listenLayer.modifyPoint.y,
@@ -731,10 +638,7 @@ export default class Layer {
           exceptCircleId = addCircle.newCircle.vectorId;
         }
         listenLayer.start(position, { exceptCircleId: exceptCircleId });
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.hasOwnProperty("x")
-        ) {
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
           position = {
             x: listenLayer.modifyPoint.x,
             y: listenLayer.modifyPoint.y,
@@ -756,16 +660,9 @@ export default class Layer {
         let road = dataService.getRoad(draggingItem.vectorId);
         let start = dataService.getRoadPoint(road.startId);
         let end = dataService.getRoadPoint(road.endId);
-        if (
-          Object.keys(start.getParent()).length == 1 &&
-          Object.keys(end.getParent()).length == 1
-        ) {
+        if (Object.keys(start.getParent()).length == 1 && Object.keys(end.getParent()).length == 1) {
           //拖拽的路只有一条
-          moveRoad.moveRoad(
-            draggingItem.vectorId,
-            (dx * coordinate.defaultZoom) / coordinate.zoom,
-            (dy * coordinate.defaultZoom) / coordinate.zoom
-          );
+          moveRoad.moveRoad(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
         }
         break;
       case LayerEvents.MoveRoadPoint:
@@ -790,11 +687,7 @@ export default class Layer {
           listenLayer.modifyPoint = null;
         }
 
-        let flag = moveRoad.moveingRoadPoint(
-          draggingItem.vectorId,
-          position,
-          listenLayer.modifyPoint
-        );
+        let flag = moveRoad.moveingRoadPoint(draggingItem.vectorId, position, listenLayer.modifyPoint);
         if (!flag) {
           elementService.hideAll();
         } else {
@@ -805,10 +698,7 @@ export default class Layer {
       case LayerEvents.AddCurveRoad:
         needAutoRedraw = true;
         listenLayer.start(position);
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.hasOwnProperty("x")
-        ) {
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
           position = {
             x: listenLayer.modifyPoint.x,
             y: listenLayer.modifyPoint.y,
@@ -822,10 +712,7 @@ export default class Layer {
       case LayerEvents.AddingCurveRoad:
         needAutoRedraw = true;
         listenLayer.start(position);
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.hasOwnProperty("x")
-        ) {
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
           position = {
             x: listenLayer.modifyPoint.x,
             y: listenLayer.modifyPoint.y,
@@ -848,11 +735,7 @@ export default class Layer {
         break;
       case LayerEvents.MoveCurveRoad:
         needAutoRedraw = true;
-        moveRoad.moveCurveRoad(
-          draggingItem.vectorId,
-          (dx * coordinate.defaultZoom) / coordinate.zoom,
-          (dy * coordinate.defaultZoom) / coordinate.zoom
-        );
+        moveRoad.moveCurveRoad(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
         break;
       case LayerEvents.MoveCurveRoadPoint:
         if (!draggingItem || !draggingItem.vectorId) {
@@ -896,21 +779,13 @@ export default class Layer {
         break;
       case LayerEvents.MoveCurveEdge:
         if (listenLayer.modifyPoint) {
-          moveRoad.moveCurveEdge(
-            draggingItem.vectorId,
-            listenLayer.modifyPoint.selectIndex,
-            position
-          );
+          moveRoad.moveCurveEdge(draggingItem.vectorId, listenLayer.modifyPoint.selectIndex, position);
         }
         needAutoRedraw = true;
         break;
       case LayerEvents.MoveLine:
         if (draggingItem != null) {
-          let flag = moveLine.moveLine(
-            draggingItem.vectorId,
-            (dx * coordinate.defaultZoom) / coordinate.zoom,
-            (dy * coordinate.defaultZoom) / coordinate.zoom
-          );
+          let flag = moveLine.moveLine(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
           if (!flag) {
             this.lastX = this.lastX - dx / coordinate.ratio;
             this.lastY = this.lastY - dy / coordinate.ratio;
@@ -926,20 +801,13 @@ export default class Layer {
             exceptLineIds: point.parent,
           });
 
-          if (
-            listenLayer.modifyPoint &&
-            listenLayer.modifyPoint.x &&
-            listenLayer.modifyPoint.y
-          ) {
+          if (listenLayer.modifyPoint && listenLayer.modifyPoint.x && listenLayer.modifyPoint.y) {
             position = {
               x: listenLayer.modifyPoint.x,
               y: listenLayer.modifyPoint.y,
             };
           }
-          let movePointFlag = movePoint.movePoint(
-            position,
-            draggingItem.vectorId
-          );
+          let movePointFlag = movePoint.movePoint(position, draggingItem.vectorId);
           needAutoRedraw = true;
           if (!point) {
             stateService.clearEventName();
@@ -955,10 +823,7 @@ export default class Layer {
             exceptCurvePointId: draggingItem.vectorId,
             exceptCurveLineId: curvePoint.parent,
           });
-          if (
-            listenLayer.modifyPoint &&
-            listenLayer.modifyPoint.hasOwnProperty("x")
-          ) {
+          if (listenLayer.modifyPoint && listenLayer.modifyPoint.hasOwnProperty("x")) {
             position = {
               x: listenLayer.modifyPoint.x,
               y: listenLayer.modifyPoint.y,
@@ -973,33 +838,16 @@ export default class Layer {
         break;
       case LayerEvents.MoveCurveLine:
         if (draggingItem != null) {
-          moveLine.moveCurveLine(
-            draggingItem.vectorId,
-            (dx * coordinate.defaultZoom) / coordinate.zoom,
-            (dy * coordinate.defaultZoom) / coordinate.zoom
-          );
+          moveLine.moveCurveLine(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
           needAutoRedraw = true;
         }
         break;
       case LayerEvents.MoveCircle:
         if (draggingItem != null) {
           if (draggingItem.state == -1) {
-            moveCircle.moveFull(
-              draggingItem.vectorId,
-              (dx * coordinate.defaultZoom) / coordinate.zoom,
-              (dy * coordinate.defaultZoom) / coordinate.zoom
-            );
-          } else if (
-            draggingItem.state == 0 ||
-            draggingItem.state == 1 ||
-            draggingItem.state == 2 ||
-            draggingItem.state == 3
-          ) {
-            moveCircle.movePoint(
-              position,
-              draggingItem.vectorId,
-              draggingItem.state
-            );
+            moveCircle.moveFull(draggingItem.vectorId, (dx * coordinate.defaultZoom) / coordinate.zoom, (dy * coordinate.defaultZoom) / coordinate.zoom);
+          } else if (draggingItem.state == 0 || draggingItem.state == 1 || draggingItem.state == 2 || draggingItem.state == 3) {
+            moveCircle.movePoint(position, draggingItem.vectorId, draggingItem.state);
           } else {
             debugger;
           }
@@ -1023,22 +871,14 @@ export default class Layer {
           if (draggingItem.state == -1) {
             moveSVG.moveFullSVG(position, draggingItem.vectorId);
           } else {
-            moveSVG.movePoint(
-              position,
-              draggingItem.vectorId,
-              draggingItem.state
-            );
+            moveSVG.movePoint(position, draggingItem.vectorId, draggingItem.state);
           }
         }
         break;
       case LayerEvents.MoveMagnifier:
         needAutoRedraw = true;
         if (draggingItem != null) {
-          moveMagnifier.moveFullMagnifier(
-            position,
-            draggingItem.vectorId,
-            draggingItem.state
-          );
+          moveMagnifier.moveFullMagnifier(position, draggingItem.vectorId, draggingItem.state);
         }
         break;
     }
@@ -1133,6 +973,13 @@ export default class Layer {
           addRoad.buildRoad();
           elementService.hideAll();
         }
+        let roadEdges = dataService.getRoadEdges();
+        for (let roadEdgeId in roadEdges) {
+          let roadEdge = dataService.getRoadEdge(roadEdgeId);
+          if (roadEdge.roadSide) {
+            roadEdge.initRoadSide();
+          }
+        }
         this.uiControl.confirmEntry(); //不能连续创建道路
         break;
       case LayerEvents.AddingLine:
@@ -1140,10 +987,7 @@ export default class Layer {
         addLine.finish(position);
         this.updateForLocation();
         //绘制的是基准线
-        if (
-          addLine.newLine &&
-          Settings.baseLineId == addLine.newLine.vectorId
-        ) {
+        if (addLine.newLine && Settings.baseLineId == addLine.newLine.vectorId) {
           stateService.clearEventName();
           this.history.save();
         }
@@ -1205,24 +1049,11 @@ export default class Layer {
         break;
       case LayerEvents.MoveCurveRoadPoint:
         needAutoRedraw = true;
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.linkedCurveRoadPointId
-        ) {
-          let curveRoadPoint1 = dataService.getCurveRoadPoint(
-            listenLayer.modifyPoint.linkedCurveRoadPointId
-          );
-          let curveRoadPoint2 = dataService.getCurveRoadPoint(
-            draggingItem.vectorId
-          );
-          if (
-            listenLayer.modifyPoint.linkedCurveRoadPointId !=
-              draggingItem.vectorId &&
-            curveRoadPoint1.getParent() == curveRoadPoint2.getParent()
-          ) {
-            curveRoadPointService.deleteCurveRoadPoint(
-              listenLayer.modifyPoint.linkedCurveRoadPointId
-            );
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurveRoadPointId) {
+          let curveRoadPoint1 = dataService.getCurveRoadPoint(listenLayer.modifyPoint.linkedCurveRoadPointId);
+          let curveRoadPoint2 = dataService.getCurveRoadPoint(draggingItem.vectorId);
+          if (listenLayer.modifyPoint.linkedCurveRoadPointId != draggingItem.vectorId && curveRoadPoint1.getParent() == curveRoadPoint2.getParent()) {
+            curveRoadPointService.deleteCurveRoadPoint(listenLayer.modifyPoint.linkedCurveRoadPointId);
           }
         }
         this.history.save();
@@ -1254,23 +1085,11 @@ export default class Layer {
         break;
       case LayerEvents.MoveCurvePoint:
         needAutoRedraw = true;
-        if (
-          listenLayer.modifyPoint &&
-          listenLayer.modifyPoint.linkedCurvePointId
-        ) {
-          let curvePoint1 = dataService.getCurvePoint(
-            listenLayer.modifyPoint.linkedCurvePointId
-          );
+        if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurvePointId) {
+          let curvePoint1 = dataService.getCurvePoint(listenLayer.modifyPoint.linkedCurvePointId);
           let curvePoint2 = dataService.getCurvePoint(draggingItem.vectorId);
-          if (
-            listenLayer.modifyPoint.linkedCurvePointId !=
-              draggingItem.vectorId &&
-            curvePoint1.getParent() == curvePoint2.getParent()
-          ) {
-            lineService.deleteCrossPointForCurveLine(
-              listenLayer.modifyPoint.linkedCurvePointId,
-              curvePoint1.getParent()
-            );
+          if (listenLayer.modifyPoint.linkedCurvePointId != draggingItem.vectorId && curvePoint1.getParent() == curvePoint2.getParent()) {
+            lineService.deleteCrossPointForCurveLine(listenLayer.modifyPoint.linkedCurvePointId, curvePoint1.getParent());
           }
         }
         elementService.hideAll();
@@ -1315,9 +1134,7 @@ export default class Layer {
     const type = e.type;
     if (type == "DOMMouseScroll" || type == "mousewheel") {
       // 当在canvas用滚轮滚动时
-      const delta = e.wheelDelta
-        ? (e.wheelDelta / 120) * 20
-        : (-(e.detail || 0) / 3) * 20;
+      const delta = e.wheelDelta ? (e.wheelDelta / 120) * 20 : (-(e.detail || 0) / 3) * 20;
       const zoom = coordinate.zoom + delta;
       let X = e.offsetX || e.layerX;
       let Y = e.offsetY || e.layerY;
@@ -1421,10 +1238,7 @@ export default class Layer {
 
   stopAddVector() {
     let eventName = stateService.getEventName();
-    if (
-      eventName != LayerEvents.AddingRoad &&
-      eventName != LayerEvents.AddingLine
-    ) {
+    if (eventName != LayerEvents.AddingRoad && eventName != LayerEvents.AddingLine) {
       stateService.clearEventName();
     } else if (eventName == LayerEvents.AddingRoad) {
       stateService.setEventName(LayerEvents.AddRoad);
@@ -1562,57 +1376,23 @@ export default class Layer {
     let otherPoint1 = null;
     let otherPoint2 = null;
     if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedRoadPointIdX) {
-      otherPoint1 = dataService.getRoadPoint(
-        listenLayer.modifyPoint.linkedRoadPointIdX
-      );
-    } else if (
-      listenLayer.modifyPoint &&
-      listenLayer.modifyPoint.linkedCurveRoadPointIdX
-    ) {
-      otherPoint1 = dataService.getCurveRoadPoint(
-        listenLayer.modifyPoint.linkedCurvePointIdX
-      );
-    } else if (
-      listenLayer.modifyPoint &&
-      listenLayer.modifyPoint.linkedPointIdX
-    ) {
-      otherPoint1 = dataService.getPoint(
-        listenLayer.modifyPoint.linkedPointIdX
-      );
-    } else if (
-      listenLayer.modifyPoint &&
-      listenLayer.modifyPoint.linkedCurvePointIdX
-    ) {
-      otherPoint1 = dataService.getCurvePoint(
-        listenLayer.modifyPoint.linkedCurvePointIdX
-      );
+      otherPoint1 = dataService.getRoadPoint(listenLayer.modifyPoint.linkedRoadPointIdX);
+    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurveRoadPointIdX) {
+      otherPoint1 = dataService.getCurveRoadPoint(listenLayer.modifyPoint.linkedCurvePointIdX);
+    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedPointIdX) {
+      otherPoint1 = dataService.getPoint(listenLayer.modifyPoint.linkedPointIdX);
+    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurvePointIdX) {
+      otherPoint1 = dataService.getCurvePoint(listenLayer.modifyPoint.linkedCurvePointIdX);
     }
 
     if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedRoadPointIdY) {
-      otherPoint2 = dataService.getRoadPoint(
-        listenLayer.modifyPoint.linkedRoadPointIdY
-      );
-    } else if (
-      listenLayer.modifyPoint &&
-      listenLayer.modifyPoint.linkedCurvePointIdY
-    ) {
-      otherPoint2 = dataService.getCurveRoadPoint(
-        listenLayer.modifyPoint.linkedCurvePointIdY
-      );
-    } else if (
-      listenLayer.modifyPoint &&
-      listenLayer.modifyPoint.linkedPointIdY
-    ) {
-      otherPoint2 = dataService.getPoint(
-        listenLayer.modifyPoint.linkedPointIdY
-      );
-    } else if (
-      listenLayer.modifyPoint &&
-      listenLayer.modifyPoint.linkedCurvePointIdY
-    ) {
-      otherPoint2 = dataService.getCurvePoint(
-        listenLayer.modifyPoint.linkedCurvePointIdY
-      );
+      otherPoint2 = dataService.getRoadPoint(listenLayer.modifyPoint.linkedRoadPointIdY);
+    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurvePointIdY) {
+      otherPoint2 = dataService.getCurveRoadPoint(listenLayer.modifyPoint.linkedCurvePointIdY);
+    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedPointIdY) {
+      otherPoint2 = dataService.getPoint(listenLayer.modifyPoint.linkedPointIdY);
+    } else if (listenLayer.modifyPoint && listenLayer.modifyPoint.linkedCurvePointIdY) {
+      otherPoint2 = dataService.getCurvePoint(listenLayer.modifyPoint.linkedCurvePointIdY);
     }
 
     let otherPoint = {};

+ 5 - 2
src/views/scene/index.vue

@@ -122,7 +122,11 @@ const accodentSortPhotos = computed(() => {
   const photos = [...accidentPhotos.value];
   return photos.sort((a, b) => types.indexOf(a.type) - types.indexOf(b.type));
 });
-
+const sortPhotos = computed(() =>
+  roadPhotos.value
+    // .filter((item) => (currentType.value === TypeEnum.Draw ? !item.table : !!item.table))
+    .reverse()
+);
 const enum TypeEnum {
   Draw,
   Table,
@@ -151,7 +155,6 @@ const sceneInfo = ref({
   accidentDesc: "",
 });
 const inputHandler = debounce(() => {
-  console.error(1);
   tables.value["sceneInfo"] = sceneInfo.value;
 }, 300);
 const viewStatus = ref(false);

+ 2 - 2
src/views/tables/ask.vue

@@ -151,12 +151,12 @@
         </div>
       </div>
     </div>
-    <div class="bottom-name" v-show="!isWrite">
+    <div v-if="page <= 1" class="bottom-name" v-show="!isWrite">
       <span v-if="type == '1'">被询问人:</span>
       <span v-else>被讯问人:</span>
       <div style="flex: 1">
         <input type="text" v-model="data.askerBys" />
-        <div class="content-box">{{ data.askerBys }}</div>
+        <div class="content-box left">{{ data.askerBys }}</div>
       </div>
     </div>
   </div>

+ 32 - 5
src/views/tables/explorate-four.vue

@@ -1,6 +1,6 @@
 <!--  -->
 <template>
-  <div class="explorate" v-if="data">
+  <div class="explorate" v-if="data" :class="{ downMode: downMode }">
     <div>
       <h2 class="title">道路交通事故现场勘查笔录(续页)</h2>
 
@@ -21,7 +21,10 @@
 
             <tr v-for="(i, index) in data.driversInfoList">
               <td v-for="(j, j_index) in i">
-                <div><input type="text" /></div>
+                <div>
+                  <div class="content-box">{{ data.driversInfoList[index][j_index] }}</div>
+                  <input type="text" v-model="data.driversInfoList[index][j_index]" />
+                </div>
               </td>
               <!-- <td><div contenteditable></div></td>
               <td><div contenteditable></div></td>
@@ -87,7 +90,10 @@
             </tr>
             <tr v-for="(i, index) in data.carsInfoList">
               <td v-for="(j, j_index) in i">
-                <div><input type="text" /></div>
+                <div>
+                  <div class="content-box" v-html="data.carsInfoList[index][j_index]"></div>
+                  <input type="text" v-model="data.carsInfoList[index][j_index]" />
+                </div>
               </td>
               <!-- <td><div contenteditable></div></td>
               <td><div contenteditable></div></td>
@@ -137,12 +143,14 @@
             <span>现场勘查人员签名:</span>
             <div>
               <input type="text" v-model="data.explorateSign" />
+              <div class="content-box left">{{ data.clientSign }}</div>
             </div>
           </div>
           <div>
             <span>记录人签名:</span>
             <div>
               <input type="text" v-model="data.reportSign" />
+              <div class="content-box left">{{ data.clientSign }}</div>
             </div>
           </div>
         </div>
@@ -151,12 +159,14 @@
             <span>当事人签名:</span>
             <div>
               <input type="text" v-model="data.clientSign" />
+              <div class="content-box left">{{ data.clientSign }}</div>
             </div>
           </div>
           <div>
             <span>见证人签名:</span>
             <div>
               <input type="text" v-model="data.witnessSign" />
+              <div class="content-box left">{{ data.witnessSign }}</div>
             </div>
           </div>
         </div>
@@ -200,13 +210,30 @@ onMounted(() => {
 });
 </script>
 <style lang="scss" scoped>
+.content-box {
+  width: 100%;
+  height: 100%;
+  display: none;
+  align-items: center;
+  justify-content: center;
+  &.left {
+    justify-content: flex-start;
+  }
+}
 .explorate {
   color: #000;
   width: 100%;
   height: 100%;
 
   font-family: sr, st;
-
+  &.downMode {
+    input {
+      display: none;
+    }
+    .content-box {
+      display: flex;
+    }
+  }
   .title {
     text-align: center;
     margin-bottom: 10px;
@@ -237,7 +264,7 @@ onMounted(() => {
           padding: 0 5px;
           box-sizing: border-box;
           text-align: center;
-          max-width: 11%;
+          // max-width: 11%;
           height: 40px;
           border-right: 1px solid #000;
           border-bottom: 1px solid #000;

+ 67 - 34
src/views/tables/explorate-one.vue

@@ -23,19 +23,22 @@
             <div>勘查单位</div>
             <!-- <div class="input-box" contenteditable v-html="data.explorateCompany"></div> -->
             <div class="input-box">
-              <input type="text" v-model="data.explorateCompany" />
+              <input type="text" style="text-align: center" v-model="data.explorateCompany" />
+              <div class="content-box">{{ data.explorateCompany }}</div>
             </div>
           </div>
           <div class="info">
             <div>勘查时间</div>
             <div class="input-box">
-              <input type="text" v-model="data.explorateTime" />
+              <input type="text" style="text-align: center" v-model="data.explorateTime" />
+              <div class="content-box">{{ data.explorateTime }}</div>
             </div>
           </div>
           <div class="info">
             <div>事故时间</div>
             <div class="input-box">
-              <input type="text" v-model="data.accidentTime" />
+              <input type="text" style="text-align: center" v-model="data.accidentTime" />
+              <div class="content-box">{{ data.accidentTime }}</div>
             </div>
           </div>
           <div class="time">
@@ -51,7 +54,7 @@
                         <div class="item-info-name">技术等级</div>
                         <div class="item-info-box">
                           <div class="item" v-for="(i, index) in technicalLevel.options" @click="checkLevel(technicalLevel, index)">
-                            <ui-icon :type="technicalLevel.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
+                            <ui-icon :type="data.technicalLevel == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
                             <span>{{ i.title }}</span>
                           </div>
                         </div>
@@ -60,10 +63,11 @@
                         <div class="item-info-name">行政等级</div>
                         <div class="item-info-box">
                           <div class="item" v-for="(i, index) in administrativeLevel.options" @click="checkLevel(administrativeLevel, index)">
-                            <ui-icon :type="administrativeLevel.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
+                            <ui-icon :type="data.administrativeLevel.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
                             <span>{{ i.title }}</span>
                             <div class="input-box" style="flex: 1" v-if="i.id == 5">
                               <input type="text" v-model="data.administrativeLevel.value" />
+                              <div class="content-box left border-bottom">{{ data.administrativeLevel.value }}</div>
                             </div>
                           </div>
                         </div>
@@ -76,7 +80,7 @@
                       <div class="item-info">
                         <div class="item-info-box" style="flex-flow: row wrap">
                           <div class="item" v-for="(i, index) in cityRoadList.options" @click="checkLevel(cityRoadList, index)">
-                            <ui-icon :type="cityRoadList.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
+                            <ui-icon :type="data.cityRoad == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
                             <span>{{ i.title }}</span>
                           </div>
                         </div>
@@ -92,7 +96,7 @@
                     <div class="type-item-name">路口</div>
                     <div class="item-msg intersection" style="min-height: 48px; flex-flow: row wrap">
                       <div class="item" v-for="(i, index) in roadSideList.options" @click="checkLevel(roadSideList, index)">
-                        <ui-icon :type="roadSideList.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
+                        <ui-icon :type="data.roadSide == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
                         <span>{{ i.title }}</span>
                       </div>
                     </div>
@@ -101,7 +105,7 @@
                     <div class="type-item-name">路段</div>
                     <div class="item-msg intersection" style="min-height: 60px; flex-flow: row wrap">
                       <div class="item" v-for="(i, index) in roadPartList.options" @click="checkLevel(roadPartList, index)">
-                        <ui-icon :type="roadPartList.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
+                        <ui-icon :type="data.roadPart == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
                         <span>{{ i.title }}</span>
                       </div>
                     </div>
@@ -113,10 +117,12 @@
                 <div class="road-msg">
                   <div class="road-name-text input-box">
                     <input type="text" v-model="data.roadName" />
+                    <div class="content-box left">{{ data.roadName }}</div>
                   </div>
                   <div class="road-num">路号(公路)</div>
                   <div class="road-num-text input-box">
                     <input type="text" v-model="data.roadNum" />
+                    <div class="content-box left">{{ data.roadNum }}</div>
                   </div>
                 </div>
               </div>
@@ -155,10 +161,11 @@
 
             <div style="flex-flow: row wrap">
               <div class="item" v-for="(i, index) in weatherList.options" @click="checkLevel(weatherList, index)">
-                <ui-icon :type="weatherList.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
+                <ui-icon :type="data.weather.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
                 <span>{{ i.title }}</span>
                 <div class="input-box" v-if="i.id == 10">
                   <input type="text" v-model="data.weather.value" />
+                  <div class="content-box left border-bottom">{{ data.weather.value }}</div>
                 </div>
               </div>
             </div>
@@ -171,14 +178,16 @@
                   <span class="info-title">{{ i.title }}</span>
                   <div class="check-box">
                     <div class="check-item" :style="j_index == i.options.length - 1 ? 'flex:1;' : ''" v-for="(j, j_index) in i.options" @click="checkEnvironItem(j, index, j_index)">
-                      <ui-icon :type="i.check == j.id ? 'rb_y' : 'rb_n'"></ui-icon>
+                      <ui-icon :type="data.environments[index].check == j.id ? 'rb_y' : 'rb_n'"></ui-icon>
                       <span>{{ j.name }}</span>
-                      <div class="input-box" v-if="j_index == i.options.length - 1">
+                      <div class="input-box" v-if="j_index == i.options.length - 1 && i.id != 9">
                         <input type="text" v-model="data.environments[index].value" />
+                        <div class="content-box left">{{ data.environments[index].value }}</div>
                       </div>
                     </div>
-                    <div class="input-box" v-if="!i.options.length">
+                    <div class="input-box" style="flex: none; width: 80%" v-if="!i.options.length">
                       <input type="text" v-model="data.environments[index].value" />
+                      <div class="content-box left">{{ data.environments[index].value }}</div>
                     </div>
                   </div>
                   <!-- <div class="input-box" v-if="index == environments.length - 1">
@@ -193,12 +202,14 @@
               <span>现场勘查人员签名:</span>
               <div>
                 <input type="text" v-model="data.explorateSign" />
+                <div class="content-box left">{{ data.explorateSign }}</div>
               </div>
             </div>
             <div>
               <span>记录人签名:</span>
               <div>
                 <input type="text" v-model="data.reportSign" />
+                <div class="content-box left">{{ data.reportSign }}</div>
               </div>
             </div>
           </div>
@@ -207,12 +218,14 @@
               <span>当事人签名:</span>
               <div>
                 <input type="text" v-model="data.clientSign" />
+                <div class="content-box left">{{ data.clientSign }}</div>
               </div>
             </div>
             <div>
               <span>见证人签名:</span>
               <div>
                 <input type="text" v-model="data.witnessSign" />
+                <div class="content-box left">{{ data.witnessSign }}</div>
               </div>
             </div>
           </div>
@@ -246,18 +259,18 @@ const props = defineProps({
 const data = ref(null);
 
 const layoutRef = ref<HTMLDivElement>();
-const downMode = ref(false);
-const getLayoutImage = async () => {
-  downMode.value = true;
-  await nextTick();
-  console.error(layoutRef.value);
-  const canvas = await html2canvas(layoutRef.value);
-  Message.success({ msg: "已保存至相册", time: 2000 });
-  downMode.value = false;
-  const blob = await new Promise<Blob>((resolve) => canvas.toBlob(resolve, "image/jpeg", 0.95));
-  await downloadImage(blob, "12312.jpg");
-  // return await uploadImage(blob);
-};
+// const downMode = ref(false);
+// const getLayoutImage = async () => {
+//   downMode.value = true;
+//   await nextTick();
+//   console.error(layoutRef.value);
+//   const canvas = await html2canvas(layoutRef.value);
+//   Message.success({ msg: "已保存至相册", time: 2000 });
+//   downMode.value = false;
+//   const blob = await new Promise<Blob>((resolve) => canvas.toBlob(resolve, "image/jpeg", 0.95));
+//   await downloadImage(blob, "12312.jpg");
+//   // return await uploadImage(blob);
+// };
 const sceneTypes = ref({
   check: 0,
   type: "explorateType",
@@ -402,6 +415,7 @@ const weatherList = ref({
 const checkEnvironItem = (item, index, j_index) => {
   environments.value[index].check = item.id;
   data.value.environments[index].check = item.id;
+  console.log(item.id)
 };
 const environments = ref([
   {
@@ -509,7 +523,7 @@ const environments = ref([
   },
   {
     id: 10,
-    title: "照明情况:",
+    title: "其他需要记录的情况:",
     value: "",
     check: 0,
     options: [],
@@ -538,6 +552,19 @@ onMounted(() => {
 });
 </script>
 <style lang="scss" scoped>
+.content-box {
+  width: 100%;
+  height: 100%;
+  display: none;
+  align-items: center;
+  justify-content: center;
+  &.left {
+    justify-content: flex-start;
+  }
+  &.border-bottom {
+    border-bottom: 1px solid #000;
+  }
+}
 input {
   width: 100%;
 }
@@ -552,8 +579,14 @@ div {
   // display: grid;
 
   font-family: sr, st;
-
-  // padding: 80px 0 0 0;
+  &.downMode {
+    input {
+      display: none;
+    }
+    .content-box {
+      display: flex;
+    }
+  }
   > div {
     // padding: 20px 50px 30px;
   }
@@ -576,13 +609,13 @@ div {
     }
   }
 
-  &.downMode {
-    width: 1050px;
-    height: 1485px;
-    > div {
-      padding: 125px 100px 75px;
-    }
-  }
+  // &.downMode {
+  //   width: 1050px;
+  //   height: 1485px;
+  //   > div {
+  //     padding: 125px 100px 75px;
+  //   }
+  // }
 }
 
 .wrapper {

+ 49 - 6
src/views/tables/explorate-three.vue

@@ -1,6 +1,6 @@
 <!--  -->
 <template>
-  <div class="explorate" v-if="data">
+  <div class="explorate" v-if="data" :class="{ downMode }">
     <div>
       <h2 class="title">道路交通事故现场勘查笔录(续页)</h2>
 
@@ -10,23 +10,38 @@
 
           <div class="item column">
             <span>(一)地面痕迹:</span>
-            <div><textarea v-model="data.groundTrace" name="" id="" cols="30" rows="10"></textarea></div>
+            <div>
+              <textarea v-model="data.groundTrace" name="" id="" cols="30" rows="10"></textarea>
+              <div class="content-box top-left">{{ data.groundTrace }}</div>
+            </div>
           </div>
           <div class="item column">
             <span>(二)车体痕迹:</span>
-            <div><textarea v-model="data.carTrace" name="" id="" cols="30" rows="10"></textarea></div>
+            <div>
+              <div class="content-box top-left">{{ data.carTrace }}</div>
+              <textarea v-model="data.carTrace" name="" id="" cols="30" rows="10"></textarea>
+            </div>
           </div>
           <div class="item column">
             <span>(三)人体痕迹:</span>
-            <div><textarea v-model="data.bodyTrace" name="" id="" cols="30" rows="10"></textarea></div>
+            <div>
+              <div class="content-box top-left">{{ data.bodyTrace }}</div>
+              <textarea v-model="data.bodyTrace" name="" id="" cols="30" rows="10"></textarea>
+            </div>
           </div>
           <div class="item column">
             <span>(四)物证:</span>
-            <div><textarea v-model="data.meterialEvidence" name="" id="" cols="30" rows="10"></textarea></div>
+            <div>
+              <div class="content-box top-left">{{ data.meterialEvidence }}</div>
+              <textarea v-model="data.meterialEvidence" name="" id="" cols="30" rows="10"></textarea>
+            </div>
           </div>
           <div class="item column">
             <span>(五)其他:</span>
-            <div><textarea v-model="data.other" name="" id="" cols="30" rows="10"></textarea></div>
+            <div>
+              <div class="content-box top-left">{{ data.other }}</div>
+              <textarea v-model="data.other" name="" id="" cols="30" rows="10"></textarea>
+            </div>
           </div>
         </div>
 
@@ -35,12 +50,14 @@
             <span>现场勘查人员签名:</span>
             <div>
               <input type="text" v-model="data.explorateSign" />
+              <div class="content-box left">{{ data.explorateSign }}</div>
             </div>
           </div>
           <div>
             <span>记录人签名:</span>
             <div>
               <input type="text" v-model="data.reportSign" />
+              <div class="content-box left">{{ data.reportSign }}</div>
             </div>
           </div>
         </div>
@@ -49,12 +66,14 @@
             <span>当事人签名:</span>
             <div>
               <input type="text" v-model="data.clientSign" />
+              <div class="content-box left">{{ data.clientSign }}</div>
             </div>
           </div>
           <div>
             <span>见证人签名:</span>
             <div>
               <input type="text" v-model="data.witnessSign" />
+              <div class="content-box left">{{ data.witnessSign }}</div>
             </div>
           </div>
         </div>
@@ -97,6 +116,21 @@ onMounted(() => {
 });
 </script>
 <style lang="scss" scoped>
+.content-box {
+  width: 100%;
+  height: 100%;
+  display: none;
+  align-items: center;
+  justify-content: center;
+  word-break: break-all;
+  &.left {
+    justify-content: flex-start;
+  }
+  &.top-left {
+    align-items: flex-start;
+    justify-content: flex-start;
+  }
+}
 .explorate {
   color: #000;
   width: 100%;
@@ -104,6 +138,15 @@ onMounted(() => {
   // display: grid;
 
   font-family: sr, st;
+  &.downMode {
+    input,
+    textarea {
+      display: none;
+    }
+    .content-box {
+      display: flex;
+    }
+  }
 
   // padding: 80px 0 0 0;
   > div {

+ 44 - 9
src/views/tables/explorate-two.vue

@@ -36,18 +36,24 @@
           <div class="item">
             <span>受伤:(</span>
             <div style="min-width: 10px">
-              <input style="width: 30px" type="text" />
-              <div class="content-box"></div>
+              <input style="width: 30px" type="text" v-model="data.hurtNum" />
+              <div class="content-box">{{ data.hurtNum }}</div>
             </div>
             <span>)人。</span>
           </div>
           <div class="item column">
             <span>伤亡人员去向:</span>
-            <div style="height: 60px; width: 100%" contenteditable></div>
+            <div style="min-height: 60px; width: 100%">
+              <textarea style="height: 60px;" v-model="data.hurtDieGo" name="" id="" cols="30" rows="10"></textarea>
+              <div class="content-box top-left">{{ data.hurtDieGo }}</div>
+            </div>
           </div>
           <div class="item column">
             <span>其他需求说明的情况:</span>
-            <div style="height: 60px; width: 100%" contenteditable></div>
+            <div style="min-height: 60px; width: 100%">
+              <textarea style="height: 60px;" v-model="data.desc" name="" id="" cols="30" rows="10"></textarea>
+              <div class="content-box top-left">{{ data.desc }}</div>
+            </div>
           </div>
           <p>(二)救援简要情况:</p>
 
@@ -117,21 +123,33 @@
         <div class="sign-box">
           <div>
             <span>现场勘查人员签名:</span>
-            <div><input type="text" v-model="data.explorateSign" /></div>
+            <div>
+              <input type="text" v-model="data.explorateSign" />
+              <div class="content-box left">{{ data.explorateSign }}</div>
+            </div>
           </div>
           <div>
             <span>记录人签名:</span>
-            <div><input type="text" v-model="data.reportSign" /></div>
+            <div>
+              <input type="text" v-model="data.reportSign" />
+              <div class="content-box left">{{ data.reportSign }}</div>
+            </div>
           </div>
         </div>
         <div class="sign-box">
           <div>
             <span>当事人签名:</span>
-            <div><input type="text" v-model="data.clientSign" /></div>
+            <div>
+              <input type="text" v-model="data.clientSign" />
+              <div class="content-box left">{{ data.clientSign }}</div>
+            </div>
           </div>
           <div>
             <span>见证人签名:</span>
-            <div><input type="text" v-model="data.witnessSign" /></div>
+            <div>
+              <input type="text" v-model="data.witnessSign" />
+              <div class="content-box left">{{ data.witnessSign }}</div>
+            </div>
           </div>
         </div>
       </div>
@@ -241,6 +259,10 @@ div[contenteditable] {
   &.left {
     justify-content: flex-start;
   }
+  &.top-left {
+    align-items: flex-start;
+    justify-content: flex-start;
+  }
 }
 .explorate {
   color: #000;
@@ -249,7 +271,15 @@ div[contenteditable] {
   // display: grid;
 
   font-family: sr, st;
-
+  &.downMode {
+    input,
+    textarea {
+      display: none;
+    }
+    .content-box {
+      display: flex;
+    }
+  }
   // padding: 80px 0 0 0;
   > div {
     // padding: 20px 50px 30px;
@@ -352,6 +382,11 @@ div[contenteditable] {
           > div {
             outline: none;
             height: 100%;
+            textarea {
+              height: 100%;
+              width: 100%;
+              resize: none;
+            }
           }
         }
         > div {

+ 2 - 1
src/views/tables/index.vue

@@ -176,11 +176,12 @@ const getLayoutImage = async () => {
     eleList.value.forEach(async (element, index) => {
       let ele = document.getElementById(`layoutRef${index}`);
       const canvas = await html2canvas(ele);
-      Message.success({ msg: "已保存至相册", time: 2000 });
+
       const blob = await new Promise<Blob>((resolve) => {
         return canvas.toBlob(resolve, "image/jpeg", 0.95);
       });
       await downloadImage(blob, `tables_${index}.jpg`);
+            Message.success({ msg: "已保存至相册", time: 2000 });
       num++;
 
       if (num == eleList.value.length) {

+ 60 - 9
src/views/tables/write/doc.vue

@@ -17,21 +17,31 @@
     </div>
   </div>
 
-  <div class="bottom-name">
+  <div class="bottom-name" :class="{ downMode }" v-if="data">
     <span v-if="type == '1'">被询问人:</span>
     <span v-else>被讯问人:</span>
-    <div style="flex: 1" contenteditable></div>
+    <div style="flex: 1">
+      <input type="text" v-model="data.askerBys" />
+      <div class="content-box left">{{ data.askerBys }}</div>
+    </div>
   </div>
 </template>
 
 <script setup>
-import { reactive, ref, toRefs, onBeforeMount, onMounted, nextTick, defineProps, defineEmits } from 'vue';
-import { router } from '@/router';
-
+import { reactive, ref, toRefs, onBeforeMount, onMounted, nextTick, defineProps, defineEmits } from "vue";
+import { router } from "@/router";
+import { tables } from "@/store/tables";
+import { tablesInfo, setData } from "../data";
+const data = ref(null);
 const props = defineProps({
+  downMode: {
+    type: Boolean,
+    default: false,
+  },
+  isDownloadShow: { type: Boolean, default: false },
   text: {
     type: String,
-    default: '',
+    default: "",
   },
   page: {
     type: Number,
@@ -42,12 +52,13 @@ const props = defineProps({
     default: 1,
   },
 });
-const emits = defineEmits(['goWrite']);
+
+const emits = defineEmits(["goWrite"]);
 const type = ref(router.currentRoute.value.query.type);
 const lineCount = ref(1);
 const inputHeight = ref(0);
 const getLineCount = () => {
-  let containerH = document.getElementById('view-container').clientHeight;
+  let containerH = document.getElementById("view-container").clientHeight;
   let count = Math.floor(containerH / 40);
   lineCount.value = count;
   inputHeight.value = count * 40;
@@ -57,15 +68,44 @@ const getLineCount = () => {
 const goWrite = () => {
   let text = window.getSelection();
   let textIndex = text.anchorOffset;
-  emits('goWrite', { textIndex });
+  emits("goWrite", { textIndex });
 };
 
 onMounted(async () => {
   await nextTick();
   getLineCount();
+
+  if (props.isDownloadShow) {
+  } else {
+    if (type.value == "1") {
+      setData("askOne");
+    } else {
+      setData("askTwo");
+    }
+  }
+  if (type.value == "1") {
+    if (tablesInfo.askOne) {
+      data.value = tablesInfo.askOne;
+    }
+  } else {
+    if (tablesInfo.askTwo) {
+      data.value = tablesInfo.askTwo;
+    }
+    console.error(tablesInfo);
+  }
 });
 </script>
 <style lang="scss" scoped>
+.content-box {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  &.left {
+    justify-content: flex-start;
+  }
+}
 div[contenteditable] {
   outline: none;
 }
@@ -77,6 +117,17 @@ div[contenteditable] {
   display: flex;
   font-size: 24px;
   font-family: SimSun-Regular, SimSun;
+  .content-box {
+    display: none;
+  }
+  &.downMode {
+    input {
+      display: none;
+    }
+    .content-box {
+      display: flex;
+    }
+  }
 }
 .num-box {
   display: flex;