Sfoglia il codice sorgente

添加V1.2相关功能

code4eat 2 anni fa
parent
commit
1cd2f52fa5

+ 33 - 5
.umirc.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-14 14:14:32
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-02-13 11:12:34
+ * @LastEditTime: 2023-03-22 15:21:48
  * @FilePath: /BudgetManaSystem/.umirc.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -17,7 +17,7 @@ export default defineConfig({
   antd: {
     configProvider: {
       prefixCls: 'bms-ant',
-      primaryColor:'#3377FF'
+      primaryColor: '#3377FF'
       // getPopupContainer:(triggerNode:HTMLElement)=>triggerNode
     }
   },
@@ -39,13 +39,13 @@ export default defineConfig({
       theme: 'light',
     }
   },
-  theme:{
-    primaryColor:'#3377FF'
+  theme: {
+    primaryColor: '#3377FF'
   },
   manifest: {
     basePath: '/',
   },
-  publicPath:REACT_APP_ENV == 'dev'?'/':'/perform/',
+  publicPath: REACT_APP_ENV == 'dev' ? '/' : '/perform/',
   proxy: {
 
     '/gateway': {
@@ -65,6 +65,34 @@ export default defineConfig({
       path: '/home',
       component: './Home',
     },
+    {
+      name: '系统设置',
+      path: '/setting',
+      routes: [
+        {
+          name: '基础设置',
+          path: '/setting/baseSetting',
+          routes: [
+            {
+              name: '业务字典分类管理',
+              path: '/setting/baseSetting/dicClassfication',
+              component: './setting/baseSetting/dicClassfication',
+            },
+            {
+              name: '业务字典管理',
+              path: '/setting/baseSetting/businessDicMana',
+              component: './setting/baseSetting/businessDicMana',
+            },
+            {
+              name: '参数管理',
+              path: '/setting/baseSetting/paramsMana',
+              component: './setting/baseSetting/paramsMana',
+            }
+          ]
+        },
+
+      ]
+    },
     {
       name: '绩校管理',
       path: '/budgetMana',

+ 93 - 58
src/app.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-14 14:14:32
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-03-06 17:03:27
+ * @LastEditTime: 2023-03-22 15:21:18
  * @FilePath: /BudgetManaSystem/src/app.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -26,7 +26,7 @@ import Icon, { createFromIconfontCN, NodeCollapseOutlined } from '@ant-design/ic
 import { useModel } from '@umijs/max';
 
 const IconFont = createFromIconfontCN({
-  scriptUrl: '//at.alicdn.com/t/c/font_3878861_38jfoefh4e6.js',
+  scriptUrl: '//at.alicdn.com/t/c/font_3878861_tw9yqguouab.js',
 });
 
 
@@ -51,16 +51,16 @@ interface ResponseStructure {
 
 
 
-export async function getInitialState(): Promise<{ name?: string,isCollapsed:boolean }> {
+export async function getInitialState(): Promise<{ name?: string, isCollapsed: boolean }> {
 
   new DevicePixelRatio().init();
 
-  return {isCollapsed:false};
+  return { isCollapsed: false };
 }
 
 export const request: RequestConfig = {
   // 统一的请求设定
-  timeout:100000000,
+  timeout: 100000000,
   headers: { 'X-Requested-With': 'XMLHttpRequest' },
 
   // 错误处理: umi@3 的错误处理方案。
@@ -142,7 +142,7 @@ export const request: RequestConfig = {
   responseInterceptors: [
     (response: AxiosResponse) => {
       // 拦截响应数据,进行个性化处理
-      const { status, data: { success, status:code,errorMessage,data:respData }, config: { method } } = response;
+      const { status, data: { success, status: code, errorMessage, data: respData }, config: { method } } = response;
 
       try {
 
@@ -152,19 +152,19 @@ export const request: RequestConfig = {
           if (method == 'post') {
 
             if (code == 200) {
-
+              
               return response.data.data == null ? {
                 success: true,
                 data: true
               } : response.data
-              
-            }else{
+
+            } else {
               notification.error({
-                 
-                 message:'',
-                 description:errorMessage,
-                 placement:'topRight',
-                 icon:<></>
+
+                message: '',
+                description: errorMessage,
+                placement: 'topRight',
+                icon: <></>
               })
               return false
             }
@@ -172,21 +172,21 @@ export const request: RequestConfig = {
             if (status != 200) {
               message.error('请求失败!');
               return false
-            }else{
+            } else {
               if (code == 200) {
                 return response.data
-              }else{
-                
+              } else {
+
                 notification.error({
-                  message:'',
-                  description:errorMessage,
-                  placement:'topRight',
-                  icon:<></>
-               })
-               return false;
+                  message: '',
+                  description: errorMessage,
+                  placement: 'topRight',
+                  icon: <></>
+                })
+                return false;
               }
             }
-            
+
           }
 
         } else {
@@ -194,7 +194,7 @@ export const request: RequestConfig = {
         }
 
       } catch (error) {
-          console.log({error});
+        console.log({ error });
       }
     }
   ]
@@ -233,18 +233,22 @@ const mappingIcon = (menuData: menuDataItemType[]) => {
 
 
 
-const imgNode = (props:any)=>{
-     return <IconFont type='icon-shouye' {...props} />
+const imgNode = (props: any) => {
+  return <IconFont type='icon-shouye' {...props} />
 };
-const fileIcon = (params:any)=>{
-    return <IconFont type='icon-jixiaoguanli' />
+const fileIcon = (params: any) => {
+  return <IconFont type='icon-jixiaoguanli' />
+};
+
+const setting = (params: any) => {
+  return <IconFont type='icon-xitongshezhi' />
 };
 
 //布局配置
 
-export const layout = ({initialState, setInitialState}:{initialState:any,setInitialState:any}) => {
+export const layout = ({ initialState, setInitialState }: { initialState: any, setInitialState: any }) => {
 
-  const {isCollapsed} = initialState;
+  const { isCollapsed } = initialState;
 
   const onCollapse = (isCollapsed: boolean): void => {
     setInitialState({ ...initialState, isCollapsed }).then();
@@ -252,25 +256,25 @@ export const layout = ({initialState, setInitialState}:{initialState:any,setInit
 
 
   return {
-    menuHeaderRender:false,
-    token:{
+    menuHeaderRender: false,
+    token: {
       sider: {
 
         colorMenuBackground: '#fff',
-        colorTextMenuActive:'#3376FE',
-        colorTextMenuSelected:'#3376FE',
-        colorTextMenuTitle:'#17181A',
-        colorTextMenu:'#17181A',
+        colorTextMenuActive: '#3376FE',
+        colorTextMenuSelected: '#3376FE',
+        colorTextMenuTitle: '#17181A',
+        colorTextMenu: '#17181A',
         // // colorBgMenuItemHover:'##f0f2f5',
-        colorBgMenuItemSelected:'#F2F6FF',
-      
+        colorBgMenuItemSelected: '#F2F6FF',
+
         // colorBgMenuItemCollapsedHover:'#f0f2f5',
         // //colorBgMenuItemCollapsedSelected:'blue'
 
       }
 
     },
-    siderWidth:200,
+    siderWidth: 200,
     menu: {
       locale: false,
       request: async () => {
@@ -278,7 +282,7 @@ export const layout = ({initialState, setInitialState}:{initialState:any,setInit
           {
             path: '/home',
             name: '首页',
-            icon:<Icon component={imgNode}  />,
+            icon: <Icon component={imgNode} />,
           },
           {
             path: '/budgetMana',
@@ -311,36 +315,67 @@ export const layout = ({initialState, setInitialState}:{initialState:any,setInit
                 icon: '',
               },
             ],
+          },
+          {
+            path: '/setting',
+            name: '系统设置',
+            icon: <Icon component={setting} />,
+            children: [
+              {
+                path: '/setting/baseSetting',
+                name: '基础设置',
+                icon:'',
+                children: [
+                  {
+                    path: '/setting/baseSetting/dicClassfication',
+                    name: '业务字典分类管理',
+                    icon: '',
+                  },
+                  {
+                    path: '/setting/baseSetting/businessDicMana',
+                    name: '业务字典管理',
+                    icon: '',
+                  },
+                  {
+                    path: '/setting/baseSetting/paramsMana',
+                    name: '参数管理',
+                    icon: '',
+                  }
+                ]
+              },
+            ],
           }
         ];
-        
+
         // console.log('mappingIcon(data)',mappingIcon(data));
         // return mappingIcon(data);
         return data
       },
     },
-    onPageChange:(location: Location)=>{
-        // console.log({location});
-        // const {pathname} = location;
-        // localStorage.setItem('currentPath',pathname);
+    onPageChange: (location: Location) => {
+      // console.log({location});
+      // const {pathname} = location;
+      // localStorage.setItem('currentPath',pathname);
     },
-    collapsedButtonRender:()=>{
-        return (
-           <div style={{position:'absolute',zIndex:10,right:17,bottom:12,
-           display:'flex',justifyContent:'center',alignItems:'center',
-           cursor:'pointer',width:24,height:24}} onClick={
-              ()=>{
-                onCollapse(isCollapsed?false:true);
-              }
-           }><IconFont className='menuCollapseIcon' type={isCollapsed?'icon-celanzhankai':'icon-celanshouqi'} /></div>
-        )
+    collapsedButtonRender: () => {
+      return (
+        <div style={{
+          position: 'absolute', zIndex: 10, right: 17, bottom: 12,
+          display: 'flex', justifyContent: 'center', alignItems: 'center',
+          cursor: 'pointer', width: 24, height: 24
+        }} onClick={
+          () => {
+            onCollapse(isCollapsed ? false : true);
+          }
+        }><IconFont className='menuCollapseIcon' type={isCollapsed ? 'icon-celanzhankai' : 'icon-celanshouqi'} /></div>
+      )
     },
-    collapsed:isCollapsed,
+    collapsed: isCollapsed,
     contentStyle: {
       border: '16px solid #F7F9FC',
       //height: '94.5vh',  //以去除顶部导航高度
       borderRadius: '22px',
-      background:'#F7F9FC',
+      background: '#F7F9FC',
       // overflow:'scroll',
       // margin:'20px 20px'
     },

+ 1 - 0
src/components/BMSPageContainer/style.less

@@ -4,6 +4,7 @@
 
 .bms-ant-pro-page-container-children-content {
     padding-inline: 0 !important;
+    padding-block: 0 !important;
     padding: 0;
 }
 

+ 162 - 0
src/global.less

@@ -27,6 +27,121 @@ textarea {
     }
 }
 
+
+
+//Modal
+
+.bms-ant-modal {
+    .bms-ant-modal-content {
+        padding: 16px !important;
+        .bms-ant-modal-body {
+             .bms-ant-modal-confirm-body-wrapper {
+                   .bms-ant-modal-confirm-btns {
+                    display: flex;
+                    flex-direction: row;
+                    align-items: center;
+                    justify-content: flex-end;
+                    &>button {
+                        display: flex;
+                        justify-content: center;
+                        align-items: center;
+                        width: 56px;
+                        height: 24px;
+                        border-radius: 4px;
+        
+                        &.bms-ant-btn-default {
+                            border: 1px solid #DAE2F2;
+                        }
+                      }
+                   }
+             } 
+        }
+    }
+    .bms-ant-modal-footer {
+        margin-top: 0;
+        .bms-ant-space-item {
+              &>button {
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                width: 56px;
+                height: 24px;
+                border-radius: 4px;
+
+                &.bms-ant-btn-default {
+                    border: 1px solid #DAE2F2;
+                }
+              }
+        }
+    }
+}
+
+
+
+//message
+
+.bms-ant-message {
+    .ant-message-notice-success {
+         .bms-ant-message-notice-content {
+              .anticon-check-circle {
+                  &>svg {
+                      color: #52c41a;
+                  }
+              }
+         }
+    }
+}
+
+//Form
+
+.bms-ant-form {
+      &.bms-ant-form-vertical {
+        .bms-ant-form-item {
+            margin-bottom: 16px;
+            .bms-ant-form-item-label {
+                padding: 0 !important;
+                height: 15px;
+                margin-bottom: 8px;
+                line-height: 15px;
+            }
+            .bms-ant-form-item-control-input {
+                  min-height: 24px;
+            }
+        }
+      }
+}
+
+
+
+
+// .bms-ant-form-item-label {
+//     padding: 0;
+//     //height: 15px;
+//     line-height: 15px;
+//     margin-bottom: 5px;
+
+//     .bms-ant-form-item-required {
+//       &::before {
+//         margin-right: 0 !important;
+//       }
+//     }
+// }
+
+.bms-ant-input-affix-wrapper {
+    padding: 0px 8px !important;
+    border-radius: 4px;
+    border: 1px solid #CFD7E6 !important;
+  
+    &>input {
+      &::placeholder {
+        font-size: 14px;
+        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+        font-weight: 400;
+        color: #99A6BF;
+      }
+    }
+  }
+
 .bms-ant-input-disabled {
     &::placeholder {
         color: #7A8599 !important;
@@ -109,6 +224,53 @@ textarea {
 }
 
 
+/**
+    Select
+**/
+.bms-ant-select {
+    .bms-ant-select-selector {
+      height: 24px !important;
+      padding: 0 8px !important;
+      border-radius: 4px !important;
+      border: 1px solid #CFD7E6 !important;
+  
+      .bms-ant-select-selection-item {
+        line-height: 24px;
+      }
+  
+      .bms-ant-select-selection-search-input {
+        height: 24px !important;
+      }
+  
+      .bms-ant-select-selection-placeholder {
+        line-height: 22px !important;
+        font-size: 14px;
+        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+        font-weight: 400;
+        color: #99A6BF;
+      }
+    }
+  
+    .bms-ant-select-arrow {
+      color: #CFD7E6;
+    }
+  
+    &.bms-ant-select-disabled {
+      .bms-ant-select-selector {
+        border: 1px solid #DADEE6 !important;
+  
+        .bms-ant-select-selection-placeholder {
+          color: #7A8599;
+        }
+      }
+  
+      .bms-ant-select-arrow {
+        color: #7A8599;
+      }
+    }
+  }
+
+
 
 
 

+ 1 - 0
src/pages/budgetMana/oneBatch/style.less

@@ -2,6 +2,7 @@
     position: relative;
     padding: 16px;
     // height: 100%;
+    border-radius: 4px;
     background: #fff;
 
     .btnGroup {

+ 320 - 0
src/pages/setting/baseSetting/businessDicMana/index.tsx

@@ -0,0 +1,320 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-03 11:30:33
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-03-22 15:18:18
+ * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+
+
+
+
+import BMSPagecontainer from '@/components/BMSPageContainer';
+import { BMSTable } from '@/components/BMSTable';
+import { createFromIconfontCN } from '@ant-design/icons';
+import { ActionType } from '@ant-design/pro-components';
+import { ModalForm, ProFormDigit, ProFormRadio, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-form';
+import { ProColumns } from '@ant-design/pro-table';
+import { Input, message, Popconfirm } from 'antd';
+import { useEffect, useRef, useState } from 'react';
+
+import { addBusinessDicTableData, delData, editPubDicRelaTbaleData, getBusinessDicTableData, getJobCateory } from './service';
+
+
+import './style.less';
+
+
+const IconFont = createFromIconfontCN({
+    scriptUrl: '//at.alicdn.com/t/c/font_1927152_4nm5kxbv4m3.js',
+});
+
+
+
+const BusinessDicMana = () => {
+
+    const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>();
+    const [tableDataSearchKeywords, set_tableDataSearchKeywords] = useState<string>('');
+    const [reload, set_reload] = useState(false);
+    const [typeList, set_typeList] = useState<any[]>([]);
+    const [showTypeListArr, set_showTypeListArr] = useState<any[]>([]);
+    const [currentSelectedType, set_currentSelectedType] = useState<any | undefined>(undefined);
+
+    const tableRef = useRef<ActionType>();
+
+    const columns = [
+        {
+            title: '项目名称',
+            dataIndex: 'name',
+
+        },
+        {
+            title: '项目代码',
+            dataIndex: 'typeCode',
+        },
+        {
+            title: '项目值',
+            dataIndex: 'value',
+        },
+        {
+            title: '默认',
+            dataIndex: 'defaultFlag',
+            render: (_: any, record: any) => {
+                return record.defaultFlag == 1 ? '是' : '否'
+            },
+
+        },
+        {
+            title: '序号',
+            dataIndex: 'dictSort',
+
+        },
+        {
+            title: '扩展1',
+            dataIndex: 'reserved1',
+
+        },
+        {
+            title: '扩展2',
+            dataIndex: 'reserved2',
+
+        },
+        {
+            title: '操作',
+            key: 'option',
+            width: 120,
+            valueType: 'option',
+            render: (_: any, record: any) => {
+                return [
+                    <UpDataActBtn key={'act'} record={record} type='EDIT' />,
+                    <Popconfirm
+                        title="是否确认删除?"
+                        key="del"
+                        onConfirm={() => delTableData(record)}
+                    >
+                        <a>删除</a>
+                    </Popconfirm>
+                ]
+            },
+        },
+
+    ]
+
+
+    const getTableData = async (params: any) => {
+        const { typeCode } = params;
+        if (typeCode) {
+            const resp = await getBusinessDicTableData(params);
+            if (resp) {
+                return {
+                    data: resp.list,
+                    success: true,
+                    total: resp.totalCount,
+                    pageSize: resp.pageSize,
+                    totalPage: resp.totalPage,
+                }
+            }
+        }
+        return []
+    }
+
+    //获取左侧职类
+    const getTypeList = async () => {
+        const resp = await getJobCateory();
+        if (resp) {
+            set_typeList(resp);
+            set_showTypeListArr(resp);
+        }
+    }
+
+    const delTableData = async (record: any) => {
+        const resp = await delData(record.id);
+        if (resp) {
+            tableRef.current?.reload();
+        }
+    }
+
+    const updateTable = async (formVal: any, type: 'EDIT' | "ADD") => {
+  
+        if (type == 'ADD') {
+            const resp = await addBusinessDicTableData({ ...formVal,typeCode: currentSelectedType?.code });
+            if (resp) {
+                tableRef.current?.reload();
+            }
+        }
+        if (type == 'EDIT') {
+            const resp = await editPubDicRelaTbaleData({ ...formVal, typeCode: currentSelectedType?.code });
+            if (resp) {
+                tableRef.current?.reload();
+            }
+        }
+
+        return true;
+
+    }
+
+    const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD' }) => {
+
+        return (
+            <ModalForm
+                title={`${type == 'EDIT' ? '编辑' : '新增'}公用字典(职称)`}
+                width={352}
+                initialValues={type == 'EDIT' ? { ...record } : {defaultFlag:0}}
+                trigger={
+                    type == 'EDIT' ? <a key="edit" >编辑</a> : <span className='add'>新增</span>
+                }
+                onFinish={(val) => {
+                    return updateTable(type == 'EDIT' ? { ...record,...val} : val, type);
+                }}
+            >
+                <ProFormText
+                    name="name"
+                    label="项目名称:"
+                    placeholder="请输入"
+                    rules={[{ required: true, message: '项目名称不能为空!' }]}
+                />
+                <ProFormText
+                    name="code"
+                    label="项目代码:"
+                    placeholder="请输入"
+                    rules={[{ required: true, message: '项目代码不能为空!' }]}
+                />
+                <ProFormText
+                    name="value"
+                    label="项目值:"
+                    placeholder="请输入"
+
+                />
+                <ProFormDigit label="顺序号:" name="dictSort" rules={[{ required: true, message: '顺序号不能为空!' }]} />
+
+                <ProFormRadio.Group
+                    name="defaultFlag"
+                    label="默认:"
+                    fieldProps={{
+                        buttonStyle: 'solid'
+                    }}
+                    options={[
+                        {
+                            label: '是',
+                            value: 1,
+                        },
+                        {
+                            label: '否',
+                            value: 0,
+                        },
+                    ]}
+                    rules={[{ required: true, message: '默认不能为空!' }]}
+                />
+                <ProFormText
+                    name="reserved1"
+                    label="扩展1:"
+                    placeholder="请输入"
+
+                />
+                <ProFormText
+                    name="reserved2"
+                    label="扩展2:"
+                    placeholder="请输入"
+
+                />
+                
+            </ModalForm>
+        )
+    }
+
+
+
+    const tableDataSearchHandle = (paramName: string) => {
+        set_tableDataFilterParams({
+            ...tableDataFilterParams,
+            [`${paramName}`]: tableDataSearchKeywords
+        })
+    }
+
+    useEffect(() => {
+        if (currentSelectedType) {
+            set_tableDataFilterParams({ ...tableDataFilterParams, typeCode: currentSelectedType.code })
+        }
+    }, [currentSelectedType])
+
+    useEffect(() => {
+        if (showTypeListArr.length > 0) {
+            set_currentSelectedType(showTypeListArr[0]);
+            set_tableDataFilterParams({ ...tableDataFilterParams, typeCode: showTypeListArr[0].code });
+        }
+    }, [showTypeListArr])
+
+    useEffect(() => {
+        getTypeList();
+    }, [])
+
+    return (
+        <BMSPagecontainer title={false} className='BusinessDicMana'>
+            <div className='left'>
+                <Input placeholder={'请输入类目名称'} allowClear
+                    suffix={
+                        <IconFont type="iconsousuo" />
+                    }
+                    onChange={(e) => {
+                        const result = typeList.filter(item => item.name.indexOf(e.target.value) != -1);
+                        set_showTypeListArr(result);
+                    }}
+
+                />
+                <div className='wrap'>
+                    {
+                        showTypeListArr.map((item, index) => {
+                            return (
+                                <div className={currentSelectedType ? currentSelectedType.id == item.id ? 'type on' : 'type' : 'type'}
+                                    key={index}
+                                    onClick={() => set_currentSelectedType(item)}
+                                >{item.name}</div>
+                            )
+                        })
+                    }
+                </div>
+            </div>
+            <div className='right'>
+                <div className='toolBar'>
+                    <div className='filter'>
+                        <div className='filterItem'>
+                            <span className='label'>检索:</span>
+                            <Input placeholder={'请输入项目名称'} style={{ width: 160 }} allowClear
+
+                                suffix={
+                                    <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('typeName')} />
+                                }
+                                onChange={(e) => {
+                                    set_tableDataSearchKeywords(e.target.value);
+                                    if (e.target.value.length == 0) {
+                                        set_tableDataFilterParams({
+                                            ...tableDataFilterParams,
+                                            typeName: ''
+                                        });
+                                    }
+                                }}
+
+                                onPressEnter={(e)=>{
+                                    set_tableDataFilterParams({
+                                        ...tableDataFilterParams,
+                                        typeName:(e.target as HTMLInputElement).value
+                                    });
+                                }}
+
+                            />
+                        </div>
+                    </div>
+                    <div className='btnGroup'>
+                        <UpDataActBtn record type='ADD' />
+                    </div>
+                </div>
+                <div style={{ marginTop: 16 }}>
+                    {currentSelectedType && <BMSTable actionRef={tableRef} columns={columns as ProColumns[]} rowKey='id' params={tableDataFilterParams} request={(params) => getTableData(params)} />}
+                </div>
+            </div>
+        </BMSPagecontainer>
+    )
+}
+
+
+export default BusinessDicMana;

+ 90 - 0
src/pages/setting/baseSetting/businessDicMana/service.ts

@@ -0,0 +1,90 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-07 11:12:10
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-03-22 14:50:23
+ * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicMana/service.ts
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+
+
+
+
+import { request } from 'umi';
+
+
+
+//获取表格数据
+
+export type BusinessDicTableData = {
+  id:number;
+  hospId:number;
+  code:string;
+  name:string;
+  value:string;
+  typeCode:string;
+  dictSort:string;
+  defaultFlag:number;
+  reserved1:string;
+  reserved2:string;
+}
+
+export const getBusinessDicTableData = (params:BusinessDicTableData) => {
+    return request('/performance/dict/getDictDataList', {
+      method: 'GET',
+      params:{...params}
+    });
+};
+
+
+//新增表格数据
+
+export type AddBusinessDicTableData = {
+  hospId:number;
+  code:string;
+  name:string;
+  value:string;
+  typeCode:string;
+  dictSort:string;
+  defaultFlag:number;
+  reserved1:string;
+  reserved2:string;
+}
+
+export const addBusinessDicTableData = (data:AddBusinessDicTableData) => {
+    return request('/performance/dict/addData', {
+      method: 'POST',
+      data
+    });
+};
+
+//编辑表格数据
+
+export const editPubDicRelaTbaleData = (data:BusinessDicTableData) => {
+    return request('/performance/dict/editData', {
+      method: 'POST',
+      data
+    });
+};
+
+
+//删除表格操作
+export const delData = (id:number) => {
+    return request('/performance/dict/deleteData', {
+      method: 'POST',
+      params:{id}
+    });
+  };
+
+
+//获取职类
+
+export type JobCateoryType = {
+    
+}
+
+export const  getJobCateory= () => {
+  return request<JobCateoryType[]>('/performance/dict/getDictTypeList', {
+    method: 'GET',
+  });
+};

+ 88 - 0
src/pages/setting/baseSetting/businessDicMana/style.less

@@ -0,0 +1,88 @@
+.BusinessDicMana {
+  width: 100%;
+  overflow: hidden;
+
+  .left {
+    float: left;
+    border-radius: 4px;
+    width: 220px;
+    height:calc(100vh - 80px);
+    overflow: scroll;
+    margin-right: 16px;
+    padding: 16px;
+    background: #FFFFFF;
+
+    .wrap {
+      margin-top: 16px;
+
+      .type {
+        cursor: pointer;
+        height: 32px;
+        line-height: 32px;
+        padding-left: 8px;
+        background: #FFFFFF;
+        border-radius: 4px;
+        font-size: 14px;
+        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+        font-weight: 400;
+        color: #17181A;
+        margin-bottom: 4px;
+
+        &.on {
+          font-weight: 500;
+          color: #17181A;
+          background: #F0F2F5;
+        }
+
+        &:last-child {
+            margin-bottom: 0;
+        }
+      }
+    }
+  }
+
+  .right {
+    float: left;
+    width: calc(100% - 236px);
+    padding: 16px;
+    border-radius: 4px;
+    background: #FFFFFF;
+
+    .toolBar {
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+      align-items: center;
+
+      .filter {
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: center;
+
+        .filterItem {
+          display: flex;
+          flex-direction: row;
+          justify-content: center;
+          align-items: center;
+        }
+      }
+
+      .btnGroup {
+        .add {
+          cursor: pointer;
+          display: inline-block;
+          font-size: 14px;
+          font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+          font-weight: 400;
+          color: #FFFFFF;
+          line-height: 24px;
+          padding: 0 14px;
+          background: #3377FF;
+          border-radius: 4px;
+        }
+      }
+
+    }
+  }
+}

+ 213 - 0
src/pages/setting/baseSetting/dicClassfication/index.tsx

@@ -0,0 +1,213 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-03 11:30:33
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-03-22 14:55:49
+ * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+
+
+
+
+import BMSPagecontainer from '@/components/BMSPageContainer';
+import { BMSTable } from '@/components/BMSTable';
+import { createFromIconfontCN } from '@ant-design/icons';
+
+import { ActionType } from '@ant-design/pro-components';
+import { ModalForm, ProFormCascader, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-form'
+import { ProColumns } from '@ant-design/pro-table';
+import { Input, message, Popconfirm } from 'antd';
+import { useEffect, useRef, useState } from 'react'
+
+import { addData, delData, editData, getData } from './service';
+
+import './style.less';
+
+
+const IconFont = createFromIconfontCN({
+    scriptUrl: '//at.alicdn.com/t/c/font_1927152_4nm5kxbv4m3.js',
+});
+
+
+
+export default function DicClassfication() {
+
+    const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>();
+    const [tableDataSearchKeywords, set_tableDataSearchKeywords] = useState<string>('');
+    const tableRef = useRef<ActionType>();
+
+
+
+
+    const columns = [
+        
+        {
+            title: '类型名称',
+            dataIndex: 'name',
+        },
+        {
+            title: '类型代码',
+            dataIndex: 'code',
+        },
+        {
+            title: '说明',
+            dataIndex: 'remark',
+        },
+        {
+            title: '操作',
+            key: 'option',
+            width: 120,
+            valueType: 'option',
+            render: (_: any, record: any) => {
+                return [
+                    <UpDataActBtn key={'act'} record={record} type='EDIT' />,
+                    <Popconfirm
+                        title="是否确认删除?"
+                        key="del"
+                        onConfirm={() => delTableData(record)}
+                    >
+                        <a>删除</a>
+                    </Popconfirm>
+                ]
+            },
+        },
+
+    ]
+
+
+    const getTableData = async (params: any) => {
+        const resp = await getData(params);
+        if (resp) {
+            return {
+                data: resp.list,
+                success: true,
+                total: resp.totalCount,
+                pageSize: resp.pageSize,
+                totalPage: resp.totalPage,
+            }
+        }
+        return []
+    }
+
+    const delTableData = async (record: any) => {
+        const resp = await delData(record.id);
+        if (resp) {
+            message.success('操作成功!');
+            tableRef.current?.reload();
+            // message.success('操作成功!');
+        }
+    }
+
+    const updateTable = async (formVal: any, type: 'EDIT' | "ADD") => {
+
+        if (type == 'ADD') {
+            const resp = await addData({ ...formVal});
+            if (resp) {
+                tableRef.current?.reload();
+                message.success('操作成功!');
+            }
+        }
+        if (type == 'EDIT') {
+            const resp = await editData({ ...formVal});
+            if (resp) {
+                tableRef.current?.reload();
+                message.success('操作成功!');
+            }
+        }
+
+
+    }
+
+    const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD' }) => {
+
+        return (
+            <ModalForm
+                title={`${type == 'EDIT' ? '编辑' : '新增'}公用字典类型`}
+                width={352}
+                initialValues={type == 'EDIT' ? { ...record } : {}}
+                trigger={
+                    type == 'EDIT' ? <a key="edit" >编辑</a> : <span className='add'>新增</span>
+                }
+                onFinish={(val) => {
+                    return updateTable(type == 'EDIT'?{...record,...val}:{...val}, type);
+                }}
+                colProps={{span:24}}
+                grid
+            >
+
+                <ProFormText
+                    name="name"
+                    label="类型名称:"
+                    placeholder="请输入"
+                    rules={[{ required: true, message: '名称不能为空!' }]}
+                />
+                <ProFormText
+                    name="code"
+                    label="类型代码:"
+                    placeholder="请输入"
+                    rules={[{ required: true, message: '类型代码不能为空!' }]}
+                />
+                 <ProFormTextArea
+                    name="remark"
+                    label="说明:"
+                    placeholder="请输入"
+                />
+            </ModalForm>
+        )
+    }
+
+    const tableDataSearchHandle = (paramName: string) => {
+
+
+        set_tableDataFilterParams({
+            ...tableDataFilterParams,
+            [`${paramName}`]: tableDataSearchKeywords
+        })
+    }
+
+
+    useEffect(()=>{
+     
+    },[])
+
+    return (
+        <BMSPagecontainer className='DicClassfication' title={false}>
+            <div className='toolBar'>
+                <div className='filter'>
+                    <div className='filterItem'>
+                        <span className='label' style={{whiteSpace:'nowrap'}}> 检索:</span>
+                        <Input placeholder={'请输入类型名称'}  allowClear
+                            suffix={
+                                <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('typeName')} />
+                            }
+                            onChange={(e) => {
+                                set_tableDataSearchKeywords(e.target.value);
+                                if (e.target.value.length == 0) {
+                                    set_tableDataFilterParams({
+                                        ...tableDataFilterParams,
+                                        typeName: ''
+                                    });
+                                }
+                            }}
+                            onPressEnter={(e)=>{
+                          
+                                set_tableDataFilterParams({
+                                    ...tableDataFilterParams,
+                                    typeName:(e.target as HTMLInputElement).value
+                                });
+                            }}
+
+                        />
+                    </div>
+                </div>
+                <div className='btnGroup'>
+                    <UpDataActBtn record type='ADD' />
+                </div>
+            </div>
+            <div style={{ marginTop: 16 }}>
+                <BMSTable columns={columns as ProColumns[]} actionRef={tableRef}  rowKey='id'  params={tableDataFilterParams} request={(params) => getTableData(params)} />
+            </div>
+        </BMSPagecontainer>
+    )
+}

+ 78 - 0
src/pages/setting/baseSetting/dicClassfication/service.ts

@@ -0,0 +1,78 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-03 16:31:27
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-03-22 11:17:39
+ * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/service.ts
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+
+
+
+import { request } from 'umi';
+
+//获取table列表数据
+
+export type PubDicClassType = {
+  id:number;
+  hospId:number;
+  code:string;
+  name:string;
+  remark:string;
+}
+
+
+export const getData = (params?:any) => {
+  return request<{
+       current:number;
+       list:PubDicClassType[];
+       pageSize:number;
+       totalCount:number;
+       totalPage:number;
+  }>('/performance/dict/getDictType', {
+    method: 'GET',
+    params:{...params}
+  });
+};
+
+
+//新增表格数据
+export type AddTableDataType = {
+  //hospId:number;
+  code:string;
+  name:string;
+  remark:string;
+}
+export const addData = (data:AddTableDataType) => {
+  return request('/performance/dict/addDictType', {
+    method: 'POST',
+    data
+  });
+};
+
+
+
+//编辑表格数据
+
+export const editData = (data:PubDicClassType) => {
+  return request('/performance/dict/editDictType', {
+    method: 'POST',
+    data
+  });
+};
+
+//删除表格操作
+export const delData = (id:string) => {
+  return request('/performance/dict/deleteDictType', {
+    method: 'POST',
+    params:{id}
+  });
+};
+
+
+
+
+
+
+
+

+ 43 - 0
src/pages/setting/baseSetting/dicClassfication/style.less

@@ -0,0 +1,43 @@
+.DicClassfication {
+  padding: 16px;
+  background: #FFFFFF;
+  border-radius: 4px;
+
+
+  .toolBar {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+
+    .filter {
+      display: flex;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: center;
+
+      .filterItem {
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        align-items: center;
+      }
+    }
+
+    .btnGroup {
+      .add {
+        cursor: pointer;
+        display: inline-block;
+        font-size: 14px;
+        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+        font-weight: 400;
+        color: #FFFFFF;
+        line-height: 24px;
+        padding: 0 14px;
+        background: #3377FF;
+        border-radius: 4px;
+      }
+    }
+
+  }
+}

+ 240 - 0
src/pages/setting/baseSetting/paramsMana/index.tsx

@@ -0,0 +1,240 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-03 11:30:33
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-03-22 15:41:47
+ * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+
+
+
+
+import BMSPagecontainer from '@/components/BMSPageContainer';
+import { BMSTable } from '@/components/BMSTable';
+import { createFromIconfontCN } from '@ant-design/icons';
+
+import { ActionType, ProFormRadio } from '@ant-design/pro-components';
+import { ModalForm, ProFormCascader, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-form'
+import { ProColumns } from '@ant-design/pro-table';
+import { Input, message, Popconfirm } from 'antd';
+import { useEffect, useRef, useState } from 'react'
+
+import { addData, delData, editData, getData } from './service';
+
+import './style.less';
+
+
+const IconFont = createFromIconfontCN({
+    scriptUrl: '//at.alicdn.com/t/c/font_1927152_4nm5kxbv4m3.js',
+});
+
+
+
+export default function ParamsMana() {
+
+    const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>();
+    const [tableDataSearchKeywords, set_tableDataSearchKeywords] = useState<string>('');
+    const tableRef = useRef<ActionType>();
+
+
+
+
+    const columns = [
+        
+        {
+            title: '参数名称',
+            dataIndex: 'name',
+        },
+        {
+            title: '描述',
+            dataIndex: 'description',
+        },
+        {
+            title: '参数值',
+            dataIndex: 'value',
+        },
+        {
+            title: '启用',
+            dataIndex: 'status', 
+            render: (_: any, record: any) => {
+                  console.log({_});
+                  return _ == 1?'是':'否'
+            } 
+        },
+        {
+            title: '操作',
+            key: 'option',
+            width: 120,
+            valueType: 'option',
+            render: (_: any, record: any) => {
+                return [
+                    <UpDataActBtn key={'act'} record={record} type='EDIT' />,
+                    <Popconfirm
+                        title="是否确认删除?"
+                        key="del"
+                        onConfirm={() => delTableData(record)}
+                    >
+                        <a>删除</a>
+                    </Popconfirm>
+                ]
+            },
+        },
+
+    ]
+
+
+    const getTableData = async (params: any) => {
+        const resp = await getData(params);
+        if (resp) {
+            return {
+                data: resp.list,
+                success: true,
+                total: resp.totalCount,
+                pageSize: resp.pageSize,
+                totalPage: resp.totalPage,
+            }
+        }
+        return []
+    }
+
+    const delTableData = async (record: any) => {
+        const resp = await delData(record.id);
+        if (resp) {
+            message.success('操作成功!');
+            tableRef.current?.reload();
+            // message.success('操作成功!');
+        }
+    }
+
+    const updateTable = async (formVal: any, type: 'EDIT' | "ADD") => {
+
+        if (type == 'ADD') {
+            const resp = await addData({ ...formVal});
+            if (resp) {
+                tableRef.current?.reload();
+                message.success('操作成功!');
+            }
+        }
+        if (type == 'EDIT') {
+            const resp = await editData({ ...formVal});
+            if (resp) {
+                tableRef.current?.reload();
+                message.success('操作成功!');
+            }
+        }
+        return true;
+
+    }
+
+    const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD' }) => {
+
+        return (
+            <ModalForm
+                title={`${type == 'EDIT' ? '编辑' : '新增'}参数`}
+                width={352}
+                initialValues={type == 'EDIT' ? { ...record } : {}}
+                trigger={
+                    type == 'EDIT' ? <a key="edit" >编辑</a> : <span className='add'>新增</span>
+                }
+                onFinish={(val) => {
+                    return updateTable(type == 'EDIT'?{...record,...val}:{...val}, type);
+                }}
+                colProps={{span:24}}
+                grid
+            >
+
+                <ProFormText
+                    name="name"
+                    label="参数名称:"
+                    placeholder="请输入"
+                    rules={[{ required: true, message: '名称不能为空!' }]}
+                />
+                <ProFormTextArea
+                    name="description"
+                    label="描述"
+                    placeholder="请输入"
+                    rules={[{ required: true, message: '类型代码不能为空!' }]}
+                />
+                 <ProFormText
+                    name="value"
+                    label="参数值:"
+                    placeholder="请输入"
+                    rules={[{ required: true, message: '名称不能为空!' }]}
+                />
+                <ProFormRadio.Group
+                    name="status"
+                    label="启用:"
+                    fieldProps={{
+                        buttonStyle: 'solid'
+                    }}
+                    options={[
+                        {
+                            label: '是',
+                            value: 1,
+                        },
+                        {
+                            label: '否',
+                            value: 0,
+                        },
+                    ]}
+                    rules={[{ required: true, message: '默认不能为空!' }]}
+                />
+            </ModalForm>
+        )
+    }
+
+    const tableDataSearchHandle = (paramName: string) => {
+
+
+        set_tableDataFilterParams({
+            ...tableDataFilterParams,
+            [`${paramName}`]: tableDataSearchKeywords
+        })
+    }
+
+
+    useEffect(()=>{
+     
+    },[])
+
+    return (
+        <BMSPagecontainer className='ParamsMana' title={false}>
+            <div className='toolBar'>
+                <div className='filter'>
+                    <div className='filterItem'>
+                        <span className='label' style={{whiteSpace:'nowrap'}}> 检索:</span>
+                        <Input placeholder={'请输入参数名称'}  allowClear
+                            suffix={
+                                <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('parameterName')} />
+                            }
+                            onChange={(e) => {
+                                set_tableDataSearchKeywords(e.target.value);
+                                if (e.target.value.length == 0) {
+                                    set_tableDataFilterParams({
+                                        ...tableDataFilterParams,
+                                        parameterName: ''
+                                    });
+                                }
+                            }}
+                            onPressEnter={(e)=>{
+                          
+                                set_tableDataFilterParams({
+                                    ...tableDataFilterParams,
+                                    parameterName:(e.target as HTMLInputElement).value
+                                });
+                            }}
+
+                        />
+                    </div>
+                </div>
+                <div className='btnGroup'>
+                    <UpDataActBtn record type='ADD' />
+                </div>
+            </div>
+            <div style={{ marginTop: 16 }}>
+                <BMSTable columns={columns as ProColumns[]} actionRef={tableRef}  rowKey='id'  params={tableDataFilterParams} request={(params) => getTableData(params)} />
+            </div>
+        </BMSPagecontainer>
+    )
+}

+ 84 - 0
src/pages/setting/baseSetting/paramsMana/service.ts

@@ -0,0 +1,84 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-03 16:31:27
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-03-22 15:33:28
+ * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/service.ts
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+
+
+
+import { request } from 'umi';
+
+//获取table列表数据
+
+export type ParamsManaTableRowType = {
+  id:number;
+  hospId:number;
+  code:string;
+  name:string;
+  remark:string;
+  value:string;
+  status:number;
+  description:string;
+}
+
+
+export const getData = (params?:any) => {
+  return request<{
+       current:number;
+       list:ParamsManaTableRowType[];
+       pageSize:number;
+       totalCount:number;
+       totalPage:number;
+  }>('/performance/parameter/getList', {
+    method: 'GET',
+    params:{...params}
+  });
+};
+
+
+//新增表格数据
+export type AddTableDataType = {
+  hospId:number;
+  code:string;
+  name:string;
+  remark:string;
+  value:string;
+  status:number;
+  description:string;
+}
+export const addData = (data:AddTableDataType) => {
+  return request('/performance/parameter/add', {
+    method: 'POST',
+    data
+  });
+};
+
+
+
+//编辑表格数据
+
+export const editData = (data:ParamsManaTableRowType) => {
+  return request('/performance/parameter/edit', {
+    method: 'POST',
+    data
+  });
+};
+
+//删除表格操作
+export const delData = (id:string) => {
+  return request('/performance/parameter/delete', {
+    method: 'POST',
+    params:{id}
+  });
+};
+
+
+
+
+
+
+
+

+ 43 - 0
src/pages/setting/baseSetting/paramsMana/style.less

@@ -0,0 +1,43 @@
+.ParamsMana {
+  padding: 16px;
+  background: #FFFFFF;
+  border-radius: 4px;
+
+
+  .toolBar {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+
+    .filter {
+      display: flex;
+      flex-direction: row;
+      justify-content: flex-start;
+      align-items: center;
+
+      .filterItem {
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        align-items: center;
+      }
+    }
+
+    .btnGroup {
+      .add {
+        cursor: pointer;
+        display: inline-block;
+        font-size: 14px;
+        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+        font-weight: 400;
+        color: #FFFFFF;
+        line-height: 24px;
+        padding: 0 14px;
+        background: #3377FF;
+        border-radius: 4px;
+      }
+    }
+
+  }
+}