|
@@ -93,6 +93,12 @@ class LuckySheet extends React.Component {
|
|
console.log(operate);
|
|
console.log(operate);
|
|
onUpdate && onUpdate();
|
|
onUpdate && onUpdate();
|
|
},
|
|
},
|
|
|
|
+ sheetActivate: sheet => {
|
|
|
|
+ console.log(sheet);
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.luckysheet.setCellFormat(0, 0, 'bg', '#fff');
|
|
|
|
+ }, 100);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
if (version) {
|
|
if (version) {
|
|
@@ -103,8 +109,8 @@ class LuckySheet extends React.Component {
|
|
templateId: templateId,
|
|
templateId: templateId,
|
|
// flowId: version.flow_id,
|
|
// flowId: version.flow_id,
|
|
loadUrl: `/api/v1/purchase/record/sheet?gridKey=${version.id}&JWT-TOKEN=${token}`,
|
|
loadUrl: `/api/v1/purchase/record/sheet?gridKey=${version.id}&JWT-TOKEN=${token}`,
|
|
- updateUrl: `ws://${location.host}/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}`,
|
|
|
|
|
|
+ // updateUrl: `ws://${location.host}/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}&JWT-TOKEN=${token}`,
|
|
getUser,
|
|
getUser,
|
|
// workbookCreateBefore(luckysheet) {
|
|
// workbookCreateBefore(luckysheet) {
|
|
@@ -154,12 +160,14 @@ class LuckySheet extends React.Component {
|
|
},
|
|
},
|
|
];
|
|
];
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
this.luckysheet.destroy();
|
|
this.luckysheet.destroy();
|
|
this.luckysheet.create(option);
|
|
this.luckysheet.create(option);
|
|
|
|
+ // 比对模式会导致单元格出现[Object object]的情况 任意编辑后才会正常显示
|
|
|
|
+ // 所以默认设置第一个单元格的背景色
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- this.luckysheet.setCellFormat(0, 0, 'bg', "#fff");
|
|
|
|
- }, 1000)
|
|
|
|
|
|
+ this.luckysheet.setCellFormat(0, 0, 'bg', '#fff');
|
|
|
|
+ }, 500);
|
|
}
|
|
}
|
|
|
|
|
|
// componentDidUpdate(prevProps) {
|
|
// componentDidUpdate(prevProps) {
|