Ver código fonte

沙盘图bug+来源水印去除

hbchen 11 meses atrás
pai
commit
c0ae29490a

+ 6 - 6
src/views/ppt_manage/newVersion/pptEditor.vue

@@ -152,7 +152,7 @@
                     <div v-for="(item,index) in sandTableList" :key="index" class="sandTable-item" >
                       <p class="chart_tit">{{item.Name}}</p>
                       <img :src="item.PicUrl" style="width:100%;-webkit-user-drag:none;"  @click="chooseChart(item,'sandImage')"/>
-                      <p class="source-identification">来源:弘则研究</p>
+                      <!-- <p class="source-identification">来源:弘则研究</p> -->
                     </div>
                     <div v-loading = "sandTableLoading" class="loaded-text">{{loadedText}}</div>
                   </template>
@@ -1511,11 +1511,11 @@ $titleColor:#333333;
                     img{
                       cursor: pointer;
                     }
-                    .source-identification{
-                      color: #000;
-                      text-align: left;
-                      padding-left: 12px;
-                    }
+                    // .source-identification{
+                    //   color: #000;
+                    //   text-align: left;
+                    //   padding-left: 12px;
+                    // }
                   }
                   .loaded-text{
                       height: 20px;

+ 6 - 6
src/views/ppt_manage/newVersion/pptEnEditor.vue

@@ -153,7 +153,7 @@
                     <div v-for="(item,index) in sandTableList" :key="index" class="sandTable-item" >
                       <p class="chart_tit">{{item.Name}}</p>
                       <img :src="item.PicUrl" style="width:100%"  @click="chooseChart(item,'sandImage')"/>
-                      <p class="source-identification">来源:弘则研究</p>
+                      <!-- <p class="source-identification">来源:弘则研究</p> -->
                     </div>
                     <div v-loading = "sandTableLoading" class="loaded-text">{{loadedText}}</div>
                   </template>
@@ -1489,11 +1489,11 @@ $titleColor:#333333;
                     img{
                       cursor: pointer;
                     }
-                    .source-identification{
-                      color: #000;
-                      text-align: left;
-                      padding-left: 12px;
-                    }
+                    // .source-identification{
+                    //   color: #000;
+                    //   text-align: left;
+                    //   padding-left: 12px;
+                    // }
                   }
                   .loaded-text{
                       height: 20px;

+ 4 - 4
src/views/report_manage/addreportNew.vue

@@ -262,7 +262,7 @@
 									:id="'sandTable' + index"
 									@click="insertHtml(item,'image')"
 								/>
-								<p class="source-identification">来源:弘则研究</p>
+								<!-- <p class="source-identification">来源:弘则研究</p> -->
 							</div>
 						</template>
 						<tableNoData text="暂无数据" size="mini" v-else/>
@@ -982,9 +982,9 @@ export default {
 				width: 100%;
 				height: auto;
 			}
-			.source-identification{
-				text-align: left;
-			}
+			// .source-identification{
+			// 	text-align: left;
+			// }
 		}
 		.loaded-text{
 			height: 20px;

+ 4 - 4
src/views/report_manage/editChapterReport.vue

@@ -241,7 +241,7 @@
                 :id="'sandTable' + index"
                 @click="insertHtml(item, 'image')"
               />
-              <p class="source-identification">来源:弘则研究</p>
+              <!-- <p class="source-identification">来源:弘则研究</p> -->
             </div>
             </template>
             <tableNoData text="暂无数据" size="mini" v-else/>
@@ -952,9 +952,9 @@ export default {
         width: 100%;
         height: auto;
       }
-      .source-identification {
-        text-align: left;
-      }
+      // .source-identification {
+      //   text-align: left;
+      // }
     }
     .loaded-text {
       height: 20px;

+ 4 - 4
src/views/report_manage/editreportNew.vue

@@ -260,7 +260,7 @@
 									:id="'sandTable' + index"
 									@click="insertHtml(item,'image')"
 								/>
-								<p class="source-identification">来源:弘则研究</p>
+								<!-- <p class="source-identification">来源:弘则研究</p> -->
 							</div>
 						</template>
 						<tableNoData text="暂无数据" size="mini" v-else/>
@@ -966,9 +966,9 @@ export default {
 				width: 100%;
 				height: auto;
 			}
-			.source-identification{
-				text-align: left;
-			}
+			// .source-identification{
+			// 	text-align: left;
+			// }
 		}
 		.loaded-text{
 			height: 20px;

+ 4 - 4
src/views/report_manage/reportEn/reportEditor.vue

@@ -265,7 +265,7 @@
 									:id="'sandTable' + index"
 									@click="insertHtml(item,'image')"
 								/>
-								<p class="source-identification">来源:弘则研究</p>
+								<!-- <p class="source-identification">来源:弘则研究</p> -->
 							</div>
 						</template>
 						<tableNoData text="暂无数据" size="mini" v-else/>
@@ -1033,9 +1033,9 @@ export default {
 				width: 100%;
 				height: auto;
 			}
-			.source-identification{
-				text-align: left;
-			}
+			// .source-identification{
+			// 	text-align: left;
+			// }
 		}
 		.loaded-text{
 			height: 20px;

+ 4 - 4
src/views/sandbox_manage/common/edge.js

@@ -34,8 +34,8 @@ export const myEdgeOption = (type,xP=0,yP=0) => {
         strokeDasharray:null,
         stroke: styleConfig.lineColor,
         strokeWidth: line.width,
-        sourceMarker: {},//起始箭头 
-        targetMarker: {},//终止箭头
+        sourceMarker: '',//起始箭头 
+        targetMarker: '',//终止箭头
       }
     }
   }
