فهرست منبع

报表相关设置功能添加|绩效基础设置功能添加

code4eat 2 سال پیش
والد
کامیت
84a385fec1

+ 21 - 1
.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-04-06 15:25:59
+ * @LastEditTime: 2023-04-12 15:35:05
  * @FilePath: /BudgetManaSystem/.umirc.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -88,6 +88,16 @@ export default defineConfig({
               name: '参数管理',
               path: '/setting/baseSetting/paramsMana',
               component: './setting/baseSetting/paramsMana',
+            },
+            {
+              name: '职类基础设定',
+              path: '/setting/baseSetting/jobCateBaseSet',
+              component: './setting/baseSetting/jobCateBaseSet',
+            },
+            {
+              name: '岗位等级系数设定',
+              path: '/setting/baseSetting/positionLevelRateSet',
+              component: './setting/baseSetting/positionLevelRateSet',
             }
           ]
         },
@@ -130,6 +140,16 @@ export default defineConfig({
               name: '报表设置',
               path: '/setting/reportSet/reportSetting',
               component: './setting/reportSet/reportSetting',
+            },
+            {
+              name: '报表跳转管理',
+              path: '/setting/reportSet/reportNavSet',
+              component: './setting/reportSet/reportNavSet',
+            },
+            {
+              name: '自定义SQL管理',
+              path: '/setting/reportSet/diySqlMana',
+              component: './setting/reportSet/diySqlMana',
             }
           ]
         },

+ 43 - 0
package-lock.json

@@ -12,11 +12,13 @@
         "@umijs/max": "^4.0.51",
         "antd": "^5.0.7",
         "axios": "^1.3.3",
+        "json-bigint": "^1.0.0",
         "lodash": "^4.17.21",
         "mathjs": "^11.6.0",
         "react-sortable-hoc": "^2.0.0"
       },
       "devDependencies": {
+        "@types/json-bigint": "^1.0.1",
         "@types/lodash": "^4.14.192",
         "@types/react": "^18.0.0",
         "@types/react-dom": "^18.0.0",
@@ -4320,6 +4322,12 @@
         "@types/istanbul-lib-report": "*"
       }
     },
+    "node_modules/@types/json-bigint": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.1.tgz",
+      "integrity": "sha512-zpchZLNsNuzJHi6v64UBoFWAvQlPhch7XAi36FkH6tL1bbbmimIF+cS7vwkzY4u5RaSWMoflQfu+TshMPPw8uw==",
+      "dev": true
+    },
     "node_modules/@types/json-schema": {
       "version": "7.0.11",
       "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
@@ -6611,6 +6619,14 @@
         "node": "*"
       }
     },
+    "node_modules/bignumber.js": {
+      "version": "9.1.1",
+      "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz",
+      "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==",
+      "engines": {
+        "node": "*"
+      }
+    },
     "node_modules/binary-extensions": {
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
@@ -10845,6 +10861,14 @@
         "node": ">=4"
       }
     },
+    "node_modules/json-bigint": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz",
+      "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
+      "dependencies": {
+        "bignumber.js": "^9.0.0"
+      }
+    },
     "node_modules/json-parse-even-better-errors": {
       "version": "2.3.1",
       "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
@@ -19772,6 +19796,12 @@
         "@types/istanbul-lib-report": "*"
       }
     },
+    "@types/json-bigint": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.1.tgz",
+      "integrity": "sha512-zpchZLNsNuzJHi6v64UBoFWAvQlPhch7XAi36FkH6tL1bbbmimIF+cS7vwkzY4u5RaSWMoflQfu+TshMPPw8uw==",
+      "dev": true
+    },
     "@types/json-schema": {
       "version": "7.0.11",
       "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
@@ -21508,6 +21538,11 @@
       "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
       "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
     },
+    "bignumber.js": {
+      "version": "9.1.1",
+      "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz",
+      "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig=="
+    },
     "binary-extensions": {
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
@@ -24576,6 +24611,14 @@
       "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
       "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA=="
     },
