Commit 33e12f4e authored by TZW's avatar TZW

1115

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