@@ -49,8 +49,8 @@ export const myEdgeOption = (type,xP=0,yP=0) => {
         strokeDasharray:null,
         stroke: styleConfig.lineColor,
         strokeWidth: line.width,
-        sourceMarker: {},//起始箭头 
-        targetMarker: {},//终止箭头
+        sourceMarker: '',//起始箭头 
+        targetMarker: '',//终止箭头
       }
     }
   }

+ 23 - 23
src/views/sandbox_manage/index_new_version.vue

@@ -80,9 +80,9 @@
             <img src="~@/assets/img/sand_new/copy.png" />
             <span>复制</span> 
           </div>
-          <div class="chartHead-options-button" @click="deleteHandle(viewSandbox,'inchart')">
+          <div class="chartHead-options-button" @click="deleteHandle(viewSandbox,'inchart')" v-permission="permissionBtn.sandboxPermission.sandbox_del">
             <img src="~@/assets/img/sand_new/remove.png" />
-            <span style="color: red;" v-permission="permissionBtn.sandboxPermission.sandbox_del">删除</span> 
+            <span style="color: red;" >删除</span> 
           </div>
         </div>
       </div>
@@ -1076,16 +1076,16 @@ import { myGraph } from './common/gragh';
             },{
               preserveDimensions:true,//让svg为实际图片大小
               beforeSerialize:(svg)=>{
-                const zoom = this.graph.zoom();
+                // const zoom = this.graph.zoom();
                 const {x,y,width,height} = this.graph.getContentBBox(cells)
-                let {tx,ty} = this.graph.translate() // 画布偏移量
+                // let {tx,ty} = this.graph.translate() // 画布偏移量
                 //给导出的svg增加一点宽高
-                svg.setAttribute('width',width+60*zoom)
-                svg.setAttribute('height',height+60*zoom) 
+                svg.setAttribute('width',width+60)
+                svg.setAttribute('height',height+60) 
                 //设置viewBox使图像居中
-                svg.setAttribute('viewBox',`${x-30*zoom} ${y-30*zoom} ${width+60*zoom} ${height+60*zoom}`)
-                // 在图表右下方 加上"来源:弘则研究"字样
-                let gNode = svg.getElementsByClassName('x6-graph-svg-viewport')[0]
+                svg.setAttribute('viewBox',`${x-30} ${y-30} ${width+60} ${height+60}`)
+                // // 在图表右下方 加上"来源:弘则研究"字样
+                // let gNode = svg.getElementsByClassName('x6-graph-svg-viewport')[0]
                 // 去掉不该截图的添加图标
                 let leftImg = svg.getElementsByClassName('left-topic-image')
                 for (let i = 0; i < leftImg.length; i++) {
@@ -1099,13 +1099,13 @@ import { myGraph } from './common/gragh';
                   element.parentElement.removeChild(element)
                   i--
                 }
-                let textNode = document.createElement('text')
-                textNode.setAttribute('x',(x-tx+width)/zoom-85)
-                textNode.setAttribute('y',(y-ty+height)/zoom+27)
-                textNode.setAttribute('font-size','16px')
-                textNode.setAttribute('font-style','italic')
-                textNode.innerText = '来源:弘则研究'
-                gNode.appendChild(textNode)
+                // let textNode = document.createElement('text')
+                // textNode.setAttribute('x',(x-tx+width)/zoom-85)
+                // textNode.setAttribute('y',(y-ty+height)/zoom+27)
+                // textNode.setAttribute('font-size','16px')
+                // textNode.setAttribute('font-style','italic')
+                // textNode.innerText = '来源:弘则研究'
+                // gNode.appendChild(textNode)
                   },
               copyStyles:false,
               stylesheet: `
@@ -1200,13 +1200,13 @@ import { myGraph } from './common/gragh';
             element.parentElement.removeChild(element)
             i--
           }
-          let textNode = document.createElement('text')
-          textNode.setAttribute('x',x-tx+width-90)
-          textNode.setAttribute('y',y-ty+height+22)
-          textNode.setAttribute('font-size','16px')
-          textNode.setAttribute('font-style','italic')
-          textNode.innerText = '来源:弘则研究'
-          gNode.appendChild(textNode)
+          // let textNode = document.createElement('text')
+          // textNode.setAttribute('x',x-tx+width-90)
+          // textNode.setAttribute('y',y-ty+height+22)
+          // textNode.setAttribute('font-size','16px')
+          // textNode.setAttribute('font-style','italic')
+          // textNode.innerText = '来源:弘则研究'
+          // gNode.appendChild(textNode)
             },
         copyStyles:false,
         stylesheet: `

+ 17 - 17
src/views/sandbox_manage/sandFlow/index.vue

@@ -38,7 +38,7 @@
 			<div class="flow-wrapper">
 				<div id="flow-container"></div>
 
-				<div class="flow-source">来源:弘则研究</div>
+				<!-- <div class="flow-source">来源:弘则研究</div> -->
 
 				<!-- 右键菜单 -->
 				<div class="contextMenu-wrapper" id="contextMenu-wrapper" @mouseleave="hideContextMenu">
@@ -224,14 +224,14 @@ export default {
 					//设置viewBox使图像居中
 					svg.setAttribute('viewBox',`${x-25} ${y-25} ${width+50} ${height+50}`)
 					// 在图表右下方 加上"来源:弘则研究"字样
-					let gNode = svg.getElementsByClassName('x6-graph-svg-viewport')[0]
-					let textNode = document.createElement('text')
-					textNode.setAttribute('x',x-tx+width-90)
-					textNode.setAttribute('y',y-ty+height+22)
-					textNode.setAttribute('font-size','16px')
-					textNode.setAttribute('font-style','italic')
-					textNode.innerText = '来源:弘则研究'
-					gNode.appendChild(textNode)
+					// let gNode = svg.getElementsByClassName('x6-graph-svg-viewport')[0]
+					// let textNode = document.createElement('text')
+					// textNode.setAttribute('x',x-tx+width-90)
+					// textNode.setAttribute('y',y-ty+height+22)
+					// textNode.setAttribute('font-size','16px')
+					// textNode.setAttribute('font-style','italic')
+					// textNode.innerText = '来源:弘则研究'
+					// gNode.appendChild(textNode)
         		},
 				copyStyles:false,
 				stylesheet: `
@@ -316,14 +316,14 @@ export default {
 					svg.setAttribute('height',height+50) 
 					//设置viewBox使图像居中
 					svg.setAttribute('viewBox',`${x-25} ${y-25} ${width+50} ${height+50}`)
-					let gNode = svg.getElementsByClassName('x6-graph-svg-viewport')[0]
-					let textNode = document.createElement('text')
-					textNode.setAttribute('x',x-tx+width-90)
-					textNode.setAttribute('y',y-ty+height+22)
-					textNode.setAttribute('font-size','16px')
-					textNode.setAttribute('font-style','italic')
-					textNode.innerText = '来源:弘则研究'
-					gNode.appendChild(textNode)
+					// let gNode = svg.getElementsByClassName('x6-graph-svg-viewport')[0]
+					// let textNode = document.createElement('text')
+					// textNode.setAttribute('x',x-tx+width-90)
+					// textNode.setAttribute('y',y-ty+height+22)
+					// textNode.setAttribute('font-size','16px')
+					// textNode.setAttribute('font-style','italic')
+					// textNode.innerText = '来源:弘则研究'
+					// gNode.appendChild(textNode)
         		},
 				copyStyles:false,
 				stylesheet: `

+ 24 - 23
src/views/sandbox_manage/sandFlowNew/index.vue

@@ -386,7 +386,7 @@
                   <el-dropdown-item command="classic" :class="styleOptions.startArrow=='classic'?'style-acitve':''">
                   </el-dropdown-item>
-                  <el-dropdown-item :command="{}" :class="typeof(styleOptions.startArrow)=='string' || styleOptions.startArrow.name?'':'style-acitve'">
+                  <el-dropdown-item command="" :class="styleOptions.startArrow?'':'style-acitve'">
                   </el-dropdown-item>
                 </el-dropdown-menu>
@@ -412,7 +412,7 @@
                   <el-dropdown-item command="classic" :class="styleOptions.endArrow=='classic'?'style-acitve':''">
                   </el-dropdown-item>
-                  <el-dropdown-item :command="{}" :class="typeof(styleOptions.endArrow)=='string' || styleOptions.endArrow.name?'':'style-acitve'">
+                  <el-dropdown-item command="" :class="styleOptions.endArrow?'':'style-acitve'">
                   </el-dropdown-item>
                 </el-dropdown-menu>
@@ -838,6 +838,7 @@ import { svgToBase64 } from '@/utils/svgToblob'
       // });
     },
     beforeDestroy(){
+      clearInterval(this.loopTimer)
       document.getElementById('sand-mainBody-chart').removeEventListener("dragover",this.edgeDragover)
       document.getElementById('sand-mainBody-chart').removeEventListener("drop",this.edgeDrop)
       this.popoverDom.removeEventListener('mouseenter',this.clearPopoverTimeout)
@@ -1274,13 +1275,13 @@ import { svgToBase64 } from '@/utils/svgToblob'
             }
             // console.log(leftImg,rightImg,'rightImg');
 