+    "json-bigint": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz",
+      "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
+      "requires": {
+        "bignumber.js": "^9.0.0"
+      }
+    },
     "json-parse-even-better-errors": {
       "version": "2.3.1",
       "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",

+ 2 - 0
package.json

@@ -18,11 +18,13 @@
     "@umijs/max": "^4.0.51",
     "antd": "^5.0.7",
     "axios": "^1.3.3",
+    "json-bigint": "^1.0.0",
     "lodash": "^4.17.21",
     "mathjs": "^11.6.0",
     "react-sortable-hoc": "^2.0.0"
   },
   "devDependencies": {
+    "@types/json-bigint": "^1.0.1",
     "@types/lodash": "^4.14.192",
     "@types/react": "^18.0.0",
     "@types/react-dom": "^18.0.0",

+ 33 - 2
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-04-04 17:19:18
+ * @LastEditTime: 2023-04-13 10:00:49
  * @FilePath: /BudgetManaSystem/src/app.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -20,6 +20,8 @@ import type { RequestConfig } from 'umi';
 
 import iconEnum from './menuIcons.js';
 
+import JSONbig from 'json-bigint'
+
 import DevicePixelRatio from './utils/devicePixelRatio.js';
 
 import Icon, { createFromIconfontCN } from '@ant-design/icons';
@@ -62,7 +64,15 @@ export const request: RequestConfig = {
   // 统一的请求设定
   timeout: 100000000,
   headers: { 'X-Requested-With': 'XMLHttpRequest' },
-
+  // transformResponse:[function (data) {
+  //   try {
+  //     // 如果转换成功则返回转换的数据结果
+  //     return JSONbig.parse(data);
+  //   } catch (error) {
+  //     // 如果转换失败,则包装为统一数据格式并返回
+  //     return data
+  //   }
+  // }],
   // 错误处理: umi@3 的错误处理方案。
   errorConfig: {
     // 错误抛出
@@ -142,6 +152,7 @@ export const request: RequestConfig = {
   responseInterceptors: [
     (response: AxiosResponse) => {
       // 拦截响应数据,进行个性化处理
+    
       const { status, data: { success, status: code, errorMessage, data: respData }, config: { method } } = response;
 
       try {
@@ -339,6 +350,16 @@ export const layout = ({ initialState, setInitialState }: { initialState: any, s
                     path: '/setting/baseSetting/paramsMana',
                     name: '参数管理',
                     icon: '',
+                  },
+                  {
+                    name: '职类基础设定',
+                    path: '/setting/baseSetting/jobCateBaseSet',
+                    icon:''
+                  },
+                  {
+                    name: '岗位等级系数设定',
+                    path: '/setting/baseSetting/positionLevelRateSet',
+                    icon:''
                   }
                 ]
               },
@@ -383,6 +404,16 @@ export const layout = ({ initialState, setInitialState }: { initialState: any, s
                     name: '报表设置',
                     path: '/setting/reportSet/reportSetting',
                     icon:''
+                  },
+                  {
+                    name: '报表跳转管理',
+                    path: '/setting/reportSet/reportNavSet',
+                    icon:''
+                  },
+                  {
+                    name: '自定义SQL管理',
+                    path: '/setting/reportSet/diySqlMana',
+                    icon:''
                   }
                 ]
               }

+ 233 - 162
src/global.less

@@ -1,4 +1,3 @@
-
 * {
     font-family: 'SourceHanSansCN, SourceHanSansCN' !important;
 }
@@ -18,7 +17,7 @@ body {
 }
 
 textarea {
-  border: 1px solid #CFD7E6 !important;
+    border: 1px solid #CFD7E6 !important;
 }
 
 .bms-ant-input {
@@ -34,84 +33,89 @@ textarea {
 .bms-ant-modal {
     .bms-ant-modal-content {
         padding: 16px !important;
+
         .bms-ant-modal-body {
-             .bms-ant-modal-confirm-body-wrapper {
-                   .bms-ant-modal-confirm-body {
-                       .bms-ant-modal-confirm-content {
-                          max-width: 100% !important;
-                          max-height: 70vh !important;
-                          overflow-y: scroll;
-
-                          .TableTransfer {
+            .bms-ant-modal-confirm-body-wrapper {
+                .bms-ant-modal-confirm-body {
+                    .bms-ant-modal-confirm-content {
+                        max-width: 100% !important;
+                        max-height: 70vh !important;
+                        overflow-y: scroll;
+
+                        .TableTransfer {
                             .bms-ant-transfer-operation {
-                            //   align-self: self-end;
-                            //   margin-bottom: 30px;
-                        
-                              button {
-                                //color: #17181A;
-                                width: 24px;
-                                height: 40px !important;
-                                // background: #FAFCFF;
-                                border-radius: 4px;
-                                border: 1px solid #DAE2F2;
-                              }
+                                //   align-self: self-end;
+                                //   margin-bottom: 30px;
+
+                                button {
+                                    //color: #17181A;
+                                    width: 24px;
+                                    height: 40px !important;
+                                    // background: #FAFCFF;
+                                    border-radius: 4px;
+                                    border: 1px solid #DAE2F2;
+                                }
                             }
 
                             .bms-ant-transfer-list {
                                 border: 1px solid #DAE2F2;
+
                                 .bms-ant-transfer-list-header {
                                     border-bottom: 1px solid #DAE2F2;
+
                                     .anticon {
-                                      color: #99A6BF;
+                                        color: #99A6BF;
                                     }
-                              
+
                                     .bms-ant-transfer-list-header-selected {
-                                      color: #515866;
+                                        color: #515866;
                                     }
-                                  }
-                              
-                                  .bms-ant-transfer-list-body {
+                                }
+
+                                .bms-ant-transfer-list-body {
                                     .bms-ant-transfer-list-body-search-wrapper {
-                                      padding: 8px;
-                              
-                                      .bms-ant-input-prefix {
-                                        .anticon-search {
-                                          color: #99A6BF;
+                                        padding: 8px;
+
+                                        .bms-ant-input-prefix {
+                                            .anticon-search {
+                                                color: #99A6BF;
+                                            }
                                         }
-                                      }
                                     }
-                                  }
-                            } 
-                        
-                            
-                        
+                                }
+                            }
+
+
+
                             .bms-ant-table {
-                              .bms-ant-table-container {
-                                .bms-ant-table-content {
-                                  .bms-ant-table-thead {
-                        
-                                    &>tr>th {
-                                      font-size: 14px;
-                                      font-family: SourceHanSansCN-Medium, SourceHanSansCN;
-                                      font-weight: 500;
-                                      color: #17181A;
-                                      background: #EEF3FA;
-                                      border-radius: 0 !important;
-                                      padding: 4px 8px !important;
-                                      border-bottom: none;
+                                .bms-ant-table-container {
+                                    .bms-ant-table-content {
+                                        .bms-ant-table-thead {
+
+                                            &>tr>th {
+                                                font-size: 14px;
+                                                font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+                                                font-weight: 500;
+                                                color: #17181A;
+                                                background: #EEF3FA;
+                                                border-radius: 0 !important;
+                                                padding: 4px 8px !important;
+                                                border-bottom: none;
+                                            }
+                                        }
                                     }
-                                  }
                                 }
-                              }
                             }
-                          }
-                       }
-                   }
-                   .bms-ant-modal-confirm-btns {
+                        }
+                    }
+                }
+
+                .bms-ant-modal-confirm-btns {
                     display: flex;
                     flex-direction: row;
                     align-items: center;
                     justify-content: flex-end;
+
                     &>button {
                         display: flex;
                         justify-content: center;
@@ -119,24 +123,27 @@ textarea {
                         min-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 {
+            &>button {
                 display: flex;
                 justify-content: center;
                 align-items: center;
                 min-width: 56px;
-                height: 24px;;
+                height: 24px;
+                ;
                 border-radius: 4px;
 
                 &>span {
@@ -146,7 +153,7 @@ textarea {
                 &.bms-ant-btn-default {
                     border: 1px solid #DAE2F2;
                 }
-              }
+            }
         }
     }
 }
@@ -157,33 +164,35 @@ textarea {
 
 .bms-ant-message {
     .ant-message-notice-success {
-         .bms-ant-message-notice-content {
-              .anticon-check-circle {
-                  &>svg {
-                      color: #52c41a;
-                  }
-              }
-         }
+        .bms-ant-message-notice-content {
+            .anticon-check-circle {
+                &>svg {
+                    color: #52c41a;
+                }
+            }
+        }
     }
 }
 
 //Form
 
 .bms-ant-form {
-      &.bms-ant-form-vertical {
+    &.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;
+                min-height: 24px;
             }
         }
-      }
+    }
 }
 
 
@@ -206,16 +215,16 @@ textarea {
     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;
-      }
+        &::placeholder {
+            font-size: 14px;
+            font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+            font-weight: 400;
+            color: #99A6BF;
+        }
     }
-  }
+}
 
 .bms-ant-input-disabled {
     &::placeholder {
@@ -224,7 +233,7 @@ textarea {
 }
 
 .bms-ant-input-affix-wrapper-disabled {
-    background: #F0F2F5 !important;    
+    background: #F0F2F5 !important;
 }
 
 
@@ -236,7 +245,7 @@ textarea {
 // }
 
 .bms-ant-page-header .bms-ant-page-header-heading-left {
-    margin-block:0 !important;
+    margin-block: 0 !important;
 }
 
 
@@ -248,7 +257,7 @@ textarea {
 
 //避免logo区域的层级过高,影响父容器
 .bms-ant-pro .bms-ant-pro-layout .bms-ant-pro-sider-fixed {
-    z-index:0!important;
+    z-index: 0 !important;
 }
 
 
@@ -261,21 +270,77 @@ textarea {
 }
 
 .bms-ant-tree.bms-ant-tree-directory .bms-ant-tree-treenode:hover::before {
-       background: #f0f2f5 !important;
-       border-radius: 4px;
+    background: #f0f2f5 !important;
+    border-radius: 4px;
+}
+
+.BMS-EditableProTable {
+    .bms-ant-pro-card-body {
+        padding-inline: 0 !important;
+        padding-block: 0 !important;
+
+        .bms-ant-table {
+            border: 1px solid #CFD7E6 !important;
+            overflow: hidden;
+            .bms-ant-table-content {
+                  .bms-ant-table-thead {
+                       &>tr>th {
+            
+                        height: 15px;
+                        line-height: 15px;
+                        font-size: 14px;
+                        padding: 12px 16px !important; 
+                        font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+                        // font-weight: 500;
+                        
+                        color: #17181A;
+                           border-bottom:1px solid #CFD7E6 !important;
+                           background: rgb(238 243 250 / 100%) !important;
+                           &::before {
+                              display: none !important;
+                           }
+                       }
+                  }
+                  .bms-ant-table-tbody {
+                       .bms-ant-table-row {
+                            .bms-ant-table-cell {
+                                
+                                height: 15px;
+                                line-height: 15px;
+                                font-size: 14px;
+                                font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+                                color: #17181A;
+                                padding: 12px 16px !important; 
+
+                                &>div {
+                                    justify-content: flex-start !important;
+                                }
+                            }
+
+                            &:last-child {
+                                &>td {
+                                    border-bottom-color: none !important;
+                                }
+                            }
+                       }
+                  }
+            }
+        }
+    }
 }
 
 .bms-ant-table-wrapper {
-    .bms-ant-table:not(.bms-ant-table-bordered) .bms-ant-table-tbody>tr.bms-ant-table-row.bms-ant-table-row-selected>td:first-child  {
-           border-radius: 0 !important;
+    .bms-ant-table:not(.bms-ant-table-bordered) .bms-ant-table-tbody>tr.bms-ant-table-row.bms-ant-table-row-selected>td:first-child {
+        border-radius: 0 !important;
     }
+
     .bms-ant-table-content {
         .bms-ant-table-thead {
             tr {
                 &:last-child {
-                      .bms-ant-table-cell {
-                         // border-top: 1px solid #dae2f2;
-                      }
+                    .bms-ant-table-cell {
+                        // border-top: 1px solid #dae2f2;
+                    }
                 }
             }
         }
@@ -283,8 +348,8 @@ textarea {
 }
 
 .bms-ant-table-wrapper .bms-ant-table:not(.bms-ant-table-bordered) .bms-ant-table-tbody>tr.bms-ant-table-row:hover>td:first-child {
-    border-start-start-radius:0 !important;
-    border-end-start-radius:0 !important;
+    border-start-start-radius: 0 !important;
+    border-end-start-radius: 0 !important;
 }
 
 .bms-ant-table-wrapper .bms-ant-table:not(.bms-ant-table-bordered) .bms-ant-table-tbody>tr.bms-ant-table-row:last-child:hover>td {
@@ -297,13 +362,13 @@ textarea {
 
 
 .bms-ant-table-wrapper .bms-ant-table:not(.bms-ant-table-bordered) .bms-ant-table-tbody>tr.bms-ant-table-row:hover>td:last-child {
-    border-end-end-radius:0 !important;
-    border-start-end-radius:0 !important;
+    border-end-end-radius: 0 !important;
+    border-start-end-radius: 0 !important;
 }
 
 
 .bms-ant-pro .bms-ant-pro-layout .bms-ant-pro-layout-bg-list {
-      background:#F7F9FC !important;
+    background: #F7F9FC !important;
 }
 
 // .bms-ant-message-notice .bms-ant-message-success .anticon {
@@ -321,54 +386,65 @@ textarea {
 **/
 .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 !important;
-      }
-  
-      .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;
-      }
+        padding: 0 8px !important;
+        border-radius: 4px !important;
+        border: 1px solid #CFD7E6 !important;
+
+        .bms-ant-select-selection-item {
+            line-height: 24px !important;
+        }
+
+        .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-selection-overflow {
+            .bms-ant-select-selection-overflow-item {
+                .bms-ant-select-selection-item {
+                      height: 22px !important;
+                      line-height: 22px !important;
+                      margin-top: 0 !important;
+                      margin-bottom: 7px !important;
+                }
+            }
+        }
     }
-  
+
     .bms-ant-select-arrow {
-      color: #CFD7E6;
+        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-selector {
+            border: 1px solid #DADEE6 !important;
+
+            .bms-ant-select-selection-placeholder {
+                color: #7A8599;
+            }
+        }
+
+        .bms-ant-select-arrow {
+            color: #7A8599;
         }
-      }
-  
-      .bms-ant-select-arrow {
-        color: #7A8599;
-      }
     }
-  }
+}
 
 
 
 
 
 .bms-ant-tabs .bms-ant-tabs-tab {
- padding: 5px 0 !important;
- padding-top:12px !important;
+    padding: 5px 0 !important;
+    padding-top: 12px !important;
 }
 
 
@@ -379,16 +455,16 @@ textarea {
 
 
 .bms-ant-pro-layout .bms-ant-pro-layout-container {
-     background: #F7F9FC !important;
+    background: #F7F9FC !important;
 }
 
 //页面全局底色
 .bms-ant-pro .bms-ant-pro-layout .bms-ant-pro-layout-bg-list {
-     background: rgb(247 249 252 / 100%);
+    background: rgb(247 249 252 / 100%);
 }
 
 .bms-ant-pro-page-container-children-content {
-    padding-inline:0 !important;
+    padding-inline: 0 !important;
 }
 
 .bms-ant-pro-sider-actions {
@@ -397,16 +473,16 @@ textarea {
 
 
 .bms-ant-pro-sider-collapsed-button {
-    top:95% !important;
+    top: 95% !important;
     right: 17px !important;
 }
 
 
-.bms-ant-menu .bms-ant-menu-submenu-title .anticon{
-      transition: none !important;
+.bms-ant-menu .bms-ant-menu-submenu-title .anticon {
+    transition: none !important;
 }
 
-.bms-ant-menu .bms-ant-menu-item .anticon +span {
+.bms-ant-menu .bms-ant-menu-item .anticon+span {
     transition: none !important;
 }
 
@@ -418,7 +494,7 @@ textarea {
     transition: none !important;
 }
 
-.bms-ant-menu .bms-ant-menu-submenu-title .anticon +span {
+.bms-ant-menu .bms-ant-menu-submenu-title .anticon+span {
     transition: none !important;
 }
 
@@ -429,21 +505,21 @@ textarea {
 
 .menuCollapseIcon {
     &>svg {
-         width:24px;
-         height:24px;
+        width: 24px;
+        height: 24px;
     }
 }
 
 
-.bms-ant-pro-form >div:not(.bms-ant-pro-form-light-filter) .pro-field-lg {
-     width: 100% !important;
+.bms-ant-pro-form>div:not(.bms-ant-pro-form-light-filter) .pro-field-lg {
+    width: 100% !important;
 }
 
 .bms-ant-select {
     .bms-ant-select-selector {
         border: 1px solid #CFD7E6 !important;
         // color: #99A6BF !important;
-       
+
         .bms-ant-select-selection-placeholder {
             color: #99A6BF !important;
         }
@@ -463,12 +539,12 @@ textarea {
 
 .bms-ant-select-disabled {
     .bms-ant-select-selector {
-          border: 1px solid #DADEE6 !important;
-          background:#F0F2F5 !important;  
+        border: 1px solid #DADEE6 !important;
+        background: #F0F2F5 !important;
 
-          .bms-ant-select-selection-placeholder {
+        .bms-ant-select-selection-placeholder {
             color: #7A8599 !important;
-          }
+        }
     }
 
     .bms-ant-select-arrow {
@@ -481,6 +557,7 @@ textarea {
 .bms-ant-input-number {
     border: 1px solid #CFD7E6 !important;
     color: #99A6BF !important;
+
     .bms-ant-input-number-input {
         height: 24px !important;
         line-height: 24px !important;
@@ -492,7 +569,7 @@ textarea {
     background: #F0F2F5 !important;
 
     .bms-ant-input-number-input {
-        color:#7A8599 !important ;
+        color: #7A8599 !important;
     }
 }
 
@@ -504,22 +581,16 @@ textarea {
     border: 1px solid #CFD7E6 !important;
 }
 
-.bms-ant-picker-input >input[disabled] {
-    color:#7A8599 !important ;
+.bms-ant-picker-input>input[disabled] {
+    color: #7A8599 !important;
 }
 
 .bms-ant-picker-disabled {
     background: #F0F2F5 !important;
     border: 1px solid #DADEE6 !important;
 
-    .anticon-swap-right,.anticon-calendar {
-        color:#7A8599 !important ;
+    .anticon-swap-right,
+    .anticon-calendar {
+        color: #7A8599 !important;
     }
-}
-
-
-
-
-
-
-
+}

+ 2 - 2
src/pages/setting/baseSetting/businessDicMana/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-04-06 18:32:45
+ * @LastEditTime: 2023-04-11 18:56: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
  */
@@ -158,7 +158,7 @@ const BusinessDicMana = () => {
 
         return (
             <ModalForm
-                title={`${type == 'EDIT' ? '编辑' : '新增'}公用字典(${record.name})`}
+                title={`${type == 'EDIT' ? `编辑(${record.name})` : '新增'}公用字典`}
                 width={352}
                 initialValues={type == 'EDIT' ? { ...record } : {defaultFlag:0}}
                 trigger={

+ 175 - 0
src/pages/setting/baseSetting/jobCateBaseSet/index.tsx

@@ -0,0 +1,175 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-03 11:30:33
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-04-12 15:30:36
+ * @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 { ActionType, EditableProTable } from '@ant-design/pro-components';
+import {  ProFormDigit } from '@ant-design/pro-form'
+import { ProColumns } from '@ant-design/pro-table';
+import { Input, InputNumber, message } from 'antd';
+import { typeOf } from 'mathjs';
+import { useEffect, useRef, useState } from 'react';
+
+
+import {editData, getJobCateTableData, JobCateTableDataType } from './service';
+
+import './style.less';
+
+
+
+
+
+export default function JobCateBaseSet() {
+
+    const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>();
+
+    const [dataSource,set_dataSource] = useState<JobCateTableDataType[]>([]);
+
+    const [currentEditRow, set_currentEditRow] = useState<undefined | any>(undefined);
+
+    const [ifEdit,set_ifEdit] = useState(false);
+
+    const [updateResult,set_updateResult] = useState<any|undefined>(undefined);
+    const tableRef = useRef<ActionType>();
+
+
+    // const EditableCell = ({_,record,keyStr}:{_:any,record:any,keyStr:string})=>{
+
+    //     const [num,set_num] = useState(0);
+
+    //     console.log({record});
+
+    //     if (currentEditRow && currentEditRow.code == record.code) {
+    //         return (
+    //             <InputNumber defaultValue={num} onChange={val=>{
+    //                  set_num(val as number);
+    //                  set_updateResult({...currentEditRow,[`${keyStr}`]:val});
+    //             }}  />
+    //         )
+    //     } else {
+    //         return _
+    //     }
+    // }
+
+    const columns: ProColumns[] = [
+
+        {
+            title: '职类',
+            dataIndex: 'name',
+            editable:false
+        },
+        {
+            title: '合理编制比例',
+            dataIndex: 'staffRate',
+            valueType:'digit'
+            //render: (_: any, record: any) => <EditableCell _={_} record={record} keyStr='staffRate' />
+        },
+        {
+            title: '合理人均薪酬系数',
+            dataIndex: 'averageSalary',
+            valueType:'digit'
+            //render: (_: any, record: any) => <EditableCell _={_} record={record} keyStr='averageSalary' />
+            // render:(_:any)=>_ == 1?'指标':'自定义SQL'
+        },
+        {
+            title: '系数考核占比',
+            dataIndex: 'ratePercent',
+            valueType:'digit'
+            //render: (_: any, record: any) => <EditableCell _={_} record={record} keyStr='ratePercent' />
+        },
+        {
+            title: '工作量考核占比',
+            dataIndex: 'workPercent',
+            valueType:'digit'
+            //render: (_: any, record: any) => <EditableCell _={_} record={record} keyStr='workPercent' />
+        },
+        {
+            title: '操作',
+            key: 'option',
+            width: 120,
+            valueType: 'option',
+            render: (text, record,_,action) => {
+                return [
+                    // <UpDataActBtn key={'act'} record={record} type='EDIT' />,
+                    <div key={'edit'} >
+                        {
+                            !ifEdit && (
+                                <a onClick={() => {
+                                    set_currentEditRow(record);
+                                    action?.startEditable?.(record.code);
+                                }}>编辑</a>
+                            )
+                        }
+
+                    </div>,
+
+                ]
+            },
+        },
+
+    ]
+
+
+    const getTableData = async () => {
+        const resp = await getJobCateTableData();
+        if(resp){
+            return {
+                data:resp
+            }
+        }
+        return {
+            data:[]
+        }
+    }
+
+
+
+    const updateTable = async (result:any) => {
+        const resp = await editData({
+            code:result.code,
+            name:result.name,
+            staffRate:result.staffRate,
+            averageSalary:result.averageSalary,
+            ratePercent:result.ratePercent,
+            workPercent:result.workPercent
+        });
+        if (resp) {
+            message.success('操作成功!');
+        }
+        tableRef.current?.reload();
+
+    }
+
+
+
+    return (
+        <BMSPagecontainer className='JobCateBaseSet' title={false}>
+            <div className='tableTitle'>职类基础设定</div>
+            <div style={{ marginTop: 16 }}>
+                <EditableProTable 
+                    className='BMS-EditableProTable'
+                    columns={columns as ProColumns[]} actionRef={tableRef} 
+                    rowKey='code'  pagination={false} request={()=> getTableData()}
+                    recordCreatorProps={false}
+                    editable={{
+                        actionRender:(row, config, defaultDom) => [defaultDom.save, defaultDom.cancel],
+                        onSave: async (rowKey, data, row) => {
+                            set_ifEdit(false);
+                            updateTable(data);   
+                        },
+                    }}
+                    />
+            </div>
+        </BMSPagecontainer>
+    )
+}

+ 67 - 0
src/pages/setting/baseSetting/jobCateBaseSet/service.ts

@@ -0,0 +1,67 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-03 16:31:27
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-04-12 11:23:45
+ * @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 JobCateTableDataType = {
+  code:string,
+  name:string,
+  staffRate:number,
+  averageSalary:number,
+  ratePercent:number,
+  workPercent:number,
+  staffRateDisplay:string,
+  averageSalaryDisplay:string,
+  ratePercentDisplay:string,
+  workPercentDisplay:string
+}
+
+
+export const getJobCateTableData = (params?:any) => {
+  return request<JobCateTableDataType[]>('/performance/setting/getUnitType', {
+    method: 'GET',
+    params:{...params}
+  });
+};
+
+
+
+//编辑表格数据
+
+export type EditJobCateTableDataType = {
+  code:string,
+  name:string,
+  staffRate:number,
+  averageSalary:number,
+  ratePercent:number,
+  workPercent:number
+}
+
+export const editData = (data:EditJobCateTableDataType) => {
+  return request('/performance/setting/addUnitType', {
+    method: 'POST',
+    data
+  });
+};
+
+
+
+
+
+
+
+
+
+
+
+

+ 52 - 0
src/pages/setting/baseSetting/jobCateBaseSet/style.less

@@ -0,0 +1,52 @@
+.JobCateBaseSet {
+  padding: 16px;
+  background: #FFFFFF;
+  border-radius: 4px;
+
+  .tableTitle {
+    height: 17px;
+    font-size: 16px;
+    font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+    font-weight: 500;
+    color: #17181A;
+    line-height: 17px;
+  }
+
+
+  .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;
+      }
+    }
+
+  }
+}

+ 273 - 0
src/pages/setting/baseSetting/positionLevelRateSet/index.tsx

@@ -0,0 +1,273 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-03 11:30:33
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-04-12 17:23: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, 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, Modal, Popconfirm } from 'antd';
+import Table, { ColumnsType } from 'antd/es/table';
+import { TableRowSelection } from 'antd/es/table/interface';
+import Transfer, { TransferItem, TransferProps } from 'antd/es/transfer';
+import { difference } from 'lodash';
+import React, { useImperativeHandle } from 'react';
+import { useEffect, useRef, useState } from 'react'
+
+import { getData, getPositionDicData, savePositionLevel } from './service';
+
+import './style.less';
+
+
+export default function PositionLevelRateSet() {
+
+    const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>();
+    const [tableDataSearchKeywords, set_tableDataSearchKeywords] = useState<string>('');
+    const tableRef = useRef<ActionType>();
+
+    const columns = [
+        
+        {
+            title: '岗位等级',
+            dataIndex: 'positionLevelName',
+        },
+        {
+            title: '分级系数',
+            dataIndex: 'positionLevelRate',
+        },
+        {
+            title: '岗位名称',
+            width:500,
+            ellipsis:true,
+            dataIndex: 'position',
+            render:(_:any,record:any)=>{
+                   if(record.position){
+                      return record.position.reduce((prev:any,cur:any)=>{
+                            return `${prev?prev+'|':''}${cur.name}`
+                      },undefined)
+                   }
+                return ''
+            }
+        },
+        {
+            title: '操作',
+            key: 'option',
+            width: 120,
+            valueType: 'option',
+            render: (_: any, record: any) => {
+                return [
+                    <a key={'option'} onClick={()=>selectpositionHandle(record)}>选择岗位</a>
+                ]
+            },
+        },
+
+    ];
+
+
+    interface DataType {
+        key: string;
+        title: string;
+        description: string;
+        disabled: boolean;
+        tag: string;
+    }
+
+    interface TableTransferProps extends TransferProps<TransferItem> {
+      
+        leftColumns: ColumnsType<DataType>;
+        rightColumns: ColumnsType<DataType>;
+        record: any
+    }
+
+
+    const transferTableColumn: any[] = [
+        {
+            title: '岗位名称',
+            dataIndex: 'name',
+            key: 'name',
+
+        },
+        {
+            title: '岗位代码',
+            width: 120,
+            dataIndex: 'code',
+            key: 'code',
+            ellipsis: true
+        },
+    ];
+
+
+    const selectpositionHandle = (record:any) => {
+
+        const ref = React.createRef<{ save: any; }>();
+
+        Modal.confirm({
+            title: `选择岗位`,
+            icon: <></>,
+            width: 750,
+            content: <TableTransfer
+                ref={ref}
+                record={record}
+                leftColumns={transferTableColumn}
+                rightColumns={transferTableColumn}
+
+            ></TableTransfer>,
+            onOk: () => {
+                return ref.current && ref.current.save();
+            }
+        })
+    }
+
+    const TableTransfer = React.forwardRef(({ leftColumns, rightColumns, record, ...restProps }: TableTransferProps, ref) => {
+
+
+        const [targetKeys, setTargetKeys] = useState<string[]>([]);
+        const [datasource, set_datasource] = useState<any[]>([]);
+        const [selectedKeys, setSelectedKeys] = useState<string[]>([]);
+
+        //获取岗位字典数据
+        const getFuncList = async () => {
+            const resp = await getPositionDicData();
+            if (resp) {
+
+                set_datasource(resp);
+        
+                const defaultSelctedkeys = record.position.map((item: any) => item.code);
+
+                setTargetKeys(defaultSelctedkeys);
+
+            }
+        }
+
+        const onChange = (nextTargetKeys: string[]) => {
+            setTargetKeys(nextTargetKeys);
+        };
+
+        const onSelectChange = (sourceSelectedKeys: string[], targetSelectedKeys: string[]) => {
+            //console.log('sourceSelectedKeys:', sourceSelectedKeys,'targetSelectedKeys:',targetSelectedKeys);
+            setSelectedKeys([...sourceSelectedKeys, ...targetSelectedKeys]);
+        };
+
+        useImperativeHandle(ref, () => ({
+            save: async () => {
+
+                const needData = datasource.filter(item => targetKeys.includes(item.code));
+
+                const resp = await savePositionLevel({
+                    positionLevelCode:record.positionLevelCode,
+                    positionLevelName:record.positionLevelName,
+                    positionLevelRate:record.positionLevelRate,
+                    position:needData
+                });
+                
+                if (resp) {
+                    message.success('添加成功!');
+                    tableRef.current?.reload();
+                }
+            }
+        }));
+
+        useEffect(() => {
+            getFuncList();
+        }, [])
+
+        return (
+            <Transfer className='TableTransfer' showSearch
+                titles={['待选项', '已选项']}
+                locale={{
+                    itemUnit: '项',
+                    itemsUnit: '项',
+                    searchPlaceholder: '请输入'
+                }}
+                onChange={onChange}
+                onSelectChange={onSelectChange}
+                dataSource={datasource}
+                rowKey={record => record.code}
+                targetKeys={targetKeys}
+                selectedKeys={selectedKeys}
+                filterOption={(inputValue, item) => {
+                    return item.headerText!.indexOf(inputValue) !== -1
+
+                }}
+            >
+                {({
+                    direction,
+                    filteredItems,
+                    onItemSelectAll,
+                    onItemSelect,
+                    selectedKeys: listSelectedKeys,
+                    disabled: listDisabled,
+                }) => {
+
+                    // console.log({ filteredItems, listSelectedKeys,direction });
+                    const columns = direction === 'left' ? leftColumns : rightColumns;
+
+                    const rowSelection: TableRowSelection<TransferItem> = {
+                        getCheckboxProps: (item) => ({ disabled: listDisabled || item.disabled }),
+                        onSelectAll(selected, selectedRows) {
+                            const treeSelectedKeys = selectedRows.map(({ code }) => code);
+                            const diffKeys = selected
+                                ? difference(treeSelectedKeys, listSelectedKeys)
+                                : difference(listSelectedKeys, treeSelectedKeys);
+                            onItemSelectAll(diffKeys as string[], selected);
+                        },
+                        onSelect({ code }, selected) {
+                            onItemSelect(code as string, selected);
+                        },
+                        selectedRowKeys: listSelectedKeys,
+                    };
+
+                    return (
+                        <Table
+                            rowSelection={rowSelection}
+                            columns={columns as TransferItem[]}
+                            dataSource={filteredItems}
+                            size="small"
+                            rowKey={'code'}
+                            style={{ pointerEvents: listDisabled ? 'none' : undefined }}
+                            onRow={({ code, disabled: itemDisabled }) => ({
+                                onClick: () => {
+                                    if (itemDisabled || listDisabled) return;
+                                    onItemSelect(code as string, !listSelectedKeys.includes(code as string));
+                                },
+                            })}
+                        />
+                    );
+                }}
+            </Transfer>
+        )
+    })
+
+
+    const getTableData = async () => {
+        const resp = await getData();
+        if (resp) {
+            return {
+                data: resp,
+                success: true,
+            }
+        }
+        return []
+    }
+
+  
+    return (
+        <BMSPagecontainer className='PositionLevelRateSet' title={false}>
+            <div className='tableTitle'>岗位等级系数设定</div>
+            <div style={{ marginTop: 16 }}>
+                <BMSTable columns={columns as ProColumns[]} actionRef={tableRef}  rowKey='positionLevelCode'  params={tableDataFilterParams} request={(params) => getTableData()} />
+            </div>
+        </BMSPagecontainer>
+    )
+}

+ 71 - 0
src/pages/setting/baseSetting/positionLevelRateSet/service.ts

@@ -0,0 +1,71 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-03 16:31:27
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-04-12 17:24:01
+ * @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 PositionLevelRateTableRowType = {
+  positionLevelCode:string,
+  positionLevelName:string,
+  positionLevelRate:string,
+  position:{
+    code:string,
+    name:string
+  }[]
+}
+
+
+export const getData = () => {
+  return request<PositionLevelRateTableRowType[]>('/performance/setting/getPositionLevel', {
+    method: 'GET',
+  });
+};
+
+
+//获取岗位字典数据
+
+export const getPositionDicData = () => {
+  return request('/performance/setting/getCenterPositionList', {
+    method: 'GET',
+  });
+};
+
+//保存
+
+export type SavePositionLevelDataType= {
+  positionLevelCode:string,
+  positionLevelName:string,
+  positionLevelRate:string,
+  position:{
+    code:string,
+    name:string
+  }[]
+}
+
+export const savePositionLevel = (data:SavePositionLevelDataType) => {
+  return request('/performance/setting/addPositionLevel', {
+    method: 'POST',
+    data
+  });
+};
+
+
+
+
+
+
+
+
+
+
+
+

+ 15 - 0
src/pages/setting/baseSetting/positionLevelRateSet/style.less

@@ -0,0 +1,15 @@
+.PositionLevelRateSet {
+  padding: 16px;
+  background: #FFFFFF;
+  border-radius: 4px;
+
+  .tableTitle {
+    height: 16px;
+    font-size: 16px;
+    font-family: SourceHanSansCN-Medium, SourceHanSansCN;
+    font-weight: 500;
+    color: #17181A;
+    line-height: 24px;
+  }
+
+}

+ 257 - 0
src/pages/setting/reportSet/diySqlMana/index.tsx

@@ -0,0 +1,257 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-03 11:30:33
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-04-11 19:51:04
+ * @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, ProFormText, ProFormTextArea } from '@ant-design/pro-components';
+import { ModalForm, ProFormDependency, ProFormDigit, ProFormSelect } 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 { getClolumnTableData, getReportColumn } from '../reportSetting/service';
+
+import { addData, delData, editData, getSqlListTableData, getSqlTypeList } from './service';
+
+import './style.less';
+
+
+const IconFont = createFromIconfontCN({
+    scriptUrl: '//at.alicdn.com/t/c/font_1927152_4nm5kxbv4m3.js',
+});
+
+
+
+export default function DiySqlMana() {
+
+    const [tableDataFilterParams, set_tableDataFilterParams] = useState<any | undefined>();
+    const [tableDataSearchKeywords, set_tableDataSearchKeywords] = useState<string>('');
+    const tableRef = useRef<ActionType>();
+
+    const columns: ProColumns[] = [
+
+        {
+            title: 'SQL代码',
+            dataIndex: 'sqlCode',
+        },
+        {
+            title: 'SQL语句',
+            dataIndex: 'sql',
+        },
+        {
+            title: 'SQL说明',
+            dataIndex: 'sqlDefinition',
+            // render:(_:any)=>_ == 1?'指标':'自定义SQL'
+        },
+        {
+            title: 'SQL类型',
+            dataIndex: 'sqlTypeName',
+        },
+        {
+            title: '序号',
+            dataIndex: 'sort',
+        },
+        {
+            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 getSqlListTableData(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({
+                sqlCode: formVal.sqlCode,
+                sql: formVal.sql,
+                sqlDefinition: formVal.sqlDefinition,
+                sqlType: formVal.sqlType.value,
+                sort: formVal.sort
+            });
+            if (resp) {
+                tableRef.current?.reload();
+                message.success('操作成功!');
+            }
+
+        }
+        if (type == 'EDIT') {
+
+            const resp = await editData({
+                id: formVal.id,
+                sql: formVal.sql,
+                sqlDefinition: formVal.sqlDefinition,
+                sqlType: formVal.sqlType,
+                sort: formVal.sort
+            });
+            if (resp) {
+                tableRef.current?.reload();
+                message.success('操作成功!');
+            }
+        }
+        return true;
+
+    }
+
+    const formRef = useRef();
+
+    const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD' }) => {
+
+        return (
+            <ModalForm
+                title={`${type == 'EDIT' ? '编辑' : '新增'}报表列`}
+                width={352}
+                formRef={formRef}
+                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
+            >
+                {
+                    type != 'EDIT' && (
+                        <ProFormText
+                            name="sqlCode"
+                            label="SQL代码:"
+                            placeholder="请输入"
+                            rules={[{ required: true, message: '列名称不能为空!' }]}
+                        />
+                    )
+                }
+
+                <ProFormTextArea placeholder="请输入" name={'sql'} label='SQL语句:' rules={[{ required: true, message: 'SQL不能为空!' }]} />
+                <ProFormTextArea placeholder="请输入" name={'sqlDefinition'} label='SQL说明:' rules={[{ required: true, message: '说明不能为空!' }]} />
+
+                <ProFormSelect
+                    name="sqlType"
+                    label="SQL类型:"
+                    placeholder="请选择"
+                    request={async () => {
+                        const resp = await getSqlTypeList();
+
+                        if (resp) {
+                            return resp.list.map((a: any) => ({ label: a.name, value: a.code }))
+                        }
+                    }}
+                    fieldProps={{
+                        labelInValue: true
+                    }}
+                    rules={[{ required: true, message: '类型不能为空!' }]}
+                />
+                <ProFormDigit
+                    name="sort"
+                    label="顺序号:"
+                    placeholder="请输入"
+                    rules={[{ required: true, message: '顺序号不能为空!' }]}
+                />
+
+            </ModalForm>
+        )
+    }
+
+    const tableDataSearchHandle = (paramName: string) => {
+
+        set_tableDataFilterParams({
+            ...tableDataFilterParams,
+            [`${paramName}`]: tableDataSearchKeywords
+        })
+
+    }
+
+
+    useEffect(() => {
+
+    }, [])
+
+    return (
+        <BMSPagecontainer className='DiySqlMana' title={false}>
+            <div className='toolBar'>
+                <div className='filter'>
+                    <div className='filterItem'>
+                        <span className='label' style={{ whiteSpace: 'nowrap' }}> 检索:</span>
+                        <Input placeholder={'请输入SQL类型'} allowClear
+                            suffix={
+                                <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('sqlType')} />
+                            }
+                            onChange={(e) => {
+                                set_tableDataSearchKeywords(e.target.value);
+                                if (e.target.value.length == 0) {
+                                    set_tableDataFilterParams({
+                                        ...tableDataFilterParams,
+                                        sqlType: ''
+                                    });
+                                }
+                            }}
+                            onPressEnter={(e) => {
+
+                                set_tableDataFilterParams({
+                                    ...tableDataFilterParams,
+                                    sqlType: (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>
+    )
+}

+ 105 - 0
src/pages/setting/reportSet/diySqlMana/service.ts

@@ -0,0 +1,105 @@
+/*
+ * @Author: code4eat awesomedema@gmail.com
+ * @Date: 2023-03-03 16:31:27
+ * @LastEditors: code4eat awesomedema@gmail.com
+ * @LastEditTime: 2023-04-11 19:12:04
+ * @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 SQLTableDataType = {
+  id:number,
+  hospId:number,
+  code:number,
+  sqlCode:string,
+  sql:string,
+  sqlDefinition:string,
+  sqlType:string,
+  sqlTypeName:string,
+  sort:number
+}
+
+
+export const getSqlListTableData = (params?:any) => {
+  return request<{
+       current:number;
+       list:SQLTableDataType[];
+       pageSize:number;
+       totalCount:number;
+       totalPage:number;
+  }>('/performance/report/getSql', {
+    method: 'GET',
+    params:{...params}
+  });
+};
+
+
+//新增报表
+export type AddSqlTableDataType = {
+  sqlCode:string,
+  sql:string,
+  sqlDefinition:string,
+  sqlType:string,
+  sort:number
+}
+
+export const addData = (data:AddSqlTableDataType) => {
+  return request('/performance/report/addSql', {
+    method: 'POST',
+    data
+  });
+};
+
+
+
+
+
+
+//编辑表格数据
+
+export type EditSqlTableDataType = {
+  id:number,
+  sql:string,
+  sqlDefinition:string,
+  sqlType:string,
+  sort:number
+}
+
+export const editData = (data:EditSqlTableDataType) => {
+  return request('/performance/report/editSql', {
+    method: 'POST',
+    data
+  });
+};
+
+//删除表格操作
+export const delData = (id:string) => {
+  return request('/performance/report/deleteSql', {
+    method: 'POST',
+    params:{id}
+  });
+};
+
+//获取sql类型
+export const getSqlTypeList = (params?:any) => {
+  return request('/performance/dict/getDictDataList?current=1&pageSize=1000&typeCode=10', {
+    method: 'GET',
+  });
+};
+
+
+
+
+
+
+
+
+
+
+

+ 43 - 0
src/pages/setting/reportSet/diySqlMana/style.less

@@ -0,0 +1,43 @@
+.DiySqlMana {
+  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;
+      }
+    }
+
+  }
+}

+ 148 - 160
src/pages/setting/reportSet/reportNavSet/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-04-11 09:16:54
+ * @LastEditTime: 2023-04-13 10:30:16
  * @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
  */
@@ -14,13 +14,14 @@ 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, ProFormDependency, ProFormDigit, ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-form'
+import { ActionType } from '@ant-design/pro-components';
+import { ModalForm, ProFormDependency, ProFormSelect } 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 { getClolumnTableData, getReportColumn } from '../reportSetting/service';
 
-import { addData, delData, editData, getManaIndic, getReportListTableData, getReportListType } from './service';
+import { addData, delData, editData, getReportListTableData } from './service';
 
 import './style.less';
 
@@ -40,33 +41,24 @@ export default function ReportNavSet() {
     const columns: ProColumns[] = [
 
         {
-            title: '名称',
-            dataIndex: 'name',
+            title: '源报表名称',
+            dataIndex: 'redirectReportName',
         },
         {
-            title: '列标题',
-            dataIndex: 'headerText',
+            title: '报表列名称',
+            dataIndex: 'reportColumnName',
         },
         {
-            title: '列类型',
-            dataIndex: 'columnTypeName',
+            title: '目标报表名称',
+            dataIndex: 'redirectReportName',
             // render:(_:any)=>_ == 1?'指标':'自定义SQL'
         },
         {
-            title: '取数类型',
-            dataIndex: 'dataSource',
-            render: (_: any) => _ == 1 ? '指标' : '自定义SQL'
-        },
-        {
-            title: '取数来源',
-            width: 300,
-            ellipsis: true,
-            dataIndex: 'sql',
-            render: (_: any, record: any) => {
-
-                if (record.sql) return record.sql;
-                if (record.indicatorCodeName) return record.indicatorCodeName
-            }
+            title: '跳转参数',
+            width:400,
+            ellipsis:true,
+            dataIndex: 'redirectParameter',
+            // render:(_:any)=>_ == 1?'指标':'自定义SQL'
         },
         {
             title: '操作',
@@ -114,91 +106,41 @@ export default function ReportNavSet() {
     }
 
     const updateTable = async (formVal: any, type: 'EDIT' | "ADD") => {
-
+    
         if (type == 'ADD') {
-            if (formVal.dataSource == 1) {
-                //
-                let result = {
-                    name: formVal.name,
-                    headerText: formVal.headerText,
-                    dataSource: formVal.dataSource,
-                    columnType: formVal.columnType,
-                    sql:'',
-                    indicatorCode: formVal.indicatorCode.key,
-                    indicatorCodeName: formVal.indicatorCode.label,
-                }
-
-                const resp = await addData({ ...result });
-                if (resp) {
-                    tableRef.current?.reload();
-                    message.success('操作成功!');
-                }
-
+            const resp = await addData({
+                redirectReportCode: formVal.targetReport.value,
+                redirectReportName: formVal.targetReport.label,
+                reportColumnCode: formVal.reportColumn.value,
+                reportColumnName: formVal.reportColumn.label,
+                reportCode: formVal.report.value,
+                reportName: formVal.report.label,
+                redirectParameter: (formVal.redirectParameter.map((a:any)=>a.value)).join('|'),
+                redirectParameterDisplay:JSON.stringify(formVal.redirectParameter)
+            });
+            if (resp) {
+                tableRef.current?.reload();
+                message.success('操作成功!');
             }
-            if(formVal.dataSource == 2){
-                //sql
-                let result = {
-                    name: formVal.name,
-                    headerText: formVal.headerText,
-                    dataSource: formVal.dataSource,
-                    columnType: formVal.columnType,
-                    sql: formVal.sql,
-                    indicatorCode:'',
-                    indicatorCodeName:''
-                }
-
-                const resp = await addData({ ...result });
-                if (resp) {
-                    tableRef.current?.reload();
-                    message.success('操作成功!');
-                }
-            }
-
-
 
         }
         if (type == 'EDIT') {
 
-            if (formVal.dataSource == 1){
-                //指标
-                const result = {
-                    id: formVal.id,
-                    name: formVal.name,
-                    headerText: formVal.headerText,
-                    dataSource: formVal.dataSource,
-                    columnType: formVal.columnType,
-                    sql:'',
-                    indicatorCode: formVal.indicatorCode.key,
-                    indicatorCodeName: formVal.indicatorCode.label,
-                }
-                const resp = await editData({ ...result });
-                if (resp) {
-                    tableRef.current?.reload();
-                    message.success('操作成功!');
-                }
-
+            const resp = await editData({
+                id: formVal.id,
+                redirectReportCode: formVal.targetReport.value,
+                redirectReportName: formVal.targetReport.label,
+                reportColumnCode: formVal.reportColumn.value,
+                reportColumnName: formVal.reportColumn.label,
+                reportCode: formVal.report.value,
+                reportName: formVal.report.label,
+                redirectParameter: (formVal.redirectParameter.map((a:any)=>a.value)).join('|'),
+                redirectParameterDisplay:JSON.stringify(formVal.redirectParameter)
+            });
+            if (resp) {
+                tableRef.current?.reload();
+                message.success('操作成功!');
             }
-
-            if(formVal.dataSource == 2){
-                //sql
-                const result = {
-                    id: formVal.id,
-                    name: formVal.name,
-                    headerText: formVal.headerText,
-                    dataSource: formVal.dataSource,
-                    columnType: formVal.columnType,
-                    sql: formVal.sql,
-                    indicatorCode:'',
-                    indicatorCodeName:''
-                }
-                const resp = await editData({ ...result });
-                if (resp) {
-                    tableRef.current?.reload();
-                    message.success('操作成功!');
-                }
-            }
-
-            
         }
         return true;
 
@@ -208,84 +150,130 @@ export default function ReportNavSet() {
 
     const UpDataActBtn = ({ record, type }: { record: any, type: 'EDIT' | 'ADD' }) => {
 
+        const redirectParameter = JSON.parse(record.redirectParameterDisplay?record.redirectParameterDisplay:'[]');
+
         return (
             <ModalForm
-                title={`${type == 'EDIT' ? '编辑' : '新增'}报表`}
-                width={352}
+                title={`${type == 'EDIT' ? '编辑' : '新增'}报表跳转`}
+                width={400}
                 formRef={formRef}
-                initialValues={type == 'EDIT' ? { ...record, indicatorCode: { label: record.indicatorCodeName, value: record.indicatorCode } } : {}}
+                initialValues={type == 'EDIT' ? {
+                    ...record,
+                    report: { label: record.reportName, value: record.reportCode },
+                    reportColumn: { label: record.reportColumnName, value: record.reportColumnCode },
+                    targetReport: { label: record.redirectReportName, value: record.redirectReportCode },
+                    redirectParameter:redirectParameter
+                } : {}}
                 trigger={
                     type == 'EDIT' ? <a key="edit" >编辑</a> : <span className='add'>新增</span>
                 }
                 onFinish={(val) => {
-                    console.log({ val });
-                    return updateTable(type == 'EDIT' ? { ...record, ...val, sql: val.sql ? val.sql : '', } : { ...val }, type);
+                    return updateTable(type == 'EDIT' ? { ...record, ...val } : { ...val }, type);
                 }}
                 colProps={{ span: 24 }}
                 grid
             >
 
-                <ProFormText
-                    name="name"
-                    label="列名称:"
-                    placeholder="请输入"
-                    rules={[{ required: true, message: '列名称不能为空!' }]}
-                />
-                <ProFormText
-                    name="headerText"
-                    label="列标题:"
-                    placeholder="请输入"
-                    rules={[{ required: true, message: '列标题不能为空!' }]}
-                />
                 <ProFormSelect
-                    name="columnType"
-                    label="列类型:"
+                    name="report"
+                    label="源报表标题:"
                     placeholder="请选择"
                     request={async () => {
-                        const resp = await getReportListType();
+                        const resp = await getReportColumn();
+
                         if (resp) {
-                            return resp.list.map((a: any) => ({ label: a.name, value: a.code }))
+                            return resp.map((a: any) => ({ label: a.reportName, value: a.code }))
                         }
                     }}
-                    rules={[{ required: true, message: '列类型不能为空!' }]}
+                    fieldProps={{
+                        labelInValue: true
+                    }}
+                    rules={[{ required: true, message: '源报表名称不能为空!' }]}
                 />
 
-                <ProFormSelect
-                    name="dataSource"
-                    label="取数类型:"
-                    placeholder="请选择"
-                    options={[
-                        { label: '指标', value: 1 },
-                        { label: '自定义SQL', value: 2 }
-                    ]}
-                    rules={[{ required: true, message: '取数类型不能为空!' }]}
-                />
-                <ProFormDependency name={['dataSource']}>
+                <ProFormDependency name={['report']}>
                     {
-                        ({ dataSource }) => dataSource == 1 && (
-                            <ProFormSelect
-                                name="indicatorCode"
-                                label="取数来源:"
-                                placeholder="请选择"
-                                fieldProps={{
-                                    labelInValue: true
-                                }}
-                                request={async () => {
-                                    const resp = await getManaIndic();
-                                    if (resp) {
-                                        return resp.map((a: any) => ({ label: a.name, value: a.code }))
-                                    }
-                                }}
-                                rules={[{ required: true, message: '数据来源不能为空!' }]}
-                            />
-                        )
+                        ({ report }) => {
+                            // console.log({report});
+                            return (
+                                <ProFormSelect
+                                    name="reportColumn"
+                                    label="报表列标题:"
+                                    disabled={!report}
+                                    placeholder="请选择"
+                                    params={report}
+                                    request={async () => {
+                                        if (report) {
+                                            const { value: reportCode } = report;
+                                            const resp = await getClolumnTableData({ reportCode });
+                                            if (resp) {
+                                                return resp.map((a: any) => ({ label: a.columnHeaderText, value: a.columnCode }))
+                                            }
+                                        } else {
+                                            return []
+                                        }
+
+                                    }}
+                                    fieldProps={{
+                                        labelInValue: true
+                                    }}
+                                    rules={[{ required: true, message: '报表列名称不能为空!' }]}
+                                />
+
+                            )
+                        }
                     }
                 </ProFormDependency>
-                <ProFormDependency name={['dataSource']}>
+                <ProFormSelect
+                    name="targetReport"
+                    label="目标报表名称:"
+                    placeholder="请选择"
+                    request={async () => {
+                        const resp = await getReportColumn();
+
+                        if (resp) {
+                            return resp.map((a: any) => ({ label: a.reportName, value: a.code }))
+                        }
+                    }}
+                    fieldProps={{
+                        labelInValue: true
+                    }}
+                    rules={[{ required: true, message: '目标报表名称不能为空!' }]}
+                />
+
+                <ProFormDependency name={['report']}>
                     {
-                        ({ dataSource }) => dataSource == 2 && (
-                            <ProFormTextArea name={'sql'} label='SQL:' rules={[{ required: true, message: 'SQL不能为空!' }]} />
-                        )
+                        ({ report }) => {
+                            // console.log({report});
+                            return (
+                                <ProFormSelect
+                                    name="redirectParameter"
+                                    label="跳转参数:"
+                                    disabled={!report}
+                                    placeholder="请选择"
+                                    params={report}
+                                    request={async () => {
+                                        if (report) {
+                                            const { value: reportCode } = report;
+                                            const resp = await getClolumnTableData({ reportCode });
+                                            if (resp) {
+                                                return resp.map((a: any) => ({ label: a.columnHeaderText, value: a.columnName }))
+                                            }
+                                        } else {
+                                            return []
+                                        }
+
+                                    }}
+                                    fieldProps={{
+                                        labelInValue: true,
+                                        mode:'multiple',
+                                        maxTagCount:'responsive'
+                                    }}
+                                    rules={[{ required: true, message: '跳转参数不能为空!' }]}
+                                />
+
+                            )
+                        }
                     }
                 </ProFormDependency>
 
@@ -313,16 +301,16 @@ export default function ReportNavSet() {
                 <div className='filter'>
                     <div className='filterItem'>
                         <span className='label' style={{ whiteSpace: 'nowrap' }}> 检索:</span>
-                        <Input placeholder={'请输入列标题'} allowClear
+                        <Input placeholder={'请输入源报表名称'} allowClear
                             suffix={
-                                <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('columnName')} />
+                                <IconFont type="iconsousuo" onClick={() => tableDataSearchHandle('reportName')} />
                             }
                             onChange={(e) => {
                                 set_tableDataSearchKeywords(e.target.value);
                                 if (e.target.value.length == 0) {
                                     set_tableDataFilterParams({
                                         ...tableDataFilterParams,
-                                        columnName: ''
+                                        reportName: ''
                                     });
                                 }
                             }}
@@ -330,7 +318,7 @@ export default function ReportNavSet() {
 
                                 set_tableDataFilterParams({
                                     ...tableDataFilterParams,
-                                    columnName: (e.target as HTMLInputElement).value
+                                    reportName: (e.target as HTMLInputElement).value
                                 });
                             }}
 

+ 24 - 44
src/pages/setting/reportSet/reportNavSet/service.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 16:31:27
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-04-07 12:03:02
+ * @LastEditTime: 2023-04-13 10:26:58
  * @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
  */
@@ -13,29 +13,29 @@ import { request } from 'umi';
 
 //获取table列表数据
 
-export type ReportListTableDataType = {
+export type ReportNavListTableDataType = {
   id:number,
   hospId:number,
   code:number,
-  name:string,
-  headerText:string,
-  dataSource:number,
-  columnType:string,
-  columnTypeName:string,
-  sql:string,
-  indicatorCode:string,
-  indicatorCodeName:string
+  redirectReportCode:number,
+  redirectReportName:string,
+  reportColumnCode:number,
+  reportColumnName:string,
+  reportCode:number,
+  reportName:string,
+  redirectParameter:string,
+  redirectParameterDisplay:string
 }
 
 
 export const getReportListTableData = (params?:any) => {
   return request<{
        current:number;
-       list:ReportListTableDataType[];
+       list:ReportNavListTableDataType[];
        pageSize:number;
        totalCount:number;
        totalPage:number;
-  }>('/performance/report/getColumnList', {
+  }>('/performance/report/getRedirect', {
     method: 'GET',
     params:{...params}
   });
@@ -44,17 +44,18 @@ export const getReportListTableData = (params?:any) => {
 
 //新增报表
 export type AddTableDataType = {
-  name:string,
-  headerText:string,
-  dataSource:number,
-  columnType:string,
-  sql?:string,
-  indicatorCode?:string,
-  indicatorCodeName?:string
+  redirectReportCode:number,
+  redirectReportName:string,
+  reportColumnCode:number,
+  reportColumnName:string,
+  reportCode:number,
+  reportName:string,
+  redirectParameter:string,
+  redirectParameterDisplay:string
 }
 
-export const addData = (data:any) => {
-  return request('/performance/report/addColumn', {
+export const addData = (data:AddTableDataType) => {
+  return request('/performance/report/addRedirect', {
     method: 'POST',
     data
   });
@@ -62,21 +63,7 @@ export const addData = (data:any) => {
 
 
 
-//获取报表列类型
 
-export const getReportListType = () => {
-  return request('/performance/dict/getDictDataList?current=1&pageSize=10&typeCode=9', {
-    method: 'GET',
-  });
-};
-
-//获取管理指标
-
-export const getManaIndic = () => {
-  return request('/performance/report/getIndicatorList', {
-    method: 'GET',
-  });
-};
 
 
 //编辑表格数据
@@ -86,7 +73,7 @@ export type ManaIndicItemTableRowEditType = {
 }&AddTableDataType
 
 export const editData = (data:any) => {
-  return request('/performance/report/editColumn', {
+  return request('/performance/report/editRedirect', {
     method: 'POST',
     data
   });
@@ -94,20 +81,13 @@ export const editData = (data:any) => {
 
 //删除表格操作
 export const delData = (id:string) => {
-  return request('/performance/report/deleteColumn', {
+  return request('/performance/report/deleteRedirect', {
     method: 'POST',
     params:{id}
   });
 };
 
 
-//添加报表列
-export const addReportTableList = (data:any) => {
-  return request('/performance/report/addReportColumn', {
-    method: 'POST',
-    data
-  });
-};
 
 
 

+ 20 - 18
src/pages/setting/reportSet/reportSetting/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-04-11 15:47:25
+ * @LastEditTime: 2023-04-11 19:18:27
  * @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
  */
@@ -506,23 +506,25 @@ const ReportSetting = () => {
                 width: 60,
                 className: 'drag-visible',
                 render: () => <DragHandle />
-            }, ...column, {
-                title: '操作',
-                key: 'option',
-                width: 120,
-                valueType: 'option',
-                render: (_: any, record: any) => {
-                    return [
-                        <Popconfirm
-                            title="是否确认移除?"
-                            key="del"
-                            onConfirm={() => { delData(record.id); getTableData({ reportCode: currentSelectedType.code }); }}
-                        >
-                            <a>移除</a>
-                        </Popconfirm>
-                    ]
-                },
-            }])
+            }, ...column, 
+            // {
+            //     title: '操作',
+            //     key: 'option',
+            //     width: 120,
+            //     valueType: 'option',
+            //     render: (_: any, record: any) => {
+            //         return [
+            //             <Popconfirm
+            //                 title="是否确认移除?"
+            //                 key="del"
+            //                 onConfirm={() => { delData(record.id); getTableData({ reportCode: currentSelectedType.code }); }}
+            //             >
+            //                 <a>移除</a>
+            //             </Popconfirm>
+            //         ]
+            //     },
+            // }
+        ])
         } else {
             set_tableColumn(column);
         }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 380 - 380
yarn.lock


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است