Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
component-lib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
郭铭瑶
component-lib
Commits
2e95b6bd
Commit
2e95b6bd
authored
Nov 10, 2021
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A013加装电梯筛选数据及emit出弹窗
parent
7f6ca88b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
12 deletions
+31
-12
serve.vue
dev/serve.vue
+8
-1
index.vue
src/lib/A013/index.vue
+13
-2
index.vue
src/lib/A017/index.vue
+10
-9
No files found.
dev/serve.vue
View file @
2e95b6bd
...
...
@@ -32,6 +32,13 @@ function copyName(name) {
document
.
execCommand
(
'Copy'
)
document
.
body
.
removeChild
(
input
)
}
document
.
addEventListener
(
'dblclick'
,
(
e
)
=>
{
console
.
log
(
e
)
console
.
log
(
e
.
target
?.
_uid
)
e
.
target
?.
classList
?.
add
(
'need-update'
)
// e.target.innerText = 'test'
})
</
script
>
<
style
lang=
"stylus"
scoped
>
...
...
@@ -94,7 +101,7 @@ html, body
width 100%
height 100%
user-select none
font-size 1
6
vh
font-size 1
5
vh
line-height 1.5
p
margin 0
...
...
src/lib/A013/index.vue
View file @
2e95b6bd
...
...
@@ -29,7 +29,7 @@
</div>
<div
class=
"content"
>
<template
v-if=
"list.length > 0"
>
<div
v-for=
"(item, i) in list"
:key=
"i"
>
<div
v-for=
"(item, i) in list"
:key=
"i"
@
click
.
stop=
"onClick(item)"
>
<span>
{{
i
+
1
}}
</span>
<span
:title=
"item.name"
>
{{
item
.
name
}}
</span>
<span
:title=
"item.address"
>
{{
item
.
address
}}
</span>
...
...
@@ -54,9 +54,11 @@ const _config = {
export
default
_config
</
script
>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'vue'
import
{
ref
,
watch
}
from
'vue'
import
{
NSpace
,
NSelect
}
from
'naive-ui'
import
{
ajax
}
from
'@/ajax'
import
bus
from
'@/util/event-bus'
const
tabs
=
[
{
name
:
'开工项目'
,
key
:
'6'
},
{
name
:
'竣工项目'
,
key
:
'7'
},
...
...
@@ -75,6 +77,7 @@ function selectTab(key) {
const
areaOptions
=
ref
([{
label
:
'全区'
,
value
:
'all'
}])
// const year = ref('2021')
const
area
=
ref
(
'all'
)
watch
(()
=>
area
.
value
,
fetchList
)
ajax
.
get
({
url
:
_config
.
apis
.
streets
,
...
...
@@ -125,6 +128,7 @@ function fetchList() {
}
}
list
.
value
=
(
res
?.
data
?.
content
||
[]).
map
((
item
)
=>
({
...
item
,
name
:
item
.
stNameFrst
,
address
:
item
.
unitAddr
,
status
:
switchType
(
item
.
evaluateType
),
...
...
@@ -132,6 +136,10 @@ function fetchList() {
})
}
fetchList
()
function
onClick
(
data
)
{
bus
.
emit
(
'elevatorInfo'
,
data
)
}
</
script
>
<
style
lang=
"stylus"
scoped
>
...
...
@@ -164,6 +172,9 @@ fetchList()
justify-content space-between
align-items center
padding .04rem .06rem
cursor pointer
&:hover
box-shadow none
&+div
margin-top .05rem
>span
...
...
src/lib/A017/index.vue
View file @
2e95b6bd
...
...
@@ -127,15 +127,16 @@ const list = ref<any[]>([
{
name
:
'小梁薄板'
,
value
:
0
},
])
async
function
onClick
({
query
,
icon
})
{
const
data
=
(
await
ajax
.
get
({
function
onClick
({
query
,
icon
})
{
ajax
.
get
({
url
:
_config
.
apis
.
list
,
params
:
{
pageSize
:
9000
,
createTime_desc
:
'desc'
,
...
query
},
})
)?.
data
?.
content
||
[]
.
then
((
res
)
=>
{
const
data
=
res
?.
data
?.
content
||
[]
bus
.
emit
(
'addPoints'
,
{
data
,
icon
,
size
:
12
})
})
}
</
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