Commit 970b0635 by zhaochengxiang

变更owner

parent 19c34514
...@@ -108,3 +108,7 @@ export function* getOwners() { ...@@ -108,3 +108,7 @@ export function* getOwners() {
export function* saveOwner(payload) { export function* saveOwner(payload) {
return yield call(pds.saveOwner, payload) return yield call(pds.saveOwner, payload)
} }
export function* changeOwner(payload) {
return yield call(pds.changeOwner, payload)
}
\ No newline at end of file
...@@ -107,3 +107,7 @@ export function getOwners() { ...@@ -107,3 +107,7 @@ export function getOwners() {
export function saveOwner(payload) { export function saveOwner(payload) {
return GetJSON("/informationmanagement/userData/getUserDataAndInsert", payload); return GetJSON("/informationmanagement/userData/getUserDataAndInsert", payload);
} }
export function changeOwner(payload) {
return PostJSON("/pdataservice/pdsCURD/changeOwnerOfDataService", payload)
}
\ No newline at end of file
...@@ -28,7 +28,7 @@ const FC = ({ visible, id, onCancel }) => { ...@@ -28,7 +28,7 @@ const FC = ({ visible, id, onCancel }) => {
callback: (data) => { callback: (data) => {
setLoading(false); setLoading(false);
setService(data); setService(data);
setCurrentOwner(data?.provider?.owner); setCurrentOwner(data?.editor);
}, },
error: () => { error: () => {
setLoading(false); setLoading(false);
...@@ -65,7 +65,23 @@ const FC = ({ visible, id, onCancel }) => { ...@@ -65,7 +65,23 @@ const FC = ({ visible, id, onCancel }) => {
} }
const onOk = () => { const onOk = () => {
setLoading(true);
dispatch({
type: 'pds.changeOwner',
payload: {
params: {
id,
owner: currentOwner
}
},
callback: () => {
setLoading(false);
onCancel?.(true); onCancel?.(true);
},
error: () => {
setLoading(false);
}
})
} }
const reset = () => { const reset = () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment