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
7ef6e681
Commit
7ef6e681
authored
Sep 15, 2021
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打包除ts错误
parent
a17f3d84
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
334 deletions
+23
-334
api-archive.ts
src/ajax/api-archive.ts
+0
-283
api.ts
src/ajax/api.ts
+5
-6
useChartGenerate.ts
src/components/MyComponent/MyChart/useChartGenerate.ts
+1
-1
util.ts
src/components/MyComponent/util.ts
+1
-1
useAliOss.ts
src/hooks/useAliOss.ts
+1
-1
shims-vue.d.ts
src/shims-vue.d.ts
+1
-0
tsx-component-example.tsx
src/tsx-component-example.tsx
+0
-34
activity-list-modal.vue
src/view/components/activity-list-modal.vue
+1
-1
filter-drawer.vue
src/view/components/filter-drawer.vue
+12
-7
tsconfig.json
tsconfig.json
+1
-0
No files found.
src/ajax/api-archive.ts
deleted
100644 → 0
View file @
a17f3d84
This diff is collapsed.
Click to expand it.
src/ajax/api.ts
View file @
7ef6e681
let
BASE_URL
=
''
let
BASE_URL
:
string
=
''
let
TOKEN
=
null
let
TOKEN
:
string
=
''
const
getCookie
=
(
name
:
string
):
string
|
null
=>
{
const
getCookie
=
(
name
:
string
):
string
|
null
=>
{
const
reg
:
RegExp
=
new
RegExp
(
`(^| )
${
name
}
=([^;]*)(;|$)`
)
const
reg
:
RegExp
=
new
RegExp
(
`(^| )
${
name
}
=([^;]*)(;|$)`
)
const
arr
:
RegExpMatchArray
|
null
=
document
.
cookie
.
match
(
reg
)
const
arr
:
RegExpMatchArray
|
null
=
document
.
cookie
.
match
(
reg
)
if
(
arr
)
{
if
(
arr
)
return
unescape
(
arr
[
2
])
return
unescape
(
arr
[
2
])
}
return
null
return
null
}
}
...
@@ -14,7 +12,7 @@ switch (process.env.NODE_ENV) {
...
@@ -14,7 +12,7 @@ switch (process.env.NODE_ENV) {
case
'production'
:
case
'production'
:
BASE_URL
=
'https://survey.maicedata.com/api/data/'
BASE_URL
=
'https://survey.maicedata.com/api/data/'
TOKEN
=
LZString
.
decompressFromEncodedURIComponent
(
TOKEN
=
LZString
.
decompressFromEncodedURIComponent
(
getCookie
(
'__DM_TOKEN__'
)
||
localStorage
.
get
(
'dm_token_'
),
getCookie
(
'__DM_TOKEN__'
)
||
window
.
localStorage
.
getItem
(
'dm_token_'
),
)
)
break
break
default
:
default
:
...
@@ -37,4 +35,5 @@ export default {
...
@@ -37,4 +35,5 @@ export default {
ATTACHMENT
:
'988fc63e-fa55-4729-851d-24c4355213f2'
,
ATTACHMENT
:
'988fc63e-fa55-4729-851d-24c4355213f2'
,
TAG
:
'54344e11-c0d3-40d5-8f99-771066249328'
,
TAG
:
'54344e11-c0d3-40d5-8f99-771066249328'
,
GET_AUTH
:
'988fc63e-fa55-4729-851d-24c4355213f2/storage/grant'
,
GET_AUTH
:
'988fc63e-fa55-4729-851d-24c4355213f2/storage/grant'
,
GET_USER_ID
:
'/auth/user/bytoken'
,
}
}
src/components/MyComponent/MyChart/useChartGenerate.ts
View file @
7ef6e681
...
@@ -74,7 +74,7 @@ const transRadarOption = (
...
@@ -74,7 +74,7 @@ const transRadarOption = (
const
length
=
(
source
&&
source
.
length
)
||
0
const
length
=
(
source
&&
source
.
length
)
||
0
const
result
=
Object
.
assign
({},
defaultOption
)
const
result
=
Object
.
assign
({},
defaultOption
)
const
seriesData
=
[]
const
seriesData
:
RadarSeriesOption
[]
=
[]
for
(
let
index
=
0
;
index
<
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
length
;
index
++
)
{
const
data
:
number
[]
=
[]
const
data
:
number
[]
=
[]
Object
.
keys
(
source
[
index
]).
forEach
((
key
)
=>
{
Object
.
keys
(
source
[
index
]).
forEach
((
key
)
=>
{
...
...
src/components/MyComponent/util.ts
View file @
7ef6e681
...
@@ -30,7 +30,7 @@ export const toRGB = (c: string, opacity = 1): string => {
...
@@ -30,7 +30,7 @@ export const toRGB = (c: string, opacity = 1): string => {
}
}
color
=
newColor
color
=
newColor
}
}
const
result
=
[]
const
result
:
number
[]
=
[]
for
(
let
i
=
1
;
i
<
7
;
i
+=
2
)
{
for
(
let
i
=
1
;
i
<
7
;
i
+=
2
)
{
result
.
push
(
parseInt
(
`0x
${
color
.
slice
(
i
,
i
+
2
)}
`
))
result
.
push
(
parseInt
(
`0x
${
color
.
slice
(
i
,
i
+
2
)}
`
))
}
}
...
...
src/hooks/useAliOss.ts
View file @
7ef6e681
...
@@ -15,7 +15,7 @@ export default async function useAliOss(file: any) {
...
@@ -15,7 +15,7 @@ export default async function useAliOss(file: any) {
const
fr
=
new
FileReader
()
const
fr
=
new
FileReader
()
const
filename
=
file
.
name
const
filename
=
file
.
name
return
new
Promise
((
resolve
:
any
)
=>
{
return
new
Promise
((
resolve
)
=>
{
fr
.
readAsArrayBuffer
(
file
)
fr
.
readAsArrayBuffer
(
file
)
fr
.
onload
=
async
(
e
)
=>
{
fr
.
onload
=
async
(
e
)
=>
{
const
buffer
=
new
OSS
.
Buffer
(
e
.
target
&&
e
.
target
.
result
)
const
buffer
=
new
OSS
.
Buffer
(
e
.
target
&&
e
.
target
.
result
)
...
...
src/shims-vue.d.ts
View file @
7ef6e681
...
@@ -26,6 +26,7 @@ declare interface Window {
...
@@ -26,6 +26,7 @@ declare interface Window {
dojoConfig
:
any
dojoConfig
:
any
apiRoot
:
any
apiRoot
:
any
map
:
any
map
:
any
graphiclayer
:
any
sceneView
:
any
sceneView
:
any
sceneLayer0
:
any
sceneLayer0
:
any
modelHighlight
:
any
modelHighlight
:
any
...
...
src/tsx-component-example.tsx
deleted
100644 → 0
View file @
a17f3d84
import
{
computed
,
defineComponent
,
PropType
,
ref
}
from
'vue'
export
default
defineComponent
({
name
:
'TsxComponent'
,
props
:
{
msg
:
{
type
:
String
as
PropType
<
string
>
,
default
:
'Tsx'
,
},
},
setup
(
props
)
{
const
count
=
ref
(
1
)
const
list
=
computed
(()
=>
{
const
result
=
[]
for
(
let
i
=
0
;
i
<
count
.
value
;
i
++
)
{
result
.
push
(
i
+
1
)
}
return
result
})
return
()
=>
(
<>
<
h1
>
Hello,
{
props
.
msg
}
</
h1
>
<
button
onClick=
{
()
=>
(
count
.
value
+=
1
)
}
>
Add count:
<
b
>
{
count
.
value
}
</
b
>
</
button
>
<
ul
>
{
list
.
value
.
map
((
_
,
i
)
=>
(
<
li
>
{
i
+
1
}
</
li
>
))
}
</
ul
>
</>
)
},
})
src/view/components/activity-list-modal.vue
View file @
7ef6e681
...
@@ -157,7 +157,7 @@ const typeOptions = computed(() => {
...
@@ -157,7 +157,7 @@ const typeOptions = computed(() => {
watch
(
watch
(
()
=>
model
.
value
,
()
=>
model
.
value
,
(
cur
)
=>
{
(
cur
)
=>
{
const
query
=
[]
const
query
:
string
[]
=
[]
cur
.
dateStart
&&
cur
.
dateStart
&&
query
.
push
(
query
.
push
(
`paths @ "活动日期" && number >=
${
+
(
cur
.
dateStart
+
''
).
slice
(
0
,
10
)}
`
,
`paths @ "活动日期" && number >=
${
+
(
cur
.
dateStart
+
''
).
slice
(
0
,
10
)}
`
,
...
...
src/view/components/filter-drawer.vue
View file @
7ef6e681
...
@@ -285,7 +285,7 @@ onMounted(() => {
...
@@ -285,7 +285,7 @@ onMounted(() => {
})
})
const
getDetail
=
async
(
type
:
string
,
name
:
string
)
=>
{
const
getDetail
=
async
(
type
:
string
,
name
:
string
)
=>
{
let
res
=
null
let
res
=
[]
switch
(
type
)
{
switch
(
type
)
{
case
'organization'
:
case
'organization'
:
res
=
await
useFetchOrg
({
res
=
await
useFetchOrg
({
...
@@ -319,8 +319,7 @@ const getDetail = async (type: string, name: string) => {
...
@@ -319,8 +319,7 @@ const getDetail = async (type: string, name: string) => {
}
}
const
handleExport
=
async
(
type
:
string
,
key
:
string
,
name
:
string
)
=>
{
const
handleExport
=
async
(
type
:
string
,
key
:
string
,
name
:
string
)
=>
{
const
res
=
await
getDetail
(
type
,
key
)
const
data
=
(
await
getDetail
(
type
,
key
))?.
map
((
item
:
any
)
=>
item
.
extra
)
const
data
=
res
.
map
((
item
:
any
)
=>
item
.
extra
)
useExportFile
(
data
,
type
===
'organization'
?
'党组织名称'
:
'姓名'
,
name
)
useExportFile
(
data
,
type
===
'organization'
?
'党组织名称'
:
'姓名'
,
name
)
}
}
...
@@ -332,7 +331,10 @@ watch(
...
@@ -332,7 +331,10 @@ watch(
const
result
=
await
Promise
.
all
(
const
result
=
await
Promise
.
all
(
keys
.
map
((
key
)
=>
getDetail
(
'organization'
,
key
)),
keys
.
map
((
key
)
=>
getDetail
(
'organization'
,
key
)),
)
)
result
.
forEach
((
item
:
any
[])
=>
pointData
.
push
(...
item
.
map
((
e
)
=>
e
.
extra
)))
result
.
forEach
((
item
:
any
[])
=>
{
if
(
!
item
||
item
.
length
===
0
)
return
pointData
.
push
(...
item
.
map
((
e
)
=>
e
.
extra
))
})
console
.
log
(
'organization撒点数据:'
,
pointData
)
console
.
log
(
'organization撒点数据:'
,
pointData
)
// TODO 撒点
// TODO 撒点
},
},
...
@@ -346,7 +348,10 @@ watch(
...
@@ -346,7 +348,10 @@ watch(
const
result
=
await
Promise
.
all
(
const
result
=
await
Promise
.
all
(
keys
.
map
((
key
)
=>
getDetail
(
'member'
,
key
)),
keys
.
map
((
key
)
=>
getDetail
(
'member'
,
key
)),
)
)
result
.
forEach
((
item
:
any
[])
=>
pointData
.
push
(...
item
.
map
((
e
)
=>
e
.
extra
)))
result
.
forEach
((
item
:
any
[])
=>
{
if
(
!
item
||
item
.
length
===
0
)
return
pointData
.
push
(...
item
.
map
((
e
)
=>
e
.
extra
))
})
console
.
log
(
'member撒点数据:'
,
pointData
)
console
.
log
(
'member撒点数据:'
,
pointData
)
// TODO 撒点
// TODO 撒点
},
},
...
@@ -448,7 +453,7 @@ const curPath = computed(() => {
...
@@ -448,7 +453,7 @@ const curPath = computed(() => {
if
(
curGeo
.
value
===
'小区'
&&
!
curCommittee
.
value
)
if
(
curGeo
.
value
===
'小区'
&&
!
curCommittee
.
value
)
return
[
curCommunity
.
value
||
'小区'
]
return
[
curCommunity
.
value
||
'小区'
]
const
result
=
[]
const
result
:
string
[]
=
[]
curArea
.
value
&&
result
.
push
(
curArea
.
value
)
curArea
.
value
&&
result
.
push
(
curArea
.
value
)
curCommittee
.
value
curCommittee
.
value
?
result
.
push
(
curCommittee
.
value
)
?
result
.
push
(
curCommittee
.
value
)
...
@@ -463,7 +468,7 @@ const checkPathThenFetchInfo = () => {
...
@@ -463,7 +468,7 @@ const checkPathThenFetchInfo = () => {
const
area
=
curArea
.
value
const
area
=
curArea
.
value
const
committee
=
curCommittee
.
value
const
committee
=
curCommittee
.
value
const
community
=
curCommunity
.
value
const
community
=
curCommunity
.
value
const
query
=
[]
const
query
:
string
[]
=
[]
area
&&
query
.
push
(
`paths @ "所属社区" && string == "
${
area
}
"`
)
area
&&
query
.
push
(
`paths @ "所属社区" && string == "
${
area
}
"`
)
committee
&&
query
.
push
(
`paths @ "所属居委" && string == "
${
committee
}
"`
)
committee
&&
query
.
push
(
`paths @ "所属居委" && string == "
${
committee
}
"`
)
community
&&
query
.
push
(
`paths @ "所属小区" && string == "
${
community
}
"`
)
community
&&
query
.
push
(
`paths @ "所属小区" && string == "
${
community
}
"`
)
...
...
tsconfig.json
View file @
7ef6e681
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
"sourceMap"
:
true
,
"sourceMap"
:
true
,
"baseUrl"
:
"."
,
"baseUrl"
:
"."
,
"lib"
:
[
"esnext"
,
"dom"
],
"lib"
:
[
"esnext"
,
"dom"
],
"noImplicitAny"
:
false
,
"paths"
:
{
"paths"
:
{
"@/*"
:
[
"src/*"
],
"@/*"
:
[
"src/*"
],
"@images/*"
:
[
"src/assets/images/*"
]
"@images/*"
:
[
"src/assets/images/*"
]
...
...
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