| | |
| | | // 处理表头单元格样式 |
| | | export function headerCellStyle() { |
| | | const option = { |
| | | // background: '#eee', padding: '0' |
| | | background: '#f8f8fa', padding: '0', color: '#a7a7a7' |
| | | // background: '#a7a7a7', padding: '0' |
| | | background: '#f8f8fa', padding: '0', color: '#000', fontWeight: 500 |
| | | } |
| | | return option |
| | | } |
| | |
| | | return option |
| | | } |
| | | |
| | | // 时间处理函数 |
| | | // 时间处理函数 年月日 |
| | | export function handleDatetime(value) { |
| | | const data = new Date(value) |
| | | const month = data.getMonth() < 9 ? '0' + (data.getMonth() + 1) : data.getMonth() + 1 |
| | |
| | | return data.getFullYear() + '-' + month + '-' + date |
| | | } |
| | | |
| | | // 事件处理函数 时分秒 |
| | | // 获取当前时间 |
| | | export function handleDatetime2(value) { |
| | | const dt = new Date(value) |
| | | const wk = dt.getDay() |
| | | const y = dt.getFullYear() |
| | | const m = (dt.getMonth() + 1 + '').padStart(2, '0') |
| | | const d = (dt.getDate() + '').padStart(2, '0') |
| | | |
| | | const hh = (dt.getHours() + '').padStart(2, '0') |
| | | const mm = (dt.getMinutes() + '').padStart(2, '0') |
| | | const ss = (dt.getSeconds() + '').padStart(2, '0') |
| | | const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'] |
| | | const week = weeks[wk] |
| | | |
| | | // return `${y}-${m}-${d} ${hh}:${mm}:${ss} ${week}` |
| | | return `${y}-${m}-${d} ${hh}:${mm}:${ss}` |
| | | } |
| | | |
| | | // 获取规则生成的编码 |
| | | export async function getNewEncodingRules(encode) { |
| | | const res = await NewEncodingRules({ rightcode: encode }) |