Ver código fonte

Merge branch 'fix-conflict'

hbchen 6 meses atrás
pai
commit
eabe14f963

+ 8 - 3
src/components/antvVueComponents/tooltipCom.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="container" ref="container" @mouseover="nodeMouseEnter" @mouseout="nodeMouseOut"
   @click="nodeClick">
-    <el-tooltip :content="data.RuleTitle" placement="top" ref="antvTooltip"
+    <el-tooltip :content="currentLang==='en'?(data.RuleTitleEn||data.RuleTitle):data.RuleTitle" placement="top" ref="antvTooltip"
     class="container-input">
-      <span ref="containerText">{{ data.EdbName }}</span> 
+      <span ref="containerText">{{currentLang==='en'?(data.EdbNameEn||data.EdbName):data.EdbName}}</span> 
     </el-tooltip>
     <i :class="data.fold?'el-icon-circle-plus':'el-icon-remove'" v-if="!data.isLeaf"
     class="fold-icon" @click="flodApi" v-show="show"></i>
@@ -39,13 +39,18 @@ export default {
   mounted() {
     this.initNode()
   },
+  computed: {
+    currentLang() {
+      return this.$store.state.lang
+    }
+  },
   methods: {
     initNode(){
       this.node = this.getNode();
       this.graph= this.getGraph()
       this.node.data = this.node.data?{...this.data,...this.node.data}:this.data
       this.data = this.node.data
-
+      
       let {style} = this.data
       this.initStyle(style)
 

+ 7 - 1
src/views/edbHistoryPage.vue

@@ -134,6 +134,7 @@ export default {
                     toolTipCom,
                 },
                 router:this.$router, //将router传进去,不然组件里面拿不到
+                store:this.$store,//将store传进去,不然组件里面拿不到
                 data() {
                     return {
                         // 传一个对象进去
@@ -162,6 +163,7 @@ export default {
             this.mouldText = document.getElementById('mould-text')
 
             let edbName=this.treeData.EdbName+(this.treeData.IsStop?'(暂停更新)':'')
+            let edbNameEn=this.treeData.EdbNameEn+(this.treeData.IsStop?'(Pause Updates)':'')
             this.mouldText.innerText=edbName
             let node = this.graph.createNode({
                 shape: 'vue-shape',
@@ -178,7 +180,9 @@ export default {
                 },
                 data:{
                     EdbName:edbName,
+                    EdbNameEn:edbNameEn,
                     RuleTitle:this.treeData.RuleTitle,
+                    RuleTitleEn:this.treeData.RuleTitleEn,
                     routeQuery:{ 
                         ClassifyId:this.treeData.ClassifyId, 
                         UniqueCode:this.treeData.UniqueCode, 
@@ -204,7 +208,7 @@ export default {
             let dataList = []
             list.forEach(element => {
                 let edbName=element.EdbName+(element.IsStop?'(暂停更新)':'')
-
+                let edbNameEn=element.EdbNameEn+(this.treeData.IsStop?'(Pause Updates)':'')
                 this.mouldText.innerText=edbName
                 let node = this.graph.createNode({
                     shape: 'vue-shape',
@@ -225,7 +229,9 @@ export default {
                             color:element.IsStop?"red!important":'#000000',
                         },
                         EdbName:edbName,
+                        EdbNameEn:edbNameEn,
                         RuleTitle:element.RuleTitle,
+                        RuleTitleEn:element.RuleTitleEn,
                         routeQuery:{ 
                             ClassifyId:element.ClassifyId, 
                             UniqueCode:element.UniqueCode,