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
9a1dc521
Commit
9a1dc521
authored
Oct 19, 2021
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10.19暂存更改
parent
1a3c24d6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
248 additions
and
25 deletions
+248
-25
api.ts
src/ajax/api.ts
+1
-1
clientLayersOperate.ts
src/util/clientLayersOperate.ts
+3
-3
activity-list-modal.vue
src/view/components/activity-list-modal.vue
+0
-1
basic-info.vue
src/view/components/basic-info.vue
+36
-7
filter-drawer.vue
src/view/components/filter-drawer.vue
+203
-10
struct-modal.vue
src/view/components/struct-modal.vue
+5
-3
No files found.
src/ajax/api.ts
View file @
9a1dc521
...
...
@@ -33,7 +33,7 @@ switch (process.env.NODE_ENV) {
default
:
// 本地开发环境
BASE_URL
=
'/api'
// 由 vite.config 代理
TOKEN
=
'
468b4d99-0ae6-4451-8c0c-b3508e715b22
'
TOKEN
=
'
ab100c91-298e-4b21-8f6d-13b6e9375914
'
MAP_CONFIG
=
{
jsApiUrl
:
'http://10.108.3.41/arcgis_js_api/library/4.18/init.js'
,
cssUrl
:
'http://10.108.3.41/arcgis_js_api/library/4.18/esri/css/main.css'
,
...
...
src/util/clientLayersOperate.ts
View file @
9a1dc521
...
...
@@ -146,9 +146,9 @@ export default {
// },
// popupTemplate: Parameters.popupTemplate,
fields
:
fields
,
featureReduction
:
{
type
:
'selection'
,
},
//
featureReduction: {
//
type: 'selection',
//
},
// elevationInfo: Parameters.elevationInfo,
spatialReference
:
SpatialReference
.
WebMercator
,
})
...
...
src/view/components/activity-list-modal.vue
View file @
9a1dc521
...
...
@@ -235,7 +235,6 @@ const columns = [
type: activity?.find((e) => e.name === tag)?.type || 'default',
name: tag,
}))
console.log('123', types)
return h(NSpace, () => [
...types.map((item, i) =>
h(
...
...
src/view/components/basic-info.vue
View file @
9a1dc521
...
...
@@ -111,14 +111,31 @@
<span>
{{ tips.name }}总数
</span>
</div>
</div>
<div
v-if=
"tips.name.includes('两新')"
>
<
template
v-if=
"tips.name.includes('两新')"
>
<div>
<div>
<p>
<m-count
class=
"count"
:value=
"tips.outStreetValue"
/>
<span>
个
</span>
<m-count
class=
"count"
:value=
"tips.outStreetValue"
/>
<span>
个
</span>
</p>
<span>
{{
tips
.
name
}}
(街道外)
</span>
</div>
</div>
<div>
<div>
<p>
<m-count
class=
"count"
:value=
"tips.independent"
/>
<span>
个
</span>
</p>
<span>
独立支部数
</span>
</div>
</div>
<div>
<div>
<p><m-count
class=
"count"
:value=
"tips.combine"
/>
<span>
个
</span></p>
<span>
联合支部数
</span>
</div>
</div>
</
template
>
</div>
</template>
...
...
@@ -205,7 +222,15 @@ const tagList = [
{
name
:
'“两新”党组织'
,
key
:
'两新'
},
]
const
tips
=
ref
({
interface
Tips
{
show
:
boolean
name
:
string
value
:
number
outStreetValue
:
number
independent
?:
number
combine
?:
number
}
const
tips
=
ref
<
Tips
>
({
show
:
false
,
name
:
''
,
value
:
0
,
...
...
@@ -242,6 +267,10 @@ const clickTag = async ({ key, name }: any) => {
data
.
filter
(
(
item
)
=>
!
item
[
'所属街道'
]
||
item
[
'所属街道'
]
!==
'花木街道'
,
)?.
length
||
0
,
independent
:
data
.
filter
((
item
)
=>
item
?.[
'类别中类'
]
===
'独立支部'
)?.
length
||
0
,
combine
:
data
.
filter
((
item
)
=>
item
?.[
'类别中类'
]
===
'联合支部'
)?.
length
||
0
,
}
}
store
.
commit
(
'SET_CUR_TAG'
,
key
)
...
...
src/view/components/filter-drawer.vue
View file @
9a1dc521
...
...
@@ -52,6 +52,67 @@
</div>
</n-collapse-item>
<n-collapse-item
title=
"党员"
name=
"2"
>
<div
class=
"member-filter"
>
<div>
<p>
党龄筛选
</p>
<n-input-number
v-model:value=
"partyAge"
class=
"input"
:min=
"0"
:max=
"100"
size=
"small"
:show-button=
"false"
>
<
template
#
suffix
>
年
</
template
>
</n-input-number>
<n-space
justify=
"end"
>
<n-button
size=
"tiny"
@
click=
"resetMember('age')"
>
重置
</n-button>
<n-button
size=
"tiny"
type=
"primary"
@
click=
"searchMember('age')"
>
筛选
</n-button>
</n-space>
</div>
<div>
<p>
入党日期筛选
</p>
<n-space
justify=
"space-between"
align=
"center"
>
<n-date-picker
v-model:value=
"partyStart"
class=
"input"
type=
"date"
clearable
size=
"small"
:is-date-disabled=
"disableDateStart"
/>
-
<n-date-picker
v-model:value=
"partyEnd"
class=
"input"
type=
"date"
clearable
size=
"small"
:is-date-disabled=
"disableDateEnd"
/>
</n-space>
<n-space
justify=
"end"
>
<n-button
size=
"tiny"
@
click=
"resetMember('date')"
>
重置
</n-button>
<n-button
size=
"tiny"
type=
"primary"
@
click=
"searchMember('date')"
>
筛选
</n-button>
</n-space>
</div>
</div>
<div
class=
"list"
>
<div
v-for=
"item in member"
...
...
@@ -249,6 +310,27 @@ const member = ref<Tags>([])
const
getMemberTags
=
async
()
=>
{
member
.
value
=
await
fetchTags
(
'党员'
)
}
const
partyAge
=
ref
<
number
|
null
>
(
null
)
const
partyStart
=
ref
<
number
|
null
>
(
null
)
const
partyEnd
=
ref
<
number
|
null
>
(
null
)
const
disableDateStart
=
(
ts
:
number
)
=>
{
const
cur
=
dayjs
(
ts
)
const
start
=
dayjs
(
'1900-01-01'
)
let
end
=
dayjs
()
if
(
partyEnd
.
value
)
{
end
=
dayjs
(
partyEnd
.
value
)
}
return
!
cur
.
isAfter
(
start
)
||
!
cur
.
isBefore
(
end
)
}
const
disableDateEnd
=
(
ts
:
number
)
=>
{
const
cur
=
dayjs
(
ts
)
let
start
=
dayjs
(
'1900-01-01'
)
const
end
=
dayjs
()
if
(
partyStart
.
value
)
{
start
=
dayjs
(
partyStart
.
value
)
}
return
!
cur
.
isAfter
(
start
)
||
!
cur
.
isBefore
(
end
)
}
function
reset
()
{
organization
.
value
=
organization
.
value
.
map
((
item
)
=>
({
...
...
@@ -322,17 +404,9 @@ const getDetail = async (type: string, name: string) => {
break
case
'member'
:
if
(
name
===
'光荣在党50年'
)
{
const
date
=
[
dayjs
().
subtract
(
59
,
'year'
).
format
(
'YYYY-MM-DD'
),
dayjs
().
subtract
(
50
,
'year'
).
format
(
'YYYY-MM-DD'
),
]
res
=
await
useFetchMember
({
q
:
`paths @ "加入中共党组织日期" && string >= "
${
date
[
0
]}
",paths @ "加入中共党组织日期" && string <= "
${
date
[
1
]}
",paths @ "党组织编号" && string @ "
${
store
.
state
.
auth
.
code
}
"`
,
})
}
else
if
(
name
===
'党心暖我心'
)
{
const
date
=
dayjs
().
subtract
(
60
,
'year'
).
format
(
'YYYY-MM-DD'
)
const
year
=
dayjs
().
subtract
(
51
,
'year'
).
format
(
'YYYY'
)
res
=
await
useFetchMember
({
q
:
`paths @ "加入中共党组织日期" && string
<= "
${
date
}
",paths @ "党组织编号" && string @ "
${
store
.
state
.
auth
.
code
}
"`
,
q
:
`paths @ "加入中共党组织日期" && string
@ "
${
year
}
",paths @ "党组织编号" && string @ "
${
store
.
state
.
auth
.
code
}
"`
,
})
}
else
{
res
=
await
useFetchMember
({
...
...
@@ -376,15 +450,112 @@ const handleExport = async (type: string, key: string, name: string) => {
useExportXlsx
(
data
,
name
)
}
function
resetMember
(
type
)
{
switch
(
type
)
{
case
'age'
:
partyAge
.
value
=
null
break
case
'date'
:
partyStart
.
value
=
null
partyEnd
.
value
=
null
break
default
:
break
}
const
pointData
:
any
[]
=
[]
orgPointData
.
value
.
forEach
((
item
:
any
[])
=>
{
if
(
!
item
||
item
.
length
===
0
)
return
pointData
.
push
(
...
item
.
map
(({
extra
})
=>
({
上海
2000
纬度
:
extra
[
'上海2000纬度'
]
||
extra
[
'居住地上海2000纬度'
]
||
extra
[
'党组织上海2000纬度'
],
上海
2000
经度
:
extra
[
'上海2000经度'
]
||
extra
[
'居住地上海2000经度'
]
||
extra
[
'党组织上海2000经度'
],
...
extra
,
})),
)
})
store
.
commit
(
'SET_MAP_POINTS'
,
pointData
)
}
async
function
searchMember
(
type
)
{
member
.
value
.
forEach
((
item
)
=>
(
item
.
checked
=
false
))
const
query
:
string
[]
=
[
`paths @ "党组织编号" && string @ "
${
store
.
state
.
auth
.
code
}
"`
,
]
switch
(
type
)
{
case
'age'
:
partyStart
.
value
=
null
partyEnd
.
value
=
null
if
(
partyAge
.
value
)
{
const
year
=
dayjs
()
.
subtract
(
+
partyAge
.
value
-
1
,
'year'
)
.
format
(
'YYYY'
)
query
.
push
(
`paths @ "加入中共党组织日期" && string @ "
${
year
}
"`
)
}
break
case
'date'
:
partyAge
.
value
=
null
if
(
partyStart
.
value
)
{
query
.
push
(
`paths @ "加入中共党组织日期" && string >= "
${
dayjs
(
partyStart
.
value
,
).
format
(
'YYYY-MM-DD'
)}
"`
,
)
}
if
(
partyEnd
.
value
)
{
query
.
push
(
`paths @ "加入中共党组织日期" && string <= "
${
dayjs
(
partyEnd
.
value
,
).
format
(
'YYYY-MM-DD'
)}
"`
,
)
}
break
default
:
break
}
const
memData
=
await
useFetchMember
({
q
:
query
.
join
(
','
),
})
const
total
=
[...
orgPointData
.
value
,
...
memData
]
const
pointData
:
any
[]
=
[]
total
.
forEach
((
item
:
any
[])
=>
{
if
(
!
item
||
item
.
length
===
0
)
return
pointData
.
push
(
...
item
.
map
(({
extra
})
=>
({
上海
2000
纬度
:
extra
[
'上海2000纬度'
]
||
extra
[
'居住地上海2000纬度'
]
||
extra
[
'党组织上海2000纬度'
],
上海
2000
经度
:
extra
[
'上海2000经度'
]
||
extra
[
'居住地上海2000经度'
]
||
extra
[
'党组织上海2000经度'
],
...
extra
,
})),
)
})
store
.
commit
(
'SET_MAP_POINTS'
,
pointData
)
}
const
orgPointData
=
ref
<
any
>
([])
watch
(
[()
=>
organization
.
value
,
()
=>
member
.
value
],
async
([
organization
,
member
])
=>
{
const
pointData
:
any
[]
=
[]
const
orgKeys
=
organization
.
filter
((
e
)
=>
e
.
checked
).
map
((
e
)
=>
e
.
key
)
const
memKeys
=
member
.
filter
((
e
)
=>
e
.
checked
).
map
((
e
)
=>
e
.
key
)
if
(
memKeys
&&
memKeys
.
length
>
0
)
{
partyAge
.
value
=
null
partyStart
.
value
=
null
partyEnd
.
value
=
null
}
const
orgData
=
await
Promise
.
all
(
orgKeys
.
map
((
key
)
=>
getDetail
(
'organization'
,
key
)),
)
orgPointData
.
value
=
orgData
const
memData
=
await
Promise
.
all
(
memKeys
.
map
((
key
)
=>
getDetail
(
'member'
,
key
)),
)
...
...
@@ -629,6 +800,16 @@ watch(
color $red
cursor pointer
font-size .08rem
.member-filter
background #f7f7f7
padding .05rem .1rem
>div
border-bottom .01rem solid $light-gray
padding .1rem 0
p
font-family $font-ping-medium
.input
margin .05rem 0
#geo-filter
.nav
padding .03rem .1rem
...
...
@@ -700,6 +881,18 @@ watch(
.n-checkbox--checked
.n-checkbox__label
color $red
.n-input-number
width 100%
.n-input-wrapper
padding-right 0
.n-input__suffix
background #f3f4f7
border-left .01rem solid $light-gray
padding 0 .1rem
.n-date-picker
width 1.14rem
.n-input
background #fff
#geo-filter
.n-tabs
...
...
src/view/components/struct-modal.vue
View file @
9a1dc521
...
...
@@ -840,10 +840,12 @@ async function setCommunityParty() {
datasource
.
push
(
item
)
}
})
const
bigSix
=
datasource
.
find
((
e
:
any
)
=>
e
[
'党组织名称'
]?.
includes
(
'六大社区党委'
),
const
bigSix
=
datasource
.
find
(
(
e
:
any
)
=>
e
[
'党组织编号'
]
===
'001.001.031.014.205.002.00a'
,
)
const
twoNew
=
datasource
.
find
(
(
e
:
any
)
=>
e
[
'党组织编号'
]
===
'001.001.031.014.205.002.00b'
,
)
const
twoNew
=
datasource
.
find
((
e
:
any
)
=>
e
[
'党组织名称'
]?.
includes
(
'两新'
))
bigSix
.
children
=
await
Promise
.
all
(
bigSixChildren
.
map
(
async
(
e
:
any
,
i
:
number
)
=>
{
...
...
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