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 c41da077
authored
Jul 06, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
删除智能表单-统计-省的市区统计图(直辖市问题)
修复智能表单-统计-饼图数据、省地图数据,用户统计问题
1 parent
66b315dd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
100 additions
and
87 deletions
vue3-lw-pc/src/api/drainageCode/smartForms.js
vue3-lw-pc/src/views/drainageCode/smartForms/build/formsDetail.vue
vue3-lw-pc/src/views/drainageCode/smartForms/components/Channels.vue
vue3-lw-pc/src/views/drainageCode/smartForms/components/ChinaMap.vue
vue3-lw-pc/src/views/drainageCode/smartForms/components/MarketMap.vue
vue3-lw-pc/src/views/drainageCode/smartForms/components/PieChart.vue
vue3-lw-pc/src/views/drainageCode/smartForms/statistics/DataStatistics.vue
vue3-lw-pc/src/api/drainageCode/smartForms.js
View file @
c41da07
...
...
@@ -30,7 +30,7 @@ export function insertInfoToSurvey(data) {
return
request
({
url
:
service
+
'/survey/add'
,
method
:
'post'
,
data
data
,
})
}
...
...
@@ -39,7 +39,7 @@ export function surveyList(data) {
return
request
({
url
:
service
+
'/survey/list'
,
method
:
'GET'
,
params
:
data
params
:
data
,
})
}
...
...
@@ -47,7 +47,7 @@ export function surveyList(data) {
export
function
deleteInfoToSurvey
(
ids
)
{
return
request
({
url
:
service
+
'/survey/delete/'
+
ids
,
method
:
'DELETE'
method
:
'DELETE'
,
})
}
...
...
@@ -55,7 +55,7 @@ export function deleteInfoToSurvey(ids) {
export
function
selectInfoToSurvey
(
id
)
{
return
request
({
url
:
service
+
'/survey/getInfo/'
+
id
,
method
:
'GET'
method
:
'GET'
,
})
}
...
...
@@ -64,7 +64,7 @@ export function submitForm(data) {
return
request
({
url
:
service
+
'/answer/add'
,
method
:
'post'
,
data
data
,
})
}
...
...
@@ -73,7 +73,7 @@ export function isCompleteSurvey(data) {
return
request
({
url
:
service
+
'/answer/isCompleteSurvey'
,
method
:
'post'
,
data
data
,
})
}
...
...
@@ -82,7 +82,7 @@ export function insertPieValue(data) {
return
request
({
url
:
service
+
'/statistic/insertPieValue'
,
method
:
'post'
,
data
data
,
})
}
...
...
@@ -91,7 +91,7 @@ export function updateSurveyStatus(data) {
return
request
({
url
:
service
+
'/survey/updateStatus'
,
method
:
'put'
,
data
data
,
})
}
...
...
@@ -100,7 +100,7 @@ export function getAccessToken(data) {
return
request
({
url
:
service
+
'/Statistics/getAccessToken'
+
data
,
method
:
'get'
,
data
data
,
})
}
...
...
@@ -109,7 +109,7 @@ export function updateSurveyGroup(data) {
return
request
({
url
:
service
+
'/updateSurveyGroup'
,
method
:
'post'
,
data
data
,
})
}
...
...
@@ -120,7 +120,7 @@ export function selectStatistics(data) {
return
request
({
url
:
service
+
'/statistic/getStatistics'
,
method
:
'get'
,
params
:
data
params
:
data
,
})
}
...
...
@@ -129,7 +129,7 @@ export function lineChart(data) {
return
request
({
url
:
service
+
'/statistic/lineChart'
,
method
:
'post'
,
data
data
,
})
}
...
...
@@ -138,7 +138,7 @@ export function StatisticsDataList(data) {
return
request
({
url
:
service
+
'/statistic/dataList'
,
method
:
'post'
,
data
data
,
})
}
...
...
@@ -147,7 +147,7 @@ export function updateInfoToSurvey(data) {
return
request
({
url
:
service
+
'/survey/update'
,
method
:
'put'
,
data
data
,
})
}
...
...
@@ -156,7 +156,7 @@ export function selectAnswerInfo(data) {
return
request
({
url
:
service
+
'/answer/getAnswerList'
,
method
:
'post'
,
data
data
,
})
}
...
...
@@ -165,7 +165,7 @@ export function pieChart(data) {
return
request
({
url
:
service
+
'/statistic/pieChart'
,
method
:
'post'
,
data
data
,
})
}
...
...
@@ -186,7 +186,7 @@ export function overviewExport(data) {
url
:
service
+
'/statistic/data/export'
,
method
:
'post'
,
data
,
responseType
:
'blob'
responseType
:
'blob'
,
})
}
...
...
@@ -196,7 +196,7 @@ export function answerExport(data) {
url
:
service
+
'/statistic/answer/export'
,
method
:
'get'
,
params
:
data
,
responseType
:
'blob'
responseType
:
'blob'
,
})
}
...
...
@@ -206,7 +206,7 @@ export function userExport(data) {
url
:
service
+
'/statistic/user/export'
,
method
:
'post'
,
data
,
responseType
:
'blob'
responseType
:
'blob'
,
})
}
...
...
@@ -215,7 +215,7 @@ export function statisticsCustomer(data) {
return
request
({
url
:
service
+
'/statistic/customer'
,
method
:
'post'
,
data
data
,
})
}
...
...
@@ -224,7 +224,7 @@ export function areaStatistic(data) {
return
request
({
url
:
service
+
'/statistic/areaStatistic'
,
method
:
'post'
,
data
data
,
})
}
...
...
@@ -241,6 +241,14 @@ export function siteStas(data) {
return
request
({
url
:
service
+
'/statistic/siteStas'
,
method
:
'post'
,
data
data
,
})
}
export
function
statisticAdd
(
data
)
{
return
request
({
url
:
service
+
'/statistic/add'
,
method
:
'post'
,
data
,
})
}
vue3-lw-pc/src/views/drainageCode/smartForms/build/formsDetail.vue
View file @
c41da07
...
...
@@ -204,6 +204,7 @@ import {
insertPieValue
,
isCompleteSurvey
,
siteStas
,
statisticAdd
,
}
from
'@/api/drainageCode/smartForms.js'
import
{
getProvinceCityTree
}
from
'@/utils/index'
// import render from './generator/render'
...
...
@@ -321,7 +322,6 @@ export default {
},
index
:
{
handler
(
val
)
{
console
.
log
(
'indexxxxxxxxxxxxxxxxxx'
,
val
)
if
(
val
==
1
)
{
this
.
fromList
.
visibility
=
0
}
else
{
...
...
@@ -872,6 +872,10 @@ export default {
},
async
siteStas
()
{
if
(
!
[
'y'
,
'q'
].
includes
(
this
.
style
))
{
statisticAdd
({
belongId
:
this
.
formId
,
dataSource
:
this
.
dataSource
,
})
//智能表单站点统计 PV
try
{
this
.
userIp
=
this
.
userIp
||
(
await
getIP
())
...
...
vue3-lw-pc/src/views/drainageCode/smartForms/components/Channels.vue
View file @
c41da07
...
...
@@ -7,10 +7,11 @@
</el-table-column>
<el-table-column
label=
"二维码"
align=
"center"
prop=
"createTime"
show-overflow-tooltip
>
<
template
#
default=
"{ row, $index }"
>
<el-popover
placement=
"bottom"
trigger=
"hover"
v-if=
"eImgList[$index]"
>
<el-image
:src=
"eImgList[$index]"
class=
"code-image"
></el-image>
<!--
<el-popover
placement=
"bottom"
trigger=
"hover"
v-if=
"eImgList[$index]"
>
<template
#
reference
><el-image
:src=
"eImgList[$index]"
class=
"code-image--small"
></el-image></
template
>
<el-image
:src=
"eImgList[$index]"
class=
"code-image"
></el-image>
</el-popover>
</el-popover>
-->
</template>
</el-table-column>
<el-table-column
label=
"渠道标识"
align=
"center"
prop=
"createTime"
show-overflow-tooltip
>
...
...
@@ -108,7 +109,7 @@ export default {
console
.
log
(
'二维码转换内容'
,
that
.
baseFormUrl4
+
'&dataSource='
+
that
.
channelsPathList
[
w
])
QRCode
.
toDataURL
(
this
.
baseFormUrl4
+
'&dataSource='
+
that
.
channelsPathList
[
w
],
// 需要转换为二维码的内容
{
width
:
150
,
margin
:
4
,
errorCorrectionLevel
:
'H'
},
{
width
:
150
,
margin
:
2
,
errorCorrectionLevel
:
'H'
},
).
then
((
url
)
=>
(
this
.
eImgList
[
i
]
=
url
))
}
}
...
...
@@ -122,11 +123,11 @@ export default {
<
style
lang=
"scss"
scoped
>
.code-image
{
width
:
200px
;
height
:
200px
;
}
.code-image--small
{
width
:
80px
;
height
:
80px
;
width
:
180px
;
height
:
180px
;
}
//
.code-image--small
{
//
width
:
200px
;
//
height
:
200px
;
//
}
</
style
>
vue3-lw-pc/src/views/drainageCode/smartForms/components/ChinaMap.vue
View file @
c41da07
...
...
@@ -73,7 +73,7 @@ export default {
for
(
let
q
=
0
;
q
<
this
.
Datas
.
data
.
length
;
q
++
)
{
if
(
this
.
Datas
.
data
[
q
].
name
.
substring
(
0
,
2
)
==
dataList
[
i
].
name
.
substring
(
0
,
2
))
{
dataList
[
i
].
value
=
this
.
Datas
.
data
[
q
].
value
console
.
log
(
' dataList[i].value'
,
dataList
[
i
].
value
)
//
console.log(' dataList[i].value', dataList[i].value)
if
(
dataList
[
i
].
value
>
max
)
{
max
=
dataList
[
i
].
value
}
...
...
vue3-lw-pc/src/views/drainageCode/smartForms/components/MarketMap.vue
View file @
c41da07
...
...
@@ -6,6 +6,7 @@
</
template
>
<
script
>
import
*
as
echarts
from
'echarts'
import
{
areaStatistic
}
from
'@/api/drainageCode/smartForms.js'
export
default
{
name
:
'province'
,
...
...
@@ -144,16 +145,16 @@ export default {
// that.baseList= res.data;
})
},
initDate
()
{
async
initDate
()
{
console
.
log
(
'this.params'
,
this
.
params
)
const
provinceName
=
this
.
params
.
ename
const
province
=
this
.
params
.
name
this
.
provinceName
=
provinceName
this
.
provinceJSON
=
import
(
`./jsonData/
${
provinceName
}
.json`
)
this
.
provinceJSON
=
(
await
import
(
`./jsonData/
${
provinceName
}
.json`
)).
default
this
.
option
.
title
.
text
=
province
this
.
option
.
geo
.
map
=
province
this
.
echartObj
=
this
.
$
echarts
.
init
(
document
.
getElementById
(
this
.
id
))
this
.
$
echarts
.
registerMap
(
province
,
this
.
provinceJSON
)
this
.
echartObj
=
echarts
.
init
(
document
.
getElementById
(
this
.
id
))
echarts
.
registerMap
(
province
,
this
.
provinceJSON
)
this
.
echartObj
.
setOption
(
this
.
option
)
// this.echartObj.on("click", (params) => {
// this.$router.push({
...
...
vue3-lw-pc/src/views/drainageCode/smartForms/components/PieChart.vue
View file @
c41da07
...
...
@@ -111,7 +111,7 @@ export default {
<
style
lang=
"scss"
scoped
>
.chart
{
position
:
relative
;
height
:
100%
;
max-
height
:
100%
;
min-width
:
400px
;
min-height
:
400px
;
}
...
...
vue3-lw-pc/src/views/drainageCode/smartForms/statistics/DataStatistics.vue
View file @
c41da07
...
...
@@ -75,11 +75,11 @@
</div>
<div
class=
"dataStatistics_optionGraph_ul"
>
<div
class=
"
dataStatistics_optionGraph_li
"
v-for=
"(item, index) in baseList"
:key=
"index"
>
<div
style=
"font-size: 20xp; font-weight: 700
"
>
{{ item.label }}
</div>
<PieChart
style=
"height: 300px"
:Data=
"item"
></PieChart>
<div
class=
"
g-card mt0
"
v-for=
"(item, index) in baseList"
:key=
"index"
>
<div
class=
"g-card-title
"
>
{{ item.label }}
</div>
<PieChart
:Data=
"item"
></PieChart>
</div>
<
div
class=
"dataStatistics_optionGraph_li
"
v-for=
"(item, index) in baseListMap"
:key=
"index"
>
<
!-- <div class="
" v-for="(item, index) in baseListMap" :key="index">
<div style="font-size: 20xp; font-weight: 700">{{ item.label }}</div>
<div
style="margin-left: 30%; font-weight: 700; font-size: 22px; cursor: pointer"
...
...
@@ -93,7 +93,11 @@
<div v-if="item.hidden == 2" @click="btnFparams(item, index)">
<MarketMap :params="item.params"></MarketMap>
</div>
</div>
</div> -->
</div>
<div
class=
"g-card"
v-if=
"baseListMap.label"
>
<div
class=
"g-card-title"
>
{{ baseListMap.label }}
</div>
<ChinaMap
style=
"height: 600px"
:Datas=
"baseListMap"
></ChinaMap>
</div>
</div>
</template>
...
...
@@ -101,8 +105,8 @@
<
script
>
import
PieChart
from
'../components/PieChart.vue'
import
ChinaMap
from
'../components/ChinaMap.vue'
import
MarketMap
from
'../components/MarketMap.vue'
import
{
getProvinceCityTree
}
from
'@/utils/index'
//
import MarketMap from '../components/MarketMap.vue'
//
import { getProvinceCityTree } from '@/utils/index'
import
{
selectAnswerInfo
,
areaStatistic
,
pieChart
,
answerExport
}
from
'@/api/drainageCode/smartForms.js'
import
SearchTitle
from
'../components/SearchTitle.vue'
...
...
@@ -112,7 +116,7 @@ export default {
SearchTitle
,
PieChart
,
ChinaMap
,
MarketMap
,
//
MarketMap,
},
data
()
{
return
{
...
...
@@ -124,7 +128,7 @@ export default {
pageSize
:
10
,
pageNum
:
1
,
},
baseListMap
:
[]
,
baseListMap
:
{}
,
tableList
:
[],
exportLoading
:
false
,
}
...
...
@@ -134,26 +138,25 @@ export default {
item
.
hidden
=
1
// this.$forceUpdate()
},
async
btnFparams
(
item
,
index
)
{
console
.
log
(
'item'
,
item
,
index
)
if
(
this
.
params
)
{
item
.
hidden
=
2
item
.
params
=
this
.
params
item
.
params
.
formId
=
this
.
formId
let
regionalLinkage
=
await
getProvinceCityTree
()
for
(
let
i
=
0
;
i
<
regionalLinkage
.
length
;
i
++
)
{
if
(
regionalLinkage
[
i
].
label
.
substring
(
0
,
2
)
==
item
.
params
.
name
.
substring
(
0
,
2
))
{
item
.
params
.
parentCode
=
regionalLinkage
[
i
].
id
}
}
this
.
params
=
''
// this.$forceUpdate()
}
},
Fparams
(
data
)
{
this
.
params
=
data
.
data
console
.
log
(
'点击返回值'
,
data
.
data
)
},
// async btnFparams(item, index) {
// if (this.params) {
// item.params = this.params
// item.params.formId = this.formId
// let regionalLinkage = await getProvinceCityTree()
// for (let i = 0; i < regionalLinkage.length; i++) {
// if (regionalLinkage[i].name.substring(0, 2) == item.params.name.substring(0, 2)) {
// item.params.parentCode = regionalLinkage[i].id
// }
// }
// item.hidden = 2
// this.params = ''
// // this.$forceUpdate()
// }
// },
// Fparams(data) {
// this.params = data.data
// console.log('点击返回值', data.data)
// },
exportFn
()
{
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -192,8 +195,7 @@ export default {
formId
:
this
.
formId
,
}
pieChart
(
data
).
then
((
res
)
=>
{
console
.
log
(
'扇形统计图返回值'
,
res
)
// console.log('扇形统计图返回值', res)
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
let
optionss
=
[]
for
(
let
q
=
0
;
q
<
res
.
data
[
i
].
data
.
length
;
q
++
)
{
...
...
@@ -274,20 +276,23 @@ export default {
areaStatisticF
(
data
)
{
areaStatistic
(
data
).
then
((
res
)
=>
{
// console.log('地图统计图返回值', res)
// res =[{data:[{name,value}],label:''},{data:[{name,value}],label:''}
// res =
[{data:[{name,value}],label:''},{data:[{name,value}],label:''}
let
_data
=
res
.
data
[
0
].
data
let
cities
=
res
.
data
.
map
((
e
)
=>
e
.
data
.
find
((
e2
)
=>
e2
.
value
))
cities
.
forEach
((
element
)
=>
{
let
city
=
_data
.
find
((
e
)
=>
element
.
name
===
e
.
name
)
Object
.
assign
(
city
,
element
)
})
this
.
baseListMap
=
[
{
data
:
_data
,
label
:
res
.
data
[
0
].
label
,
hidden
:
1
,
},
]
this
.
baseListMap
=
{
data
:
_data
,
label
:
res
.
data
[
0
].
label
,
hidden
:
1
,
}
// 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
// }
...
...
@@ -326,15 +331,9 @@ export default {
<
style
lang=
"scss"
scoped
>
.dataStatistics_optionGraph_ul
{
margin-top
:
30px
;
display
:
flex
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
.dataStatistics_optionGraph_li
{
margin-bottom
:
10px
;
width
:
49.6%
;
background
:
var
(
--bg-white
);
padding
:
30px
;
}
margin-top
:
var
(
--card-margin
);
display
:
grid
;
grid
:
auto
/
1
fr
1
fr
;
gap
:
var
(
--card-margin
);
}
</
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