return {
  onClick: () => {
    /*
      name 字段名称；code obj.字段编码(取值)；
      required 是否必填；
      type:数据处理 0 不处理、1 时间类型、2 json类型
    */
    let isAdd = true; //true 新增；false 编辑;
    let tips1 = '添加成功';
    let tips2 = '添加失败';
    let t1 = obj.KUFmMsSaUIE$KUFmTUYkyAg;
    if (!isAdd) {
      //d.push({name:'row_id',code:obj.KTOyGAfiEWJ,required:0}); // row_id字段编码
      tips1 = '编辑成功';
    } else {
      tips2 = '编辑成功';
    }
    // 第一步
    let d = [{ name: 'zppc', code: obj.KUFivNcDDCo, required: 1, type: 0 },
      { name: 'jbkssj', code: t1[0], required: 0, type: 1 },
      { name: 'jbjssj', code: t1[1], required: 0, type: 1 },
      { name: 'zpsm', code: obj.LdEBsnQIQGJ, required: 1, type: 0 },
      { name: 'jbdw', code: obj.KUFmZSdymPU, required: 1, type: 0 },
      { name: 'host_address', code: obj.LdTHUFeGtPl, required: 1, type: 0 },
      { name: 'enclosure', code: obj.LdglNTQkWTE, required: 1, type: 2 },
      { name: 'is_open', code: '0', required: 1, type: 0 }];

    let json = {}, state = true;
    for (var j = 0, len = d.length; j < len; j++) {
      if (d[j].type === 0) {
        json[d[j].name] = d[j].code ? d[j].code : '';
      } else if (d[j].type === 1) {
        json[d[j].name] = d[j].code ? utils.moment(d[j].code).format('YYYY-MM-DD HH:mm:ss') : null;
      } else if (d[j].type === 2) {
        json[d[j].name] = d[j].code ? JSON.stringify(d[j].code) : null;
      } else {
        json[d[j].name] = d[j].code ? d[j].code : null;
      }
    }
    utils.form.validateFields().then((values) => {
      // console.log(json)
      utils.req('/SnowflakeUtilApi/decode', 'POST', { code: 'KUFlhnvfnfE' }, (res) => { //转码  第二步
        utils.req('/DataObjApi/addFormData', 'POST', {
          objId: res,
          isAdd: isAdd,
          data: JSON.stringify(json),
        }, (datas) => { // 操作
          if (datas) {
            utils.message.success(tips1);
            //刷新列表  第三步
            // let sq =  obj.id_2e9a743624357245e12a0882ea6999de5cdb
            let xs = obj.id_649873f1230722403e2aa4022a6faa4ceec7; // 初始化渲染的单元格id
            xs.time = new Date().valueOf();
            utils.setValues({ id_649873f1230722403e2aa4022a6faa4ceec7: xs });
            //关闭弹框  第四步
            utils.closeModal('a05771be-44c9-4fd6-b579-f8d7b2133206');
          } else {
            utils.message.error(tips2);
          }
        });
      });
    }).catch(errorInfo => {
      console.log('errorInfo------------->', errorInfo);
      utils.message.error('请填写必填项！');
    });
  },
};
