Selaa lähdekoodia

添加表格对应的格式化函数

huangbin 4 vuotta sitten
vanhempi
commit
7af4bdd8c3
1 muutettua tiedostoa jossa 18 lisäystä ja 0 poistoa
  1. 18 0
      src/common/setup/table/clolumn.ts

+ 18 - 0
src/common/setup/table/clolumn.ts

@@ -1,3 +1,4 @@
+import * as FormatterFn from '@/common/constants/enumsName';
 import { ColumnType, getTableHead } from '@/common/methods/table';
 import { TableKey } from '@/common/methods/table/interface';
 import { ref } from "vue";
@@ -101,6 +102,23 @@ function getFromatterFn(val: string) {
                 return (value && arr[1]) ? value.toFixed(obj.record[arr[1]]) : value
             }
             break
+        case 'getContractTypeName':  // 合同类型名称
+            result = FormatterFn.getContractTypeName
+            break
+        case 'getBizTypeName':  // 业务类型
+            result = FormatterFn.getBizTypeName
+            break
+        case 'getBuyOrSellName':  // 持仓方向
+            result = FormatterFn.getBuyOrSellName
+            break
+        case 'getChangeLogType':  // 变更流水类型
+            result = FormatterFn.getChangeLogType
+            break
+        default:
+            if (first) {
+                console.error(`请开发人员配置${first}格式化函数!`)
+            }
+            break
     }
     return result
 }