Skip to content

1.前端项目

1.组件选择,修改远程api 的filter参数

2.修改required

3.update ComponetProps

2.忘记服务器root密码

1.通过宝塔修改服务器密码系统文件 -》插件(linux工具箱) -〉系统密码-》用户名

3.表格导入精度失准

sheetjs 或者excel导入

image-20250725140840334

json
{t: 'n', v: 297.525, f: '(SUM(G2:L2)+SUM(M2:R2)+SUM(S2:X2))*7.5%', w: '297.52 '}

297.525 4264.525

5189.025

512.925

Tofixed(2)

结果输出是: 297.52

日期

{t: 'n', v: 45444, w: '2024/6/1'}
{t: 'n', v: 45597, f: 'VLOOKUP(A2,[2]个税!H:AS,38,0)', w: '2024-11-01'}

src/utils/xlsx.ts

js
// 精度失准修复
if (cell && cell.f) {
  const val = parseFloat(cell.v)
  const formatted = parseFloat(cell.w)
  // eslint-disable-next-line max-depth
  if (isNumber(val) && isNumber(formatted)) {
    const diff = Math.abs(round(val, 2) - formatted)
    // eslint-disable-next-line max-depth
    if (diff > 0.009) { // 用 0.009 作为判断边界更稳妥
      hdr = round(val, 2).toString()
    }
  }
}

Lucking