Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-editor
Project
Project
Details
Activity
Releases
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
劳工
zeroing-editor
Commits
7cb7b6c1
Commit
7cb7b6c1
authored
Apr 16, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉压缩
parent
a0f0edff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
project.js
src/store/modules/project.js
+9
-4
No files found.
src/store/modules/project.js
View file @
7cb7b6c1
...
@@ -98,6 +98,7 @@ export const projectStore = {
...
@@ -98,6 +98,7 @@ export const projectStore = {
creator
:
''
,
creator
:
''
,
operator
:
''
,
operator
:
''
,
operators
:
''
,
operators
:
''
,
update_time
:
''
,
data
:
{
data
:
{
options
:
{},
options
:
{},
views
:
[],
views
:
[],
...
@@ -126,10 +127,12 @@ export const projectStore = {
...
@@ -126,10 +127,12 @@ export const projectStore = {
},
},
updateProject
(
state
,
project
)
{
updateProject
(
state
,
project
)
{
const
{
id
,
name
,
creator
,
data
}
=
project
;
const
{
id
,
name
,
creator
,
data
,
operators
,
update_time
}
=
project
;
state
.
id
=
id
;
state
.
id
=
id
;
state
.
name
=
name
;
state
.
name
=
name
;
state
.
creator
=
creator
;
state
.
creator
=
creator
;
state
.
operators
=
operators
;
state
.
update_time
=
update_time
;
const
localData
=
state
.
data
;
const
localData
=
state
.
data
;
if
(
data
)
{
if
(
data
)
{
...
@@ -502,9 +505,9 @@ export const projectStore = {
...
@@ -502,9 +505,9 @@ export const projectStore = {
},
},
getters
:
{
getters
:
{
project
(
state
)
{
project
(
state
)
{
const
{
id
,
name
,
creator
,
data
}
=
state
;
const
{
id
,
name
,
creator
,
data
,
update_time
}
=
state
;
return
{
return
{
id
,
name
,
creator
,
id
,
name
,
creator
,
update_time
,
data
:
JSON
.
stringify
(
data
),
data
:
JSON
.
stringify
(
data
),
};
};
},
},
...
@@ -671,7 +674,9 @@ export const projectStore = {
...
@@ -671,7 +674,9 @@ export const projectStore = {
}
}
},
},
async
saveToRemote
({
state
,
dispatch
,
getters
},
{
remark
})
{
async
saveToRemote
({
state
,
dispatch
,
getters
},
{
remark
})
{
await
projectApi
.
saveOne
(
getters
.
project
,
remark
);
console
.
log
(
getters
.
project
);
let
result
=
await
projectApi
.
saveOne
(
getters
.
project
,
remark
);
console
.
log
(
result
);
dispatch
(
'deleteLocalVersion'
,
state
.
id
);
dispatch
(
'deleteLocalVersion'
,
state
.
id
);
},
},
async
updateProject
({
commit
},
projectID
)
{
async
updateProject
({
commit
},
projectID
)
{
...
...
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