一、增加一个菜单，用于配置生成通用表格或者表单
表格：
1、搜索栏（手动输入）
详细：表名:searchConf

api：查询
http://192.168.1.236:3000/document
req：{"table":"searchConf","attrs":{"modelType":"test"}}
ack：

[{
    "modelType":"test",
    "key":"title",
    "placeholder":"标题",
    "formType":"text",
    "defaultValues":[{name:value},{name:value}]
    "ord":1
}]

[
    {"modelType":"test","key":"title","placeholder":"标题text","formType":"text","defaultValues":"","ord":1},
    {"modelType":"test","key":"title1","placeholder":"标题time","formType":"time","defaultValues":"","ord":2},
    {"modelType":"test","key":"title2","placeholder":"标题radio","formType":"radio","defaultValues":[{"key":"男","value":"男"},{"key":"女","value":"女"}],"ord":3},
    {"modelType":"test","key":"title3","placeholder":"标题checkbox","formType":"checkbox","defaultValues":[{"key":"男","value":"男"},{"key":"女","value":"女"}],"ord":4},
    {"modelType":"test","key":"title4","placeholder":"标题text","formType":"text","defaultValues":"","ord":5},
    {"modelType":"test","key":"title5","placeholder":"标题select","formType":"select","defaultValues":[{"key":"1","value":"启用"},{"key":"0","value":"停用"}],"ord":6},
]

modelType:模块类别
key：字段属性名称
placeholder：提示
formType input类型：1、text,2、file,3、radio,4、checkbox，5、select等
defaultValues:默认显示数据（下拉框，其他）
ord：排序码



2、操作栏（手动输入）
详细：表名：buttonConf

api：查询
http://192.168.1.236:3000/document
req：{"table":"buttonConf","attrs":{"modelType":"test"}}
ack：

