zoukankan      html  css  js  c++  java
  • 元数据设计

    var mdList = [
        {
            name: 'employee_info',
            collection:'employee_info',
            text: '员工信息',
            group: 'employee',
            items: [
                {
                    name: 'empName',
                    text: '员工姓名',
                    db: 'string',//bool,number,date,string
                    format: '${value}',
                    input: 'text',
                    validator: ["required", "length:1-10"]
                },
                {
                    name: 'empBirthday',
                    text: '出生日期',
                    db: 'date',
                    format: 'CommonDateFormat(${value},"yyyy-mm-dd")',
                    input: 'datePicker',
                    validator: ["DateValidator:yyyy-mm-dd"]
                },
                {
                    name: 'empAge',
                    text: '年龄',
                    db: null,//不存储,
                    format: 'CommonAgeFormat(${entity},"empBirthday")',
                    input: 'readonly',
                    validator: []
                },
                {
                    name: 'empBelongOrg',
                    text: '所属组织',
                    db: 'string',
                    format: 'OrgFormat(${value})',
                    input: 'selector:OrgSelector(${value},${entity})',
                    validator: []
                },
                {
                    name: 'empBelongOrg',
                    text: '所属组织',
                    db: 'string',
                    format: 'OrgFormat(${value})',
                    input: 'selector:OrgSelector(${value},${entity}):target.id',
                    validator: []
                },
                {
                    name: 'empSalaryBase',
                    text: '基本工资',
                    db: 'number',
                    format: '${value} 元',
                    input: 'text',
                    validator: ['number']
                },
                {
                    name: 'empNation',
                    text: '民族',
                    db: 'string',
                    format: '${value}',
                    input: 'select:SelectEnum("Nation"):target',
                    validator: ['number']
                },
                {
                    name: 'empPosition',
                    text: '担任岗位',
                    db: 'string',
                    format: '${value}',
                    input: 'select:SelectDataSource("Position"):target.id',
                    validator: ['number']
                }
            ]
        },
    
    
        {
            name: 'employee_family',
            collection:'employee_family',
            text: '家庭成员',
            group: 'employee',
            items: [
                {
                    name: 'familyName',
                    text: '姓名',
                    db: 'string',//bool,number,date,string
                    format: '${value}',
                    input: 'text',
                    validator: ["required", "length:1-10"]
                },
                {
                    name: 'familyBirthday',
                    text: '出生日期',
                    db: 'date',
                    format: 'CommonDateFormat(${value},"yyyy-mm-dd")',
                    input: 'datePicker',
                    validator: ["DateValidator:yyyy-mm-dd"]
                }
            ]
        }
    
    
    
    
    ];
    

      

  • 相关阅读:
    win10系统磁盘占用率高的解决方法,占用100%的问题
    码率/比特率定义
    风好大,我好冷
    风好大,我好冷——团队作品
    风好大,我好冷——团队介绍
    风好大,我好冷——个人分工理解
    风好大,我好冷——团队风采
    命令行作业
    面向对象程序设计作业三
    作业二
  • 原文地址:https://www.cnblogs.com/lhp2012/p/6133233.html
Copyright © 2011-2022 走看看