@newview/report-tools 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .table-panel[data-v-f844066a]{position:relative;padding:20px 0}
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@newview/report-tools",
3
+ "version": "1.0.0",
4
+ "author": "newview",
5
+ "main": "dist/tools.js",
6
+ "module": "./dist/tools.esm.js",
7
+ "typings": "types/index.d.ts",
8
+ "files": [
9
+ "dist/*",
10
+ "types/*",
11
+ "package.json",
12
+ "tsconfig.json"
13
+ ],
14
+ "scripts": {
15
+ "dev": "vite",
16
+ "build": "run-p type-check build-only",
17
+ "preview": "vite preview",
18
+ "p": "npm publish --access public",
19
+ "type-check": "vue-tsc --noEmit",
20
+ "build-only": "vite build --watch"
21
+ },
22
+ "devDependencies": {
23
+ "microbundle": "0.15.1",
24
+ "typescript": "4.9.3",
25
+ "view-ui-plus": "1.3.1",
26
+ "vite": "4.0.0",
27
+ "vue": "3.2.45",
28
+ "@types/jquery": "^3.5.0",
29
+ "@newview/base-vue": "^1.1.0",
30
+ "@newview/ui": "^1.1.0"
31
+ },
32
+ "dependencies": {
33
+ "@types/node": "^18.11.18",
34
+ "@vitejs/plugin-vue": "4.0.0",
35
+ "npm-run-all": "4.1.5",
36
+ "terser": "5.16.8",
37
+ "typescript": "4.9.3",
38
+ "vite": "4.0.0",
39
+ "vue-tsc": "1.0.11"
40
+ }
41
+ }
package/readme.md ADDED
@@ -0,0 +1,3 @@
1
+
2
+ ### 1.0.0
3
+ 新增报表预览工具
package/tsconfig.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "Node",
7
+ "strict": true,
8
+ "jsx": "preserve",
9
+ "resolveJsonModule": true,
10
+ "isolatedModules": true,
11
+ "esModuleInterop": true,
12
+ "lib": ["ESNext", "DOM"],
13
+ "skipLibCheck": true,
14
+ "noEmit": true,
15
+ "noImplicitAny": false
16
+ },
17
+ "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
18
+ "references": [{ "path": "./tsconfig.node.json" }]
19
+ }
@@ -0,0 +1,128 @@
1
+
2
+ export declare class ReportTool {
3
+
4
+ /**
5
+ * luckySheet数据转换
6
+ * @param reportJson
7
+ * @returns
8
+ */
9
+ convertProcess: (reportJson: any) => void;
10
+ /**
11
+ * 获取转换后的数据
12
+ * @returns
13
+ */
14
+ getPageInfo: (value: any, defaultValue: any) => void;
15
+ /**
16
+ * 插入行
17
+ * @param starRow 在第几行插入空白行,从0开始
18
+ * @param rowCount 插入几行
19
+ * @param sheetHandle 页码-从0开始
20
+ * @returns
21
+ */
22
+ insertRow: (starRow: number, rowCount: number, sheetHandle?: number) => void;
23
+
24
+ /**
25
+ * 删除行
26
+ * @param starRow 起始行
27
+ * @param rowCount 删除行数
28
+ * @param sheetHandle 页码-从0开始
29
+ * @returns
30
+ */
31
+ deleteRow: (starRow: number, rowCount: number, sheetHandle?: number) => void;
32
+
33
+ /**
34
+ * 合并指定单元格
35
+ * @param parmes 格式{r-起始行,c-起始列,rs-结束行,cs-结束列 }
36
+ * @param sheetHandle 页码-从0开始
37
+ * @returns
38
+ */
39
+ merge: ({ r, c, rs, cs }: any, sheetHandle?: number) => void;
40
+
41
+
42
+ /**
43
+ * 指定单元格写入样式
44
+ * @param rowIndex 行坐标
45
+ * @param colIndex 列坐标
46
+ * @param style 样式{fontSize:'20px',}
47
+ * @param sheetHandle 页码-从0开始
48
+ * @returns
49
+ */
50
+ setCellStyle: (rowIndex: number, colIndex: number, style: any, sheetHandle?: number) => void;
51
+
52
+ /**
53
+ * 指定单元格写入数据
54
+ * @param rowIndex 行坐标
55
+ * @param colIndex 列坐标
56
+ * @param value 数据
57
+ * @param sheetHandle 页码-从0开始
58
+ * @returns
59
+ */
60
+ setCellValue: (rowIndex: number, colIndex: number, value: any, sheetHandle?: number) => void;
61
+
62
+
63
+ /**
64
+ * 根据别名赋值
65
+ * @param alias 别名
66
+ * @param value 数据
67
+ * @param sheetHandle 页码-从0开始
68
+ * @returns
69
+ */
70
+ setCellByAlias: (alias: string, value: any, sheetHandle?: number) => void;
71
+
72
+
73
+ /**
74
+ * 指定单元格写入图片
75
+ * @param rowIndex 行坐标
76
+ * @param colIndex 列坐标
77
+ * @param base64 图片base64码
78
+ * @param sheetHandle 页码-从0开始
79
+ * @returns
80
+ */
81
+ setCellImg: (rowIndex: number, colIndex: number, base64: any, sheetHandle?: number) => void;
82
+
83
+
84
+ /**
85
+ * 根据别名添加图片
86
+ * @param alias 别名
87
+ * @param base64 图片base64码
88
+ * @param sheetHandle 页码-从0开始
89
+ * @returns
90
+ */
91
+ setCellImgByAlias: (alias: string, base64: any, sheetHandle?: number) => void;
92
+
93
+
94
+ /**
95
+ * 根据别名向文本框添加图片
96
+ * @param alias 别名
97
+ * @param base64 图片base64码
98
+ * @param sheetHandle 页码-从0开始
99
+ * @returns
100
+ */
101
+ setTextBoxByAlias: (alias: string, base64: any, sheetHandle?: number) => void;
102
+
103
+
104
+
105
+ /**
106
+ * 复制指定下标页
107
+ * @param sheetHandle 复制工作表下标
108
+ * @returns
109
+ */
110
+ copySheetIndexPage: (sheetHandle?: number) => void;
111
+
112
+
113
+ /**
114
+ * 复制初始页
115
+ * @param sheetHandle 复制工作表下标
116
+ * @returns
117
+ */
118
+ copyInitPageInfo: (sheetHandle?: number) => void;
119
+
120
+
121
+ /**
122
+ * 打印预览
123
+ */
124
+ printView:(width: number) => void;
125
+
126
+
127
+ }
128
+ export declare const reportTool: ReportTool;
@@ -0,0 +1 @@
1
+ export * from "./ReportTool";