summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangyu <[email protected]>2021-03-29 10:42:54 +0800
committerzhangyu <[email protected]>2021-03-29 10:42:54 +0800
commitfbeec0964ed893706b16a22b9a0904d3fe1dbfde (patch)
treeffbceadf652972c83961f8a37ee1ae18f0fc79c9
parent39306477eeb0c6913eaafda527ac6de5a8c68684 (diff)
fix:修改从当前连线更换到其他连线 颜色选择器颜色不对的问题
-rw-r--r--nezha-fronted/src/assets/stylus/main.scss4
-rw-r--r--nezha-fronted/src/components/common/nezhaColor.vue6
-rw-r--r--nezha-fronted/src/components/common/project/L5/CanvasProps.vue2
-rw-r--r--nezha-fronted/src/components/common/project/topologyL5.vue30
-rw-r--r--nezha-fronted/src/components/common/project/topologyPrev.vue30
5 files changed, 42 insertions, 30 deletions
diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss
index f768fc9be..795541836 100644
--- a/nezha-fronted/src/assets/stylus/main.scss
+++ b/nezha-fronted/src/assets/stylus/main.scss
@@ -2495,3 +2495,7 @@ li{
outline: none;
}
+/deep/ .el-switch.is-checked .el-switch__core{
+ border-color: #ee9d3f;
+ background-color: #ee9d3f;
+}
diff --git a/nezha-fronted/src/components/common/nezhaColor.vue b/nezha-fronted/src/components/common/nezhaColor.vue
index 057206bda..0c4df5320 100644
--- a/nezha-fronted/src/components/common/nezhaColor.vue
+++ b/nezha-fronted/src/components/common/nezhaColor.vue
@@ -63,14 +63,14 @@ export default {
}
},
watch: {
- // valueArr:{
+ // valueArr: {
// immediate: true,
- // handler(n) {
+ // handler (n) {
// console.log(n);
// if(n.length){
//
- // }
// }
+ // }
// },
// keyName:{
// deep:true,
diff --git a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue
index 2243070ab..d0d176760 100644
--- a/nezha-fronted/src/components/common/project/L5/CanvasProps.vue
+++ b/nezha-fronted/src/components/common/project/L5/CanvasProps.vue
@@ -580,7 +580,7 @@
</el-tab-pane>
</el-tabs>
<!-- 选中为空 -->
- <div v-if="!selection.pen && !selection.pens" style="height: 100%">
+ <div v-else style="height: 100%">
<div class="project-title">
Project
</div>
diff --git a/nezha-fronted/src/components/common/project/topologyL5.vue b/nezha-fronted/src/components/common/project/topologyL5.vue
index 59e3175eb..fba8a02c8 100644
--- a/nezha-fronted/src/components/common/project/topologyL5.vue
+++ b/nezha-fronted/src/components/common/project/topologyL5.vue
@@ -414,7 +414,7 @@ registerNode('myCube', myCubec, myCubeAnchors, null, null)
const canvasOptions = {
rotateCursor: '/img/rotate.cur',
translateKey: 'None',
- disableEmptyLine: false,
+ disableEmptyLine: true,
autoExpandDistance: 0,
minScale: 0.01
}
@@ -830,15 +830,15 @@ export default {
clearInterval(timer)
const promiseArr = []
const self = this
- // for(let i=0;i<data.pens.length;i++){
- // let line=data.pens[i]
- // if(line.type===1){
- // if(!data.pens.find(item=>item.id===line.from.id) || !data.pens.find(item=>item.id===line.to.id)){
- // data.pens.splice(i, 1);
- // i--;
- // }
- // }
- // }
+ for (let i = 0; i < data.pens.length; i++) {
+ const line = data.pens[i]
+ if (line.type === 1) {
+ if (!data.pens.find(item => item.id === line.from.id) || !data.pens.find(item => item.id === line.to.id)) {
+ data.pens.splice(i, 1)
+ i--
+ }
+ }
+ }
data.pens.forEach(item => {
if (item.type === 0 && item.data.imageId) {
item.image = this.iconArray.find(item1 => item1.id == item.data.imageId).image
@@ -1166,6 +1166,10 @@ export default {
// console.log('onMessage',event,data);
// console.log(getTopology(this.topologyIndex))
// this.notModuleIDArr=[];
+ this.toolShow.attr = false
+ this.$nextTick(()=>{
+ this.toolShow.attr = true
+ })
if (data) {
this.notModuleIDArr.forEach(item => {
if (item.id === data.id) {
@@ -1220,9 +1224,9 @@ export default {
animatePlay: false,
strokeStyle: data.strokeStyle,
animateColor: data.animateColor,
- arrowColor: '#00000',
- fromArrowColor: '#00000',
- toArrowColor: '#00000',
+ arrowColor: '#000000',
+ fromArrowColor: '#000000',
+ toArrowColor: '#000000',
lineWidth: 1,
// chart 配置项
valueMapping: [{
diff --git a/nezha-fronted/src/components/common/project/topologyPrev.vue b/nezha-fronted/src/components/common/project/topologyPrev.vue
index 0fdb6aaf7..94b0599ea 100644
--- a/nezha-fronted/src/components/common/project/topologyPrev.vue
+++ b/nezha-fronted/src/components/common/project/topologyPrev.vue
@@ -414,7 +414,7 @@
const canvasOptions = {
rotateCursor: '/img/rotate.cur',
translateKey: 'None',
- disableEmptyLine: false,
+ disableEmptyLine: true,
autoExpandDistance: 0,
minScale: 0.01
}
@@ -830,15 +830,15 @@
clearInterval(timer)
const promiseArr = []
const self = this
- // for(let i=0;i<data.pens.length;i++){
- // let line=data.pens[i]
- // if(line.type===1){
- // if(!data.pens.find(item=>item.id===line.from.id) || !data.pens.find(item=>item.id===line.to.id)){
- // data.pens.splice(i, 1);
- // i--;
- // }
- // }
- // }
+ for (let i = 0; i < data.pens.length; i++) {
+ const line = data.pens[i]
+ if (line.type === 1) {
+ if (!data.pens.find(item => item.id === line.from.id) || !data.pens.find(item => item.id === line.to.id)) {
+ data.pens.splice(i, 1)
+ i--
+ }
+ }
+ }
data.pens.forEach(item => {
if (item.type === 0 && item.data.imageId) {
item.image = this.iconArray.find(item1 => item1.id == item.data.imageId).image
@@ -1166,6 +1166,10 @@
// console.log('onMessage',event,data);
// console.log(getTopology(this.topologyIndex))
// this.notModuleIDArr=[];
+ this.toolShow.attr = false
+ this.$nextTick(()=>{
+ this.toolShow.attr = true
+ })
if (data) {
this.notModuleIDArr.forEach(item => {
if (item.id === data.id) {
@@ -1220,9 +1224,9 @@
animatePlay: false,
strokeStyle: data.strokeStyle,
animateColor: data.animateColor,
- arrowColor: '#00000',
- fromArrowColor: '#00000',
- toArrowColor: '#00000',
+ arrowColor: '#000000',
+ fromArrowColor: '#000000',
+ toArrowColor: '#000000',
lineWidth: 1,
// chart 配置项
valueMapping: [{