Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
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
lihuizhen
ec-report-refactor
Commits
f46d5e05
Commit
f46d5e05
authored
Feb 28, 2022
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: report detail same deal with index
parent
48774168
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
63 deletions
+58
-63
details.vue
pages/details/details.vue
+57
-63
index.vue
pages/index/index.vue
+1
-0
No files found.
pages/details/details.vue
View file @
f46d5e05
<
template
>
<view
class=
"canvas"
:style=
"[styleObject]"
>
<view
class=
"viewport-wrapper"
:style=
"
{
width: `${reportInfo.width * scale}px`,
height: `${reportInfo.height * scale}px`
}">
<view
class=
"viewport-wrapper"
:style=
"[styleObject]"
>
<template
v-for=
"(element, index) in reportData"
>
<view
class=
"view-element"
v-if
=
"!element.hide"
v-show
=
"!element.hide"
:key=
"element.id"
:style=
"
{
width: `${element.width * scale}px`,
...
...
@@ -55,11 +48,11 @@
<!-- 远程图片 -->
<RemoteImage
v-if=
"element.type == 'RemoteImage'"
:elementInfo=
"element"
></RemoteImage>
<!-- 普通表格 -->
<NormalTable
v-if=
"element.type == 'NormalTable'"
:elementInfo=
"element"
></NormalTable>
<!--
<NormalTable
v-if=
"element.type == 'NormalTable'"
:elementInfo=
"element"
></NormalTable>
-->
<Table
v-if=
"element.type == 'NormalTable'"
:elementInfo=
"element"
></Table>
</view>
</
template
>
</view>
</view>
</template>
<
script
>
...
...
@@ -102,7 +95,7 @@
* 组件交互 - 组件
*/
uni
.
$on
(
'handleLinkComp'
,
({
showData
,
hideData
})
=>
{
this
.
reportData
.
map
(
item
=>
{
this
.
reportData
=
this
.
reportData
.
map
(
item
=>
{
if
(
showData
.
includes
(
item
.
id
))
item
.
hide
=
false
if
(
hideData
.
includes
(
item
.
id
))
item
.
hide
=
true
return
item
...
...
@@ -152,6 +145,7 @@
async
getReportCharts
()
{
clearInterval
(
this
.
timename
)
let
res
=
await
this
.
$u
.
api
.
getReportCharts
({
id
:
this
.
detailId
})
uni
.
stopPullDownRefresh
()
const
{
Status
,
Result
:
{
info
,
list
}
}
=
res
.
data
if
(
Status
===
'true'
)
{
if
(
info
.
dataUrl
)
{
...
...
@@ -181,7 +175,7 @@
*/
handleValueChange
(
index
,
paramName
,
value
)
{
if
(
index
.
length
&&
paramName
&&
value
)
{
this
.
reportData
.
map
(
item
=>
{
this
.
reportData
=
this
.
reportData
.
map
(
item
=>
{
const
flag
=
index
.
includes
(
item
.
id
)
if
(
flag
&&
item
.
type
===
'BasicText'
&&
item
.
data
.
dataType
===
'static'
)
{
this
.
$set
(
item
.
data
.
dataList
,
'text'
,
value
)
...
...
pages/index/index.vue
View file @
f46d5e05
...
...
@@ -145,6 +145,7 @@
async
getReportCharts
()
{
clearInterval
(
this
.
timename
)
let
res
=
await
this
.
$u
.
api
.
getReportCharts
({
id
:
'61cd2ba1c06bffbdae442c4f'
})
uni
.
stopPullDownRefresh
()
const
{
Status
,
Result
:
{
info
,
list
}
}
=
res
.
data
if
(
Status
===
'true'
)
{
if
(
info
.
dataUrl
)
{
...
...
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