|
|
@@ -70,12 +70,13 @@ export const genTabulationData = async (
|
|
|
compass?: number,
|
|
|
cover?: TabCover | null
|
|
|
) => {
|
|
|
+ const temp: Record<string, string> = await window.platform.getTableTemp();
|
|
|
const { margin, size } = getPaperConfig(
|
|
|
paperConfigs[paperKey].size,
|
|
|
paperConfigs[paperKey].scale
|
|
|
);
|
|
|
|
|
|
- const getTable = () => {
|
|
|
+ const getTable = async () => {
|
|
|
const w1 = getRealPixel(25, paperKey);
|
|
|
const w2 = getRealPixel(55, paperKey);
|
|
|
const h = getRealPixel(8, paperKey);
|
|
|
@@ -90,8 +91,7 @@ export const genTabulationData = async (
|
|
|
fontColor: "#000000",
|
|
|
};
|
|
|
const valueColl = { ...nameColl, width: w2 };
|
|
|
- const tableTemp: Record<string, string> =
|
|
|
- window.platform.getTableTemp().table;
|
|
|
+ const tableTemp = temp.table
|
|
|
const rows = Object.entries(tableTemp);
|
|
|
const data = {
|
|
|
...getBaseItem(),
|
|
|
@@ -194,7 +194,7 @@ export const genTabulationData = async (
|
|
|
const getTitle = () => {
|
|
|
const title = {
|
|
|
...getBaseItem(),
|
|
|
- content: window.platform.getTableTemp().title,
|
|
|
+ content: temp.title,
|
|
|
width: getRealPixel(90, paperKey),
|
|
|
heihgt: getRealPixel(14.4, paperKey),
|
|
|
fontSize: getRealPixel(12, paperKey),
|
|
|
@@ -289,10 +289,10 @@ export const genTabulationData = async (
|
|
|
};
|
|
|
|
|
|
const data: DrawData = {
|
|
|
- table: [getTable()],
|
|
|
+ table: [await getTable()],
|
|
|
serial: [],
|
|
|
};
|
|
|
- if (window.platform.getTableTemp().title) {
|
|
|
+ if (temp.title) {
|
|
|
data.text = [getTitle()]
|
|
|
}
|
|
|
const image = await getCover();
|