|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
import { message } from 'antd';
|
|
|
import exportExcel, { getExcelBolob } from '@/utils/exportExcl';
|
|
|
import LuckyExcel from 'luckyexcel';
|
|
|
-import { getToken } from '@/utils/utils';
|
|
|
+import { getToken, GetTokenFromUrl } from '@/utils/utils';
|
|
|
|
|
|
const hintText = '禁止编辑!请先点击编辑按钮。';
|
|
|
const DIFF_COLOR = '#ff0000';
|
|
@@ -74,7 +74,7 @@ class LuckySheet extends React.Component {
|
|
|
}, 300);
|
|
|
return;
|
|
|
}
|
|
|
- let token = getToken();
|
|
|
+ let token = GetTokenFromUrl() || getToken();
|
|
|
let option = {
|
|
|
lang: 'zh',
|
|
|
showinfobar: false,
|
|
@@ -145,7 +145,8 @@ class LuckySheet extends React.Component {
|
|
|
updateUrl: wsUrl + `api/v1/ws?id=${version.id}&sid=${templateId}&JWT-TOKEN=${token}`,
|
|
|
// updateUrl: `ws://47.96.12.136:8896/api/v1/ws?id=${version.id}&sid=${templateId}&JWT-TOKEN=${token}`,
|
|
|
// updateUrl: `ws://120.55.44.4:8896/api/v1/ws?id=${version.id}&sid=${templateId}&JWT-TOKEN=${token}`,
|
|
|
- authorityUrl: `/api/v1/purchase/bom/user/excel/col?depId=${localStorage.depId}&JWT-TOKEN=${token}`,
|
|
|
+ authorityUrl: `/api/v1/purchase/bom/user/excel/col?depId=${localStorage.depId ||
|
|
|
+ 0}&JWT-TOKEN=${token}`,
|
|
|
getUser,
|
|
|
// workbookCreateBefore(luckysheet) {
|
|
|
// console.log('===============================', luckysheet);
|