Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-science-front
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
徐俊
yn-science-front
Commits
a563c0e8
Commit
a563c0e8
authored
Dec 17, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4444
parent
6ca4886f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
+30
-8
projectCreate.vue
src/views/report/project/components/edit/projectCreate.vue
+20
-1
projectEdit.vue
src/views/report/project/components/edit/projectEdit.vue
+10
-7
No files found.
src/views/report/project/components/edit/projectCreate.vue
View file @
a563c0e8
...
...
@@ -8,7 +8,7 @@
</a-steps>
</div>
<div
class=
"page-content"
>
<project-edit
v-model=
"value"
@
close=
"closeWindow"
@
load=
"onLoad"
@
next=
"changeSteps"
:stepsArray
.
sync=
"stepsArray"
ref=
"projCreate"
></project-edit>
<project-edit
v-model=
"value"
@
close=
"closeWindow"
@
load=
"onLoad"
@
onStepChange=
"onStepChange"
:completeStatus
.
sync=
completeStatus
:stepsArray
.
sync=
"stepsArray"
ref=
"projCreate"
></project-edit>
</div>
<div
class=
"page-footer"
>
<a-button
v-if=
"currSteps > 0"
style=
"margin-left: 40px"
type=
"primary"
@
click=
"prev"
>
上一步
</a-button>
...
...
@@ -47,6 +47,7 @@ export default {
marginBottom
:
'60px'
,
boxShadow
:
'0px -1px 0 0 #e8e8e8 inset'
,
},
completeStatus
:
"0,0,0,0,0,0"
}
},
props
:
{
...
...
@@ -72,6 +73,10 @@ export default {
this
.
currSteps
--
;
this
.
changeSteps
(
this
.
currSteps
)
},
onStepChange
(
e
)
{
this
.
completeStatus
=
e
.
state
this
.
changeSteps
(
e
.
step
)
},
changeSteps
(
e
)
{
this
.
currSteps
=
e
var
clone
=
[].
concat
(
this
.
stepsArray
)
...
...
@@ -80,6 +85,20 @@ export default {
})
clone
[
e
].
showStatus
=
true
;
this
.
stepsArray
=
clone
this
.
getCompleteStatus
(
e
,
this
.
completeStatus
)
},
getCompleteStatus
(
step
,
completeStatus
)
{
var
arr
=
completeStatus
.
split
(
','
)
if
(
!!
arr
&&
arr
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
arr
[
i
]
==
"1"
)
{
this
.
stepsArray
[
i
].
status
=
"finish"
}
else
{
this
.
stepsArray
[
i
].
status
=
"wait"
}
}
this
.
stepsArray
[
step
].
status
=
"process"
}
},
save
()
{
this
.
$refs
.
projCreate
.
save
(
this
.
currSteps
)
...
...
src/views/report/project/components/edit/projectEdit.vue
View file @
a563c0e8
...
...
@@ -669,13 +669,18 @@ export default {
return
[]
}
},
completeStatus
:
{
type
:
String
,
default
()
{
return
"0,0,0,0,0,0"
}
},
},
created
()
{
this
.
getProject
()
},
data
()
{
return
{
completeStatus
:
"0,0,0,0,0,0"
,
overseasShow
:
false
,
formData
:
{
id
:
null
,
...
...
@@ -804,12 +809,10 @@ export default {
this
.
formData
.
id
=
data
if
(
next
)
{
this
.
$emit
(
'close'
,
'save'
)
this
.
$emit
(
'next'
,
step
+
1
)
var
arr
=
this
.
completeStatus
.
split
(
','
);
arr
[
step
]
=
"1"
;
this
.
completeStatus
=
arr
.
toString
()
this
.
formData
.
completeStatus
=
this
.
completeStatus
this
.
getCompleteStatus
(
step
+
1
,
this
.
completeStatus
)
this
.
formData
.
completeStatus
=
arr
.
toString
()
this
.
$emit
(
'onStepChange'
,
{
step
:
step
+
1
,
state
:
arr
.
toString
()
})
}
else
{
this
.
$message
.
success
(
'成功!'
)
this
.
$emit
(
'close'
,
'submit'
)
...
...
@@ -833,7 +836,7 @@ export default {
if
(
data
)
{
this
.
formData
=
data
console
.
log
(
data
)
this
.
getCompleteStatus
(
0
,
data
.
completeStatus
)
this
.
$emit
(
'onStepChange'
,
{
step
:
0
,
state
:
data
.
completeStatus
}
)
this
.
loadList
()
}
else
this
.
$emit
(
'close'
,
'error'
)
...
...
@@ -846,7 +849,7 @@ export default {
this
.
$api
.
project
.
getNewProject
({
projType
:
getType
()
}).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
formData
=
data
this
.
getCompleteStatus
(
0
,
data
.
completeStatus
)
this
.
$emit
(
'onStepChange'
,
{
step
:
0
,
state
:
data
.
completeStatus
}
)
this
.
loadList
()
}
else
this
.
$emit
(
'close'
,
'error'
)
...
...
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