node-red文件读取格式化分割

[
    {
        "id": "436cfd1ccb9828af",
        "type": "inject",
        "z": "625524366db6c977",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 70,
        "y": 40,
        "wires": [
            [
                "097553cf4a7aef0a"
            ]
        ]
    },
    {
        "id": "097553cf4a7aef0a",
        "type": "file in",
        "z": "625524366db6c977",
        "name": "文件",
        "filename": "D:\\桌面\\接口标准\\人员定位数据txt\\20131225092951RYSS",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "GBK",
        "allProps": false,
        "x": 210,
        "y": 40,
        "wires": [
            [
                "05e15891dcd54ec1"
            ]
        ]
    },
    {
        "id": "3e9565c312fac142",
        "type": "debug",
        "z": "625524366db6c977",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 710,
        "y": 40,
        "wires": []
    },
    {
        "id": "05e15891dcd54ec1",
        "type": "csv",
        "z": "625524366db6c977",
        "name": "",
        "sep": ";",
        "hdrin": "",
        "hdrout": "none",
        "multi": "mult",
        "ret": "\\r\\n",
        "temp": "",
        "skip": "0",
        "strings": true,
        "include_empty_strings": "",
        "include_null_values": "",
        "x": 330,
        "y": 40,
        "wires": [
            [
                "c3166901158d64ed"
            ]
        ]
    },
    {
        "id": "c3166901158d64ed",
        "type": "function",
        "z": "625524366db6c977",
        "name": "",
        "func": "let shuzu=msg.payload;\n msg.payload=[];\nfor(let i=0;i<shuzu.length;i++){\n    \n  let te={\n    \"煤矿编码\":shuzu[i].col1,\n    \"集团名称\":shuzu[i].col2,\n    \"公司名称\":shuzu[i].col3,\n    \"煤矿简称\":shuzu[i].col4,\n    \"当前井下总人数\":shuzu[i].col5,\n    \"文件生成时刻\":shuzu[i].col6,\n    \"出入井标志位\":shuzu[i].col7,\n    \"人员卡编码\":shuzu[i].col8,\n    \"姓名\":shuzu[i].col9,\n    \"身份证号码\":shuzu[i].col10,\n    \"工种或职务\":shuzu[i].col

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值