Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 34f3d1cf
authored
Jul 06, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
表单饼图,地图统计等问题
1 parent
5bb8b21a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
71 deletions
vue3-lw-pc/src/views/drainageCode/smartForms/build/formsDetail.vue
vue3-lw-pc/src/views/drainageCode/smartForms/components/ChinaMap.vue
vue3-lw-pc/src/views/drainageCode/smartForms/statistics/DataStatistics.vue
vue3-lw-pc/src/views/drainageCode/smartForms/statistics/UserStatistics.vue
vue3-lw-pc/src/views/drainageCode/smartForms/build/formsDetail.vue
View file @
34f3d1c
...
@@ -501,8 +501,10 @@ export default {
...
@@ -501,8 +501,10 @@ export default {
if
(
q
==
0
)
{
if
(
q
==
0
)
{
cloneCurItem
.
defaultValue
=
defaultValue
[
q
]
+
''
cloneCurItem
.
defaultValue
=
defaultValue
[
q
]
+
''
}
else
{
}
else
{
answer
.
push
(
that
.
deepCopy
(
cloneCurItem
))
let
_cloneCurItem
=
that
.
deepCopy
(
cloneCurItem
)
answer
[
answer
.
length
-
1
].
defaultValue
=
defaultValue
[
q
]
+
''
_cloneCurItem
.
defaultValue
=
defaultValue
[
q
]
+
''
answer
.
push
(
_cloneCurItem
)
btData
.
push
(
_cloneCurItem
)
}
}
}
}
}
}
...
...
vue3-lw-pc/src/views/drainageCode/smartForms/components/ChinaMap.vue
View file @
34f3d1c
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
import
*
as
echarts
from
'echarts'
import
*
as
echarts
from
'echarts'
import
chinaJson
from
'./jsonData/china.json'
import
chinaJson
from
'./jsonData/china.json'
export
default
{
export
default
{
render
:
function
(
createElement
)
{
render
:
function
()
{
return
createElement
(
'div'
,
{
return
h
(
'div'
,
{
id
:
'main
'
,
ref
:
'chart
'
,
style
:
{
style
:
{
height
:
'55
0px'
,
'min-height'
:
'50
0px'
,
width
:
'8
00px'
,
'min-width'
:
'2
00px'
,
margin
:
'auto'
,
margin
:
'auto'
,
},
},
})
})
...
@@ -65,8 +65,8 @@ export default {
...
@@ -65,8 +65,8 @@ export default {
methods
:
{
methods
:
{
initEchart
()
{
initEchart
()
{
let
that
=
this
let
that
=
this
console
.
log
(
'this.Datas'
,
this
.
Datas
.
data
)
//
console.log('this.Datas', this.Datas.data)
console
.
log
(
'this.dataList'
,
this
.
dataList
)
//
console.log('this.dataList', this.dataList)
let
dataList
=
this
.
dataList
let
dataList
=
this
.
dataList
let
max
=
0
let
max
=
0
for
(
let
i
=
0
;
i
<
dataList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
dataList
.
length
;
i
++
)
{
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
}
}
max
=
max
+
5
max
=
max
+
5
const
_this
=
this
const
_this
=
this
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'main'
)
)
var
myChart
=
echarts
.
init
(
this
.
$refs
.
chart
)
echarts
.
registerMap
(
'china'
,
chinaJson
)
echarts
.
registerMap
(
'china'
,
chinaJson
)
var
option
=
{
var
option
=
{
tooltip
:
{
tooltip
:
{
...
@@ -139,6 +139,11 @@ export default {
...
@@ -139,6 +139,11 @@ export default {
],
],
}
}
myChart
.
setOption
(
option
)
myChart
.
setOption
(
option
)
new
ResizeObserver
((
entries
)
=>
{
myChart
.
resize
()
}).
observe
(
this
.
$refs
.
chart
)
myChart
.
on
(
'click'
,
function
(
params
)
{
myChart
.
on
(
'click'
,
function
(
params
)
{
if
(
!
params
.
data
.
ename
)
{
if
(
!
params
.
data
.
ename
)
{
alert
(
'暂无'
+
params
.
name
+
'地图数据'
)
alert
(
'暂无'
+
params
.
name
+
'地图数据'
)
...
...
vue3-lw-pc/src/views/drainageCode/smartForms/statistics/DataStatistics.vue
View file @
34f3d1c
...
@@ -66,13 +66,11 @@
...
@@ -66,13 +66,11 @@
<el-table-column label="收集量" align="center" prop="CollectionQuantity" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="收集量" align="center" prop="CollectionQuantity" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="平均完成时间" align="center" prop="average" min-width="100" show-overflow-tooltip></el-table-column> -->
<el-table-column label="平均完成时间" align="center" prop="average" min-width="100" show-overflow-tooltip></el-table-column> -->
</el-table>
</el-table>
<div
class=
"bottom"
>
<pagination
<pagination
:total=
"total"
:total=
"total"
v-model:page=
"query.pageNum"
v-model:page=
"query.pageNum"
v-model:limit=
"query.pageSize"
v-model:limit=
"query.pageSize"
@
pagination=
"getTableChangeSize(query.pageNum, query.pageSize)"
/>
@
pagination=
"getTableChangeSize(query.pageNum, query.pageSize)"
/>
</div>
</template>
</template>
</div>
</div>
...
@@ -274,15 +272,26 @@ export default {
...
@@ -274,15 +272,26 @@ export default {
},
},
// 地图
// 地图
areaStatisticF
(
data
)
{
areaStatisticF
(
data
)
{
let
that
=
this
console
.
log
(
'123'
)
areaStatistic
(
data
).
then
((
res
)
=>
{
areaStatistic
(
data
).
then
((
res
)
=>
{
console
.
log
(
'地图统计图返回值'
,
res
)
// console.log('地图统计图返回值', res)
that
.
baseListMap
=
res
.
data
// res =[{data:[{name,value}],label:''},{data:[{name,value}],label:''}
for
(
let
i
=
0
;
i
<
that
.
baseListMap
.
length
;
i
++
)
{
let
_data
=
res
.
data
[
0
].
data
that
.
baseListMap
[
i
].
hidden
=
1
let
cities
=
res
.
data
.
map
((
e
)
=>
e
.
data
.
find
((
e2
)
=>
e2
.
value
))
}
cities
.
forEach
((
element
)
=>
{
// that.baseList= res.data;
let
city
=
_data
.
find
((
e
)
=>
element
.
name
===
e
.
name
)
Object
.
assign
(
city
,
element
)
})
this
.
baseListMap
=
[
{
data
:
_data
,
label
:
res
.
data
[
0
].
label
,
hidden
:
1
,
},
]
// for (let i = 0; i < this.baseListMap.length; i++) {
// this.baseListMap[i].hidden = 1
// }
// this.baseList= res.data;
})
})
},
},
// transDefaultValueToView(data) {
// transDefaultValueToView(data) {
...
...
vue3-lw-pc/src/views/drainageCode/smartForms/statistics/UserStatistics.vue
View file @
34f3d1c
<
template
>
<
template
>
<div
style=
"padding-bottom: 30px
;
"
>
<div
style=
"padding-bottom: 30px"
>
<div>
<div>
<div
class=
"g-card"
>
<div
class=
"g-card"
>
<div
class=
"mid-action"
>
<div
class=
"mid-action"
>
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
{{
tableList
[
0
].
answer
}}
{{
tableList
[
0
].
answer
}}
</div>
-->
</div>
-->
<template
v-if=
"tableList"
>
<template
v-if=
"tableList"
>
<el-table
v-loading=
"loading1"
:data=
"tableList"
style=
"width: 100%
;
"
>
<el-table
v-loading=
"loading1"
:data=
"tableList"
style=
"width: 100%"
>
<!--
<el-table-column
label=
"日期"
align=
"center"
min-width=
"100"
show-overflow-tooltip
>
<!--
<el-table-column
label=
"日期"
align=
"center"
min-width=
"100"
show-overflow-tooltip
>
<template
#
default=
"
{ row }">
<template
#
default=
"
{ row }">
<div
style=
"display: flex;justify-content:center;"
>
{{
row
.
updateTime
.
substring
(
0
,
10
)
}}
</div>
<div
style=
"display: flex;justify-content:center;"
>
{{
row
.
updateTime
.
substring
(
0
,
10
)
}}
</div>
...
@@ -26,20 +26,20 @@
...
@@ -26,20 +26,20 @@
{{
row
.
createTime
}}
{{
row
.
createTime
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"用户姓名"
align=
"center"
min-width=
"100"
show-overflow-tooltip
>
<
!-- <
el-table-column label="用户姓名" align="center" min-width="100" show-overflow-tooltip>
<template #default="{ row }">
<template #default="{ row }">
{{ row.name }}
{{ row.name }}
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
label=
"渠道"
align=
"center"
min-width=
"100"
show-overflow-tooltip
>
<
template
#
default=
"{ row }"
>
{{
dataSource
}}
</
template
>
</el-table-column>
<el-table-column label="用户手机号" align="center" min-width="100" show-overflow-tooltip>
<el-table-column label="用户手机号" align="center" min-width="100" show-overflow-tooltip>
<template #default="{ row }">
<template #default="{ row }">
{{ row.mobile }}
{{ row.mobile }}
</template>
</template>
</el-table-column> -->
<el-table-column
label=
"渠道"
align=
"center"
min-width=
"100"
show-overflow-tooltip
>
<
template
#
default=
"{ row }"
>
{{
dataSource
}}
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"openId"
align=
"center"
min-width=
"100"
show-overflow-tooltip
>
<el-table-column
label=
"openId"
align=
"center"
min-width=
"100"
show-overflow-tooltip
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
...
@@ -69,8 +69,7 @@
...
@@ -69,8 +69,7 @@
:total=
"total"
:total=
"total"
v-model:page=
"query.pageNum"
v-model:page=
"query.pageNum"
v-model:limit=
"query.pageSize"
v-model:limit=
"query.pageSize"
@
pagination=
"getTableChangeSize(query.pageNum, query.pageSize)"
@
pagination=
"getTableChangeSize(query.pageNum, query.pageSize)"
/>
/>
</template>
</template>
</div>
</div>
</div>
</div>
...
@@ -78,12 +77,12 @@
...
@@ -78,12 +77,12 @@
</template>
</template>
<
script
>
<
script
>
import
{
statisticsCustomer
,
userExport
}
from
'@/api/drainageCode/smartForms.js'
import
{
statisticsCustomer
,
userExport
}
from
'@/api/drainageCode/smartForms.js'
import
SearchTitle
from
'../components/SearchTitle.vue'
import
SearchTitle
from
'../components/SearchTitle.vue'
export
default
{
export
default
{
props
:
[
'formId'
],
props
:
[
'formId'
],
components
:
{
components
:
{
SearchTitle
SearchTitle
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -92,11 +91,11 @@
...
@@ -92,11 +91,11 @@
baseList
:
''
,
baseList
:
''
,
query
:
{
query
:
{
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
1
pageNum
:
1
,
},
},
tableList
:
[],
tableList
:
[],
exportLoading
:
false
,
exportLoading
:
false
,
dataSource
:
'默认渠道'
dataSource
:
'默认渠道'
,
}
}
},
},
methods
:
{
methods
:
{
...
@@ -105,7 +104,7 @@
...
@@ -105,7 +104,7 @@
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
,
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
exportLoading
=
true
this
.
exportLoading
=
true
let
data
=
this
.
tableSearch
let
data
=
this
.
tableSearch
...
@@ -186,40 +185,26 @@
...
@@ -186,40 +185,26 @@
// })
// })
})
})
},
},
getTableChangeSize
(
a
,
b
)
{
getTableChangeSize
(
pageNum
,
pageSize
)
{
console
.
log
(
'a'
,
a
,
b
)
let
that
=
this
this
.
loading1
=
true
this
.
loading1
=
true
let
data
=
this
.
tableSearch
let
data
=
this
.
tableSearch
console
.
log
(
'data'
,
data
)
if
(
!
data
.
dataSource
)
{
if
(
!
data
.
dataSource
)
{
that
.
loading1
=
false
this
.
loading1
=
false
return
return
}
}
data
.
pageNum
=
a
data
.
pageNum
=
pageNum
data
.
pageSize
=
b
data
.
pageSize
=
pageSize
that
.
dataSource
=
data
.
dataSource
this
.
dataSource
=
data
.
dataSource
statisticsCustomer
(
data
).
then
((
res
)
=>
{
statisticsCustomer
(
data
).
then
((
res
)
=>
{
console
.
log
(
'用户统计数据返回值'
,
res
)
// console.log('用户统计数据返回值', res)
let
b
=
[]
if
(
res
.
rows
?.
length
)
{
if
(
res
.
data
&&
res
.
data
.
length
)
{
this
.
tableList
=
res
.
rows
that
.
tableList
=
[]
this
.
total
=
Number
(
res
.
total
)
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
b
.
push
(
res
.
data
[
i
].
data
)
console
.
log
(
'b'
,
b
)
}
that
.
tableList
=
b
that
.
total
=
Number
(
res
.
data
[
0
].
total
)
}
else
{
that
.
tableList
=
[]
}
}
console
.
log
(
'that.tableList'
,
that
.
tableList
)
this
.
loading1
=
false
// this.tableList = res.data.xAxis.data.length
that
.
loading1
=
false
})
})
},
},
getTableFn
(
data
)
{
getTableFn
(
data
)
{
let
that
=
this
this
.
loading1
=
true
this
.
loading1
=
true
data
.
belongId
=
this
.
$route
.
query
.
id
data
.
belongId
=
this
.
$route
.
query
.
id
// getTableTotal(Object.assign({}, this.query, data)).then(res => {
// getTableTotal(Object.assign({}, this.query, data)).then(res => {
...
@@ -228,20 +213,20 @@
...
@@ -228,20 +213,20 @@
// this.loading = false
// this.loading = false
// })
// })
if
(
!
data
.
dataSource
)
{
if
(
!
data
.
dataSource
)
{
that
.
loading1
=
false
this
.
loading1
=
false
return
return
}
}
this
.
tableSearch
=
data
this
.
tableSearch
=
data
that
.
dataSource
=
data
.
dataSource
this
.
dataSource
=
data
.
dataSource
that
.
getTableChangeSize
(
1
,
10
)
this
.
getTableChangeSize
(
1
,
10
)
}
},
},
mounted
()
{}
},
}
mounted
()
{},
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.dataStatistics_optionGraph_ul
{
.dataStatistics_optionGraph_ul
{
margin-top
:
30px
;
margin-top
:
30px
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
...
@@ -252,9 +237,9 @@
...
@@ -252,9 +237,9 @@
background
:
var
(
--bg-white
);
background
:
var
(
--bg-white
);
padding
:
30px
;
padding
:
30px
;
}
}
}
}
.data-content
{
.data-content
{
margin-top
:
10px
;
margin-top
:
10px
;
.chart-content
{
.chart-content
{
...
@@ -281,5 +266,5 @@
...
@@ -281,5 +266,5 @@
.table-content
{
.table-content
{
margin-top
:
10px
;
margin-top
:
10px
;
}
}
}
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment