Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source-trace-manage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
source-trace-manage
Commits
3ce01933
Commit
3ce01933
authored
Aug 08, 2022
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
251721c6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
copyrightService.ts
src/service/copyrightService.ts
+2
-1
index.vue
src/views/AddCopyRight/index.vue
+15
-2
No files found.
src/service/copyrightService.ts
View file @
3ce01933
...
@@ -89,12 +89,13 @@ export function getCopyRight(id: number) {
...
@@ -89,12 +89,13 @@ export function getCopyRight(id: number) {
});
});
}
}
export
function
putCopyRight
(
id
:
number
)
{
export
function
putCopyRight
(
id
:
number
,
params
:
any
)
{
return
$ajax
({
return
$ajax
({
type
:
"put"
,
type
:
"put"
,
url
:
"/api/copyright"
,
url
:
"/api/copyright"
,
params
:
{
params
:
{
id
,
id
,
...
params
},
},
});
});
}
}
...
...
src/views/AddCopyRight/index.vue
View file @
3ce01933
...
@@ -265,6 +265,7 @@ import {
...
@@ -265,6 +265,7 @@ import {
getAuths
,
getAuths
,
getCopyRight
,
getCopyRight
,
postCopyRight
,
postCopyRight
,
putCopyRight
,
}
from
"@/service/copyrightService"
;
}
from
"@/service/copyrightService"
;
import
{
eStatusOfFilerCertification
}
from
"@/components/ApproveStatus/status"
;
import
{
eStatusOfFilerCertification
}
from
"@/components/ApproveStatus/status"
;
import
{
iAuth
,
iCopyRight
,
iCopyrightPostData
}
from
"@/types/copyright"
;
import
{
iAuth
,
iCopyRight
,
iCopyrightPostData
}
from
"@/types/copyright"
;
...
@@ -450,6 +451,8 @@ const getParams = ({ to_drafts }: { to_drafts: boolean }) => {
...
@@ -450,6 +451,8 @@ const getParams = ({ to_drafts }: { to_drafts: boolean }) => {
return
params
;
return
params
;
};
};
const
route
=
useRoute
();
const
handleClickSave
=
async
()
=>
{
const
handleClickSave
=
async
()
=>
{
loading2
.
value
=
true
;
loading2
.
value
=
true
;
formRef
.
value
?.
validate
(
async
(
isValid
)
=>
{
formRef
.
value
?.
validate
(
async
(
isValid
)
=>
{
...
@@ -458,7 +461,12 @@ const handleClickSave = async () => {
...
@@ -458,7 +461,12 @@ const handleClickSave = async () => {
const
params
=
getParams
({
const
params
=
getParams
({
to_drafts
:
true
,
to_drafts
:
true
,
});
});
const
res
=
await
postCopyRight
(
params
);
let
res
:
any
;
if
(
route
.
query
.
id
)
{
res
=
await
putCopyRight
(
Number
(
route
.
query
.
id
),
params
);
}
else
{
res
=
await
postCopyRight
(
params
);
}
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
&&
res
.
code
===
200
)
{
ElMessage
.
success
(
"保存成功"
);
ElMessage
.
success
(
"保存成功"
);
router
.
push
({
router
.
push
({
...
@@ -477,7 +485,12 @@ const handleSubmit = () => {
...
@@ -477,7 +485,12 @@ const handleSubmit = () => {
const
params
=
getParams
({
const
params
=
getParams
({
to_drafts
:
false
,
to_drafts
:
false
,
});
});
const
res
=
await
postCopyRight
(
params
);
let
res
:
any
;
if
(
route
.
query
.
id
)
{
res
=
await
putCopyRight
(
Number
(
route
.
query
.
id
),
params
);
}
else
{
res
=
await
postCopyRight
(
params
);
}
loading1
.
value
=
false
;
loading1
.
value
=
false
;
if
(
res
&&
res
.
code
===
200
)
{
if
(
res
&&
res
.
code
===
200
)
{
ElMessage
.
success
(
"添加成功"
);
ElMessage
.
success
(
"添加成功"
);
...
...
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