Commit 970b0635 by zhaochengxiang

变更owner

parent 19c34514
......@@ -108,3 +108,7 @@ export function* getOwners() {
export function* 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() {
export function saveOwner(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 }) => {
callback: (data) => {
setLoading(false);
setService(data);
setCurrentOwner(data?.provider?.owner);
setCurrentOwner(data?.editor);
},
error: () => {
setLoading(false);
......@@ -65,7 +65,23 @@ const FC = ({ visible, id, onCancel }) => {
}
const onOk = () => {
setLoading(true);
dispatch({
type: 'pds.changeOwner',
payload: {
params: {
id,
owner: currentOwner
}
},
callback: () => {
setLoading(false);
onCancel?.(true);
},
error: () => {
setLoading(false);
}
})
}
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