Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
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
ReactWeb5
CivManage
Commits
8905faae
Commit
8905faae
authored
Dec 28, 2023
by
田翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 扫码url增加参数
parent
db26b916
Pipeline
#83634
passed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
index.js
...uconfig/WorkDesign/components/Designer/Container/index.js
+3
-1
index.js
...Config/menuconfig/WorkDesign/components/Designer/index.js
+15
-2
No files found.
src/pages/productCenter/mobileConfig/menuconfig/WorkDesign/components/Designer/Container/index.js
View file @
8905faae
...
...
@@ -80,15 +80,17 @@ const Container = (props, ref) => {
}
else
if
(
item
.
title
===
'上一项'
)
{
let
ativeIndex
=
shema
?.
work
?.
findIndex
(
v
=>
v
.
active
)
-
1
index
=
ativeIndex
>=
0
?
ativeIndex
:
0
moblieRef
.
current
.
scrollTop
=
moblieRef
.
current
.
scrollTop
-
70
}
else
if
(
item
.
title
===
'下一项'
)
{
let
ativeIndex
=
shema
?.
work
?.
findIndex
(
v
=>
v
.
active
)
+
1
index
=
ativeIndex
<
(
shema
?.
work
.
length
-
1
)
?
ativeIndex
:
shema
?.
work
.
length
-
1
moblieRef
.
current
.
scrollTop
=
moblieRef
.
current
.
scrollTop
+
70
}
let
array
=
[]
shema
?.
work
.
forEach
((
v
,
i
)
=>
{
array
.
push
({
...
v
,
active
:
index
===
i
,
children
:
v
.
children
.
map
(
s
=>
({
...
s
,
active
:
false
}))
})
})
setShema
({
...
shema
,
work
:
array
,
active
:
false
})
setShema
({
...
shema
,
work
:
array
,
active
:
false
,
carousel
:
{
...
shema
.
carousel
,
active
:
false
}
})
}
const
carouselClick
=
(
e
)
=>
{
...
...
src/pages/productCenter/mobileConfig/menuconfig/WorkDesign/components/Designer/index.js
View file @
8905faae
import
React
,
{
useState
,
createContext
,
useRef
}
from
'react'
import
React
,
{
useState
,
createContext
,
useRef
,
useEffect
}
from
'react'
import
{
useDrag
,
useDrop
,
DndProvider
}
from
'react-dnd'
import
QRcode
from
'qrcode.react'
import
{
Button
,
Popover
,
message
}
from
'antd'
...
...
@@ -10,6 +10,7 @@ import Container from './Container'
import
Right
from
'./Right'
import
html2canvas
from
'html2canvas'
import
{
request
}
from
'@wisdom-utils/utils/es'
;
import
{
getSiteTree
}
from
'@/services/siteManage/api'
const
HtmlToCanvas
=
(
DOM
,
option
)
=>
{
// function saveFile(data, filename) {
...
...
@@ -47,6 +48,7 @@ const Designer = (props) => {
const
{
currentCard
,
}
=
props
const
[
shema
,
setShema
]
=
useState
(
currentCard
[
'卡片结构'
]
?
{
...
JSON
.
parse
(
currentCard
[
'卡片结构'
])
}
:
initShema
)
const
[
currentSite
,
setCurrentSite
]
=
useState
(
'永吉水务有限公司'
)
const
containerRef
=
useRef
(
null
)
const
goBack
=
()
=>
{
...
...
@@ -81,6 +83,17 @@ const Designer = (props) => {
})
}
const
getSite
=
async
()
=>
{
const
{
code
,
data
}
=
await
getSiteTree
({
node
:
-
1
})
if
(
code
===
0
)
{
setCurrentSite
(
data
?.
list
?.[
0
].
text
)
}
}
useEffect
(()
=>
{
getSite
()
},
[])
const
preview
=
()
=>
{
props
?.
saveDesgin
?.({
...
currentCard
,
'卡片结构'
:
JSON
.
stringify
(
shema
)
})
}
...
...
@@ -102,7 +115,7 @@ const Designer = (props) => {
trigger
=
"click"
content
=
{
<
div
>
<
QRcode
value
=
{
`
${
window
.
origin
}
/civ_mobile/product/water/monitor/workbench?env=dev&id=
${
currentCard
.
ID
}
`
}
/
>
<
QRcode
value
=
{
`
${
window
.
origin
}
/civ_mobile/product/water/monitor/workbench?env=dev&id=
${
currentCard
.
ID
}
&station=
${
currentSite
}
`
}
/
>
<
/div
>
}
>
...
...
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