fix:topology 相关bug修改

This commit is contained in:
zhangyu
2022-09-05 17:45:49 +08:00
parent c86b36583e
commit f85edd121d
7 changed files with 33 additions and 12 deletions

View File

@@ -28,7 +28,7 @@
"@topology/activity-diagram": "^1.1.0", "@topology/activity-diagram": "^1.1.0",
"@topology/chart-diagram": "^1.1.0", "@topology/chart-diagram": "^1.1.0",
"@topology/class-diagram": "^1.1.0", "@topology/class-diagram": "^1.1.0",
"@topology/core": "^1.1.32", "@topology/core": "^1.1.34",
"@topology/flow-diagram": "^1.1.1", "@topology/flow-diagram": "^1.1.1",
"@topology/form-diagram": "^1.1.32", "@topology/form-diagram": "^1.1.32",
"@topology/sequence-diagram": "^1.1.0", "@topology/sequence-diagram": "^1.1.0",

View File

@@ -135,7 +135,7 @@ export default {
const z = urlParams[urlParams.length - 3] const z = urlParams[urlParams.length - 3]
const x = urlParams[urlParams.length - 2] const x = urlParams[urlParams.length - 2]
const y = urlParams[urlParams.length - 1] const y = urlParams[urlParams.length - 1]
const newUrl1 = `nzMap://static/Titles/${z}/${x}/${y}.pbf` const newUrl1 = `nzMap:///static/Titles/${z}/${x}/${y}.pbf`
return { return {
url: newUrl1, url: newUrl1,
credentials: 'include', credentials: 'include',
@@ -145,7 +145,7 @@ export default {
} }
if (resourceType === 'SpriteJSON') { if (resourceType === 'SpriteJSON') {
return { return {
url: 'nzMap://static/Titles/sprite.json', url: 'nzMap:///static/Titles/sprite.json',
credentials: 'include', credentials: 'include',
method: 'GET' method: 'GET'
// Include cookies for cross-origin requests // Include cookies for cross-origin requests
@@ -153,7 +153,7 @@ export default {
} }
if (resourceType === 'SpriteImage') { if (resourceType === 'SpriteImage') {
return { return {
url: 'nzMap://static/Titles/sprite.png', url: 'nzMap:///static/Titles/sprite.png',
credentials: 'include', credentials: 'include',
method: 'GET' method: 'GET'
// Include cookies for cross-origin requests // Include cookies for cross-origin requests

File diff suppressed because one or more lines are too long

View File

@@ -856,7 +856,7 @@ export default {
gridColor: '#ededed', gridColor: '#ededed',
lineWidth: 1, lineWidth: 1,
ruleColor: '#4e4e4e', ruleColor: '#4e4e4e',
pens:[] pens: []
} }
this.projectInfoShow = true this.projectInfoShow = true
this.projectAlertShow = true this.projectAlertShow = true
@@ -865,6 +865,7 @@ export default {
data.ruleColor = this.theme == 'light' ? '#4e4e4e' : '#BEBEBE' data.ruleColor = this.theme == 'light' ? '#4e4e4e' : '#BEBEBE'
resolve(data) resolve(data)
} else { } else {
delete data.origin
data.ruleColor = this.theme == 'light' ? '#4e4e4e' : '#BEBEBE' data.ruleColor = this.theme == 'light' ? '#4e4e4e' : '#BEBEBE'
if (data.data) { if (data.data) {
this.topologyInfo = { this.topologyInfo = {

View File

@@ -429,7 +429,7 @@
:class="['nz-icon',bkTypeOption.find(item1=>item1.id==selection.pen.data.gradientType).label,bkTypeOption.find(item1=>item1.id==selection.pen.data.gradientType).fontSize]"></i> :class="['nz-icon',bkTypeOption.find(item1=>item1.id==selection.pen.data.gradientType).label,bkTypeOption.find(item1=>item1.id==selection.pen.data.gradientType).fontSize]"></i>
</div> </div>
<el-option v-for="(item,index) in bkTypeOption" :value="item.id" :key="index"> <el-option v-for="(item,index) in bkTypeOption" :value="item.id" :label="''" :key="index">
<i :class="['nz-icon',item.label,item.fontSize]"></i> <i :class="['nz-icon',item.label,item.fontSize]"></i>
</el-option> </el-option>
<!--el-input__inner--> <!--el-input__inner-->
@@ -1546,6 +1546,7 @@ export default {
if (value === 'lineDash') { if (value === 'lineDash') {
this.selection.pen.lineDash = val ? (val == 1 ? [5, 5] : ((val == 2 ? [10, 10] : [10, 10, 2, 10]))) : [] this.selection.pen.lineDash = val ? (val == 1 ? [5, 5] : ((val == 2 ? [10, 10] : [10, 10, 2, 10]))) : []
} }
console.log(this.selection.pen)
this.$emit('change', this.selection.pen) this.$emit('change', this.selection.pen)
// if(!this.selection.pen.type||this.selection.pens){ // if(!this.selection.pen.type||this.selection.pens){
// this.$emit('change',this.selection.pen||this.selection.pens); // this.$emit('change',this.selection.pen||this.selection.pens);

View File

@@ -878,6 +878,7 @@ export default {
resolve(data) resolve(data)
data = null data = null
} else { } else {
delete data.origin
data.ruleColor = this.theme == 'light' ? '#4e4e4e' : '#f9f9f9' data.ruleColor = this.theme == 'light' ? '#4e4e4e' : '#f9f9f9'
data.gridColor = this.theme == 'light' ? '#ededed' : '#090909' data.gridColor = this.theme == 'light' ? '#ededed' : '#090909'
data.grid = false data.grid = false
@@ -1645,7 +1646,25 @@ export default {
}, },
onUpdateProps (node) { // 更新pen onUpdateProps (node) { // 更新pen
getTopology(this.topologyIndex).setValue(node) const obj = {
id: node.id,
x: node.x,
y: node.y,
data: node.data,
width: node.width,
height: node.height,
borderRadius: node.borderRadius,
rotate: node.rotate,
background: node.background,
iconColor: node.iconColor,
gradientType: node.gradientType,
gradientFromColor: node.gradientFromColor,
gradientToColor: node.gradientToColor,
globalAlpha: node.globalAlpha,
dash: node.dash,
strokeColor: node.strokeColor
}
getTopology(this.topologyIndex).setValue(obj)
}, },
handleAvatarSuccess () { handleAvatarSuccess () {

View File

@@ -117,7 +117,7 @@ export default {
pen: null, pen: null,
pens: null pens: null
} }
if (!pens.length) return if (!pens.length || !this.editTopologyFlag) return
this.$nextTick(() => { this.$nextTick(() => {
if (pens.length == 1) { if (pens.length == 1) {
this.modulesDiff && this.modulesDiff(pens[0]) this.modulesDiff && this.modulesDiff(pens[0])