-            let textNode = document.createElement('text')
-            textNode.setAttribute('x',x-tx+width-90)
-            textNode.setAttribute('y',y-ty+height+22)
-            textNode.setAttribute('font-size','16px')
-            textNode.setAttribute('font-style','italic')
-            textNode.innerText = '来源:弘则研究'
-            gNode.appendChild(textNode)
+            // let textNode = document.createElement('text')
+            // textNode.setAttribute('x',x-tx+width-90)
+            // textNode.setAttribute('y',y-ty+height+22)
+            // textNode.setAttribute('font-size','16px')
+            // textNode.setAttribute('font-style','italic')
+            // textNode.innerText = '来源:弘则研究'
+            // gNode.appendChild(textNode)
               },
           copyStyles:false,
           stylesheet: `
@@ -1361,16 +1362,16 @@ import { svgToBase64 } from '@/utils/svgToblob'
         },{
           preserveDimensions:true,//让svg为实际图片大小
           beforeSerialize:(svg)=>{
-            const zoom = this.graph.zoom();
+            // const zoom = this.graph.zoom();
             const {x,y,width,height} = this.graph.getContentBBox(cells)
-            let {tx,ty} = this.graph.translate() // 画布偏移量
+            // let {tx,ty} = this.graph.translate() // 画布偏移量
             //给导出的svg增加一点宽高
-            svg.setAttribute('width',width+60*zoom)
-            svg.setAttribute('height',height+60*zoom) 
+            svg.setAttribute('width',width+60)
+            svg.setAttribute('height',height+60) 
             //设置viewBox使图像居中
-            svg.setAttribute('viewBox',`${x-30*zoom} ${y-30*zoom} ${width+60*zoom} ${height+60*zoom}`)
-            // 在图表右下方 加上"来源:弘则研究"字样
-            let gNode = svg.getElementsByClassName('x6-graph-svg-viewport')[0]
+            svg.setAttribute('viewBox',`${x-30} ${y-30} ${width+60} ${height+60}`)
+            // // 在图表右下方 加上"来源:弘则研究"字样
+            // let gNode = svg.getElementsByClassName('x6-graph-svg-viewport')[0]
             // 去掉不该截图的添加图标
             let leftImg = svg.getElementsByClassName('left-topic-image')
             for (let i = 0; i < leftImg.length; i++) {
@@ -1384,13 +1385,13 @@ import { svgToBase64 } from '@/utils/svgToblob'
               element.parentElement.removeChild(element)
               i--
             }
-            let textNode = document.createElement('text')
-            textNode.setAttribute('x',(x-tx+width)/zoom-85)
-            textNode.setAttribute('y',(y-ty+height)/zoom+27)
-            textNode.setAttribute('font-size','16px')
-            textNode.setAttribute('font-style','italic')
-            textNode.innerText = '来源:弘则研究'
-            gNode.appendChild(textNode)
+            // let textNode = document.createElement('text')
+            // textNode.setAttribute('x',(x-tx+width)/zoom-85)
+            // textNode.setAttribute('y',(y-ty+height)/zoom+27)
+            // textNode.setAttribute('font-size','16px')
+            // textNode.setAttribute('font-style','italic')
+            // textNode.innerText = '来源:弘则研究'
+            // gNode.appendChild(textNode)
               },
           copyStyles:false,
           stylesheet: `

