Commit 33e12f4e authored by TZW's avatar TZW

1115

parent 8521482b
......@@ -469,6 +469,7 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) {
params={params}
request={async (parse) => {
let result = {};
console.log(curlinkparams);
for (let key in curlinkparams) {
let reversekey = !curlinkparams[key] ? key : curlinkparams[key];
result[reversekey] = parse[key];
......
......@@ -113,11 +113,18 @@ function InitForm({
request={async (params) => {
if (detailpath) {
let res = await doFetch({ url: detailpath, params });
console.log({
...(res?.data?.data ?? {}),
...defaultFormValue,
});
return {
...(res?.data?.data ?? {}),
...defaultFormValue,
};
} else {
console.log({
...defaultFormValue,
});
return {
...defaultFormValue,
};
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-14 15:40:09
* @Last Modified time: 2022-11-15 09:50:49
*/
import * as React from 'react';
......@@ -111,7 +111,7 @@ function Type(props) {
parentKey: row.title,
},
title: '新增子级',
val: 'add',
val: 'addChild',
onFinish: async (vals) => {
console.log(1);
let params = {
......@@ -121,7 +121,6 @@ function Type(props) {
};
delete params.title;
delete params.parentKey;
console.log(params);
let res = await doFetch({
url: urlParams.save,
params,
......@@ -175,6 +174,8 @@ function Type(props) {
};
const columns = useMemo(() => {
// console.log(drawer);
// if(drawer?.val == 'edit')
let defcolumn = getcolumns(setDrawer);
return defcolumn.concat({
title: '操作',
......@@ -186,7 +187,7 @@ function Type(props) {
remove(text, row, _, action),
],
});
}, []);
}, [drawer.val]);
return (
<div style={{ position: 'relative' }}>
......
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