1、完善项目
2、完善合同 3、完善费用项 4、司机管理对接OCR 5、完善运输计划 6、完善临时额度
This commit is contained in:
16
src/utils/table-menu.js
Normal file
16
src/utils/table-menu.js
Normal file
@@ -0,0 +1,16 @@
|
||||
export const TABLE_MENU_WIDTH = {
|
||||
default: 160,
|
||||
three: 220,
|
||||
four: 320,
|
||||
};
|
||||
|
||||
export const resolveTableMenuWidth = buttonCount => {
|
||||
if (buttonCount >= 4) return TABLE_MENU_WIDTH.four;
|
||||
if (buttonCount === 3) return TABLE_MENU_WIDTH.three;
|
||||
return TABLE_MENU_WIDTH.default;
|
||||
};
|
||||
|
||||
export const applyTableMenuWidth = (option, buttonCount) => ({
|
||||
...option,
|
||||
menuWidth: Math.max(Number(option.menuWidth) || 0, resolveTableMenuWidth(buttonCount)),
|
||||
});
|
||||
12
src/utils/upload.js
Normal file
12
src/utils/upload.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Base64 } from 'js-base64';
|
||||
import website from '@/config/website';
|
||||
import { getToken } from '@/utils/auth';
|
||||
|
||||
export function getUploadHeaders(extraHeaders = {}) {
|
||||
return {
|
||||
...extraHeaders,
|
||||
[website.tokenHeader]: `bearer ${getToken() || ''}`,
|
||||
Authorization: `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
|
||||
'Blade-Requested-With': 'BladeHttpRequest',
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user