Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
A
amap-line-edit
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
feng
amap-line-edit
Commits
a061bc3a
Commit
a061bc3a
authored
May 05, 2019
by
aoobao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出线段优化
parent
f6c4f84a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
60 deletions
+87
-60
src/assets/MouseTool.js
src/assets/MouseTool.js
+1
-0
src/components/ExportDialog.vue
src/components/ExportDialog.vue
+71
-60
src/views/Home.vue
src/views/Home.vue
+15
-0
No files found.
src/assets/MouseTool.js
View file @
a061bc3a
...
...
@@ -39,6 +39,7 @@ export default class MouseTool {
this
.
_mouseTool
.
close
()
// this._mouseTool.setMap(null)
this
.
_mouseTool
.
g
=
null
this
.
_mouseTool
=
null
}
}
...
...
src/components/ExportDialog.vue
View file @
a061bc3a
<
template
>
<div
class=
"export-container"
v-show=
"visible"
>
<el-checkbox-group
v-model=
"checkList"
@
change=
"handleCheckedCitiesChange"
>
<el-checkbox
v-for=
"item in lineList"
:label=
"item.id"
:key=
"item.id"
>
{{
item
.
name
}}
</el-checkbox>
</el-checkbox-group>
<el-input
style=
"margin-top:10px;"
type=
"textarea"
v-model=
"text"
:rows=
"15"
placeholder=
""
></el-input>
</div>
</
template
>
<
script
>
import
{
LineToString
}
from
'
@/assets/utils
'
export
default
{
props
:
{
visible
:
Boolean
,
lineList
:
Array
},
data
()
{
return
{
checkList
:
[],
text
:
null
}
},
computed
:
{
checkLineList
()
{
let
list
=
this
.
checkList
.
map
(
id
=>
{
let
obj
=
this
.
lineList
.
find
(
t
=>
t
.
id
==
id
)
return
obj
})
return
list
}
},
methods
:
{
handleCheckedCitiesChange
()
{
// console.log(val)
let
list
=
this
.
checkLineList
let
sb
=
''
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
const
lineObj
=
list
[
i
];
let
st
=
LineToString
(
lineObj
.
line
)
sb
+=
'
|
'
+
st
}
if
(
sb
.
length
)
{
sb
=
sb
.
substr
(
1
)
}
this
.
text
=
sb
this
.
$emit
(
'
exportLine
'
,
list
.
map
(
t
=>
t
.
id
))
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.export-container
{
position
:
absolute
;
right
:
0px
;
top
:
45px
;
width
:
400px
;
height
:
calc
(
100%
-
50px
);
background-color
:
#fff
;
}
</
style
>
<
template
>
<div
class=
"export-container"
v-show=
"visible"
>
<el-checkbox-group
v-model=
"checkList"
@
change=
"handleCheckedCitiesChange"
>
<el-checkbox
v-for=
"item in lineList"
:label=
"item.id"
:key=
"item.id"
>
{{
item
.
name
}}
</el-checkbox>
</el-checkbox-group>
<el-input
style=
"margin-top:10px;"
type=
"textarea"
v-model=
"text"
:rows=
"15"
placeholder=
""
></el-input>
</div>
</
template
>
<
script
>
import
{
LineToString
}
from
'
@/assets/utils
'
export
default
{
props
:
{
visible
:
Boolean
,
lineList
:
Array
},
data
()
{
return
{
checkList
:
[],
text
:
null
}
},
computed
:
{
checkLineList
()
{
let
list
=
this
.
checkList
.
map
(
id
=>
{
let
obj
=
this
.
lineList
.
find
(
t
=>
t
.
id
==
id
)
return
obj
})
return
list
}
},
mounted
()
{
},
methods
:
{
handleCheckedCitiesChange
()
{
// console.log(val)
let
list
=
this
.
checkLineList
let
sb
=
''
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
const
lineObj
=
list
[
i
];
let
st
=
LineToString
(
lineObj
.
line
)
sb
+=
'
|
'
+
st
}
if
(
sb
.
length
)
{
sb
=
sb
.
substr
(
1
)
}
this
.
text
=
sb
this
.
$emit
(
'
exportLine
'
,
list
.
map
(
t
=>
t
.
id
))
}
},
watch
:
{
visible
(
val
)
{
if
(
val
)
{
this
.
checkList
=
this
.
lineList
.
map
(
t
=>
t
.
id
)
this
.
handleCheckedCitiesChange
()
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.export-container
{
position
:
absolute
;
right
:
0px
;
top
:
45px
;
width
:
400px
;
height
:
calc
(
100%
-
50px
);
background-color
:
#fff
;
}
</
style
>
src/views/Home.vue
View file @
a061bc3a
...
...
@@ -307,6 +307,21 @@ export default {
height
:
width
+
'
px
'
}
}
},
watch
:
{
exportVisible
(
val
)
{
if
(
!
val
)
{
let
list
=
this
.
lineList
.
map
(
lineObj
=>
{
return
{
...
lineObj
,
color
:
'
blue
'
,
lastPointColor
:
undefined
,
lastPointSize
:
undefined
}
});
this
.
lineList
=
list
}
}
}
}
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment