Commit fd65ec2a authored by TZW's avatar TZW

11.10

parent 7219878d
......@@ -43,13 +43,30 @@ export default [
],
},
{
name: "设备管理",
icon: 'BulbOutlined',
name: '设备管理',
icon: 'bulb',
path: '/device',
routes: [{
routes: [
{
name: '设备台账',
path: '/setting/account',
component: './setting/account',
}]
}
path: '/device/account',
component: './device/account',
},
{
name: '设备类型',
path: '/device/type',
component: './device/type',
},
{
name: '设备型号',
path: '/device/model',
component: './device/model',
},
{
name: '设备供应商',
path: '/device/supplier',
component: './device/supplier',
},
],
},
];
......@@ -22,7 +22,7 @@ export default {
changeOrigin: true,
},
'/staticfile/': {
target: 'http://192.168.40.2/',
target: 'http://192.168.40.68:9088/',
changeOrigin: true,
pathRewrite: {
'^/staticfile': '',
......
......@@ -38,7 +38,7 @@ import EditTable from './EditTable';
import EditorItem from './EditorItem';
import defaultSetting from '../../../config/defaultSettings';
const { Image, Form, Upload, Col, Pagination, Avatar, Dropdown, Menu, Tabs } = Antd;
const { Image, Form, Upload, Col, Pagination, Avatar, Dropdown, Menu, Tabs, message } = Antd;
const AntdCheckBox = Antd.Checkbox;
const FormItems = {
......@@ -75,7 +75,6 @@ const FormItems = {
CheckboxItem,
RadioItem,
};
function upperCase(str) {
const newStr = str.slice(0, 1).toUpperCase() + str.slice(1);
return newStr;
......@@ -468,7 +467,6 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) {
label={item.title}
placeholder={`请选择${item.title}`}
params={params}
mode={item?.mode}
request={async (parse) => {
let result = {};
for (let key in curlinkparams) {
......@@ -528,7 +526,6 @@ function NolinkSelect({ item, colProps }) {
label={item.title}
placeholder={`请选择${item.title}`}
showSearch
mode={item?.mode}
{...options}
/>
</>
......@@ -560,7 +557,6 @@ function LinkTreeSelect({ item, colProps, formRef, name, curindex }) {
...item?.fieldProps,
fieldNames: { label: 'title', value: 'key', children: 'children' },
showSearch: false,
multiple: item?.mode === 'multiple',
}}
formItemProps={item.formItemProps}
name={curkey}
......@@ -628,14 +624,12 @@ function NolinkTreeSelect({ item, colProps }) {
...item?.fieldProps,
fieldNames: { label: 'title', value: 'key', children: 'children' },
showSearch: true,
multiple: item?.mode === 'multiple',
}}
formItemProps={item.formItemProps}
name={item.key ?? item.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`请选择${item.title}`}
multiple
{...options}
/>
</>
......@@ -876,8 +870,7 @@ function LinkCascader({ item, colProps, formRef, name, curindex }) {
fieldProps={{
...item?.fieldProps,
fieldNames: { label: 'title', value: 'key', children: 'children' },
showSearch: true,
multiple: item?.mode === 'multiple',
showSearch: false,
}}
formItemProps={item.formItemProps}
name={curkey}
......@@ -944,7 +937,6 @@ function NolinkCascader({ item, colProps }) {
...item?.fieldProps,
fieldNames: { label: 'title', value: 'key', children: 'children' },
showSearch: true,
multiple: item?.mode === 'multiple',
}}
formItemProps={item.formItemProps}
name={item.key ?? item.dataIndex}
......@@ -1016,12 +1008,14 @@ function Slider({ item, colProps }) {
//uploadbtn
function UploadBtn({ item, colProps }) {
let token = `Bearer ${localStorage.getItem('TOKENES')}`;
return (
<>
<ProFormUploadButton
fieldProps={{
...item?.fieldProps,
action: defaultSetting.proxypath + '/ngic-base-business/sysAttachment/uploadFile',
action: defaultSetting.proxypath + '/base/sysAttachment/uploadFile',
headers: { Authorization: token },
onPreview: (file) => {
let url = '';
if (file.response) {
......@@ -1052,15 +1046,15 @@ function UploadBtn({ item, colProps }) {
colProps={item.colProps ?? colProps}
label={item.title}
title={`上传${item.title}`}
max={item.max}
/>
</>
);
}
function UploadImg({ value, onChange, fieldProps }) {
let token = `Bearer ${localStorage.getItem('TOKENES')}`;
const [image, setImage] = useState({});
let token = '18e1081d54f57af2fdeac1964cc981e7';
function beforeUpload(file) {
const isJpgOrPng =
file.type === 'image/jpg' || file.type === 'image/jpeg' || file.type === 'image/png';
......@@ -1074,12 +1068,12 @@ function UploadImg({ value, onChange, fieldProps }) {
// maxCount 最大数量
const defaultconfig = {
name: 'file',
action: defaultSetting.proxypath + '/ngic-base-business/sysAttachment/uploadFile',
action: defaultSetting.proxypath + '/base/sysAttachment/uploadFile',
accept: '.jpg,.png,.jpeg',
listType: 'picture-card',
beforeUpload: beforeUpload,
defaultFileList: value,
headers: { token },
headers: { Authorization: token },
onChange(info) {
let {
file: { name, status, response },
......@@ -1090,7 +1084,7 @@ function UploadImg({ value, onChange, fieldProps }) {
message.error(`${info.file.name} 上传失败`);
} else if (status === 'done') {
const transfile = fileList.map((it) => {
return it?.response ? it?.response.data.dataList[0] : it;
return it?.response ? it?.response?.data?.dataList[0] : it;
});
onChange(transfile);
}
......@@ -1122,6 +1116,7 @@ function UploadImg({ value, onChange, fieldProps }) {
<div style={{ marginTop: 8 }}>上传图片</div>
</div>
);
console.log(value?.length, fieldProps.limit);
return (
<>
<Image
......@@ -1175,12 +1170,14 @@ function UploadImage({ item, colProps }) {
// uploadDragger
function UploadDragger({ item, colProps }) {
let token = `Bearer ${localStorage.getItem('TOKENES')}`;
return (
<>
<ProFormUploadDragger
fieldProps={{
...item?.fieldProps,
action: defaultSetting.proxypath + '/ngic-base-business/sysAttachment/uploadFile',
action: defaultSetting.proxypath + '/base/sysAttachment/uploadFile',
headers: { Authorization: token },
onPreview: (file) => {
let url = '';
if (file.response) {
......@@ -1227,14 +1224,20 @@ function Editor({ item, colProps, formRef }) {
// }}
transform={(value) => {
return {
[curkey]: value.toHTML(),
[curkey]: value && value?.toHTML?.(),
};
}}
name={curkey}
label={item.title}
{...item.formItemProps}
>
<EditorItem item={item} params={item.params} formRef={formRef} curkey={curkey} />
<EditorItem
serverURL={defaultSetting.proxypath + '/base/sysAttachment/uploadFile'}
item={item}
params={item.params}
formRef={formRef}
curkey={curkey}
/>
</ProForm.Item>
</Col>
);
......
/*
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-10 09:39:56
*/
import * as React from 'react';
import { useState, useMemo, useRef } from 'react';
import DrawerPro from '@/components/DrawerPro';
......
import { Image } from 'antd';
function getcolumns(setdrawer) {
return [
{
title: '基础信息',
valueType: 'split',
},
{
title: '用户名',
dataIndex: 'accountName',
title: '设备型号',
dataIndex: 'equipmentModelName',
key: 'equipmentModelName',
formItemProps: {
rules: [
{
......@@ -15,93 +13,34 @@ function getcolumns(setdrawer) {
},
],
},
initialValue: '默认值',
hideInForm: false,
search: false,
render: (text, row) => {
return (
<a
onClick={() => {
setdrawer?.((s) => ({
...s,
visible: true,
item: null,
title: '新增',
val: 'add',
}));
}}
>
{text}
</a>
);
},
},
{
title: '姓名',
dataIndex: 'userName',
key: 'userId',
hideInForm: {
accountName: {
reverse: ['1', '2', '5'],
},
remark: ['3'],
},
search: false,
},
{
title: '额外信息',
valueType: 'split',
},
{
title: '联系电话',
dataIndex: 'telephone',
formItemProps: {
rules: [
{
required: false,
message: '此项为必填项',
},
],
},
search: false,
},
{
title: '邮箱',
dataIndex: 'mailNo',
formItemProps: {
rules: [
{
required: false,
message: '此项为必填项',
},
],
},
search: false,
},
{
title: '备注',
dataIndex: 'remark',
valueType: 'editor',
dataIndex: 'modelDescription',
key: 'modelDescription',
initialValue: '默认值',
hideInForm: false,
search: false,
colProps: { span: 24 },
initialValue: '<p>Hello <b>World!</b></p>',
},
{
title: '上传样式-图片',
dataIndex: 'uploadImage',
key: 'uploadImage',
title: '设备图片',
dataIndex: 'pictureUrl',
key: 'picList',
search: false,
valueType: 'uploadImage',
fieldProps: {
limit: 2,
limit: 1,
},
formItemProps: {
rules: [
{
required: false,
required: true,
message: '此项为必填项',
},
],
},
hideInTable: false,
render: (text, row) => <Image width={70} src={row.pictureUrl} />,
},
];
}
......
/* 设备型号
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-10 15:12:23
*/
import * as React from 'react';
import { useState, useMemo, useRef } from 'react';
import DrawerPro from '@/components/DrawerPro';
import AutoTable from '@/components/AutoTable';
import PremButton from '@/components/PremButton';
import getcolumns from './columns';
import { doFetch } from '@/utils/doFetch';
import { message } from 'antd';
function Model(props) {
const actionRef = useRef(),
formRef = useRef();
const [drawer, setdrawer] = useState({
const [drawer, setDrawer] = useState({
visible: false,
});
const urlParams = {
save: '/asset/equipmentModel/save',
remove: '/asset/equipmentModel/deleteById',
list: '/asset/equipmentModel/queryList',
detail: '/asset/equipmentModel/queryById',
};
const detail = (text, row, _, action) => {
return (
<PremButton
......@@ -19,7 +35,7 @@ function Model(props) {
size: 'small',
type: 'link',
onClick: () => {
setdrawer((s) => ({
setDrawer((s) => ({
...s,
visible: true,
item: row,
......@@ -41,12 +57,32 @@ function Model(props) {
btn={{
size: 'small',
onClick: () => {
setdrawer((s) => ({
setDrawer((s) => ({
...s,
visible: true,
item: row,
title: '编辑',
val: 'edit',
detailpath: urlParams.detail,
params: { id: row.id },
onFinish: async (vals) => {
console.log(1);
let params = {
...vals,
id: row.id,
};
let res = await doFetch({
url: urlParams.save,
params,
});
if (res.code === '0000') {
message.success('新增成功!');
setDrawer((s) => ({
...s,
visible: false,
}));
actionRef.current.reload();
}
},
}));
},
}}
......@@ -63,8 +99,16 @@ function Model(props) {
title: '是否删除该用户?',
okText: '确认',
cancelText: '取消',
onConfirm: () => {
alert(0);
onConfirm: async () => {
let res = await doFetch({ url: urlParams.remove, params: { id: row.id } });
if (res.code === '0000') {
message.success('删除成功!');
setDrawer((s) => ({
...s,
visible: false,
}));
actionRef.current.reload();
}
},
}}
btn={{
......@@ -78,39 +122,55 @@ function Model(props) {
};
const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer);
let defcolumn = getcolumns(setDrawer);
return defcolumn.concat({
title: '操作',
valueType: 'option',
width: 150,
render: (text, row, _, action) => [
detail(text, row, _, action),
edit(text, row, _, action),
remove(text, row, _, action),
],
render: (text, row, _, action) => [edit(text, row, _, action), remove(text, row, _, action)],
});
}, []);
return (
<div style={{ position: 'relative' }}>
<AutoTable
pagetitle="设备型号"
pagetitle={<h3 className="page-title">设备型号</h3>}
columns={columns}
path="/ngic-auth/sysUser/query/page"
path={urlParams.list}
actionRef={actionRef}
pageextra={'add'}
resizeable={true}
resizeable={false}
addconfig={{
// access: 'sysDepartment_save',
btn: {
disabled: false,
onClick: () => {
setdrawer((s) => ({
setDrawer((s) => ({
...s,
visible: true,
item: null,
detailpath: null,
title: '新增',
val: 'add',
onFinish: async (vals) => {
// console.log(1);
console.log(drawer);
let params = {
...vals,
};
let res = await doFetch({
url: urlParams.save,
params,
});
if (res.code === '0000') {
message.success('新增成功!');
setDrawer((s) => ({
...s,
visible: false,
}));
actionRef.current.reload();
}
},
}));
},
},
......@@ -119,12 +179,11 @@ function Model(props) {
<DrawerPro
fields={columns}
detailpath="/ngic-auth/sysUser/query/detail"
params={{ id: drawer?.item?.id }}
defaultFormValue={drawer?.item ?? {}}
formRef={formRef}
placement="right"
onClose={() => {
setdrawer((s) => ({
setDrawer((s) => ({
...s,
visible: false,
}));
......
import { doFetch } from '@/utils/doFetch';
import { Switch } from 'antd';
function getcolumns(setdrawer) {
return [
{
title: '基础信息',
valueType: 'split',
title: '供应商编号',
dataIndex: 'supplierNo',
key: 'supplierNo',
hideInForm: {
accountName: {
reverse: ['1', '2', '5'],
},
remark: ['3'],
},
},
{
title: '用户名',
dataIndex: 'accountName',
title: '供应商名称',
dataIndex: 'supplierName',
key: 'supplierName',
formItemProps: {
rules: [
{
......@@ -15,46 +25,24 @@ function getcolumns(setdrawer) {
},
],
},
initialValue: '默认值',
hideInForm: false,
search: false,
render: (text, row) => {
return (
<a
onClick={() => {
setdrawer?.((s) => ({
...s,
visible: true,
item: null,
title: '新增',
val: 'add',
}));
}}
>
{text}
</a>
);
},
},
{
title: '姓名',
dataIndex: 'userName',
key: 'userId',
hideInForm: {
accountName: {
reverse: ['1', '2', '5'],
},
remark: ['3'],
title: '电话',
dataIndex: 'telephone',
key: 'telephone',
formItemProps: {
rules: [
{
required: false,
message: '此项为必填项',
},
search: false,
],
},
{
title: '额外信息',
valueType: 'split',
},
{
title: '联系电话',
dataIndex: 'telephone',
title: '邮箱',
dataIndex: 'email',
key: 'email',
formItemProps: {
rules: [
{
......@@ -63,11 +51,11 @@ function getcolumns(setdrawer) {
},
],
},
search: false,
},
{
title: '邮箱',
dataIndex: 'mailNo',
title: '地址',
dataIndex: 'address',
key: 'address',
formItemProps: {
rules: [
{
......@@ -76,24 +64,24 @@ function getcolumns(setdrawer) {
},
],
},
search: false,
},
{
title: '备注',
dataIndex: 'remark',
valueType: 'editor',
search: false,
colProps: { span: 24 },
initialValue: '<p>Hello <b>World!</b></p>',
},
title: '评分',
dataIndex: 'score',
formItemProps: {
rules: [
{
title: '上传样式-图片',
dataIndex: 'uploadImage',
key: 'uploadImage',
valueType: 'uploadImage',
fieldProps: {
limit: 2,
required: false,
message: '此项为必填项',
},
],
},
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
valueType: 'radio',
formItemProps: {
rules: [
{
......@@ -102,6 +90,29 @@ function getcolumns(setdrawer) {
},
],
},
render: (text, row) => {
return (
<Switch
checkedChildren="启用"
unCheckedChildren="禁用"
defaultChecked={row.status == 1}
onChange={(flag) => {
// console.log(e);
if (flag) {
doFetch({
url: '/asset/equipmentSupplier/update/status',
params: { id: row.id, status: '1' },
});
} else {
doFetch({
url: '/asset/equipmentSupplier/update/status',
params: { id: row.id, status: '2' },
});
}
}}
/>
);
},
},
];
}
......
/* 设备供应商
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-10 16:57:58
*/
import * as React from 'react';
import { useState, useMemo, useRef } from 'react';
import DrawerPro from '@/components/DrawerPro';
import AutoTable from '@/components/AutoTable';
import PremButton from '@/components/PremButton';
import getcolumns from './columns';
import { doFetch } from '@/utils/doFetch';
import { message } from 'antd';
function Supplier(props) {
const actionRef = useRef(),
formRef = useRef();
const [drawer, setdrawer] = useState({
const [drawer, setDrawer] = useState({
visible: false,
});
const urlParams = {
save: '/asset/equipmentSupplier/save',
remove: '/asset/equipmentSupplier/deleteById',
list: '/asset/equipmentSupplier/queryList',
detail: '/asset/equipmentSupplier/query/detail',
detail_nocp: '/asset/equipmentSupplier/queryById',
};
const detail = (text, row, _, action) => {
return (
<PremButton
......@@ -19,7 +36,7 @@ function Supplier(props) {
size: 'small',
type: 'link',
onClick: () => {
setdrawer((s) => ({
setDrawer((s) => ({
...s,
visible: true,
item: row,
......@@ -41,12 +58,32 @@ function Supplier(props) {
btn={{
size: 'small',
onClick: () => {
setdrawer((s) => ({
setDrawer((s) => ({
...s,
visible: true,
item: row,
detailpath: urlParams.detail,
params: { id: drawer?.item?.id },
title: '编辑',
val: 'edit',
onFinish: async (vals) => {
console.log(1);
let params = {
...vals,
id: row.id,
};
let res = await doFetch({
url: urlParams.save,
params,
});
if (res.code === '0000') {
message.success('编辑成功!');
setDrawer((s) => ({
...s,
visible: false,
}));
actionRef.current.reload();
}
},
}));
},
}}
......@@ -60,11 +97,19 @@ function Supplier(props) {
return (
<PremButton
pop={{
title: '是否删除该用户?',
title: '是否删除该供应商?',
okText: '确认',
cancelText: '取消',
onConfirm: () => {
alert(0);
onConfirm: async () => {
let res = await doFetch({ url: urlParams.remove, params: { id: row.id } });
if (res.code === '0000') {
message.success('删除成功!');
setDrawer((s) => ({
...s,
visible: false,
}));
actionRef.current.reload();
}
},
}}
btn={{
......@@ -78,39 +123,53 @@ function Supplier(props) {
};
const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer);
let defcolumn = getcolumns(setDrawer);
return defcolumn.concat({
title: '操作',
valueType: 'option',
width: 150,
render: (text, row, _, action) => [
detail(text, row, _, action),
edit(text, row, _, action),
remove(text, row, _, action),
],
render: (text, row, _, action) => [edit(text, row, _, action), remove(text, row, _, action)],
});
}, []);
return (
<div style={{ position: 'relative' }}>
<AutoTable
pagetitle="设备供应商"
pagetitle={<h3 className="page-title">设备供应商</h3>}
columns={columns}
path="/ngic-auth/sysUser/query/page"
path={urlParams.list}
actionRef={actionRef}
pageextra={'add'}
resizeable={true}
resizeable={false}
addconfig={{
// access: 'sysDepartment_save',
btn: {
disabled: false,
type: 'primary',
onClick: () => {
setdrawer((s) => ({
setDrawer((s) => ({
...s,
visible: true,
item: null,
title: '新增',
val: 'add',
onFinish: async (vals) => {
let params = {
...vals,
};
let res = await doFetch({
url: urlParams.save,
params,
});
if (res.code === '0000') {
message.success('新增成功!');
setDrawer((s) => ({
...s,
visible: false,
}));
actionRef.current.reload();
}
},
}));
},
},
......@@ -119,12 +178,11 @@ function Supplier(props) {
<DrawerPro
fields={columns}
detailpath="/ngic-auth/sysUser/query/detail"
params={{ id: drawer?.item?.id }}
defaultFormValue={drawer?.item ?? {}}
formRef={formRef}
placement="right"
onClose={() => {
setdrawer((s) => ({
setDrawer((s) => ({
...s,
visible: false,
}));
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-09 14:44:44
* @Last Modified time: 2022-11-10 15:41:24
*/
import * as React from 'react';
......@@ -95,7 +95,7 @@ function Factory(props) {
return (
<PremButton
pop={{
title: '是否删除该用户?',
title: '是否删除该工厂?',
okText: '确认',
cancelText: '取消',
onConfirm: async () => {
......@@ -142,12 +142,14 @@ function Factory(props) {
addconfig={{
// access: 'sysDepartment_save',
btn: {
type: 'primary',
disabled: false,
onClick: () => {
setDrawer((s) => ({
...s,
visible: true,
item: null,
detailpath: null,
title: '新增',
val: 'add',
onFinish: async (vals) => {
......
......@@ -103,12 +103,14 @@ function Organization(props) {
addconfig={{
// access: 'sysDepartment_save',
btn: {
type: 'primary',
disabled: false,
onClick: () => {
setdrawer((s) => ({
...s,
visible: true,
item: null,
detailpath: null,
title: '新增',
val: 'add',
}));
......
......@@ -18,10 +18,15 @@ function getcolumns(setdrawer) {
{
title: '所属车间',
dataIndex: 'shopName',
key: 'shopName',
key: 'shopId',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
valueType: 'select',
options: { path: '/auth/sysShop/getShopSelectionByFactory', params: {} },
options: {
path: '/auth/sysShop/getShopSelectionByFactory',
linkParams: {
factoryId: '', //key 后面如果存在value 则该value会在调用接口时format
},
},
},
];
}
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:43:54
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-09 16:47:41
* @Last Modified time: 2022-11-10 16:25:11
*/
import * as React from 'react';
......@@ -67,11 +67,11 @@ function Section(props) {
onFinish: async (vals) => {
let params = {
...vals,
id: row.id,
};
let res = await doFetch({
url: urlParams.save,
params,
id: row.id,
});
if (res.code === '0000') {
message.success('新增成功!');
......@@ -95,7 +95,7 @@ function Section(props) {
return (
<PremButton
pop={{
title: '是否删除该用户?',
title: '是否删除该产线?',
okText: '确认',
cancelText: '取消',
onConfirm: async () => {
......@@ -142,12 +142,14 @@ function Section(props) {
addconfig={{
// access: 'sysDepartment_save',
btn: {
type: 'primary',
disabled: false,
onClick: () => {
setdrawer((s) => ({
...s,
visible: true,
item: null,
detailpath: null,
title: '新增',
val: 'add',
onFinish: async (vals) => {
......@@ -160,7 +162,7 @@ function Section(props) {
});
if (res.code === '0000') {
message.success('新增成功!');
setDraw((s) => ({
setdrawer((s) => ({
...s,
visible: false,
}));
......
......@@ -103,6 +103,7 @@ function Role(props) {
addconfig={{
// access: 'sysDepartment_save',
btn: {
type: 'primary',
disabled: false,
onClick: () => {
setdrawer((s) => ({
......
......@@ -24,7 +24,7 @@ function getcolumns(setdrawer) {
options: {
path: '/auth/sysShop/getShopSelectionByFactory',
linkParams: {
factoryId: 'factoryId', //key 后面如果存在value 则该value会在调用接口时format
factoryId: '', //key 后面如果存在value 则该value会在调用接口时format
},
},
},
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:43:54
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-09 16:48:08
* @Last Modified time: 2022-11-10 15:37:21
*/
import * as React from 'react';
......@@ -95,7 +95,7 @@ function Section(props) {
return (
<PremButton
pop={{
title: '是否删除该用户?',
title: '是否删除该工段?',
okText: '确认',
cancelText: '取消',
onConfirm: async () => {
......@@ -142,12 +142,14 @@ function Section(props) {
addconfig={{
// access: 'sysDepartment_save',
btn: {
type: 'primary',
disabled: false,
onClick: () => {
setdrawer((s) => ({
...s,
visible: true,
item: null,
detailpath: null,
title: '新增',
val: 'add',
onFinish: async (vals) => {
......@@ -160,7 +162,7 @@ function Section(props) {
});
if (res.code === '0000') {
message.success('新增成功!');
setDraw((s) => ({
setdrawer((s) => ({
...s,
visible: false,
}));
......
......@@ -103,12 +103,14 @@ function Users(props) {
addconfig={{
// access: 'sysDepartment_save',
btn: {
type: 'primary',
disabled: false,
onClick: () => {
setdrawer((s) => ({
...s,
visible: true,
item: null,
detailpath: null,
title: '新增',
val: 'add',
}));
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:18
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-09 14:44:18
* @Last Modified time: 2022-11-10 15:36:27
*/
import * as React from 'react';
......@@ -141,12 +141,14 @@ function Factory(props) {
addconfig={{
// access: 'sysDepartment_save',
btn: {
type: 'primary',
disabled: false,
onClick: () => {
setdrawer((s) => ({
...s,
visible: true,
item: null,
detailpath: null,
title: '新增',
val: 'add',
onFinish: async (vals) => {
......@@ -159,7 +161,7 @@ function Factory(props) {
});
if (res.code === '0000') {
message.success('新增成功!');
setDraw((s) => ({
setdrawer((s) => ({
...s,
visible: false,
}));
......
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