Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
huamu
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
郭铭瑶
huamu
Commits
7cb46791
Commit
7cb46791
authored
Sep 29, 2021
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整弹窗字号
parent
85a74bdb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
16 deletions
+27
-16
actions.ts
src/store/actions.ts
+6
-1
mutations.ts
src/store/mutations.ts
+3
-0
state.ts
src/store/state.ts
+1
-0
data2html.ts
src/util/data2html.ts
+3
-3
building-drawer.vue
src/view/components/building-drawer.vue
+9
-1
filter-drawer.vue
src/view/components/filter-drawer.vue
+4
-11
vite.config.js
vite.config.js
+1
-0
No files found.
src/store/actions.ts
View file @
7cb46791
...
...
@@ -109,7 +109,6 @@ export default {
/** 地图直接点击楼栋获取数据 */
async
getBuildingDetail
({
commit
}:
Method
,
id
:
string
)
{
if
(
state
.
showFilterDrawer
)
return
commit
(
'SET_SHOW_BUILDING_DETAIL'
,
false
)
commit
(
'SET_LOADING'
,
true
)
const
building
=
...
...
@@ -122,6 +121,12 @@ export default {
commit
(
'SET_LOADING'
,
false
)
return
}
if
(
state
.
showFilterDrawer
)
{
// 筛选侧边栏展开的情况下直接点击地图楼栋
commit
(
'SET_BUILDING_DETAIL_BY_NEXT'
,
building
)
commit
(
'SET_LOADING'
,
false
)
return
}
const
floors
=
await
getFloors
(
building
)
commit
(
'SET_BUILDING_DETAIL'
,
{
building
,
floors
})
commit
(
'SET_SHOW_BUILDING_DETAIL'
,
true
)
...
...
src/store/mutations.ts
View file @
7cb46791
...
...
@@ -60,4 +60,7 @@ export default {
)
{
state
.
buildingDetail
=
data
},
SET_BUILDING_DETAIL_BY_NEXT
(
state
:
GlobalStateProps
,
data
:
any
)
{
state
.
buildingDetailByNext
=
data
},
}
src/store/state.ts
View file @
7cb46791
...
...
@@ -65,4 +65,5 @@ export default {
building
:
any
floors
:
any
[]
},
buildingDetailByNext
:
{},
}
src/util/data2html.ts
View file @
7cb46791
...
...
@@ -27,12 +27,13 @@ const style = `
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: .11rem;
}
.pop-container > p {
margin-bottom: .04rem;
padding: 0 .02rem;
}
.title {
.
pop-container .
title {
font-size: .13rem;
font-family: PingFangMedium, 'Avenir', Helvetica, Arial, sans-serif;
}
...
...
@@ -41,7 +42,7 @@ const style = `
flex-wrap: wrap;
margin: .05rem 0;
}
.tag {
.
pop-container .
tag {
display: inline-block;
border-radius: .04rem;
font-size: .1rem;
...
...
@@ -143,7 +144,6 @@ const style = `
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: .11rem;
}
.pop-container .wrapper > .item p {
font-family: PingFangMedium, 'Avenir', Helvetica, Arial, sans-serif;
...
...
src/view/components/building-drawer.vue
View file @
7cb46791
...
...
@@ -108,7 +108,7 @@
</template>
<
script
lang=
"ts"
setup
>
import
{
computed
,
onMounted
,
PropType
,
ref
}
from
'vue'
import
{
computed
,
onMounted
,
PropType
,
ref
,
watch
}
from
'vue'
import
store
from
'@/store'
import
dot
from
'@images/dot.svg'
import
{
ArrowForward
,
ArrowBack
,
ArrowDown
}
from
'@vicons/ionicons5'
...
...
@@ -238,6 +238,14 @@ const buildingNext = async (building: any) => {
setBuilding
(
building
,
true
)
showBuildingDetail
.
value
=
true
}
watch
(
()
=>
store
.
state
.
buildingDetailByNext
,
(
building
)
=>
{
if
(
!
building
)
return
buildingNext
(
building
)
},
{
deep
:
true
},
)
</
script
>
<
style
lang=
"stylus"
scoped
>
...
...
src/view/components/filter-drawer.vue
View file @
7cb46791
...
...
@@ -220,11 +220,8 @@ const setTab = (val: string) => {
curTab
.
value
=
val
}
const
fetchTags
=
async
(
type
:
string
,
):
Promise
<
{
key
:
string
;
name
:
string
;
count
:
number
;
checked
:
boolean
}[]
>
=>
{
type
Tags
=
{
key
:
string
;
name
:
string
;
count
:
number
;
checked
:
boolean
}[]
const
fetchTags
=
async
(
type
:
string
):
Promise
<
Tags
>
=>
{
const
res
=
await
useFetchTag
({
keys
:
'标签名称'
,
q
:
`paths @ "所属模块" && string == "
${
type
}
"`
,
...
...
@@ -243,16 +240,12 @@ const fetchTags = async (
}),
)
}
const
organization
=
ref
<
{
key
:
string
;
name
:
string
;
count
:
number
;
checked
:
boolean
}[]
>
([])
const
organization
=
ref
<
Tags
>
([])
const
getOrgTags
=
async
()
=>
{
organization
.
value
=
await
fetchTags
(
'党组织'
)
}
const
member
=
ref
<
{
key
:
string
;
name
:
string
;
count
:
number
;
checked
:
boolean
}[]
>
([])
const
member
=
ref
<
Tags
>
([])
const
getMemberTags
=
async
()
=>
{
member
.
value
=
await
fetchTags
(
'党员'
)
}
...
...
vite.config.js
View file @
7cb46791
...
...
@@ -21,6 +21,7 @@ export default defineConfig({
},
},
server
:
{
port
:
3001
,
proxy
:
{
'/api'
:
{
target
:
'https://survey.maicedata.com/api/data/'
,
...
...
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