+ 6 - 6
src/vuex/modules/sand.js

@@ -21,8 +21,8 @@ const setSandboxToolStatus=(state,payload)=>{
 			lineStyle:null,
 			lineWidth:2,
 			connectStyle:1,
-			startArrow:{},
-			endArrow:{}
+			startArrow:'',
+			endArrow:''
 		}
 		return 
 	}else{
@@ -107,9 +107,9 @@ const setSandboxToolStatus=(state,payload)=>{
 		// 设置connectStyle回显
 		state.styleOptions.connectStyle=connectStyleSet.size==1?Array.from(connectStyleSet)[0]:1
 		// 设置sourceMarker回显
-		state.styleOptions.startArrow=startArrowSet.size==1?Array.from(startArrowSet)[0]||{}:{}
+		state.styleOptions.startArrow=startArrowSet.size==1?Array.from(startArrowSet)[0]||'':''
 		// 设置targetMarker回显
-		state.styleOptions.endArrow=endArrowSet.size==1?Array.from(endArrowSet)[0]||{}:{}
+		state.styleOptions.endArrow=endArrowSet.size==1?Array.from(endArrowSet)[0]||'':''
 	}
 }
 
@@ -153,8 +153,8 @@ const sand = {
 			lineStyle:null,
 			lineWidth:2,
 			connectStyle:1,
-			startArrow:{},
-			endArrow:{}
+			startArrow:'',
+			endArrow:''
 		},
 		selectCells:[]
 	}),