Commit 5f10de68 authored by 左玲玲's avatar 左玲玲 😬

1720

parent b252d3b5
...@@ -39,7 +39,7 @@ const Mtable = (props) => { ...@@ -39,7 +39,7 @@ const Mtable = (props) => {
activeTabKey, //激活的tabKey 拖拽表格唯一标识使用 其他情况用不到 activeTabKey, //激活的tabKey 拖拽表格唯一标识使用 其他情况用不到
refreshDep, //依赖刷新 (已废弃) refreshDep, //依赖刷新 (已废弃)
getDefaultSelected, //存在默认选中向上返回选中值 getDefaultSelected, //存在默认选中向上返回选中值
resizeable = true, resizeable = false,
dataSource, dataSource,
} = props; } = props;
...@@ -101,6 +101,7 @@ const Mtable = (props) => { ...@@ -101,6 +101,7 @@ const Mtable = (props) => {
if (Array.isArray(it.options)) { if (Array.isArray(it.options)) {
options = { options = {
fieldProps: { fieldProps: {
...it?.fieldProps,
options: [...it.options], options: [...it.options],
}, },
}; };
...@@ -162,6 +163,7 @@ const Mtable = (props) => { ...@@ -162,6 +163,7 @@ const Mtable = (props) => {
if (Array.isArray(it.options)) { if (Array.isArray(it.options)) {
options = { options = {
fieldProps: { fieldProps: {
...it?.fieldProps,
options: [...it.options], options: [...it.options],
}, },
}; };
......
...@@ -509,3 +509,7 @@ ol { ...@@ -509,3 +509,7 @@ ol {
.ant-input-number { .ant-input-number {
width: 100%; width: 100%;
} }
.ant-form-item-label {
pointer-events: none;
}
\ No newline at end of file
This diff is collapsed.
import * as React from 'react'; import * as React from 'react';
import { useState, useMemo, useRef } from 'react'; import { useState, useMemo, useRef } from 'react';
import DrawerPro from '@/components/DrawerPro'; import DrawerPro from '@/components/DrawerPro';
import AutoTable from '@/components/AutoTable'; import AutoTable from '@/components/AutoTable';
import PremButton from '@/components/PremButton'; import PremButton from '@/components/PremButton';
import getcolumns from './columns'; import getcolumns from './columns';
import { useRequest } from 'ahooks'; import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
function Plan(props) { function Plan(props) {
const actionRef = useRef(), const actionRef = useRef(),
formRef = useRef(); formRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
...@@ -94,18 +94,17 @@ import * as React from 'react'; ...@@ -94,18 +94,17 @@ import * as React from 'react';
}; };
const columns = useMemo(() => { const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.columns; let defcolumn = getcolumns(setdrawer, run).filter((it) => it.key == activeTabKey)[0]?.columns;
let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {}; let defpath = getcolumns(setdrawer, run).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {};
return defcolumn.concat({ return activeTabKey == 1 ? defcolumn.concat({
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: 150, width: 150,
render: (text, row, _, action) => [ render: (text, row, _, action) => [
defpath?.enabledetail && detail(text, row, _, action),
defpath?.enableedit && edit(text, row, _, action), defpath?.enableedit && edit(text, row, _, action),
defpath?.enabledelete && remove(text, row, _, action), defpath?.enabledelete && remove(text, row, _, action),
], ],
}); }) : defcolumn;
}, [activeTabKey]); }, [activeTabKey]);
const pathconfig = useMemo(() => { const pathconfig = useMemo(() => {
...@@ -121,7 +120,6 @@ import * as React from 'react'; ...@@ -121,7 +120,6 @@ import * as React from 'react';
path={pathconfig?.list || '/ngic-auth/sysUser/query/page'} path={pathconfig?.list || '/ngic-auth/sysUser/query/page'}
actionRef={actionRef} actionRef={actionRef}
pageextra={pathconfig?.enableadd ? 'add' : null} pageextra={pathconfig?.enableadd ? 'add' : null}
resizeable={true}
addconfig={{ addconfig={{
// access: 'sysDepartment_save', // access: 'sysDepartment_save',
btn: { btn: {
...@@ -169,7 +167,6 @@ import * as React from 'react'; ...@@ -169,7 +167,6 @@ import * as React from 'react';
/> />
</div> </div>
); );
} }
export default Plan;
export default Plan;
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