[{
    "modelType":"test",
    name : '添加',
    icon : '',
    colorType : '',
    ord：1,`
    clickType:'1'
}]

[
    {"modelType":"test","name":"添加","icon":"","colorType":"primary","ord":1,"clickType":1},
    {"modelType":"test","name":"修改","icon":"","colorType":"success","ord":2,"clickType":2},
    {"modelType":"test","name":"删除","icon":"","colorType":"info","ord":3,"clickType":1},
    {"modelType":"test","name":"批量删除","icon":"","colorType":"warning","ord":4,"clickType":1},
    {"modelType":"test","name":"导出","icon":"","colorType":"danger","ord":5,"clickType":1},
    {"modelType":"test","name":"导入","icon":"","colorType":"primary","ord":6,"clickType":3},
    {"modelType":"test","name":"添加","icon":"","colorType":"primary","ord":6,"clickType":"add",
    "url":"http://192.168.1.236:3000/getdocument","params":"{"table":"buttonConf","attrs":PARAMS}",
    "result":{"success":{"ok":"status","msg":"successMsg"},"error":{"error":"status","msg":"errorMsg"}}}
]

modelType:模块类别
name:操作显示名称
icon：图标
colorType：按钮类型（primary，success， info，warning，danger）
ord：操作排序码
clickType:点击事件类型：
基础值
1、add 本表数据添加
2、update 本表数据修改
3、delete 本表数据删除

扩展值
1、直接操作事件（删除，导出），
2、弹出层（添加，修改），
3、打开新窗口（图形报表，外部链接）

url:“保存”或者“确定”按钮的接口地址
params:url参数（字符串值替换其他需要传入的参数）
result:url返回格式（success or fail）

3、table列（手动输入）

详细：表名：columnConf
api：查询
http://192.168.1.236:3000/document
req：{"table":"columnConf","attrs":{"modelType":"test"}}
ack：
http://192.168.1.236:3000/document
req：{"table":"columnConf","attrs":{"modelType":"test"}}
ack：
 cols: [
          {"modelType":"test",prop: 'name', label: '名字'},
        {"modelType":"test",prop: 'address', label: '地址'}
 ]

modelType:模块类别
prop:字段属性名称
label：显示名称

http://192.168.1.236:3000/getdocument
req：{"table":"test","attrs":{},"sorts":{a:1}}  //1 升序  -1 降序
ack：
list：[{
    'name':'王小虎',
     address: '上海市普陀区金沙江路 1516 弄',
    "age":20
},
{
    'name':'王小妞',
     address: '河南郑州金水区',

}]


cols：label：列的标题
label：列的标题；

表单：
1、列表
2、呈现效果（文本框，下拉框，文件上传等）
3、验证格式
4、添加，修改显示




左侧菜单：
详细：表名：menuConf

[{
    "path":"/system",
    "menuType":"1",
    "modelType":"test",
    "key"
}]

path:路由地址
menuType：1、通用模板，2、原生接口，3...up


5 删除一条记录
post  /deldocument
参数: {table:t,attrs:{"":""}}

5.1 删除多条记录
post  /delmultidocument
参数: {table:t,attrs:{"":""}}

5 修改多条记录
post  /modifymultidocument
参数: {table:t,attrs:a}



7、baseOptionConf（添加，修改项配置）

[
    {
        "modelType":"test",
        "prop": "name",
        "label": "名字",
        "insert":true,
        "update":true,
        "ord":1,
        "formType":"text"
        //"verification":""
    }
]

modelType:模块类别（表名）
prop:字段属性名称
label：显示名称
insert:true添加显示，false不显示
update:true修改显示，false不显示
ord：排序码
formType input类型：1、text,2、file,3、radio,4、checkbox，5、select等
defaultValues:默认显示数据（下拉框，其他）
verification：验证格式（非空，长度，正则，等验证）


table分页
8 post getdocument
参数 {table:"t",attrs:{a:1},curpage:1,page_num:10}



9、menuConf（左侧菜单配置）
[
    {
        "path":"/system",
        "menuType":"mongo",
        "tableName":"test"
    }
]

path（同路由path）
menuType（左侧菜单模板类型：0、native模板（不做任何处理，手动实现），1、mongo模板，2、mysql模板，3、....）
tableName（mongo模板、mysql模板对应的表名）


[
    {
        "path":"/systemManager",
        "component":"Layout",
        "redirect":"/permission/index",
        "alwaysShow":true,
        "label":"label",
        "meta":{
            "title":"SystemConfig",
            "icon":"lock"
        },
        "children":[
            {
                "path":"/systemManager/accountManage",
                "name":"AccountManage",
                "component":"/views/accountManage",
                "label":"label",
                "meta":{
                    "title":"accountManage",
                    "icon":"form"
                },
                "menuType":"native"
            },
            {
                "path":"/systemManager/tableCommomConfig",
                "name":"tableCommomConfig",
                "component":"/views/tableCommomConfig",
                "label":"label",
                "meta":{
                    "title":"tableCommomConfig",
                    "icon":"form"
                },
                "menuType":"mongo",
                "tableName":"test"
            }
        ]
    }
]

1 上传版本文件到服务器
post /upload_ver.yaws
文件form表单

2 获取版本文件列表
post api/nhome/get_version_file_list
conditions:[]
3  獲取所有設備列表  http://priv.x9water.com:18080/  10秒钟掉一次
get api/nhome/get_online_devices_verinfo
无参数
返回： {dev_id:d,newest_filename:"文件名",device_type:dt,"seqno":SeqNoBin,"status":Status,"sendedlen":RecLen}  
Status:  downloading: 正在下载，停止下载按钮显示出来。 下载按钮隐藏
         waiting: 等待设备下载，停止下载按钮显示出来。 下载按钮隐藏
         进度： RecLen/FileSize * 100

4 版本下载接口
post api/nhome/version/download
req:      {dev_id:d,ver_filename:"文件名"}

5 停止版本下载接口
post api/nhome/version/download/stop
req:      {dev_id:d}




常用通用方法
1.获取_id
pcm_call('gen_id',{key:'outcome_id',prefix:'k',num:5,time_format:"YYMMDD"})