Browse Source

Merge branch 'debug' of http://8.136.199.33:3000/eta_gn_front/eta_front into debug

ldong 4 months ago
parent
commit
165558472e

BIN
src/assets/img/sand_new/blue_edit_icon.png


+ 2 - 1
src/views/ppt_manage/mixins/pptMixins.js

@@ -26,6 +26,7 @@ import FormatTen from '../newVersion/components/formatPage/FormatTen.vue';
 import FormatEle from '../newVersion/components/formatPage/FormatEle.vue';
 import FormatTwelve from '../newVersion/components/formatPage/FormatTwelve.vue';
 import FormatThirteen from '../newVersion/components/formatPage/FormatThirteen.vue';
+import FormatFourteen from '../newVersion/components/formatPage/FormatFourteen.vue';
 const chunkArray = (array, chunkSize)=>{
     let result = [];
     for (let i = 0; i < array.length; i += chunkSize) {
@@ -35,7 +36,7 @@ const chunkArray = (array, chunkSize)=>{
 }
 export default {
   components:{ FormatOne,FormatTwo,FormatThree,
-    FormatFour,FormatFive,FormatSix,FormatSeven,FormatEight,FormatNine,FormatTen,FormatEle,FormatTwelve,FormatThirteen},
+    FormatFour,FormatFive,FormatSix,FormatSeven,FormatEight,FormatNine,FormatTen,FormatEle,FormatTwelve,FormatThirteen,FormatFourteen},
   computed: {
     globalLang() { //全局语言版本 中文ppt可用 英文ppt固定en忽视
       return this.$store.state.lang

+ 3 - 1
src/views/ppt_manage/newVersion/components/editor/AddFormat.vue

@@ -37,6 +37,7 @@ import FormatPreTen from "@/views/ppt_manage/newVersion/components/formatPreview
 import FormatPreEle from "@/views/ppt_manage/newVersion/components/formatPreview/FormatPreEle";
 import FormatPreTwelve from "@/views/ppt_manage/newVersion/components/formatPreview/FormatPreTwelve";
 import FormatPreThirteen from "@/views/ppt_manage/newVersion/components/formatPreview/FormatPreThirteen";
+import FormatPreFourteen from "@/views/ppt_manage/newVersion/components/formatPreview/FormatPreFourteen";
 import {countComponentName} from '@/views/ppt_manage/newVersion/utils/untils';
 export default {
   name: "AddFormat",
@@ -59,7 +60,8 @@ export default {
     FormatPreTen,
     FormatPreEle,
     FormatPreTwelve,
-    FormatPreThirteen
+    FormatPreThirteen,
+    FormatPreFourteen
   },
   data() {
     return {

+ 2 - 2
src/views/ppt_manage/newVersion/components/formatPage/FormatEle.vue

@@ -28,7 +28,7 @@
                     @getText="getText($event,4)" />
             </div>
         </div>
-        <div class="wrap-full-bottom bottom-15 flex-center"
+        <div class="wrap-full-bottom bottom-ele-15 flex-center"
             :style="pageItem.layers&&!isLayerShow()?TypeName(5)==='ChartEl'?'z-index:5':'z-index:3':''">
             <component :data-position="5" :is="TypeName(5)" :ref="RefName(5)" :index="pageIndex" :position="5"
                 :item="Item(5)" @dragstart.native="onDragStart" @dragover.native="onDragOver" @drop.native="onDrop"
@@ -73,7 +73,7 @@
 <style scoped lang="scss">
 .format-ele{
     .line{
-        height: 41%;
+        height: 35%;
         .line-item{
             width: 50%;
         }

+ 11 - 2
src/views/ppt_manage/newVersion/components/formatPage/FormatFour.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="total-wrap" :style="{'pointer-events' :isPreview?'none':'auto'}">
+  <div class="total-wrap format-four" :style="{'pointer-events' :isPreview?'none':'auto'}">
       <div class="wrap-full-left-half top flex-center" :style="pageItem.layers&&!isLayerShow()?TypeName(1)==='ChartEl'?'z-index:5':'z-index:3':''">
         <component
           :data-position="1"
@@ -42,7 +42,7 @@
           @getText="getText($event,3)"
         ></component>
       </div>
-      <div class="wrap-full-right-half bottom flex-center" :style="pageItem.layers&&!isLayerShow()?TypeName(4)==='ChartEl'?'z-index:5':'z-index:3':''">
+      <div class="wrap-full-right-half four-bottom bottom flex-center" :style="pageItem.layers&&!isLayerShow()?TypeName(4)==='ChartEl'?'z-index:5':'z-index:3':''">
         <component
           :data-position="4"
           :is="TypeName(4)"
@@ -103,4 +103,13 @@ export default {
 </script>
 
 <style scoped lang="scss">
+.format-four {
+  .top {
+    height: 40%;
+  }
+  .bottom {
+    top: 40%;
+    height: 60%;
+  }
+}
 </style>

+ 93 - 0
src/views/ppt_manage/newVersion/components/formatPage/FormatFourteen.vue

@@ -0,0 +1,93 @@
+<template>
+  <div class="total-wrap" :style="{'pointer-events' :isPreview?'none':'auto'}">
+      <div class="wrap-full-left-half top flex-center" :style="pageItem.layers&&!isLayerShow()?TypeName(1)==='ChartEl'?'z-index:5':'z-index:3':''">
+        <component
+          :data-position="1"
+          :is="TypeName(1)"
+          :ref="RefName(1)"
+          :index="pageIndex"
+          :position="1"
+          :item="Item(1)"
+          @dragstart.native="onDragStart"
+          @dragover.native="onDragOver"
+          @drop.native="onDrop"
+          @getText="getText($event,1)"
+        ></component>
+      </div>
+      <div class="wrap-full-left-half bottom flex-center" :style="pageItem.layers&&!isLayerShow()?TypeName(2)==='ChartEl'?'z-index:5':'z-index:3':''">
+        <component
+          :data-position="2"
+          :is="TypeName(2)"
+          :ref="RefName(2)"
+          :index="pageIndex"
+          :position="2"
+          :item="Item(2)"
+          @dragstart.native="onDragStart"
+          @dragover.native="onDragOver"
+          @drop.native="onDrop"
+          @getText="getText($event,2)"
+        ></component>
+      </div>
+   <!--  </div> -->
+    <div class="wrap-full-right fourteen-right flex-center" :style="{'z-index':pageItem.layers&&!isLayerShow()?TypeName(3)==='ChartEl'?'5':'3':'auto'}">
+        <component
+          :data-position="3"
+          :is="TypeName(3)"
+          :ref="RefName(3)"
+          :index="pageIndex"
+          :position="3"
+          :item="Item(3)"
+          @dragstart.native="onDragStart"
+          @dragover.native="onDragOver"
+          @drop.native="onDrop"
+          @getText="getText($event,3)"
+        ></component>
+    </div>
+    <!-- 图层编辑模式 -->
+    <div class="layers" :id="`layers_${pageItem.id}`"
+        v-if="isLayerShow()" @click.stop="clickLayer" @contextmenu.stop="showLayerContentMenu">
+      <template v-for="item in pageItem.layers">
+        <component
+          :is="getLayerElName(item)"
+          :key="item.id"
+          :elementInfo="item"
+          :isActive="item.id===activeLayerEl.id&&!isClickLayer"
+          :isLayerEdit="true"
+          @click.stop.native="changeActEl(item)"
+          @chooseThis="changeActEl(item)"
+          v-on="$listeners"
+        ></component>
+      </template>
+    </div>
+    <!-- 非图层编辑模式 -->
+    <template v-else>
+      <template v-for="item in pageItem.layers">
+        <component
+          :is="getLayerElName(item)"
+          :key="item.id"
+          :elementInfo="item"
+          :isActive="false"
+          :isLayerEdit="false"
+        ></component>
+      </template>
+    </template>
+  </div>
+</template>
+
+<script>
+import mixin from "./mixins";
+import {defaultPosition} from "../../utils/config";
+export default {
+  name: "formatFourteen",
+  mixins: [mixin],
+  data(){
+    return {
+      modelId:14,
+      positionInfo:defaultPosition[14]
+    }
+  },
+};
+</script>
+
+<style scoped lang="scss">
+</style>

+ 24 - 0
src/views/ppt_manage/newVersion/components/formatPreview/FormatPreFourteen.vue

@@ -0,0 +1,24 @@
+<template>
+  <div class="format-pre-wrap flex-center">
+    <div class="half-left flex-center">
+      <img class="half-top" src="~@/assets/img/ppt_m/format-pic.png" />
+      <img class="half-bottom" src="~@/assets/img/ppt_m/format-pic.png" />
+    </div>
+    <div class="half-right flex-center">
+      <div class="full text"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "formatPreFourteen",
+  data() {
+    return {};
+  },
+  methods: {},
+};
+</script>
+
+<style scoped lang="scss">
+</style>

+ 1 - 1
src/views/ppt_manage/newVersion/css/common.scss

@@ -14,7 +14,7 @@ $titleColor:#333333;
     .mce-content-body{
         width: 100%;
         height: 100%;
-        padding: 10px;
+        padding: 5px;
         box-sizing: border-box;
         font-size: 16px;
         &:focus-visible{

+ 27 - 0
src/views/ppt_manage/newVersion/css/format.scss

@@ -358,6 +358,14 @@ $marginTop:14%;
         .chart-bottom-insruction-info,.chart-source{
             top:90%;
         }
+
+        // 板式14文本框加高
+        &.fourteen-right {
+          .editor-wrap {
+              width: 90%;
+              height: 90%;
+          }
+        }
     }
 
     //版式8 9 13
@@ -525,6 +533,14 @@ $marginTop:14%;
             top:0;
             right:2.5%;
         }
+
+        //板式4文本框加高度
+        &.four-bottom {
+          .editor-wrap {
+            width: 90%;
+            height: 90%;
+          }
+        }
       }
       .editor-wrap {
         width: 90%;
@@ -572,6 +588,17 @@ $marginTop:14%;
                 top:80%;
             }
         }
+
+        //十一板式底部加高
+        .bottom-ele-15{
+            height: 28%;
+            .chart-bottom-insruction-info,.chart-source{
+                top:80%;
+            }
+            .editor-wrap {
+              width: 95%;
+            }
+        }
     }
 
 }

+ 10 - 5
src/views/ppt_manage/newVersion/pptPublish.vue

@@ -132,6 +132,9 @@ export default {
         return this.LayoutType===2?2:3
     },
 
+    isTestLocal() {
+      return process.env.NODE_ENV==='development'
+    }
   },
   methods: {
     /* 提交 */
@@ -287,14 +290,14 @@ export default {
       //开始计时
       const start = Date.now()
       const SlideMaster = _.cloneDeep(pptSlideMaster) 
-      SlideMaster.objects[1] = {image: {x:0,y:0,w:10,h:7,path:this.pptBgImage}}
-      let pptx = pptConfigInit(new pptxgen(),this.LayoutType,'ch',SlideMaster,this.pptBgImage)
+      SlideMaster.objects[1] = {image: {x:0,y:0,w:10,h:7,path: this.isTestLocal?require('@/assets/img/pptnextimg.png'):this.pptBgImage}}
+      let pptx = pptConfigInit(new pptxgen(),this.LayoutType,'ch',SlideMaster,this.isTestLocal?require('@/assets/img/pptnextimg.png'):this.pptBgImage)
       //添加封面
       let cover = pptx.addSlide()
       let coverId = 'cover'
       let coverImg = $(`#${coverId} .cover img`)[0].src
       cover.addImage({
-        path: coverImg,
+        path: this.isTestLocal?require('@/assets/img/ppt_m/bg3.jpg'):coverImg,
         x: 0,
         y: 0,
         w:'100%',
@@ -433,7 +436,7 @@ export default {
         let backId = 'back'
         let backImg = $(`#${backId} img`)[0].src
         back.addImage({
-            path: backImg,
+            path: this.isTestLocal?require('@/assets/img/pptlastimg.png'):backImg,
             x: 0,
             y: 0,
             w:'100%',
@@ -447,7 +450,9 @@ export default {
       //结束计时
       const end = Date.now()
       console.log("转换ppt用时:",Math.floor((end-start)/1000),' s')
-      //pptx.writeFile({ fileName: "test.pptx" });//本地测试用
+      if(this.isTestLocal) {
+        return pptx.writeFile({ fileName: "test.pptx" });//本地测试用
+      }
       //直接下载
       if(type==='dowload'){
         this.downloadLoading = this.$loading({

+ 62 - 22
src/views/ppt_manage/newVersion/utils/config.js

@@ -96,6 +96,10 @@ export const formatPre = [{
     },{
         modelId:13,
         text:'xxx'
+    },
+    {
+      modelId:14,
+      text:'左上图左下右文本框'
     }
 ]
 //版式id对应组件名
@@ -112,7 +116,8 @@ export const modelMap = {
     10:'Ten',
     11:'Ele',
     12:'Twelve',
-    13:'Thirteen'
+    13:'Thirteen',
+    14:'Fourteen',
 }
 //版式信息,用于判断图表/文字插入哪个位置
 export const modelInfo = {
@@ -215,7 +220,15 @@ export const modelInfo = {
         positions:[1,2],
         elChartNum:2,
         elTextNum:0
-    }
+    },
+    14: {
+      elNum: 3,
+      elType: ['chart', 'text', 'text'],
+      positions: [1, 2, 3],
+      elChartNum: 1,
+      elTextNum: 2,
+      elTextPosition: 3
+  },
 }
 
 //给标题预留的位置,单位%
@@ -279,27 +292,27 @@ export const modelConfig = [{
         elements: [{
             position: 1,
             width: 100*0.5,
-            height: (restHeight)*0.5*0.84,
+            height: (restHeight)*0.4*0.84,
             x: 0,
-            y: ((restHeight)*0.5-(restHeight)*0.5*0.84)/2
+            y: ((restHeight)*0.4-(restHeight)*0.4*0.84)/2
         }, {
             position: 2,
             width: 100*0.5,
-            height: (restHeight)*0.5*0.84,
+            height: (restHeight)*0.6*0.84,
             x: 0,
-            y: 50-7/* +((restHeight)*0.5-(restHeight)*0.5*0.84)/2 */,//or 50
+            y: 50-17/* +((restHeight)*0.5-(restHeight)*0.5*0.84)/2 */,//or 50
         }, {
             position: 3,
             width: 100*0.5,
-            height: (restHeight)*0.5*0.84,
+            height: (restHeight)*0.4*0.84,
             x: 50,//or 50
             y: ((restHeight)*0.5-(restHeight)*0.5*0.84)/2
         }, {
             position: 4,
             width: 100*0.5,
-            height: (restHeight)*0.5*0.84,
+            height: (restHeight)*0.6*0.9,
             x: 50,
-            y: 50-7/* +((restHeight)*0.5-(restHeight)*0.5*0.84)/2 */,//or 50
+            y: 50-17/* +((restHeight)*0.5-(restHeight)*0.5*0.84)/2 */,//or 50
         }]
     },
     {
@@ -445,33 +458,33 @@ export const modelConfig = [{
         elements:[{
             position:1,
             width:50,
-            height:(restHeight)*0.40*0.9,
+            height:(restHeight)*0.35*0.9,
             x:0,
-            y:(restHeight*0.4*0.1)/2
+            y:(restHeight*0.35*0.1)/2
         },{
             position:2,
             width:50,
-            height:(restHeight)*0.40*0.9,
+            height:(restHeight)*0.35*0.9,
             x:50,
-            y:(restHeight*0.4*0.1)/2
+            y:(restHeight*0.35*0.1)/2
         },{
             position:3,
             width:50,
-            height:(restHeight)*0.40*0.9,
+            height:(restHeight)*0.35*0.9,
             x:0,
-            y:38
+            y:34
         },{
             position:4,
             width:50,
-            height:(restHeight)*0.40*0.9,
+            height:(restHeight)*0.35*0.9,
             x:50,
-            y:38
+            y:34
         },{
             position:5,
-            width:100*0.9,
-            height:(restHeight)*0.18*0.8,
+            width:100*0.95,
+            height:(restHeight)*0.28*0.8,
             x:0,
-            y:74
+            y:64
         }]
     },{
         modelId:10,
@@ -539,7 +552,29 @@ export const modelConfig = [{
             x:0,
             y:(restHeight)*0.5
         }]
-    }
+    },
+    {
+      modelId: 14,
+      elements: [{
+          position: 1,
+          width: 100*0.5,
+          height: (restHeight)*0.5*0.84,
+          x: 0,
+          y: ((restHeight)*0.5-(restHeight)*0.5*0.84)/2
+      }, {
+          position: 2,
+          width: 100*0.5,
+          height: (restHeight)*0.5*0.84,
+          x: 0,
+          y: 50-7/* +((restHeight)*0.5-(restHeight)*0.5*0.84)/2 */,//or 50
+      }, {
+          position: 3,
+          width: 100*0.5,
+          height: (restHeight)*0.9,
+          x: 50,
+          y: ((restHeight)-(restHeight)*0.9)/2
+      }]
+  },
 ]
 //ppt母版
 export const pptSlideMaster = {
@@ -830,7 +865,12 @@ export const defaultPosition = {
   13:{
     1:{type:'chart'},
     2:{type:'chart'}
-  }
+  },
+  14:{
+    1:{type:'chart'},
+    2:{type:'text'},
+    3:{type:'text'}
+  },
 }
 //画笔工具栏
 export const boardTool = [

+ 10 - 0
src/views/ppt_manage/newVersion/utils/untils.js

@@ -358,6 +358,11 @@ export const getTextContentSize = (model,position)=>{
         },
         13:{
             1:[],2:[]
+        },
+        14: {
+          1:[1,0.5,1,0.9],
+          2:[1,0.5,1,0.9],
+          3:[1,0.5,1,0.9]
         }
     }
     const modelMapHeight = {
@@ -415,6 +420,11 @@ export const getTextContentSize = (model,position)=>{
         },
         13:{
             1:[],2:[]
+        },
+        14: {
+            1:[0.86,1,0.5,0.84],
+            2:[0.86,1,0.5,0.84],
+            3:[0.86,1,0.9]
         }
     }
     const baseWidth=900,baseHeight=630

+ 13 - 13
src/views/sandbox_manage/common/customize.js

@@ -157,20 +157,20 @@ export default {
               stroke:
                 !linkItem.calculationMethod ||
                 !linkItem.calculationMethod.length
-                  ? "#0052D9"
-                  : this.$store.state.sand.styleConfig.borderColor,
+                  ? this.$store.state.sand.styleConfig.titleBorderColor
+                  : this.$store.state.sand.styleConfig.dataBorderColor,
               fill:
                 !linkItem.calculationMethod ||
                 !linkItem.calculationMethod.length
-                  ? "#0052D9"
-                  : this.$store.state.sand.styleConfig.backgroundColor,
+                  ? this.$store.state.sand.styleConfig.titleBackgoundColor
+                  : this.$store.state.sand.styleConfig.dataBackgroundColor,
             },
             text: {
               fill:
                 !linkItem.calculationMethod ||
                 !linkItem.calculationMethod.length
-                  ? "#FFFFFF"
-                  : this.$store.state.sand.styleConfig.color,
+                  ? this.$store.state.sand.styleConfig.titleTextColor 
+                  : this.$store.state.sand.styleConfig.dataTextColor,
             },
           },
           data: linkItem,
@@ -189,9 +189,9 @@ export default {
               source: {
                 cell: select_cell.id,
                 anchor: {
-                  name: 'center',
+                  name: select_cell.data && select_cell.data.key == 'text' ?  'right' : 'center',
                   args: {
-                    dx: '25%',
+                    dx: select_cell.data && select_cell.data.key == 'text' ? 0 : '25%',
                   },
                 },
               },
@@ -226,11 +226,11 @@ export default {
             type: "datanode-title",
             attrs: {
               body: {
-                stroke: "#0052D9",
-                fill: "#0052D9",
+                stroke: this.$store.state.sand.styleConfig.titleBorderColor,
+                fill: this.$store.state.sand.styleConfig.titleBackgoundColor,
               },
               text: {
-                fill: "#FFFFFF",
+                fill: this.$store.state.sand.styleConfig.titleTextColor ,
               },
             },
             data: linkItem,
@@ -268,7 +268,7 @@ export default {
                   "pointer-events": "none",
                 },
                 text: {
-                  fill: this.$store.state.sand.styleConfig.color,
+                  fill: this.$store.state.sand.styleConfig.dataTextColor,
                   text: item.label,
                   refWidth: 1,
                   refY: 10,
@@ -276,7 +276,7 @@ export default {
                   "pointer-events": "none",
                 },
                 value: {
-                  fill: this.$store.state.sand.styleConfig.color,
+                  fill: this.$store.state.sand.styleConfig.dataTextColor,
                   text: item.value,
                   refWidth: 1,
                   refX: "50%",

+ 6 - 3
src/views/sandbox_manage/common/events.js

@@ -211,10 +211,10 @@ export const bindKey = (graph,mindmapDataUseFun) => {
 }
 
 /* 右键事件 */
-export const contextEvent = (graph,key,mindmapDataUseFun) => {
+export const contextEvent = (graph,key,mindmapDataUseFun,that) => {
 	switch (key) {
 		case 'copy':
-			nodeCopyAndPaste(graph);
+			nodeCopyAndPaste(graph,that);
 			break;
 		case 'del': 
 			deleteNodes(graph,mindmapDataUseFun);
@@ -223,13 +223,16 @@ export const contextEvent = (graph,key,mindmapDataUseFun) => {
 }
 
 /* 复制粘贴节点 */
-const nodeCopyAndPaste = (graph) => {
+const nodeCopyAndPaste = (graph,that) => {
 	const select_cell = graph.getSelectedCells();
 	if (select_cell.length) {
 		graph.copy(select_cell);
 		const copy_cell = graph.paste({ offset: 30 });
 		graph.cleanSelection();
 		graph.select(copy_cell);
+		if(select_cell[0] && select_cell[0].data && select_cell[0].data.linkData && select_cell[0].data.linkData.length > 0){ //复制子数据节点
+			that && that.saveLink && that.saveLink(select_cell[0].data.linkData) //sandFlowNew/index.vue
+		}
 	}
 }
 

+ 6 - 1
src/views/sandbox_manage/common/gragh.js

@@ -85,7 +85,12 @@ export function myGraph (wrapper,mindmapDataUseFun,type='edit') {
 			vertexMovable:false,
 			vertexMovable:false,
 			vertexDeletable:false
-		}:{},
+		}:function(cellView){
+		  if(cellView.cell.shape == 'mindmap-child-datanode-title' && cellView.cell.data && cellView.cell.data.calculationMethod && cellView.cell.data.calculationMethod.length > 0){
+            return {nodeMovable:false};
+		  }
+		  return true
+		},
 		connecting: {
 			snap: true,
 			// 允许连接到空白位置

+ 12 - 12
src/views/sandbox_manage/common/mindmap.js

@@ -215,7 +215,7 @@ export default {
             ry: 4,
             width:132,
             height:28,
-            fill:'#0052D9',
+            fill:this.$store.state.sand.styleConfig.titleBackgoundColor,
             strokeWidth: 1,
             class: 'mindmap-child-datanode-title',
           },
@@ -851,11 +851,11 @@ export default {
               type: data.type,
               attrs:{
                 body: {
-                  stroke: data.type == 'datanode-title' ? '#0052D9' : 'transparent',
-                  fill: data.type == 'datanode-title' ? '#0052D9' :  'transparent',
+                  stroke: data.type == 'datanode-title' ? this.$store.state.sand.styleConfig.titleBorderColor : 'transparent',
+                  fill: data.type == 'datanode-title' ? this.$store.state.sand.styleConfig.titleBackgoundColor :  'transparent',
                 },
                 text:{
-                  fill:data.type == 'datanode-title' ? '#FFFFFF' :  'transparent',
+                  fill:data.type == 'datanode-title' ? this.$store.state.sand.styleConfig.titleTextColor  :  'transparent',
                 }
               },
               data:data.data,
@@ -877,12 +877,12 @@ export default {
                 type:'datanode-child',
                 attrs:{
                   body: {
-                    stroke: this.$store.state.sand.styleConfig.borderColor,
-                    fill: this.$store.state.sand.styleConfig.backgroundColor,
+                    stroke: this.$store.state.sand.styleConfig.dataBorderColor,
+                    fill: this.$store.state.sand.styleConfig.dataBackgroundColor,
                     'pointer-events': 'none',
                   },
                   text:{
-                    fill:this.$store.state.sand.styleConfig.color,
+                    fill:this.$store.state.sand.styleConfig.dataTextColor,
                     'pointer-events': 'none',
                   }
                 },
@@ -906,11 +906,11 @@ export default {
                 type: 'datanode-title',
                 attrs:{
                   body: {
-                    stroke: '#0052D9',
-                    fill: '#0052D9'
+                    stroke: this.$store.state.sand.styleConfig.titleBorderColor,
+                    fill: this.$store.state.sand.styleConfig.titleBackgoundColor
                   },
                   text:{
-                    fill:'#FFFFFF' 
+                    fill:this.$store.state.sand.styleConfig.titleTextColor 
                   }
                 },
                 data:data.data,
@@ -940,7 +940,7 @@ export default {
                       'pointer-events': 'none',
                     },
                     text:{
-                      fill:this.$store.state.sand.styleConfig.color,
+                      fill:this.$store.state.sand.styleConfig.dataTextColor,
                       text:v.label,
                       refWidth:1,
                       refY: 10,
@@ -948,7 +948,7 @@ export default {
                       'pointer-events': 'none',
                     },
                     value:{
-                      fill:this.$store.state.sand.styleConfig.color,
+                      fill:this.$store.state.sand.styleConfig.dataTextColor,
                       text:v.value,
                       refWidth:1,
                       refX:"50%",

+ 2 - 2
src/views/sandbox_manage/common/options.js

@@ -30,7 +30,7 @@ export const contextMenuOption = [
 export const calculateOption = [
 	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.Detail.e_latest_date') : '最新日期',source: 98,fromEdbKey:98 },
 	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.Detail.e_latest_value') : '最新值',source: 99,fromEdbKey:99 },
-	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.to_month_quarter') : '累计值转月/季值',source: 1,fromEdbKey:5 },
+	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.to_month_quarter') : '累计值转月/季值',source: 1,fromEdbKey:5,source2: 2},
 	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.on_year') : '同比值',source: 3,fromEdbKey:6 },
 	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.differ') : '同差值',source: 4,fromEdbKey:7 },
 	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.rule_move_average') : 'N期移动均值',source: 5,fromEdbKey:8 },
@@ -41,7 +41,7 @@ export const calculateOption = [
 	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.super_season') : '超季节性',source: 11,fromEdbKey:35 },
 	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.annualized') : '年化值',source: 12,fromEdbKey:52 },
 	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.frequency') : '降频',source: 9,fromEdbKey:51 },
-	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.cumulate') : '累计值',source: 13,fromEdbKey:62 },
+	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.cumulate') : '累计值',source: 13,fromEdbKey:62 ,source2: 14},
 	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.ex_smooth') : '指数修匀',source: 15,fromEdbKey:'alpha' },
 	{ label: bus.$i18nt ? bus.$i18nt.t('Edb.CalculatesAll.day_mean') : '日均值',source: 16,fromEdbKey:75 },
 ]

+ 28 - 4
src/views/sandbox_manage/common/toolConfig.js

@@ -80,7 +80,13 @@ export const styleSettings=[
 		color:'#1841AA',
 		textColor:'#1841AA',
 		borderColor:'#1841AA',
-		lineColor:'#1841AA'
+		lineColor:'#1841AA',
+
+		dataBackgroundColor:'#FFFFFF',
+		dataBorderColor:'#0052D9',
+		titleBackgoundColor:'#1841AA',
+		titleBorderColor:'#1841AA',
+		titleTextColor:'#FFFFFF',
 	},
 	{
 		id:2,
@@ -88,7 +94,13 @@ export const styleSettings=[
 		color:'#FFFFFF',
 		textColor:'#1841AA',
 		borderColor:'#1841AA',
-		lineColor:'#1841AA'
+		lineColor:'#1841AA',
+
+		dataBackgroundColor:'#FFFFFF',
+		dataBorderColor:'#1841AA',
+		titleBackgoundColor:'#1841AA',
+		titleBorderColor:'#1841AA',
+		titleTextColor:'#FFFFFF',
 	},
 	{
 		id:3,
@@ -96,7 +108,13 @@ export const styleSettings=[
 		color:'#333333',
 		textColor:'#333333',
 		borderColor:'#333333',
-		lineColor:'#333333'
+		lineColor:'#333333',
+
+		dataBackgroundColor:'#FFFFFF',
+		dataBorderColor:'#333333',
+		titleBackgoundColor:'#333333',
+		titleBorderColor:'#333333',
+		titleTextColor:'#FFFFFF',
 	},
 	{
 		id:4,
@@ -104,6 +122,12 @@ export const styleSettings=[
 		color:'#AA3218',
 		textColor:'#AA3218',
 		borderColor:'#AA3218',
-		lineColor:'#AA3218'
+		lineColor:'#AA3218',
+
+		dataBackgroundColor:'#FFFFFF',
+		dataBorderColor:'#AA3218',
+		titleBackgoundColor:'#AA3218',
+		titleBorderColor:'#AA3218',
+		titleTextColor:'#FFFFFF',
 	}
 ]

+ 32 - 14
src/views/sandbox_manage/sandFlowNew/components/addLInkDia.vue

@@ -1,6 +1,7 @@
 <template>
-    <el-dialog :modal-append-to-body='false' :title="$t('SandboxManage.SandFlow.add_node_data')" :visible.sync="show" 
-    :close-on-click-modal="false" width="1000px" top="5vh" @close="cancelHandle">
+    <div>
+      <el-dialog v-dialogDrag :modal-append-to-body='false' :title="$t('SandboxManage.SandFlow.add_node_data')" :visible.sync="show" 
+    :close-on-click-modal="false" width="1000px" top="5vh" @close="cancelHandle" v-show="!dialogDisplayNone">
       <div class="add-link-box">
         <div class="link-box-option">
           <el-select v-model="addLinkSearchParams.linkType" placeholder="节点数据类型" style="width: 240px;" @change="changeLinkType">
@@ -121,7 +122,13 @@
                       :key="item.source" 
                       class="link-count-item" 
                       :class="{'link-count-item-un':!handleCountChoose(item),'link-count-item-on':handleCountChoose(item)}"
-                      @click="clickCountItem(item)">{{ item.label }}</li>
+                      @click="clickCountItem(item)">
+                      <span>{{ item.label }}</span>
+                      <img v-if="handleCountChoose(item) && item.source != 98 && item.source != 99"  
+                        src="~@/assets/img/sand_new/blue_edit_icon.png" 
+                        style="width: 13px;height: 13px;margin-left: 8px;" 
+                        @click.stop="handleEditCal(item)">
+                  </li>
               </ul>
               <div v-if="threeCalculation && threeCalculation.length > 0" class="calculate-result-wrap">
                  <div class="calculate-result-title">{{ $t('ETableChildren.calculate_result') }}</div>
@@ -176,7 +183,8 @@
           <el-button type="primary" style="width:120px;margin-left: 30px;" @click="saveLink">{{$t('Dialog.confirm_btn')}}</el-button>
         </div>
       </div>
-      <calculateEdb
+		</el-dialog>
+    <calculateEdb
        :isShow.sync="isOpenCalculationDia"
        :calculationItem="calculationItem"
        :activeLink="activeItem"
@@ -186,8 +194,9 @@
        @changeActiveEdb="handleChangeActiveEdb"
        @edbDelete="handleEdbDelete"
        @addCalculation="handleAddCalculation"
+       @handleCloseDialog="handleCloseDialog"
       ></calculateEdb>
-		</el-dialog>
+    </div>
 </template>
 
 <script>
@@ -218,7 +227,7 @@ import { calculateOption } from "../../common/options"
       /* 选中搜索指标 展开目录 选中指标 展示数据 */
       search_dataBaseId(newval) {
         if (newval) {
-          if(this.checkedLinkList.find(_=>_.Id == newval)){
+          if(this.linkListInShow.find(_=>_.Id == newval)){
                return this.$message.warning(this.$t('SandboxManage.SandFlow.data_already_exists'))
           }
           if(this.addLinkSearchParams.linkType==1){
@@ -233,6 +242,7 @@ import { calculateOption } from "../../common/options"
                 Type:this.addLinkSearchParams.linkType,
                 editing:false,
                 databaseType:search_obj.EdbInfoType, //0 普通指标 | 1 预测指标
+                EdbType:search_obj.EdbType || 0,
                 detailParams:{
                   code:search_obj.UniqueCode,
                   id:search_obj.EdbInfoId,
@@ -348,10 +358,10 @@ import { calculateOption } from "../../common/options"
         threeCalculation:[],//三个一组
         isOpenCalculationDia:false,
         calculationItem:{},
+        dialogDisplayNone:false,
       }
     },
     methods: {
-      // -------------------------------添加链接
       handleThreeCalculation(){
         let i = this.checkedLinkList.findIndex(_=>_.RId == this.activeItem.RId);
         if(i < 0) return;
@@ -370,14 +380,18 @@ import { calculateOption } from "../../common/options"
         let i = this.checkedLinkList.findIndex(_=>_.RId == this.activeItem.RId);
         if(i < 0) return false;
         let arr = this.checkedLinkList[i].calculationMethod || [];
-        return arr.find(_=>_.source == item.source);
+        return arr.find(_=>_.source == item.source || _.source == item.source2);
+      },
+      handleEditCal(v){ //编辑状态
+          this.calculationItem = v;
+          this.isOpenCalculationDia = true;
+          this.dialogDisplayNone = true;
       },
       clickCountItem(item){
          let i = this.checkedLinkList.findIndex(_=>_.RId == this.activeItem.RId);
          if(i < 0) return;
          if(!this.checkedLinkList[i].calculationMethod) this.checkedLinkList[i].calculationMethod = [];
-
-         let isChoosed = this.checkedLinkList[i].calculationMethod.findIndex(_=>_.source == item.source);
+         let isChoosed = this.checkedLinkList[i].calculationMethod.findIndex(_=>_.source == item.source || _.source == item.source2);
          if(isChoosed >= 0){ //已经选中
           this.checkedLinkList[i].calculationMethod.splice(isChoosed,1)
          } else { //未选中
@@ -389,6 +403,7 @@ import { calculateOption } from "../../common/options"
               } else {
                 this.calculationItem = item;
                 this.isOpenCalculationDia = true;
+                this.dialogDisplayNone = true;
               }
         };
         this.handleThreeCalculation();
@@ -397,9 +412,8 @@ import { calculateOption } from "../../common/options"
         let i = this.checkedLinkList.findIndex(_=>_.RId == this.activeItem.RId);
         if(i < 0) return;
         if(!this.checkedLinkList[i].calculationMethod) this.checkedLinkList[i].calculationMethod = [];
-
-        let isChoosed = this.checkedLinkList[i].calculationMethod.findIndex(_=>_.source == item.source);
-        
+        let x = this.calculateOption.find(_=>item.source == _.source || item.source == _.source2);
+        let isChoosed = this.checkedLinkList[i].calculationMethod.findIndex(_=>_.source == x.source || _.source == x.source2);
         if(isChoosed >= 0) {
           this.checkedLinkList[i].calculationMethod.splice(isChoosed,1);
         }
@@ -556,6 +570,7 @@ import { calculateOption } from "../../common/options"
         this.activeItemRId = item.RId
         this.activeItem = item
         this.addLinkSearchParams.linkType=item.Type
+        this.handleLinkListInShow();
         if(item.Type==3){
           if(!config.noInfo){
             this.$message.info('研报类型的暂无回显')
@@ -701,6 +716,9 @@ import { calculateOption } from "../../common/options"
       saveLink(){
         this.$emit("saveLink", this.checkedLinkList);
       },
+      handleCloseDialog(){
+        this.dialogDisplayNone = false;
+      },
       cancelHandle(){
         this.linkListInShow = [];
         this.$emit("update:show", false);
@@ -746,7 +764,7 @@ import { calculateOption } from "../../common/options"
              }
              .link-count-item-on{
               border: 1px solid #0052D9;
-              color: #0052D9;
+              color: #666666;
               background: #ECF2FE;
              }
              .link-count-item-un{

+ 63 - 13
src/views/sandbox_manage/sandFlowNew/components/calculateEdb.vue

@@ -272,7 +272,7 @@
               >{{ $t("ETable.Btn.cancel_btn") }}</el-button
             >
             <el-popover width="300" trigger="hover" placement="right">
-              <div v-html="formulaTip.get(calculationItem.fromEdbKey)"></div>
+              <div v-html="formulaTipContent"></div>
               <el-button class="tips-btn" type="text" slot="reference">{{
                 $t("Edb.formula_instru")
               }}</el-button>
@@ -364,18 +364,25 @@
     watch: {
       isShow(newv) {
         if (!newv) return;
-        this.formData.source = this.calculationItem.source;
+        this.formData.source = +this.calculationItem.source;
         this.edbList = _.cloneDeep(this.linkList);
         this.edbActive = _.cloneDeep(this.activeLink);
         this.selectEdbInfo = null;
         this.linkClick(this.edbActive);
+        this.handleFormulaTipContent()
       },
+      edbActive:{
+        deep:true,
+        handler(){
+          this.handleEditData();
+        },
+      }
     },
     data() {
       return {
         isCalculateDia: true,
         formData: {
-          source: "" + this.calculationItem.source,
+          source: + this.calculationItem.source,
           frequency: "",
           nNum: 1,
           moveType: 1,
@@ -387,6 +394,7 @@
         },
         formRules,
         formulaTip,
+        formulaTipContent:'',
   
         edbList: [], //指标标签列表
         edbActive: {}, //目前选中的标签
@@ -403,8 +411,47 @@
       };
     },
     methods: {
+      async handleEditData(){
+        await this.$nextTick();
+        let v = this.linkList.find(_=>_.Id == this.edbActive.Id);
+        if(!v || !v.calculationMethod || !v.calculationMethod.length) return this.clearFormValue();
+        let item = v.calculationMethod.find(_=>_.source == this.formData.source);
+        if(!item) return this.clearFormValue();
+        // 累计值有问题
+        //处理编辑数据
+        this.formData = {
+          source:+item.source,
+          frequency:item.frequency || '',
+          moveUnit:item.moveFrequency || '天',
+          moveType:item.moveType || 1,
+          calendarType:item.calendar || "公历",
+          nNum:1,
+          moveVal:'',
+          valueType:'期末值',
+          alphaValue:0,
+        };
+        const valueMap = {
+          22: "moveVal",
+          51: "valueType",
+          alpha: "alphaValue",
+        };
+        this.formData[[22,51,'alpha'].includes(this.calculationItem.fromEdbKey) ? valueMap[this.calculationItem.fromEdbKey] : 'nNum'] = +item.formula || item.formula;
+        
+        this.dateSelectForm = {
+          Type: 1,
+          MoveForward: item.moveForward || 0,
+        };
+        this.$refs.dateMoveWayRef.dateChangeArr = item.dateChange || [];
+      },
+      handleFormulaTipContent(){
+         this.formulaTipContent = this.formulaTip.get(this.calculationItem.fromEdbKey);
+         if(this.formData.source == 2) this.formulaTipContent = this.formulaTip.get(61); //积累季度
+         if(this.formData.source == 14) this.formulaTipContent = this.formulaTip.get(63); //年初至今计算
+      },
       handleRadioGroup() {
+        this.handleEditData()
         this.$refs.selectRef.targetTypeChange();
+        this.handleFormulaTipContent()
         this.selectEdbInfo = null;
         this.edbActive = null;
         let firstEdb = this.edbList[0];
@@ -430,7 +477,7 @@
   
         let params = {
           DataTime: "",
-          Source: source,
+          Source: +source,
           Frequency: frequency,
           Formula: valueMap[this.calculationItem.fromEdbKey]
             ? String(this.formData[valueMap[this.calculationItem.fromEdbKey]])
@@ -459,7 +506,7 @@
         let calculation = {
           fromEdbKey: this.calculationItem.fromEdbKey,
           label: this.calculationItem.label,
-          source: this.calculationItem.source,
+          source: +this.formData.source,
           value,
           calendar: params.Calendar,
           dateChange: params.DateChange,
@@ -612,13 +659,12 @@
       },
       cancelHandle() {
         this.initData();
+        this.$emit('handleCloseDialog')
         this.$emit("update:isShow", false);
       },
-      initData() {
-        this.search_edb = "";
-        this.selectEdbInfo = null;
+      clearFormValue(){
         this.formData = {
-          source: this.formData.source,
+          source: +this.formData.source,
           frequency: "",
           nNum: 1,
           moveType: 1,
@@ -628,16 +674,20 @@
           valueType: "期末值",
           alphaValue: 0,
         };
-        this.edbList = [];
-        this.edbActive = {};
-        this.editingLabel = "";
-  
         this.dateSelectForm = {
           Type: 1,
           MoveForward: 0,
         };
         this.$refs.dateMoveWayRef && this.$refs.dateMoveWayRef.initData();
       },
+      initData() {
+        this.clearFormValue();
+        this.search_edb = "";
+        this.selectEdbInfo = null;
+        this.edbList = [];
+        this.edbActive = {};
+        this.editingLabel = "";
+      },
     },
   };
   </script>

+ 40 - 10
src/views/sandbox_manage/sandFlowNew/index.vue

@@ -833,10 +833,9 @@ import addLInkDia from './components/addLInkDia.vue';
         let styleData=styleSettings[activeNum-1]
         this.styleActive = activeNum
         let cells = this.graph.getCells()
-
         for (let i = 0; i < cells.length; i++) {
           const element = cells[i];
-          if(element.shape == 'mindmap-child-background-datanode') continue;
+          if(element.shape == 'mindmap-child-background-datanode' || element.shape == 'mindmap-grandchild-datanode') continue;
           if(element.shape.indexOf("edge") !=-1){
             element.setAttrs({
               line:{
@@ -844,14 +843,49 @@ import addLInkDia from './components/addLInkDia.vue';
               }
             })
           }
+          //添加数据节点样式特殊处理
+          if(element.shape == 'mindmap-child-datanode') {
+            element.setAttrs({
+              body: {
+                stroke:styleData.dataBorderColor,
+                fill:styleData.dataBackgroundColor,
+                },
+                text: {
+                  fill:styleData.dataTextColor,
+                },
+              });
+            continue;
+          } else if(element.shape == 'mindmap-child-datanode-title') {
+            element.setAttrs({
+              body: {
+                  stroke: styleData.titleBorderColor,
+                  fill: styleData.titleBackgoundColor,
+                },
+                text: {
+                  fill: styleData.titleTextColor,
+                },
+              });
+              continue;
+          } else if(element.shape == 'mindmap-grandchild-datanode') {
+            element.setAttrs({
+                  body: {
+                    fill: "transparent",
+                  },
+                  text: {
+                    fill: styleData.dataTextColor,
+                  },
+                  value: {
+                    fill: styleData.dataTextColor,
+                  },
+              });
+              continue;
+          }
+           //  普通节点样式调整
           if(element.data && element.data.key == 'text'){
             element.setAttrs({
               text:{
                 fill:styleData.textColor
               },
-              value:{
-                fill:styleData.textColor
-              },
             })
           }else{
             element.setAttrs({
@@ -862,9 +896,6 @@ import addLInkDia from './components/addLInkDia.vue';
               text:{
                 fill:styleData.color
               },
-              value:{
-                fill:styleData.color
-              },
             })
           }
         }
@@ -876,7 +907,7 @@ import addLInkDia from './components/addLInkDia.vue';
         }else if(key=="deleteLink"){
           this.deleteLink()
         }else{
-          contextEvent(this.graph, key,this.getMindmapDataUse);
+          contextEvent(this.graph, key,this.getMindmapDataUse,this);
         }
         this.hideContextMenu();
       },
@@ -930,7 +961,6 @@ import addLInkDia from './components/addLInkDia.vue';
 
         let childs = select_cell.getChildren() || [];
         if(childs && childs.length > 0) this.graph.removeCells(childs);
-        // select_cell.data.linkData=[];
         if(type == 2){
           if(!list || !list.length) return;
           const { id } = select_cell

+ 14 - 1
src/vuex/modules/sand.js

@@ -131,7 +131,14 @@ const sand = {
 			color:'#1841AA',
 			textColor:'#1841AA',
 			borderColor:'#1841AA',
-			lineColor:'#1841AA'
+			lineColor:'#1841AA',
+
+			dataBackgroundColor:'#FFFFFF',
+			dataBorderColor:'#1841AA',
+			dataTextColor:'#333333',
+			titleBackgoundColor:'#1841AA',
+			titleBorderColor:'#1841AA',
+			titleTextColor:'#FFFFFF',
 		},
 		toolStatus:{
 			nodeDisabled:true,
@@ -230,6 +237,12 @@ const sand = {
 			state.styleConfig.textColor = styleData.textColor
 			state.styleConfig.borderColor = styleData.borderColor
 			state.styleConfig.lineColor = styleData.lineColor
+
+			state.styleConfig.dataBackgroundColor = styleData.dataBackgroundColor
+			state.styleConfig.dataBorderColor = styleData.dataBorderColor
+			state.styleConfig.titleBackgoundColor = styleData.titleBackgoundColor
+			state.styleConfig.titleBorderColor = styleData.titleBorderColor
+			state.styleConfig.titleTextColor = styleData.titleTextColor
 		}
 	},
   actions: {