摘要: /** * * @returns 获取当前月份的前12个月份 */ export const xDataYear = () => { let dataArr = []; let data = new Date(); data.setMonth(data.getMonth() + 1, 1); //获 阅读全文
posted @ 2022-04-06 15:17 葫芦娃啊 阅读(249) 评论(0) 推荐(0) 编辑
摘要: /** * 遍历单位基本信息树 * @param data * @param parentId * @returns */ const getTrees = (data: OrganizationResult[], parentId: number | null) => { let itemArr 阅读全文
posted @ 2022-04-06 15:11 葫芦娃啊 阅读(157) 评论(0) 推荐(0) 编辑
摘要: /** * 处理数字的保留位数 * @param num 要处理的数字 * @param fixNum 保留的小数位数 */ export const sliceNumberEnd = (num: string | number, fixNum?: number) => (+num).toFixed 阅读全文
posted @ 2022-04-06 15:01 葫芦娃啊 阅读(2) 评论(0) 推荐(0) 编辑
摘要: export const getUrlkey = (variable: string) => { var query = window.location.search.substring(1); var vars = query.split('&'); for (var i = 0; i < var 阅读全文
posted @ 2022-04-06 14:59 葫芦娃啊 阅读(58) 评论(0) 推荐(0) 编辑
摘要: export const combineClassName = (...classNames: (string | undefined)[]) => compact(classNames).join(' '); 合并class名字: <div className={combineClassName( 阅读全文
posted @ 2022-04-06 14:57 葫芦娃啊 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 1 const str='t/Mwh'; 2 str.replace(/Mwh/, "GJ") 阅读全文
posted @ 2022-02-22 14:13 葫芦娃啊 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 1 const columnsdata = [ 2 { 3 roles: [1, 2], 4 rolesColumnsdata: [...baseBranchsColumns], 5 searchForm: [], 6 }, 7 { 8 roles: [3], 9 rolesColumnsdata: 阅读全文
posted @ 2022-02-10 16:48 葫芦娃啊 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 占坑 阅读全文
posted @ 2022-02-08 19:24 葫芦娃啊 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 报错:sh -c node install.js 解决方案1 加参数 npm install --ignore-scripts--ignore-scripts表示npm将不会运行在package.json中指定的scripts脚本 2 更换数据源 npm install chromedriver - 阅读全文
posted @ 2022-02-08 19:22 葫芦娃啊 阅读(753) 评论(0) 推荐(0) 编辑
摘要: 数据部分: export const borderData: BorderProps[] = [ { label: '重点排放单位名称', name: 'name', type: 'input', col: 12, max: 100, selectName: '', value: '', patte 阅读全文
posted @ 2021-12-28 11:09 葫芦娃啊 阅读(322) 评论(0) 推荐(0) 编辑