Explorar el Código

Initial commit: Add frontend project files

zheng.song hace 1 mes
commit
ff5f42c58a
Se han modificado 100 ficheros con 76152 adiciones y 0 borrados
  1. 12 0
      .editorconfig
  2. 25 0
      .env
  3. 42 0
      .env.dev
  4. 48 0
      .env.local
  5. 45 0
      .env.prod
  6. 39 0
      .env.stage
  7. 44 0
      .env.test
  8. 8 0
      .eslintignore
  9. 259 0
      .eslintrc-auto-import.json
  10. 75 0
      .eslintrc.js
  11. 12 0
      .gitignore
  12. 11 0
      .prettierignore
  13. 6 0
      .stylelintignore
  14. 18 0
      .vscode/extensions.json
  15. 16 0
      .vscode/launch.json
  16. 146 0
      .vscode/settings.json
  17. 21 0
      LICENSE
  18. 84 0
      README.md
  19. 99 0
      build/vite/index.ts
  20. 123 0
      build/vite/optimize.ts
  21. 151 0
      index.html
  22. 18179 0
      package-lock.json
  23. 174 0
      package.json
  24. 13 0
      patches/@sv-print+hiprint+0.3.22.patch
  25. 21 0
      patches/@sv-print+hiprint+0.3.24.patch
  26. 41 0
      plugin-ele-bwip-js/package.json
  27. 38 0
      plugin-text-auto/package.json
  28. 12313 0
      pnpm-lock.yaml
  29. 5 0
      postcss.config.js
  30. 22 0
      prettier.config.js
  31. BIN
      public/favicon.ico
  32. BIN
      public/font/AGENCYB.TTF
  33. BIN
      public/font/AGENCYR.TTF
  34. BIN
      public/font/ALGER.TTF
  35. BIN
      public/font/ArialNarrowBold_zitidi.com.ttf
  36. BIN
      public/font/Arial_zitidi.com.ttf
  37. BIN
      public/font/Chroma ST Regular_zitidi.com.ttf
  38. BIN
      public/font/GODEX.TTF
  39. BIN
      public/font/League Spartan Bold_zitidi.com.otf
  40. BIN
      public/logo.gif
  41. BIN
      public/logo.png
  42. BIN
      public/logo.webp
  43. BIN
      public/logo1.png
  44. 345 0
      public/print-lock.css
  45. 7566 0
      public/static/hiprint.bundle.js
  46. 814 0
      public/static/hiprint.css
  47. 6 0
      public/static/hiprint/content/bootstrap.min.css
  48. 7 0
      public/static/hiprint/content/bootstrap.min.js
  49. 814 0
      public/static/hiprint/css/hiprint.css
  50. BIN
      public/static/hiprint/css/image/hi.png
  51. BIN
      public/static/hiprint/css/image/jquery.minicolors.png
  52. 281 0
      public/static/hiprint/css/print-lock.css
  53. 463 0
      public/static/hiprint/custom.html
  54. 106 0
      public/static/hiprint/custom_test/config-etype-provider.js
  55. 19 0
      public/static/hiprint/custom_test/config-print-data.js
  56. 144 0
      public/static/hiprint/custom_test/config-print-json.js
  57. 76 0
      public/static/hiprint/custom_test/custom-etype-provider.js
  58. 485 0
      public/static/hiprint/custom_test/custom-print-json.js
  59. 51 0
      public/static/hiprint/custom_test/print-data.js
  60. BIN
      public/static/hiprint/hi.png
  61. 7566 0
      public/static/hiprint/hiprint.bundle.js
  62. 755 0
      public/static/hiprint/hiprint.config.js
  63. 2 0
      public/static/hiprint/plugins/JsBarcode.all.min.js
  64. 10364 0
      public/static/hiprint/plugins/jq-3.31.js
  65. 113 0
      public/static/hiprint/plugins/jquery.hiwprint.js
  66. 77 0
      public/static/hiprint/plugins/jquery.jqprint-0.3.js
  67. 8 0
      public/static/hiprint/plugins/jquery.minicolors.min.js
  68. 265 0
      public/static/hiprint/plugins/jspdf/canvas2image.js
  69. 1 0
      public/static/hiprint/plugins/jspdf/canvg.min.js
  70. 22 0
      public/static/hiprint/plugins/jspdf/html2canvas.min.js
  71. 286 0
      public/static/hiprint/plugins/jspdf/jspdf.min.js
  72. 615 0
      public/static/hiprint/plugins/qrcode.js
  73. 9 0
      public/static/hiprint/plugins/socket.io.js
  74. 1 0
      public/static/hiprint/polyfill.min.js
  75. 2 0
      public/static/jquery.min.js
  76. 2 0
      public/static/plugins/JsBarcode.all.min.js
  77. 10364 0
      public/static/plugins/jq-3.31.js
  78. 113 0
      public/static/plugins/jquery.hiwprint.js
  79. 77 0
      public/static/plugins/jquery.jqprint-0.3.js
  80. 8 0
      public/static/plugins/jquery.minicolors.min.js
  81. 265 0
      public/static/plugins/jspdf/canvas2image.js
  82. 1 0
      public/static/plugins/jspdf/canvg.min.js
  83. 22 0
      public/static/plugins/jspdf/html2canvas.min.js
  84. 286 0
      public/static/plugins/jspdf/jspdf.min.js
  85. 615 0
      public/static/plugins/qrcode.js
  86. 9 0
      public/static/plugins/socket.io.js
  87. 281 0
      public/static/print-lock.css
  88. BIN
      public/templateFile/工资核算导入模板.xlsx
  89. 82 0
      src/App.vue
  90. 65 0
      src/api/ai/chat/conversation/index.ts
  91. 96 0
      src/api/ai/chat/message/index.ts
  92. 102 0
      src/api/ai/image/index.ts
  93. 54 0
      src/api/ai/knowledge/document/index.ts
  94. 44 0
      src/api/ai/knowledge/knowledge/index.ts
  95. 49 0
      src/api/ai/knowledge/nl2sql/index.ts
  96. 75 0
      src/api/ai/knowledge/segment/index.ts
  97. 60 0
      src/api/ai/mindmap/index.ts
  98. 44 0
      src/api/ai/model/apiKey/index.ts
  99. 85 0
      src/api/ai/model/chatRole/index.ts
  100. 0 0
      src/api/ai/model/model/index.ts

+ 12 - 0
.editorconfig

@@ -0,0 +1,12 @@
1
+root = true
2
+[*.{js,ts,vue}]
3
+charset = utf-8 # 设置文件字符集为 utf-8
4
+end_of_line = lf # 控制换行类型(lf | cr | crlf)
5
+insert_final_newline = true # 始终在文件末尾插入一个新行
6
+indent_style = space # 缩进风格(tab | space)
7
+indent_size = 2 # 缩进大小
8
+max_line_length = 100 # 最大行长度
9
+
10
+[*.md] # 仅 md 文件适用以下规则
11
+max_line_length = off # 关闭最大行长度限制
12
+trim_trailing_whitespace = false # 关闭末尾空格修剪

+ 25 - 0
.env

@@ -0,0 +1,25 @@
1
+# 标题
2
+VITE_APP_TITLE=打印平台
3
+
4
+# 项目本地运行端口号
5
+VITE_PORT=10000
6
+
7
+# open 运行 npm run dev 时自动打开浏览器
8
+VITE_OPEN=true
9
+
10
+# 租户开关
11
+VITE_APP_TENANT_ENABLE=true
12
+
13
+# 验证码的开关
14
+VITE_APP_CAPTCHA_ENABLE=false
15
+
16
+# 文档地址的开关
17
+VITE_APP_DOCALERT_ENABLE=false
18
+
19
+# 百度统计
20
+VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
21
+
22
+# 默认账户密码
23
+VITE_APP_DEFAULT_LOGIN_TENANT = 企业运营管理
24
+VITE_APP_DEFAULT_LOGIN_USERNAME = ''
25
+VITE_APP_DEFAULT_LOGIN_PASSWORD = ''

+ 42 - 0
.env.dev

@@ -0,0 +1,42 @@
1
+# 开发环境:本地只启动前端项目,依赖开发环境(后端、APP)
2
+NODE_ENV=production
3
+
4
+VITE_DEV=true
5
+
6
+# 请求路径
7
+VITE_BASE_URL='http://api-dashboard.jt.cn'
8
+
9
+# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
10
+VITE_UPLOAD_TYPE=server
11
+
12
+# 接口地址
13
+VITE_API_URL=/admin-api
14
+
15
+# 是否删除debugger
16
+VITE_DROP_DEBUGGER=false
17
+
18
+# 是否删除console.log
19
+VITE_DROP_CONSOLE=false
20
+
21
+# 是否sourcemap
22
+VITE_SOURCEMAP=true
23
+
24
+# 打包路径
25
+VITE_BASE_PATH=/business-platform
26
+
27
+# 输出路径
28
+VITE_OUT_DIR=dist
29
+
30
+# 商城H5会员端域名
31
+VITE_MALL_H5_DOMAIN='http://mall.jt.cn'
32
+
33
+# 验证码的开关
34
+VITE_APP_CAPTCHA_ENABLE=true
35
+
36
+# GoView域名
37
+VITE_GOVIEW_URL='http://127.0.0.1:3000'
38
+
39
+#打印exe对接公钥
40
+VITE_PRINT_EXE_API_KEY = jsCEWSgnUbmh9n7sYmU6Bg==
41
+#打印exe应用api服务地址
42
+VITE_PRINT_EXE_API_URL = http://localhost:50001

+ 48 - 0
.env.local

@@ -0,0 +1,48 @@
1
+# 测试环境:只在打包时使用
2
+NODE_ENV=production
3
+
4
+VITE_DEV=false
5
+
6
+# 请求路径
7
+
8
+VITE_BASE_URL='http://192.168.88.66:20001'
9
+# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
10
+VITE_UPLOAD_TYPE=server
11
+
12
+# 接口地址
13
+VITE_API_URL=/admin-api
14
+
15
+#VITE_BASE_URL=''
16
+# VITE_PROXY_API_URL='http://218.13.91.108:7126/print-api/admin-api'
17
+# 是否删除debugger
18
+VITE_DROP_DEBUGGER=true
19
+
20
+# 是否删除console.log
21
+VITE_DROP_CONSOLE=true
22
+
23
+# 是否sourcemap
24
+VITE_SOURCEMAP=false
25
+
26
+# 打包路径
27
+VITE_BASE_PATH=/
28
+
29
+# 输出路径
30
+VITE_OUT_DIR=business-platform-test
31
+
32
+# 商城H5会员端域名
33
+VITE_MALL_H5_DOMAIN=''
34
+
35
+# GoView域名
36
+VITE_GOVIEW_URL='http://127.0.0.1:3000'
37
+
38
+VITE_REDIRECT_URI = 'http://122.152.216.7/business-platform-test'
39
+
40
+VITE_FEISHU_APP_ID = 'cli_a834fd65ed3e100e'
41
+
42
+# 验证码的开关
43
+VITE_APP_CAPTCHA_ENABLE=false
44
+
45
+#打印exe对接公钥
46
+VITE_PRINT_EXE_API_KEY = jsCEWSgnUbmh9n7sYmU6Bg==
47
+#打印exe应用api服务地址
48
+VITE_PRINT_EXE_API_URL = 60002

+ 45 - 0
.env.prod

@@ -0,0 +1,45 @@
1
+# 生产环境:只在打包时使用
2
+NODE_ENV=production
3
+
4
+VITE_DEV=false
5
+
6
+# 请求路径
7
+VITE_BASE_URL='http://192.168.100.26:20001'
8
+
9
+# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
10
+VITE_UPLOAD_TYPE=server
11
+
12
+# 接口地址
13
+VITE_API_URL=/admin-api
14
+
15
+# 是否删除debugger
16
+VITE_DROP_DEBUGGER=true
17
+
18
+# 是否删除console.log
19
+VITE_DROP_CONSOLE=true
20
+
21
+# 是否sourcemap
22
+VITE_SOURCEMAP=true
23
+
24
+# 打包路径
25
+VITE_BASE_PATH=/
26
+
27
+# 输出路径
28
+VITE_OUT_DIR=dist-prod
29
+
30
+# 商城H5会员端域名
31
+VITE_MALL_H5_DOMAIN=''
32
+
33
+# GoView域名
34
+VITE_GOVIEW_URL='http://127.0.0.1:3000'
35
+
36
+
37
+
38
+VITE_REDIRECT_URI = 'http://122.152.216.7/business-platform-test'
39
+
40
+VITE_FEISHU_APP_ID = 'cli_a834fd65ed3e100e'
41
+
42
+#打印exe对接公钥
43
+VITE_PRINT_EXE_API_KEY = jsCEWSgnUbmh9n7sYmU6Bg==
44
+#打印exe应用api服务地址
45
+VITE_PRINT_EXE_API_URL = 60002

+ 39 - 0
.env.stage

@@ -0,0 +1,39 @@
1
+# 预发布环境:只在打包时使用
2
+NODE_ENV=production
3
+
4
+VITE_DEV=false
5
+
6
+# 请求路径
7
+VITE_BASE_URL='http://api-dashboard.jt.cn'
8
+
9
+# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
10
+VITE_UPLOAD_TYPE=server
11
+
12
+# 接口地址
13
+VITE_API_URL=/admin-api
14
+
15
+# 是否删除debugger
16
+VITE_DROP_DEBUGGER=true
17
+
18
+# 是否删除console.log
19
+VITE_DROP_CONSOLE=true
20
+
21
+# 是否sourcemap
22
+VITE_SOURCEMAP=false
23
+
24
+# 打包路径
25
+VITE_BASE_PATH='http://static-vue3.jt.cn/'
26
+
27
+# 输出路径
28
+VITE_OUT_DIR=dist-stage
29
+
30
+# 商城H5会员端域名
31
+VITE_MALL_H5_DOMAIN='http://mall.jt.cn'
32
+
33
+# GoView域名
34
+VITE_GOVIEW_URL='http://127.0.0.1:3000'
35
+
36
+#打印exe对接公钥
37
+VITE_PRINT_EXE_API_KEY = jsCEWSgnUbmh9n7sYmU6Bg==
38
+#打印exe应用api服务地址
39
+VITE_PRINT_EXE_API_URL = http://localhost:50001

+ 44 - 0
.env.test

@@ -0,0 +1,44 @@
1
+# 测试环境:只在打包时使用
2
+NODE_ENV=production
3
+
4
+VITE_DEV=false
5
+
6
+# 请求路径
7
+VITE_BASE_URL='http://218.13.91.108:7126'
8
+
9
+# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
10
+VITE_UPLOAD_TYPE=server
11
+
12
+# 接口地址
13
+VITE_API_URL=/print-api/admin-api
14
+
15
+# 是否删除debugger
16
+VITE_DROP_DEBUGGER=true
17
+
18
+# 是否删除console.log
19
+VITE_DROP_CONSOLE=true
20
+
21
+# 是否sourcemap
22
+VITE_SOURCEMAP=false
23
+
24
+# 打包路径
25
+VITE_BASE_PATH=/print-front/
26
+
27
+# 输出路径
28
+VITE_OUT_DIR=dist-test
29
+
30
+# 商城H5会员端域名
31
+VITE_MALL_H5_DOMAIN=''
32
+
33
+# GoView域名
34
+VITE_GOVIEW_URL='http://127.0.0.1:3000'
35
+
36
+VITE_REDIRECT_URI = 'http://122.152.216.7/business-platform-test'
37
+
38
+VITE_FEISHU_APP_ID = 'cli_a834fd65ed3e100e'
39
+
40
+#打印exe对接公钥
41
+VITE_PRINT_EXE_API_KEY = jsCEWSgnUbmh9n7sYmU6Bg==
42
+#打印exe应用api服务地址端口
43
+VITE_PRINT_EXE_API_URL = 60002
44
+

+ 8 - 0
.eslintignore

@@ -0,0 +1,8 @@
1
+/build/
2
+/config/
3
+/dist/
4
+/*.js
5
+/test/unit/coverage/
6
+/node_modules/*
7
+/dist*
8
+/src/main.ts

+ 259 - 0
.eslintrc-auto-import.json

@@ -0,0 +1,259 @@
1
+{
2
+  "globals": {
3
+    "EffectScope": true,
4
+    "ElMessage": true,
5
+    "ElMessageBox": true,
6
+    "ElTag": true,
7
+    "asyncComputed": true,
8
+    "autoResetRef": true,
9
+    "computed": true,
10
+    "computedAsync": true,
11
+    "computedEager": true,
12
+    "computedInject": true,
13
+    "computedWithControl": true,
14
+    "controlledComputed": true,
15
+    "controlledRef": true,
16
+    "createApp": true,
17
+    "createEventHook": true,
18
+    "createGlobalState": true,
19
+    "createInjectionState": true,
20
+    "createReactiveFn": true,
21
+    "createSharedComposable": true,
22
+    "createUnrefFn": true,
23
+    "customRef": true,
24
+    "debouncedRef": true,
25
+    "debouncedWatch": true,
26
+    "defineAsyncComponent": true,
27
+    "defineComponent": true,
28
+    "eagerComputed": true,
29
+    "effectScope": true,
30
+    "extendRef": true,
31
+    "getCurrentInstance": true,
32
+    "getCurrentScope": true,
33
+    "h": true,
34
+    "ignorableWatch": true,
35
+    "inject": true,
36
+    "isDefined": true,
37
+    "isProxy": true,
38
+    "isReactive": true,
39
+    "isReadonly": true,
40
+    "isRef": true,
41
+    "makeDestructurable": true,
42
+    "markRaw": true,
43
+    "nextTick": true,
44
+    "onActivated": true,
45
+    "onBeforeMount": true,
46
+    "onBeforeUnmount": true,
47
+    "onBeforeUpdate": true,
48
+    "onClickOutside": true,
49
+    "onDeactivated": true,
50
+    "onErrorCaptured": true,
51
+    "onKeyStroke": true,
52
+    "onLongPress": true,
53
+    "onMounted": true,
54
+    "onRenderTracked": true,
55
+    "onRenderTriggered": true,
56
+    "onScopeDispose": true,
57
+    "onServerPrefetch": true,
58
+    "onStartTyping": true,
59
+    "onUnmounted": true,
60
+    "onUpdated": true,
61
+    "pausableWatch": true,
62
+    "provide": true,
63
+    "reactify": true,
64
+    "reactifyObject": true,
65
+    "reactive": true,
66
+    "reactiveComputed": true,
67
+    "reactiveOmit": true,
68
+    "reactivePick": true,
69
+    "readonly": true,
70
+    "ref": true,
71
+    "refAutoReset": true,
72
+    "refDebounced": true,
73
+    "refDefault": true,
74
+    "refThrottled": true,
75
+    "refWithControl": true,
76
+    "resolveComponent": true,
77
+    "resolveRef": true,
78
+    "resolveUnref": true,
79
+    "shallowReactive": true,
80
+    "shallowReadonly": true,
81
+    "shallowRef": true,
82
+    "syncRef": true,
83
+    "syncRefs": true,
84
+    "templateRef": true,
85
+    "throttledRef": true,
86
+    "throttledWatch": true,
87
+    "toRaw": true,
88
+    "toReactive": true,
89
+    "toRef": true,
90
+    "toRefs": true,
91
+    "triggerRef": true,
92
+    "tryOnBeforeMount": true,
93
+    "tryOnBeforeUnmount": true,
94
+    "tryOnMounted": true,
95
+    "tryOnScopeDispose": true,
96
+    "tryOnUnmounted": true,
97
+    "unref": true,
98
+    "unrefElement": true,
99
+    "until": true,
100
+    "useActiveElement": true,
101
+    "useArrayEvery": true,
102
+    "useArrayFilter": true,
103
+    "useArrayFind": true,
104
+    "useArrayFindIndex": true,
105
+    "useArrayJoin": true,
106
+    "useArrayMap": true,
107
+    "useArrayReduce": true,
108
+    "useArraySome": true,
109
+    "useAsyncQueue": true,
110
+    "useAsyncState": true,
111
+    "useAttrs": true,
112
+    "useBase64": true,
113
+    "useBattery": true,
114
+    "useBluetooth": true,
115
+    "useBreakpoints": true,
116
+    "useBroadcastChannel": true,
117
+    "useBrowserLocation": true,
118
+    "useCached": true,
119
+    "useClipboard": true,
120
+    "useColorMode": true,
121
+    "useConfirmDialog": true,
122
+    "useCounter": true,
123
+    "useCssModule": true,
124
+    "useCssVar": true,
125
+    "useCssVars": true,
126
+    "useCurrentElement": true,
127
+    "useCycleList": true,
128
+    "useDark": true,
129
+    "useDateFormat": true,
130
+    "useDebounce": true,
131
+    "useDebounceFn": true,
132
+    "useDebouncedRefHistory": true,
133
+    "useDeviceMotion": true,
134
+    "useDeviceOrientation": true,
135
+    "useDevicePixelRatio": true,
136
+    "useDevicesList": true,
137
+    "useDisplayMedia": true,
138
+    "useDocumentVisibility": true,
139
+    "useDraggable": true,
140
+    "useDropZone": true,
141
+    "useElementBounding": true,
142
+    "useElementByPoint": true,
143
+    "useElementHover": true,
144
+    "useElementSize": true,
145
+    "useElementVisibility": true,
146
+    "useEventBus": true,
147
+    "useEventListener": true,
148
+    "useEventSource": true,
149
+    "useEyeDropper": true,
150
+    "useFavicon": true,
151
+    "useFetch": true,
152
+    "useFileDialog": true,
153
+    "useFileSystemAccess": true,
154
+    "useFocus": true,
155
+    "useFocusWithin": true,
156
+    "useFps": true,
157
+    "useFullscreen": true,
158
+    "useGamepad": true,
159
+    "useGeolocation": true,
160
+    "useIdle": true,
161
+    "useImage": true,
162
+    "useInfiniteScroll": true,
163
+    "useIntersectionObserver": true,
164
+    "useInterval": true,
165
+    "useIntervalFn": true,
166
+    "useKeyModifier": true,
167
+    "useLastChanged": true,
168
+    "useLocalStorage": true,
169
+    "useMagicKeys": true,
170
+    "useManualRefHistory": true,
171
+    "useMediaControls": true,
172
+    "useMediaQuery": true,
173
+    "useMemoize": true,
174
+    "useMemory": true,
175
+    "useMounted": true,
176
+    "useMouse": true,
177
+    "useMouseInElement": true,
178
+    "useMousePressed": true,
179
+    "useMutationObserver": true,
180
+    "useNavigatorLanguage": true,
181
+    "useNetwork": true,
182
+    "useNow": true,
183
+    "useObjectUrl": true,
184
+    "useOffsetPagination": true,
185
+    "useOnline": true,
186
+    "usePageLeave": true,
187
+    "useParallax": true,
188
+    "usePermission": true,
189
+    "usePointer": true,
190
+    "usePointerSwipe": true,
191
+    "usePreferredColorScheme": true,
192
+    "usePreferredDark": true,
193
+    "usePreferredLanguages": true,
194
+    "useRafFn": true,
195
+    "useRefHistory": true,
196
+    "useResizeObserver": true,
197
+    "useRoute": true,
198
+    "useRouter": true,
199
+    "useScreenOrientation": true,
200
+    "useScreenSafeArea": true,
201
+    "useScriptTag": true,
202
+    "useScroll": true,
203
+    "useScrollLock": true,
204
+    "useSessionStorage": true,
205
+    "useShare": true,
206
+    "useSlots": true,
207
+    "useSpeechRecognition": true,
208
+    "useSpeechSynthesis": true,
209
+    "useStepper": true,
210
+    "useStorage": true,
211
+    "useStorageAsync": true,
212
+    "useStyleTag": true,
213
+    "useSupported": true,
214
+    "useSwipe": true,
215
+    "useTemplateRefsList": true,
216
+    "useTextDirection": true,
217
+    "useTextSelection": true,
218
+    "useTextareaAutosize": true,
219
+    "useThrottle": true,
220
+    "useThrottleFn": true,
221
+    "useThrottledRefHistory": true,
222
+    "useTimeAgo": true,
223
+    "useTimeout": true,
224
+    "useTimeoutFn": true,
225
+    "useTimeoutPoll": true,
226
+    "useTimestamp": true,
227
+    "useTitle": true,
228
+    "useToggle": true,
229
+    "useTransition": true,
230
+    "useUrlSearchParams": true,
231
+    "useUserMedia": true,
232
+    "useVModel": true,
233
+    "useVModels": true,
234
+    "useVibrate": true,
235
+    "useVirtualList": true,
236
+    "useWakeLock": true,
237
+    "useWebNotification": true,
238
+    "useWebSocket": true,
239
+    "useWebWorker": true,
240
+    "useWebWorkerFn": true,
241
+    "useWindowFocus": true,
242
+    "useWindowScroll": true,
243
+    "useWindowSize": true,
244
+    "watch": true,
245
+    "watchArray": true,
246
+    "watchAtMost": true,
247
+    "watchDebounced": true,
248
+    "watchEffect": true,
249
+    "watchIgnorable": true,
250
+    "watchOnce": true,
251
+    "watchPausable": true,
252
+    "watchPostEffect": true,
253
+    "watchSyncEffect": true,
254
+    "watchThrottled": true,
255
+    "watchTriggerable": true,
256
+    "watchWithFilter": true,
257
+    "whenever": true
258
+  }
259
+}

+ 75 - 0
.eslintrc.js

@@ -0,0 +1,75 @@
1
+// @ts-check
2
+const { defineConfig } = require('eslint-define-config')
3
+module.exports = defineConfig({
4
+  root: true,
5
+  env: {
6
+    browser: true,
7
+    node: true,
8
+    es6: true
9
+  },
10
+  parser: 'vue-eslint-parser',
11
+  parserOptions: {
12
+    parser: '@typescript-eslint/parser',
13
+    ecmaVersion: 2020,
14
+    sourceType: 'module',
15
+    jsxPragma: 'React',
16
+    ecmaFeatures: {
17
+      jsx: true
18
+    }
19
+  },
20
+  extends: [
21
+    'plugin:vue/vue3-recommended',
22
+    'plugin:@typescript-eslint/recommended',
23
+    'prettier',
24
+    'plugin:prettier/recommended',
25
+    '@unocss'
26
+  ],
27
+  rules: {
28
+    'vue/no-setup-props-destructure': 'off',
29
+    'vue/script-setup-uses-vars': 'error',
30
+    'vue/no-reserved-component-names': 'off',
31
+    '@typescript-eslint/ban-ts-ignore': 'off',
32
+    '@typescript-eslint/explicit-function-return-type': 'off',
33
+    '@typescript-eslint/no-explicit-any': 'off',
34
+    '@typescript-eslint/no-var-requires': 'off',
35
+    '@typescript-eslint/no-empty-function': 'off',
36
+    'vue/custom-event-name-casing': 'off',
37
+    'no-use-before-define': 'off',
38
+    '@typescript-eslint/no-use-before-define': 'off',
39
+    '@typescript-eslint/ban-ts-comment': 'off',
40
+    '@typescript-eslint/ban-types': 'off',
41
+    '@typescript-eslint/no-non-null-assertion': 'off',
42
+    '@typescript-eslint/explicit-module-boundary-types': 'off',
43
+    '@typescript-eslint/no-unused-vars': 'off',
44
+    'no-unused-vars': 'off',
45
+    'space-before-function-paren': 'off',
46
+
47
+    'vue/attributes-order': 'off',
48
+    'vue/one-component-per-file': 'off',
49
+    'vue/html-closing-bracket-newline': 'off',
50
+    'vue/max-attributes-per-line': 'off',
51
+    'vue/multiline-html-element-content-newline': 'off',
52
+    'vue/singleline-html-element-content-newline': 'off',
53
+    'vue/attribute-hyphenation': 'off',
54
+    'vue/require-default-prop': 'off',
55
+    'vue/require-explicit-emits': 'off',
56
+    'vue/require-toggle-inside-transition': 'off',
57
+    'vue/html-self-closing': [
58
+      'error',
59
+      {
60
+        html: {
61
+          void: 'always',
62
+          normal: 'never',
63
+          component: 'always'
64
+        },
65
+        svg: 'always',
66
+        math: 'always'
67
+      }
68
+    ],
69
+    'vue/multi-word-component-names': 'off',
70
+    'vue/no-v-html': 'off',
71
+    'prettier/prettier': 'off', // 芋艿:默认关闭 prettier 的 ESLint 校验,因为我们使用的是 IDE 的 Prettier 插件
72
+    '@unocss/order': 'off', // 芋艿:禁用 unocss 【css】顺序的提示,因为暂时不需要这么严格,警告也有点繁琐
73
+    '@unocss/order-attributify': 'off' // 芋艿:禁用 unocss 【属性】顺序的提示,因为暂时不需要这么严格,警告也有点繁琐
74
+  }
75
+})

+ 12 - 0
.gitignore

@@ -0,0 +1,12 @@
1
+node_modules
2
+.DS_Store
3
+dist
4
+dist-ssr
5
+/dist*
6
+pnpm-debug
7
+auto-*.d.ts
8
+.idea
9
+.history
10
+business-platform-test
11
+/business-platform-test*
12
+/business-prod*

+ 11 - 0
.prettierignore

@@ -0,0 +1,11 @@
1
+/node_modules/**
2
+/dist/
3
+/dist*
4
+/public/*
5
+/docs/*
6
+/vite.config.ts
7
+/src/types/env.d.ts
8
+/src/types/auto-components.d.ts
9
+/src/types/auto-imports.d.ts
10
+/docs/**/*
11
+CHANGELOG

+ 6 - 0
.stylelintignore

@@ -0,0 +1,6 @@
1
+/dist/*
2
+/public/*
3
+public/*
4
+/dist*
5
+/src/types/env.d.ts
6
+/docs/**/*

+ 18 - 0
.vscode/extensions.json

@@ -0,0 +1,18 @@
1
+{
2
+  "recommendations": [
3
+    "christian-kohler.path-intellisense",
4
+    "vscode-icons-team.vscode-icons",
5
+    "davidanson.vscode-markdownlint",
6
+    "dbaeumer.vscode-eslint",
7
+    "esbenp.prettier-vscode",
8
+    "mrmlnc.vscode-less",
9
+    "lokalise.i18n-ally",
10
+    "redhat.vscode-yaml",
11
+    "csstools.postcss",
12
+    "mikestead.dotenv",
13
+    "eamodio.gitlens",
14
+    "antfu.iconify",
15
+    "antfu.unocss",
16
+    "Vue.volar"
17
+  ]
18
+}

+ 16 - 0
.vscode/launch.json

@@ -0,0 +1,16 @@
1
+{
2
+  // Use IntelliSense to learn about possible attributes.
3
+  // Hover to view descriptions of existing attributes.
4
+  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+  "version": "0.2.0",
6
+  "configurations": [
7
+    {
8
+      "type": "msedge",
9
+      "request": "launch",
10
+      "name": "Launch Edge against localhost",
11
+      "url": "http://localhost",
12
+      "webRoot": "${workspaceFolder}/src",
13
+      "sourceMaps": true
14
+    }
15
+  ]
16
+}

+ 146 - 0
.vscode/settings.json

@@ -0,0 +1,146 @@
1
+{
2
+  "typescript.tsdk": "node_modules/typescript/lib",
3
+  "npm.packageManager": "pnpm",
4
+  "editor.tabSize": 2,
5
+  "prettier.printWidth": 100, // 超过最大值换行
6
+  "editor.defaultFormatter": "esbenp.prettier-vscode",
7
+  "files.eol": "\n",
8
+  "search.exclude": {
9
+    "**/node_modules": true,
10
+    "**/*.log": true,
11
+    "**/*.log*": true,
12
+    "**/bower_components": true,
13
+    "**/dist": true,
14
+    "**/elehukouben": true,
15
+    "**/.git": true,
16
+    "**/.gitignore": true,
17
+    "**/.svn": true,
18
+    "**/.DS_Store": true,
19
+    "**/.idea": true,
20
+    "**/.vscode": false,
21
+    "**/yarn.lock": true,
22
+    "**/tmp": true,
23
+    "out": true,
24
+    "dist": true,
25
+    "node_modules": true,
26
+    "CHANGELOG.md": true,
27
+    "examples": true,
28
+    "res": true,
29
+    "screenshots": true,
30
+    "yarn-error.log": true,
31
+    "**/.yarn": true
32
+  },
33
+  "files.exclude": {
34
+    "**/.cache": true,
35
+    "**/.editorconfig": true,
36
+    "**/.eslintcache": true,
37
+    "**/bower_components": true,
38
+    "**/.idea": true,
39
+    "**/tmp": true,
40
+    "**/.git": true,
41
+    "**/.svn": true,
42
+    "**/.hg": true,
43
+    "**/CVS": true,
44
+    "**/.DS_Store": true
45
+  },
46
+  "files.watcherExclude": {
47
+    "**/.git/objects/**": true,
48
+    "**/.git/subtree-cache/**": true,
49
+    "**/.vscode/**": true,
50
+    "**/node_modules/**": true,
51
+    "**/tmp/**": true,
52
+    "**/bower_components/**": true,
53
+    "**/dist/**": true,
54
+    "**/yarn.lock": true
55
+  },
56
+  "stylelint.enable": true,
57
+  "stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"],
58
+  "path-intellisense.mappings": {
59
+    "@/": "${workspaceRoot}/src"
60
+  },
61
+  "[javascriptreact]": {
62
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
63
+  },
64
+  "[typescript]": {
65
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
66
+  },
67
+  "[typescriptreact]": {
68
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
69
+  },
70
+  "[html]": {
71
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
72
+  },
73
+  "[css]": {
74
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
75
+  },
76
+  "[less]": {
77
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
78
+  },
79
+  "[scss]": {
80
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
81
+  },
82
+  "[markdown]": {
83
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
84
+  },
85
+  "editor.codeActionsOnSave": {
86
+    "source.fixAll.eslint": "explicit",
87
+    "source.fixAll.stylelint": "explicit"
88
+  },
89
+  "editor.formatOnSave": true,
90
+  "[vue]": {
91
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
92
+  },
93
+  "i18n-ally.localesPaths": ["src/locales"],
94
+  "i18n-ally.keystyle": "nested",
95
+  "i18n-ally.sortKeys": true,
96
+  "i18n-ally.namespace": false,
97
+  "i18n-ally.enabledParsers": ["ts"],
98
+  "i18n-ally.sourceLanguage": "en",
99
+  "i18n-ally.displayLanguage": "zh-CN",
100
+  "i18n-ally.enabledFrameworks": ["vue", "react"],
101
+  "cSpell.words": [
102
+    "brotli",
103
+    "browserslist",
104
+    "codemirror",
105
+    "commitlint",
106
+    "cropperjs",
107
+    "echart",
108
+    "echarts",
109
+    "esnext",
110
+    "esno",
111
+    "iconify",
112
+    "INTLIFY",
113
+    "lintstagedrc",
114
+    "logicflow",
115
+    "nprogress",
116
+    "pinia",
117
+    "pnpm",
118
+    "qrcode",
119
+    "sider",
120
+    "sortablejs",
121
+    "stylelint",
122
+    "svgs",
123
+    "unocss",
124
+    "unplugin",
125
+    "unref",
126
+    "videojs",
127
+    "VITE",
128
+    "vitejs",
129
+    "vueuse",
130
+    "wangeditor",
131
+    "xingyu",
132
+    "jt",
133
+    "zxcvbn"
134
+  ],
135
+  // 控制相关文件嵌套展示
136
+  "explorer.fileNesting.enabled": true,
137
+  "explorer.fileNesting.expand": false,
138
+  "explorer.fileNesting.patterns": {
139
+    "*.ts": "$(capture).test.ts, $(capture).test.tsx",
140
+    "*.tsx": "$(capture).test.ts, $(capture).test.tsx",
141
+    "*.env": "$(capture).env.*",
142
+    "package.json": "pnpm-lock.yaml,yarn.lock,LICENSE,README*,CHANGELOG*,CNAME,.gitattributes,.eslintrc-auto-import.json,.gitignore,prettier.config.js,stylelint.config.js,commitlint.config.js,.stylelintignore,.prettierignore,.gitpod.yml,.eslintrc.js,.eslintignore"
143
+  },
144
+  "terminal.integrated.scrollback": 10000,
145
+  "nuxt.isNuxtApp": false
146
+}

+ 21 - 0
LICENSE

@@ -0,0 +1,21 @@
1
+MIT License
2
+
3
+Copyright (c) 2021-present Archer
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.

+ 84 - 0
README.md

@@ -0,0 +1,84 @@
1
+
2
+## 🐯 平台简介
3
+* 采用 [vue-element-plus-admin](https://gitee.com/kailong110120130/vue-element-plus-admin) 实现
4
+* 改换 saas,自动引入等功能
5
+* 使用 Element Plus 免费开源的中后台模版,具备如下特性:
6
+
7
+![首页](.image/demo/vue3-ep.png)
8
+
9
+* **最新技术栈**:使用 Vue3、Vite4 等前端前沿技术开发
10
+* **TypeScript**: 应用程序级 JavaScript 的语言
11
+* **主题**: 可配置的主题
12
+* **国际化**:内置完善的国际化方案
13
+* **权限**:内置完善的动态路由权限生成方案
14
+* **组件**:二次封装了多个常用的组件
15
+* **示例**:内置丰富的示例
16
+
17
+## 技术栈
18
+
19
+| 框架                                                                   | 说明               | 版本     |
20
+|----------------------------------------------------------------------|------------------|--------|
21
+| [Vue](https://staging-cn.vuejs.org/)                                 | Vue 框架           | 3.3.8  |
22
+| [Vite](https://cn.vitejs.dev//)                                      | 开发与构建工具          | 4.5.0  |
23
+| [Element Plus](https://element-plus.org/zh-CN/)                      | Element Plus     | 2.4.2  |
24
+| [TypeScript](https://www.typescriptlang.org/docs/)                   | JavaScript 的超集   | 5.2.2  |
25
+| [pinia](https://pinia.vuejs.org/)                                    | Vue 存储库 替代 vuex5 | 2.1.7  |
26
+| [vueuse](https://vueuse.org/)                                        | 常用工具集            | 10.6.1 |
27
+| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化              | 9.6.5  |
28
+| [vue-router](https://router.vuejs.org/)                              | Vue 路由           | 4.2.5  |
29
+| [unocss](https://uno.antfu.me/)                                      | 原子 css           | 0.57.4 |
30
+| [iconify](https://icon-sets.iconify.design/)                         | 在线图标库            | 3.1.1  |
31
+| [wangeditor](https://www.wangeditor.com/)                            | 富文本编辑器           | 5.1.23 |
32
+
33
+## 开发工具
34
+
35
+推荐 VS Code 开发,配合插件如下:
36
+
37
+| 插件名                           | 功能                  |
38
+|-------------------------------|---------------------|
39
+| Vue - Official                | Vue 与 TypeScript 支持 |
40
+| unocss                        | unocss for vscode   |
41
+| Iconify IntelliSense          | Iconify 预览和搜索       |
42
+| i18n Ally                     | 国际化智能提示             |
43
+| Stylelint                     | Css    格式化          |
44
+| Prettier                      | 代码格式化               |
45
+| ESLint                        | 脚本代码检查              |
46
+| DotENV                        | env 文件高亮            |
47
+
48
+
49
+
50
+## 内置功能
51
+
52
+系统内置多种多种业务功能,可以用于快速你的业务系统:
53
+
54
+系统内置多种多种业务功能,可以用于快速你的业务系统:
55
+
56
+![功能分层](/.image/common/ruoyi-vue-pro-biz.png)
57
+
58
+* 通用模块(必选):系统功能、基础设施
59
+* 通用模块(可选):工作流程、支付系统、数据报表、会员中心
60
+* 业务系统(按需):ERP 系统、CRM 系统、商城系统、微信公众号、AI 大模型
61
+
62
+### 系统功能
63
+
64
+|     | 功能    | 描述                              |
65
+|-----|-------|---------------------------------|
66
+|     | 用户管理  | 用户是系统操作者,该功能主要完成系统用户配置          |
67
+| ⭐️  | 在线用户  | 当前系统中活跃用户状态监控,支持手动踢下线           |
68
+|     | 角色管理  | 角色菜单权限分配、设置角色按机构进行数据范围权限划分      |
69
+|     | 菜单管理  | 配置系统菜单、操作权限、按钮权限标识等,本地缓存提供性能    |
70
+|     | 部门管理  | 配置系统组织机构(公司、部门、小组),树结构展现支持数据权限  |
71
+|     | 岗位管理  | 配置系统用户所属担任职务                    |
72
+| 🚀  | 租户管理  | 配置系统租户,支持 SaaS 场景下的多租户功能        |
73
+| 🚀  | 租户套餐  | 配置租户套餐,自定每个租户的菜单、操作、按钮的权限       |
74
+|     | 字典管理  | 对系统中经常使用的一些较为固定的数据进行维护          |
75
+| 🚀  | 短信管理  | 短信渠道、短息模板、短信日志,对接阿里云、腾讯云等主流短信平台 |
76
+| 🚀  | 邮件管理  | 邮箱账号、邮件模版、邮件发送日志,支持所有邮件平台       |
77
+| 🚀  | 站内信   | 系统内的消息通知,提供站内信模版、站内信消息          |
78
+| 🚀  | 操作日志  | 系统正常操作日志记录和查询,集成 Swagger 生成日志内容 |
79
+| ⭐️  | 登录日志  | 系统登录日志记录查询,包含登录异常               |
80
+| 🚀  | 错误码管理 | 系统所有错误码的管理,可在线修改错误提示,无需重启服务     |
81
+|     | 通知公告  | 系统通知公告信息发布维护                    |
82
+| 🚀  | 敏感词   | 配置系统敏感词,支持标签分组                  |
83
+| 🚀  | 应用管理  | 管理 SSO 单点登录的应用,支持多种 OAuth2 授权方式 |
84
+| 🚀  | 地区管理  | 展示省份、城市、区镇等城市信息,支持 IP 对应城市      |

+ 99 - 0
build/vite/index.ts

@@ -0,0 +1,99 @@
1
+import { resolve } from 'path'
2
+import Vue from '@vitejs/plugin-vue'
3
+import VueJsx from '@vitejs/plugin-vue-jsx'
4
+import progress from 'vite-plugin-progress'
5
+import EslintPlugin from 'vite-plugin-eslint'
6
+import PurgeIcons from 'vite-plugin-purge-icons'
7
+import { ViteEjsPlugin } from 'vite-plugin-ejs'
8
+// @ts-ignore
9
+import ElementPlus from 'unplugin-element-plus/vite'
10
+import AutoImport from 'unplugin-auto-import/vite'
11
+import Components from 'unplugin-vue-components/vite'
12
+import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
13
+import viteCompression from 'vite-plugin-compression'
14
+import topLevelAwait from 'vite-plugin-top-level-await'
15
+import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
16
+import { createSvgIconsPlugin } from 'vite-plugin-svg-icons-ng'
17
+import UnoCSS from 'unocss/vite'
18
+
19
+export function createVitePlugins() {
20
+  const root = process.cwd()
21
+
22
+  // 路径查找
23
+  function pathResolve(dir: string) {
24
+    return resolve(root, '.', dir)
25
+  }
26
+
27
+  return [
28
+    Vue(),
29
+    VueJsx(),
30
+    UnoCSS(),
31
+    progress(),
32
+    PurgeIcons(),
33
+    ElementPlus({}),
34
+    AutoImport({
35
+      include: [
36
+        /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
37
+        /\.vue$/,
38
+        /\.vue\?vue/, // .vue
39
+        /\.md$/ // .md
40
+      ],
41
+      imports: [
42
+        'vue',
43
+        'vue-router',
44
+        // 可额外添加需要 autoImport 的组件
45
+        {
46
+          '@/hooks/web/useI18n': ['useI18n'],
47
+          '@/hooks/web/useMessage': ['useMessage'],
48
+          '@/hooks/web/useTable': ['useTable'],
49
+          '@/hooks/web/useCrudSchemas': ['useCrudSchemas'],
50
+          '@/utils/formRules': ['required'],
51
+          '@/utils/dict': ['DICT_TYPE']
52
+        }
53
+      ],
54
+      dts: 'src/types/auto-imports.d.ts',
55
+      resolvers: [ElementPlusResolver()],
56
+      eslintrc: {
57
+        enabled: false, // Default `false`
58
+        filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
59
+        globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
60
+      }
61
+    }),
62
+    Components({
63
+      // 生成自定义 `auto-components.d.ts` 全局声明
64
+      dts: 'src/types/auto-components.d.ts',
65
+      // 自定义组件的解析器
66
+      resolvers: [ElementPlusResolver()],
67
+      globs: ["src/components/**/**.{vue, md}", '!src/components/DiyEditor/components/mobile/**']
68
+    }),
69
+    EslintPlugin({
70
+      cache: false,
71
+      include: ['src/**/*.vue', 'src/**/*.ts', 'src/**/*.tsx'] // 检查的文件
72
+    }),
73
+    VueI18nPlugin({
74
+      runtimeOnly: true,
75
+      compositionOnly: true,
76
+      include: [resolve(__dirname, 'src/locales/**')]
77
+    }),
78
+    createSvgIconsPlugin({
79
+      iconDirs: [pathResolve('src/assets/svgs')],
80
+      symbolId: 'icon-[dir]-[name]',
81
+    }),
82
+    viteCompression({
83
+      verbose: true, // 是否在控制台输出压缩结果
84
+      disable: false, // 是否禁用
85
+      threshold: 10240, // 体积大于 threshold 才会被压缩,单位 b
86
+      algorithm: 'gzip', // 压缩算法,可选 [ 'gzip' , 'brotliCompress' ,'deflate' , 'deflateRaw']
87
+      ext: '.gz', // 生成的压缩包后缀
88
+      deleteOriginFile: false //压缩后是否删除源文件
89
+    }),
90
+    ViteEjsPlugin(),
91
+    topLevelAwait({
92
+      // https://juejin.cn/post/7152191742513512485
93
+      // The export name of top-level await promise for each chunk module
94
+      promiseExportName: '__tla',
95
+      // The function to generate import names of top-level await promise in each chunk module
96
+      promiseImportName: (i) => `__tla_${i}`
97
+    })
98
+  ]
99
+}

+ 123 - 0
build/vite/optimize.ts

@@ -0,0 +1,123 @@
1
+const include = [
2
+  'qs',
3
+  'url',
4
+  'vue',
5
+  'sass',
6
+  'mitt',
7
+  'axios',
8
+  'pinia',
9
+  'dayjs',
10
+  'qrcode',
11
+  'unocss',
12
+  'vue-router',
13
+  'vue-types',
14
+  'vue-i18n',
15
+  'crypto-js',
16
+  'cropperjs',
17
+  'lodash-es',
18
+  'nprogress',
19
+  'web-storage-cache',
20
+  '@iconify/iconify',
21
+  '@vueuse/core',
22
+  '@zxcvbn-ts/core',
23
+  'echarts/core',
24
+  'echarts/charts',
25
+  'echarts/components',
26
+  'echarts/renderers',
27
+  'echarts-wordcloud',
28
+  '@wangeditor/editor',
29
+  '@wangeditor/editor-for-vue',
30
+  '@microsoft/fetch-event-source',
31
+  'markdown-it',
32
+  'markmap-view',
33
+  'markmap-lib',
34
+  'markmap-toolbar',
35
+  'highlight.js',
36
+  'element-plus',
37
+  'element-plus/es',
38
+  'element-plus/es/locale/lang/zh-cn',
39
+  'element-plus/es/locale/lang/en',
40
+  'element-plus/es/components/avatar/style/css',
41
+  'element-plus/es/components/space/style/css',
42
+  'element-plus/es/components/backtop/style/css',
43
+  'element-plus/es/components/form/style/css',
44
+  'element-plus/es/components/radio-group/style/css',
45
+  'element-plus/es/components/radio/style/css',
46
+  'element-plus/es/components/checkbox/style/css',
47
+  'element-plus/es/components/checkbox-group/style/css',
48
+  'element-plus/es/components/switch/style/css',
49
+  'element-plus/es/components/time-picker/style/css',
50
+  'element-plus/es/components/date-picker/style/css',
51
+  'element-plus/es/components/descriptions/style/css',
52
+  'element-plus/es/components/descriptions-item/style/css',
53
+  'element-plus/es/components/link/style/css',
54
+  'element-plus/es/components/tooltip/style/css',
55
+  'element-plus/es/components/drawer/style/css',
56
+  'element-plus/es/components/dialog/style/css',
57
+  'element-plus/es/components/checkbox-button/style/css',
58
+  'element-plus/es/components/option-group/style/css',
59
+  'element-plus/es/components/radio-button/style/css',
60
+  'element-plus/es/components/cascader/style/css',
61
+  'element-plus/es/components/color-picker/style/css',
62
+  'element-plus/es/components/input-number/style/css',
63
+  'element-plus/es/components/rate/style/css',
64
+  'element-plus/es/components/select-v2/style/css',
65
+  'element-plus/es/components/tree-select/style/css',
66
+  'element-plus/es/components/slider/style/css',
67
+  'element-plus/es/components/time-select/style/css',
68
+  'element-plus/es/components/autocomplete/style/css',
69
+  'element-plus/es/components/image-viewer/style/css',
70
+  'element-plus/es/components/upload/style/css',
71
+  'element-plus/es/components/col/style/css',
72
+  'element-plus/es/components/form-item/style/css',
73
+  'element-plus/es/components/alert/style/css',
74
+  'element-plus/es/components/breadcrumb/style/css',
75
+  'element-plus/es/components/select/style/css',
76
+  'element-plus/es/components/input/style/css',
77
+  'element-plus/es/components/breadcrumb-item/style/css',
78
+  'element-plus/es/components/tag/style/css',
79
+  'element-plus/es/components/pagination/style/css',
80
+  'element-plus/es/components/table/style/css',
81
+  'element-plus/es/components/table-v2/style/css',
82
+  'element-plus/es/components/table-column/style/css',
83
+  'element-plus/es/components/card/style/css',
84
+  'element-plus/es/components/row/style/css',
85
+  'element-plus/es/components/button/style/css',
86
+  'element-plus/es/components/menu/style/css',
87
+  'element-plus/es/components/sub-menu/style/css',
88
+  'element-plus/es/components/menu-item/style/css',
89
+  'element-plus/es/components/option/style/css',
90
+  'element-plus/es/components/dropdown/style/css',
91
+  'element-plus/es/components/dropdown-menu/style/css',
92
+  'element-plus/es/components/dropdown-item/style/css',
93
+  'element-plus/es/components/skeleton/style/css',
94
+  'element-plus/es/components/skeleton/style/css',
95
+  'element-plus/es/components/backtop/style/css',
96
+  'element-plus/es/components/menu/style/css',
97
+  'element-plus/es/components/sub-menu/style/css',
98
+  'element-plus/es/components/menu-item/style/css',
99
+  'element-plus/es/components/dropdown/style/css',
100
+  'element-plus/es/components/tree/style/css',
101
+  'element-plus/es/components/dropdown-menu/style/css',
102
+  'element-plus/es/components/dropdown-item/style/css',
103
+  'element-plus/es/components/badge/style/css',
104
+  'element-plus/es/components/breadcrumb/style/css',
105
+  'element-plus/es/components/breadcrumb-item/style/css',
106
+  'element-plus/es/components/image/style/css',
107
+  'element-plus/es/components/collapse-transition/style/css',
108
+  'element-plus/es/components/timeline/style/css',
109
+  'element-plus/es/components/timeline-item/style/css',
110
+  'element-plus/es/components/collapse/style/css',
111
+  'element-plus/es/components/collapse-item/style/css',
112
+  'element-plus/es/components/button-group/style/css',
113
+  'element-plus/es/components/text/style/css',
114
+  'element-plus/es/components/segmented/style/css',
115
+  '@element-plus/icons-vue',
116
+  'element-plus/es/components/footer/style/css',
117
+  'element-plus/es/components/empty/style/css',
118
+  'element-plus/es/components/mention/style/css'
119
+]
120
+
121
+const exclude = ['@iconify/json']
122
+
123
+export { include, exclude }

+ 151 - 0
index.html

@@ -0,0 +1,151 @@
1
+<!doctype html>
2
+<html lang="en">
3
+  <head>
4
+    <meta charset="UTF-8" />
5
+    <link rel="icon" href="/logo.png" />
6
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
7
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
+    <title>格莱默打印系统</title>
9
+    <!-- <link rel="stylesheet" media="print" href="/static/hiprint/css/print-lock.css" /> -->
10
+    <!-- 可以调整成 相对链接/自有链接, 【重要】名称需要一致 【print-lock.css】-->
11
+    <link rel="stylesheet" type="text/css" media="print" href="/print-lock.css" />
12
+    <!-- 引入hiprint-->
13
+    <!-- <script src="/static/hiprint/plugins/jq-3.31.js"></script>
14
+    <link rel="stylesheet" href="/static/hiprint/css/hiprint.css" />
15
+    <script src="/static/hiprint/hiprint.bundle.js"></script> -->
16
+  </head>
17
+  <body>
18
+    <div id="app">
19
+      <style>
20
+        .app-loading {
21
+          display: flex;
22
+          width: 100%;
23
+          height: 100%;
24
+          justify-content: center;
25
+          align-items: center;
26
+          flex-direction: column;
27
+          background: #f0f2f5;
28
+        }
29
+
30
+        .app-loading .app-loading-wrap {
31
+          position: absolute;
32
+          top: 50%;
33
+          left: 50%;
34
+          display: flex;
35
+          -webkit-transform: translate3d(-50%, -50%, 0);
36
+          transform: translate3d(-50%, -50%, 0);
37
+          justify-content: center;
38
+          align-items: center;
39
+          flex-direction: column;
40
+        }
41
+
42
+        .app-loading .app-loading-title {
43
+          margin-bottom: 30px;
44
+          font-size: 20px;
45
+          font-weight: bold;
46
+          text-align: center;
47
+        }
48
+
49
+        .app-loading .app-loading-logo {
50
+          width: 100px;
51
+          margin: 0 auto 15px auto;
52
+        }
53
+
54
+        .app-loading .app-loading-item {
55
+          position: relative;
56
+          display: inline-block;
57
+          width: 60px;
58
+          height: 60px;
59
+          vertical-align: middle;
60
+          border-radius: 50%;
61
+        }
62
+
63
+        .app-loading .app-loading-outter {
64
+          position: absolute;
65
+          width: 100%;
66
+          height: 100%;
67
+          border: 4px solid #2d8cf0;
68
+          border-bottom: 0;
69
+          border-left-color: transparent;
70
+          border-radius: 50%;
71
+          animation: loader-outter 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite;
72
+        }
73
+
74
+        .app-loading .app-loading-inner {
75
+          position: absolute;
76
+          top: calc(50% - 20px);
77
+          left: calc(50% - 20px);
78
+          width: 40px;
79
+          height: 40px;
80
+          border: 4px solid #87bdff;
81
+          border-right: 0;
82
+          border-top-color: transparent;
83
+          border-radius: 50%;
84
+          animation: loader-inner 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite;
85
+        }
86
+
87
+        @-webkit-keyframes loader-outter {
88
+          0% {
89
+            -webkit-transform: rotate(0deg);
90
+            transform: rotate(0deg);
91
+          }
92
+
93
+          100% {
94
+            -webkit-transform: rotate(360deg);
95
+            transform: rotate(360deg);
96
+          }
97
+        }
98
+
99
+        @keyframes loader-outter {
100
+          0% {
101
+            -webkit-transform: rotate(0deg);
102
+            transform: rotate(0deg);
103
+          }
104
+
105
+          100% {
106
+            -webkit-transform: rotate(360deg);
107
+            transform: rotate(360deg);
108
+          }
109
+        }
110
+
111
+        @-webkit-keyframes loader-inner {
112
+          0% {
113
+            -webkit-transform: rotate(0deg);
114
+            transform: rotate(0deg);
115
+          }
116
+
117
+          100% {
118
+            -webkit-transform: rotate(-360deg);
119
+            transform: rotate(-360deg);
120
+          }
121
+        }
122
+
123
+        @keyframes loader-inner {
124
+          0% {
125
+            -webkit-transform: rotate(0deg);
126
+            transform: rotate(0deg);
127
+          }
128
+
129
+          100% {
130
+            -webkit-transform: rotate(-360deg);
131
+            transform: rotate(-360deg);
132
+          }
133
+        }
134
+      </style>
135
+      <div class="app-loading">
136
+        <div class="app-loading-wrap">
137
+          <div class="app-loading-title">
138
+            <img src="/logo.png" class="app-loading-logo" alt="Logo" />
139
+            <div class="app-loading-title">格莱默打印系统</div>
140
+          </div>
141
+          <div class="app-loading-item">
142
+            <div class="app-loading-outter"></div>
143
+            <div class="app-loading-inner"></div>
144
+          </div>
145
+        </div>
146
+      </div>
147
+    </div>
148
+    <script type="module" src="/src/main.ts"></script>
149
+  </body>
150
+  <!-- <script src="https://lf-package-cn.feishucdn.com/obj/feishu-static/lark/passport/qrcode/LarkSSOSDKWebQRCode-1.0.3.js"></script> -->
151
+</html>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 18179 - 0
package-lock.json


+ 174 - 0
package.json

@@ -0,0 +1,174 @@
1
+{
2
+  "name": "jt-ui-admin-vue3",
3
+  "version": "2.6.0-snapshot",
4
+  "description": "基于vue3、vite4、element-plus、typesScript",
5
+  "author": "xingyu",
6
+  "private": false,
7
+  "scripts": {
8
+    "i": "pnpm install",
9
+    "dev": "vite --mode env.local",
10
+    "local": "vite --mode env.local",
11
+    "prod": "vite --mode env.prod",
12
+    "dev-server": "vite --mode dev",
13
+    "ts:check": "vue-tsc --noEmit",
14
+    "build:local": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build",
15
+    "build:dev": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode dev",
16
+    "build:test": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode test",
17
+    "build:stage": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode stage",
18
+    "build:prod": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode prod",
19
+    "serve:dev": "vite preview --mode dev",
20
+    "serve:prod": "vite preview --mode prod",
21
+    "preview": "pnpm build:local && vite preview",
22
+    "clean": "npx rimraf node_modules",
23
+    "clean:cache": "npx rimraf node_modules/.cache",
24
+    "lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
25
+    "lint:format": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
26
+    "lint:style": "stylelint --fix \"./src/**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
27
+    "lint:lint-staged": "lint-staged -c ",
28
+    "postinstall": "patch-package"
29
+  },
30
+  "dependencies": {
31
+    "@element-plus/icons-vue": "^2.1.0",
32
+    "@form-create/designer": "^3.2.6",
33
+    "@form-create/element-ui": "^3.2.11",
34
+    "@form-create/vant": "^3.2.30",
35
+    "@form-create/vant-designer": "^3.3.1",
36
+    "@iconify/iconify": "^3.1.1",
37
+    "@microsoft/fetch-event-source": "^2.0.1",
38
+    "@sv-print/hiprint": "^0.3.24",
39
+    "@sv-print/plugin-api-image": "^0.2.2",
40
+    "@sv-print/plugin-api-pdf3": "^0.2.2",
41
+    "@sv-print/plugin-ele-bwip-js": "file:plugin-ele-bwip-js",
42
+    "@sv-print/plugin-text-auto": "file:plugin-text-auto",
43
+    "@sv-print/vue3": "^0.2.3",
44
+    "@videojs-player/vue": "^1.0.0",
45
+    "@vueuse/core": "^10.9.0",
46
+    "@wangeditor/editor": "^5.1.23",
47
+    "@wangeditor/editor-for-vue": "^5.1.10",
48
+    "@zxcvbn-ts/core": "^3.0.4",
49
+    "animate.css": "^4.1.1",
50
+    "axios": "1.9.0",
51
+    "benz-amr-recorder": "^1.1.5",
52
+    "bpmn-js-token-simulation": "^0.36.0",
53
+    "camunda-bpmn-moddle": "^7.0.1",
54
+    "cropperjs": "^1.6.1",
55
+    "crypto-js": "^4.2.0",
56
+    "dayjs": "^1.11.10",
57
+    "diagram-js": "^12.8.0",
58
+    "driver.js": "^1.3.1",
59
+    "echarts": "^5.5.0",
60
+    "echarts-wordcloud": "^2.1.0",
61
+    "element-plus": "2.9.1",
62
+    "fast-xml-parser": "^4.3.2",
63
+    "highlight.js": "^11.9.0",
64
+    "jsencrypt": "^3.3.2",
65
+    "lodash-es": "^4.17.21",
66
+    "markdown-it": "^14.1.0",
67
+    "markmap-common": "^0.16.0",
68
+    "markmap-lib": "^0.16.1",
69
+    "markmap-toolbar": "^0.17.0",
70
+    "markmap-view": "^0.16.0",
71
+    "min-dash": "^4.1.1",
72
+    "mitt": "^3.0.1",
73
+    "nprogress": "^0.2.0",
74
+    "pdfjs-dist": "^2.9.359",
75
+    "pinia": "^2.1.7",
76
+    "pinia-plugin-persistedstate": "^3.2.1",
77
+    "pnpm": "^10.30.3",
78
+    "qrcode": "^1.5.3",
79
+    "qs": "^6.12.0",
80
+    "socket.io-client": "^4.8.3",
81
+    "sortablejs": "^1.15.3",
82
+    "steady-xml": "^0.1.0",
83
+    "sv-print": "^0.2.17",
84
+    "url": "^0.11.3",
85
+    "v3-jsoneditor": "^0.0.6",
86
+    "vant": "^4.9.21",
87
+    "video.js": "^7.21.5",
88
+    "vue": "3.5.12",
89
+    "vue-dompurify-html": "^4.1.4",
90
+    "vue-i18n": "9.10.2",
91
+    "vue-plugin-hiprint": "0.0.60",
92
+    "vue-router": "4.4.5",
93
+    "vue-types": "^5.1.1",
94
+    "vue3-signature": "^0.2.4",
95
+    "vuedraggable": "^4.1.0",
96
+    "web-storage-cache": "^1.1.1",
97
+    "xml-js": "^1.6.11"
98
+  },
99
+  "devDependencies": {
100
+    "@commitlint/cli": "^19.0.1",
101
+    "@commitlint/config-conventional": "^19.0.0",
102
+    "@iconify/json": "^2.2.187",
103
+    "@intlify/unplugin-vue-i18n": "^2.0.0",
104
+    "@purge-icons/generated": "^0.9.0",
105
+    "@types/lodash-es": "^4.17.12",
106
+    "@types/node": "^20.11.21",
107
+    "@types/nprogress": "^0.2.3",
108
+    "@types/qrcode": "^1.5.5",
109
+    "@types/qs": "^6.9.12",
110
+    "@typescript-eslint/eslint-plugin": "^7.1.0",
111
+    "@typescript-eslint/parser": "^7.1.0",
112
+    "@unocss/eslint-config": "^0.57.4",
113
+    "@unocss/eslint-plugin": "66.1.0-beta.5",
114
+    "@unocss/transformer-variant-group": "^0.58.5",
115
+    "@vitejs/plugin-legacy": "^5.3.1",
116
+    "@vitejs/plugin-vue": "^5.0.4",
117
+    "@vitejs/plugin-vue-jsx": "^3.1.0",
118
+    "autoprefixer": "^10.4.17",
119
+    "bpmn-js": "^17.9.2",
120
+    "bpmn-js-properties-panel": "5.23.0",
121
+    "consola": "^3.2.3",
122
+    "eslint": "^8.57.0",
123
+    "eslint-config-prettier": "^9.1.0",
124
+    "eslint-define-config": "^2.1.0",
125
+    "eslint-plugin-prettier": "^5.1.3",
126
+    "eslint-plugin-vue": "^9.22.0",
127
+    "less": "^4.4.1",
128
+    "lint-staged": "^15.2.2",
129
+    "patch-package": "^8.0.1",
130
+    "postcss": "^8.4.35",
131
+    "postcss-html": "^1.6.0",
132
+    "postcss-scss": "^4.0.9",
133
+    "prettier": "^3.2.5",
134
+    "prettier-eslint": "^16.3.0",
135
+    "rimraf": "^5.0.5",
136
+    "rollup": "^4.12.0",
137
+    "sass": "^1.69.5",
138
+    "stylelint": "^16.2.1",
139
+    "stylelint-config-html": "^1.1.0",
140
+    "stylelint-config-recommended": "^14.0.0",
141
+    "stylelint-config-standard": "^36.0.0",
142
+    "stylelint-order": "^6.0.4",
143
+    "terser": "^5.28.1",
144
+    "typescript": "5.3.3",
145
+    "unocss": "^0.58.5",
146
+    "unplugin-auto-import": "^0.16.7",
147
+    "unplugin-element-plus": "^0.8.0",
148
+    "unplugin-vue-components": "^0.25.2",
149
+    "vite": "5.1.4",
150
+    "vite-plugin-compression": "^0.5.1",
151
+    "vite-plugin-ejs": "^1.7.0",
152
+    "vite-plugin-eslint": "^1.8.1",
153
+    "vite-plugin-progress": "^0.0.7",
154
+    "vite-plugin-purge-icons": "^0.10.0",
155
+    "vite-plugin-svg-icons-ng": "^1.3.1",
156
+    "vite-plugin-top-level-await": "^1.4.4",
157
+    "vue-eslint-parser": "^9.3.2",
158
+    "vue-tsc": "^1.8.27"
159
+  },
160
+  "license": "MIT",
161
+  "repository": {
162
+    "type": "git",
163
+    "url": "git+https://gitee.com/jtcode/jt-ui-admin-vue3"
164
+  },
165
+  "bugs": {
166
+    "url": "https://gitee.com/jtcode/jt-ui-admin-vue3/issues"
167
+  },
168
+  "homepage": "https://gitee.com/jtcode/jt-ui-admin-vue3",
169
+  "web-types": "./web-types.json",
170
+  "engines": {
171
+    "node": ">= 16.0.0",
172
+    "pnpm": ">=8.6.0"
173
+  }
174
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 13 - 0
patches/@sv-print+hiprint+0.3.22.patch


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 21 - 0
patches/@sv-print+hiprint+0.3.24.patch


+ 41 - 0
plugin-ele-bwip-js/package.json

@@ -0,0 +1,41 @@
1
+{
2
+  "name": "@sv-print/plugin-ele-bwip-js",
3
+  "version": "0.1.18",
4
+  "description": "",
5
+  "type": "module",
6
+  "main": "./dist/index.js",
7
+  "svelte": "./dist/index.mjs",
8
+  "jsdelivr": "./dist/index.umd.js",
9
+  "unpkg": "./dist/index.umd.js",
10
+  "module": "./dist/index.mjs",
11
+  "types": "./dist/index.d.ts",
12
+  "exports": {
13
+    ".": {
14
+      "types": "./dist/index.d.ts",
15
+      "import": "./dist/index.mjs",
16
+      "require": "./dist/index.umd.js"
17
+    }
18
+  },
19
+  "files": [
20
+    "dist"
21
+  ],
22
+  "scripts": {
23
+    "build": "vite build && api-extractor run",
24
+    "build-browserify": "vite build --mode=browserify && api-extractor run",
25
+    "pub": "pnpm build && npm --registry https://registry.npmjs.org/ publish --access public",
26
+    "pub-beta": "pnpm build && pnpm --registry https://registry.npmjs.org/ publish --access public --tag beta"
27
+  },
28
+  "keywords": [
29
+    "sv-print",
30
+    "hiprint"
31
+  ],
32
+  "author": "",
33
+  "license": "MIT",
34
+  "devDependencies": {
35
+    "sv-print": "^0.1.8"
36
+  },
37
+  "dependencies": {
38
+    "bwip-js": "^4.3.2",
39
+    "vite": "^6.4.1"
40
+  }
41
+}

+ 38 - 0
plugin-text-auto/package.json

@@ -0,0 +1,38 @@
1
+{
2
+  "name": "@sv-print/plugin-text-auto",
3
+  "version": "0.1.5",
4
+  "description": "",
5
+  "type": "module",
6
+  "main": "./dist/index.js",
7
+  "svelte": "./dist/index.mjs",
8
+  "jsdelivr": "./dist/index.umd.js",
9
+  "unpkg": "./dist/index.umd.js",
10
+  "module": "./dist/index.mjs",
11
+  "types": "./dist/index.d.ts",
12
+  "exports": {
13
+    ".": {
14
+      "types": "./dist/index.d.ts",
15
+      "import": "./dist/index.mjs",
16
+      "require": "./dist/index.umd.js"
17
+    }
18
+  },
19
+  "files": [
20
+    "dist"
21
+  ],
22
+  "scripts": {
23
+    "build": "vite build && tsc src/index.ts --declaration --emitDeclarationOnly --outDir dist",
24
+    "build-browserify": "vite build --mode=browserify",
25
+    "pub": "pnpm build && npm --registry https://registry.npmjs.org/ publish --access public",
26
+    "pub-beta": "pnpm build && npm --registry https://registry.npmjs.org/ publish --access public --tag beta"
27
+  },
28
+  "keywords": [
29
+    "sv-print",
30
+    "hiprint"
31
+  ],
32
+  "author": "",
33
+  "license": "MIT",
34
+  "dependencies": {
35
+    "sv-print": "^0.1.28",
36
+    "vite": "^6.4.1"
37
+  }
38
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 12313 - 0
pnpm-lock.yaml


+ 5 - 0
postcss.config.js

@@ -0,0 +1,5 @@
1
+module.exports = {
2
+  plugins: {
3
+    autoprefixer: {}
4
+  }
5
+}

+ 22 - 0
prettier.config.js

@@ -0,0 +1,22 @@
1
+module.exports = {
2
+  printWidth: 100, // 每行代码长度(默认80)
3
+  tabWidth: 2, // 每个tab相当于多少个空格(默认2)ab进行缩进(默认false)
4
+  useTabs: false, // 是否使用tab
5
+  semi: false, // 声明结尾使用分号(默认true)
6
+  vueIndentScriptAndStyle: false,
7
+  singleQuote: true, // 使用单引号(默认false)
8
+  quoteProps: 'as-needed',
9
+  bracketSpacing: true, // 对象字面量的大括号间使用空格(默认true)
10
+  trailingComma: 'none', // 多行使用拖尾逗号(默认none)
11
+  jsxSingleQuote: false,
12
+  // 箭头函数参数括号 默认avoid 可选 avoid| always
13
+  // avoid 能省略括号的时候就省略 例如x => x
14
+  // always 总是有括号
15
+  arrowParens: 'always',
16
+  insertPragma: false,
17
+  requirePragma: false,
18
+  proseWrap: 'never',
19
+  htmlWhitespaceSensitivity: 'strict',
20
+  endOfLine: 'auto',
21
+  rangeStart: 0
22
+}

BIN
public/favicon.ico


BIN
public/font/AGENCYB.TTF


BIN
public/font/AGENCYR.TTF


BIN
public/font/ALGER.TTF


BIN
public/font/ArialNarrowBold_zitidi.com.ttf


BIN
public/font/Arial_zitidi.com.ttf


BIN
public/font/Chroma ST Regular_zitidi.com.ttf


BIN
public/font/GODEX.TTF


BIN
public/font/League Spartan Bold_zitidi.com.otf


BIN
public/logo.gif


BIN
public/logo.png


BIN
public/logo.webp


BIN
public/logo1.png


+ 345 - 0
public/print-lock.css

@@ -0,0 +1,345 @@
1
+@media print {
2
+  body {
3
+    margin: 0px;
4
+    padding: 0px;
5
+  }
6
+}
7
+
8
+@page {
9
+  margin: 0;
10
+}
11
+
12
+.hiprint-printPaper * {
13
+  box-sizing: border-box;
14
+  image-rendering: -webkit-optimize-contrast; /* 让图片/标尺稍微清楚一点 */
15
+}
16
+
17
+.hiprint-printPaper *:focus {
18
+  outline: 0;
19
+}
20
+
21
+.hiprint-page-break-avoid {
22
+  page-break-after: avoid;
23
+}
24
+.hiprint-printPaper {
25
+  position: relative;
26
+  padding: 0 0 0 0;
27
+  page-break-after: always;
28
+  -webkit-user-select: none; /* Chrome/Safari/Opera */
29
+  -moz-user-select: none; /* Firefox */
30
+  user-select: none;
31
+  overflow-x: hidden;
32
+  overflow: hidden;
33
+}
34
+.hiprint-printPaper .hiprint-printPaper-background {
35
+  position: absolute;
36
+  pointer-events: none;
37
+  z-index: 0;
38
+  left: 0;
39
+  top: 0;
40
+}
41
+.hiprint-printPaper .hiprint-printPaper-content {
42
+  position: relative;
43
+}
44
+.hiprint-printPaper.design {
45
+  overflow: visible;
46
+}
47
+
48
+.hiprint-printTemplate .hiprint-printPanel {
49
+  page-break-after: always;
50
+}
51
+
52
+.hiprint-printPaper,
53
+hiprint-printPanel {
54
+  box-sizing: border-box;
55
+  border: 0px;
56
+}
57
+
58
+.hiprint-printPanel .hiprint-printPaper:last-child {
59
+  page-break-after: avoid;
60
+}
61
+
62
+.hiprint-printTemplate .hiprint-printPanel:last-child {
63
+  page-break-after: avoid;
64
+}
65
+
66
+.hiprint-printPaper .hideheaderLinetarget {
67
+  border-top: 0px dashed rgb(201, 190, 190) !important;
68
+}
69
+
70
+.hiprint-printPaper .hidefooterLinetarget {
71
+  border-top: 0px dashed rgb(201, 190, 190) !important;
72
+}
73
+
74
+.hiprint-printPaper.design {
75
+  border: 1px dashed rgba(170, 170, 170, 0.7);
76
+}
77
+
78
+.design .hiprint-printElement-table-content,
79
+.design .hiprint-printElement-longText-content {
80
+  overflow: hidden;
81
+  box-sizing: border-box;
82
+}
83
+
84
+.design .resize-panel {
85
+  box-sizing: border-box;
86
+  border: 1px dotted;
87
+}
88
+
89
+.hiprint-printElement-text {
90
+  background-color: transparent;
91
+  background-repeat: repeat;
92
+  padding: 0 0 0 0;
93
+  border: 0.75pt none rgb(0, 0, 0);
94
+  direction: ltr;
95
+  font-family: "SimSun";
96
+  font-size: 9pt;
97
+  font-style: normal;
98
+  font-weight: normal;
99
+  padding-bottom: 0pt;
100
+  padding-left: 0pt;
101
+  padding-right: 0pt;
102
+  padding-top: 0pt;
103
+  text-align: left;
104
+  text-decoration: none;
105
+  line-height: 9.75pt;
106
+  box-sizing: border-box;
107
+  word-wrap: break-word;
108
+  word-break: keep-all;
109
+  /* word-break: break-all; */
110
+}
111
+
112
+.design .hiprint-printElement-text-content {
113
+  border: 1px dashed rgb(206, 188, 188);
114
+  box-sizing: border-box;
115
+}
116
+
117
+.hiprint-printElement-longText {
118
+  background-color: transparent;
119
+  background-repeat: repeat;
120
+  border: 0.75pt none rgb(0, 0, 0);
121
+  direction: ltr;
122
+  font-family: "SimSun";
123
+  font-size: 9pt;
124
+  font-style: normal;
125
+  font-weight: normal;
126
+  padding-bottom: 0pt;
127
+  padding-left: 0pt;
128
+  padding-right: 0pt;
129
+  padding-top: 0pt;
130
+  text-align: left;
131
+  text-decoration: none;
132
+  line-height: 9.75pt;
133
+  box-sizing: border-box;
134
+  word-wrap: break-word;
135
+  /* word-break: break-all; */
136
+  word-break: keep-all;
137
+  /*white-space: pre-wrap*/
138
+}
139
+
140
+.hiprint-printElement-table {
141
+  background-color: transparent;
142
+  background-repeat: repeat;
143
+  color: rgb(0, 0, 0);
144
+  border-color: rgb(0, 0, 0);
145
+  border-style: none;
146
+  direction: ltr;
147
+  font-family: "SimSun";
148
+  font-size: 9pt;
149
+  font-style: normal;
150
+  font-weight: normal;
151
+  padding-bottom: 0pt;
152
+  padding-left: 0pt;
153
+  padding-right: 0pt;
154
+  padding-top: 0pt;
155
+  text-align: left;
156
+  text-decoration: none;
157
+  padding: 0 0 0 0;
158
+  box-sizing: border-box;
159
+  line-height: 9.75pt;
160
+}
161
+
162
+.hiprint-printElement-table thead {
163
+  background: #e8e8e8;
164
+  font-weight: 700;
165
+}
166
+
167
+table.hiprint-printElement-tableTarget {
168
+  width: 100%;
169
+}
170
+
171
+.hiprint-printElement-tableTarget,
172
+.hiprint-printElement-tableTarget tr,
173
+.hiprint-printElement-tableTarget td {
174
+  border-color: rgb(0, 0, 0);
175
+  /* border-style: none; */
176
+  /*border: 1px solid rgb(0,0,0);*/
177
+  font-weight: normal;
178
+  direction: ltr;
179
+  padding-bottom: 0pt;
180
+  padding-left: 4pt;
181
+  padding-right: 4pt;
182
+  padding-top: 0pt;
183
+  text-decoration: none;
184
+  vertical-align: middle;
185
+  box-sizing: border-box;
186
+  word-wrap: break-word;
187
+  word-break: break-all;
188
+  /*line-height: 9.75pt;
189
+    font-size: 9pt;*/
190
+}
191
+
192
+.hiprint-printElement-tableTarget-border-all {
193
+  border: 1px solid;
194
+}
195
+.hiprint-printElement-tableTarget-border-none {
196
+  border: 0px solid;
197
+}
198
+.hiprint-printElement-tableTarget-border-lr {
199
+  border-left: 1px solid;
200
+  border-right: 1px solid;
201
+}
202
+.hiprint-printElement-tableTarget-border-left {
203
+  border-left: 1px solid;
204
+}
205
+.hiprint-printElement-tableTarget-border-right {
206
+  border-right: 1px solid;
207
+}
208
+.hiprint-printElement-tableTarget-border-tb {
209
+  border-top: 1px solid;
210
+  border-bottom: 1px solid;
211
+}
212
+.hiprint-printElement-tableTarget-border-top {
213
+  border-top: 1px solid;
214
+}
215
+.hiprint-printElement-tableTarget-border-bottom {
216
+  border-bottom: 1px solid;
217
+}
218
+
219
+.hiprint-printElement-tableTarget-border-td-none td {
220
+  border: 0px solid;
221
+}
222
+.hiprint-printElement-tableTarget-border-td-all td:not(:nth-last-child(-n + 2)) {
223
+  border-right: 1px solid;
224
+}
225
+.hiprint-printElement-tableTarget-border-td-all td:not(last-child) {
226
+  border-right: 1px solid;
227
+}
228
+.hiprint-printElement-tableTarget-border-td-all td:last-child {
229
+  border-left: 1px solid;
230
+}
231
+.hiprint-printElement-tableTarget-border-td-all td:last-child:first-child {
232
+  border-left: none;
233
+}
234
+
235
+/*.hiprint-printElement-tableTarget tr,*/
236
+.hiprint-printElement-tableTarget td {
237
+  height: 18pt;
238
+}
239
+
240
+.hiprint-printPaper .hiprint-paperNumber {
241
+  font-size: 9pt;
242
+}
243
+
244
+.hiprint-printPaper .hiprint-paperNumber-disabled {
245
+  float: right !important;
246
+  right: 0 !important;
247
+  color: gainsboro !important;
248
+}
249
+
250
+.hiprint-printElement-vline,
251
+.hiprint-printElement-hline {
252
+  border: 0px none rgb(0, 0, 0);
253
+}
254
+.hiprint-printElement-vline {
255
+  border-left: 0.75pt solid #000;
256
+  border-right: 0px none rgb(0, 0, 0) !important;
257
+  border-bottom: 0px none rgb(0, 0, 0) !important;
258
+  border-top: 0px none rgb(0, 0, 0) !important;
259
+}
260
+
261
+.hiprint-printElement-hline {
262
+  border-top: 0.75pt solid #000;
263
+  border-right: 0px none rgb(0, 0, 0) !important;
264
+  border-bottom: 0px none rgb(0, 0, 0) !important;
265
+  border-left: 0px none rgb(0, 0, 0) !important;
266
+}
267
+
268
+.hiprint-printElement-oval,
269
+.hiprint-printElement-rect {
270
+  border: 0.75pt solid #000;
271
+}
272
+
273
+.hiprint-text-content-middle {
274
+}
275
+.hiprint-text-content-middle > div:first-child {
276
+  display: grid;
277
+  align-items: center;
278
+}
279
+
280
+.hiprint-text-content-bottom {
281
+}
282
+
283
+.hiprint-text-content-bottom > div:first-child {
284
+  display: grid;
285
+  align-items: flex-end;
286
+}
287
+
288
+.hiprint-text-content-wrap {
289
+}
290
+
291
+.hiprint-text-content-wrap .hiprint-text-content-wrap-nowrap {
292
+  white-space: nowrap;
293
+}
294
+
295
+.hiprint-text-content-wrap .hiprint-text-content-wrap-clip {
296
+  white-space: nowrap;
297
+  overflow: hidden;
298
+  text-overflow: clip;
299
+}
300
+
301
+.hiprint-text-content-wrap .hiprint-text-content-wrap-ellipsis {
302
+  white-space: nowrap;
303
+  overflow: hidden;
304
+  text-overflow: ellipsis;
305
+}
306
+
307
+/*hi-grid-row */
308
+.hi-grid-row {
309
+  position: relative;
310
+  height: auto;
311
+  margin-right: 0;
312
+  margin-left: 0;
313
+  zoom: 1;
314
+  display: block;
315
+  box-sizing: border-box;
316
+}
317
+
318
+.hi-grid-row::after,
319
+.hi-grid-row::before {
320
+  display: table;
321
+  content: "";
322
+  box-sizing: border-box;
323
+}
324
+
325
+.hi-grid-col {
326
+  display: block;
327
+  box-sizing: border-box;
328
+  position: relative;
329
+  float: left;
330
+  flex: 0 0 auto;
331
+}
332
+
333
+.table-grid-row {
334
+  margin-left: -0pt;
335
+  margin-right: -0pt;
336
+}
337
+
338
+.tableGridColumnsGutterRow {
339
+  padding-left: 0pt;
340
+  padding-right: 0pt;
341
+}
342
+.hiprint-gridColumnsFooter {
343
+  text-align: left;
344
+  clear: both;
345
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 7566 - 0
public/static/hiprint.bundle.js


+ 814 - 0
public/static/hiprint.css

@@ -0,0 +1,814 @@
1
+
2
+
3
+/* hiprint-pagination */
4
+.hiprint-pagination {
5
+    display: inline-block;
6
+    padding-left: 0;
7
+}
8
+
9
+    .hiprint-pagination > li {
10
+        border: 1px solid #bdc3c7;
11
+        -moz-border-radius: 2px;
12
+        -webkit-border-radius: 2px;
13
+        display: block;
14
+        float: left;
15
+        padding: 5px;
16
+        text-decoration: none;
17
+        margin-right: 5px;
18
+        margin-bottom: 5px;
19
+        font-family: helvetica;
20
+        font-size: 13px;
21
+        cursor: pointer
22
+    }
23
+.hiprint-pagination > li > span {
24
+    padding: 0 10px 0 10px;
25
+}
26
+
27
+.hiprint-pagination > li > a {
28
+    color: #bdc3c7;
29
+    font-weight: bold;
30
+    text-decoration: none;
31
+    font-size: 11px;
32
+    padding: 3px;
33
+}
34
+
35
+    .hiprint-pagination > li > a:hover {
36
+        color: red;
37
+    }
38
+
39
+
40
+
41
+.hiprint-pagination-sm > li > a {
42
+    padding: 5px 10px;
43
+    font-size: 12px;
44
+    line-height: 1.5;
45
+}
46
+/*rect-printElement-type hiprint-printElement-type */
47
+.rect-printElement-types .hiprint-printElement-type {
48
+  display: block;
49
+}
50
+
51
+.rect-printElement-types .hiprint-printElement-type {
52
+  padding: 0 0 0 0;
53
+  list-style: none;
54
+}
55
+
56
+  .rect-printElement-types .hiprint-printElement-type > li > .title {
57
+      display: block;
58
+      padding: 4px 0px;
59
+      clear: both;
60
+  }
61
+
62
+  .rect-printElement-types .hiprint-printElement-type > li > ul {
63
+      padding: 0 0 0 0;
64
+      display: block;
65
+      list-style: none;
66
+  }
67
+
68
+      .rect-printElement-types .hiprint-printElement-type > li > ul > li {
69
+          display: block;
70
+          width: 50%;
71
+          float: left;
72
+          max-width: 100px;
73
+      }
74
+
75
+          .rect-printElement-types .hiprint-printElement-type > li > ul > li > a {
76
+              height: 92px;
77
+              padding: 12px 6px;
78
+              margin-left: -1px;
79
+              line-height: 1.42857143;
80
+              color: #337ab7;
81
+              text-decoration: none;
82
+              background-color: #fff;
83
+              border: 1px solid #ddd;
84
+              margin-right: 5px;
85
+              width: 95%;
86
+              max-width: 100px;
87
+              display: inline-block;
88
+              text-align: center;
89
+              margin-bottom: 7px;
90
+              box-sizing: border-box;
91
+              color: #b9a5a6;
92
+              border: 1px solid rgba(0,0,0,0.2);
93
+              border-radius: 3px;
94
+              box-shadow: 0 1px 0 0 rgba(0,0,0,0.15);
95
+          }
96
+
97
+
98
+/*small-printElement-type hiprint-printElement-type */
99
+
100
+/*.hiprint-printElement :focus {
101
+    outline: none;
102
+}*/
103
+
104
+.small-printElement-types .hiprint-printElement-type {
105
+    display: block;
106
+}
107
+
108
+.small-printElement-types .hiprint-printElement-type {
109
+  padding: 0 0 0 0;
110
+  list-style: none;
111
+}
112
+
113
+  .small-printElement-types .hiprint-printElement-type > li > .title {
114
+      display: block;
115
+      padding: 4px 0px;
116
+      clear: both;
117
+  }
118
+
119
+  .small-printElement-types .hiprint-printElement-type > li > ul {
120
+      padding: 0 0 0 0;
121
+      display: block;
122
+      list-style: none;
123
+      width: 100%;
124
+  }
125
+
126
+      .small-printElement-types .hiprint-printElement-type > li > ul > li {
127
+          display: block;
128
+          width: 50%;
129
+          float: left;
130
+          padding: 0 4px;
131
+      }
132
+
133
+          .small-printElement-types .hiprint-printElement-type > li > ul > li > a {
134
+              height: 22px;
135
+              /* padding: 12px 6px; */
136
+              /* margin-left: -1px; */
137
+              line-height: 20px;
138
+              color: #337ab7;
139
+              text-decoration: none;
140
+              background-color: #fff;
141
+              border: 1px solid #ddd;
142
+              margin-right: 5px;
143
+              width: 100%;
144
+              display: block;
145
+              text-align: center;
146
+              margin-bottom: 7px;
147
+              box-sizing: border-box;
148
+              color: #b9a5a6;
149
+              border: 1px solid rgba(0,0,0,0.2);
150
+              border-radius: 3px;
151
+              box-shadow: 0 1px 0 0 rgba(0,0,0,0.15);
152
+          }
153
+
154
+
155
+/* hiprint-toolbar*/
156
+
157
+.hiprint-toolbar {
158
+}
159
+
160
+  .hiprint-toolbar > ul {
161
+      padding: 0px;
162
+      margin-bottom: 5px;
163
+  }
164
+
165
+      .hiprint-toolbar > ul > li {
166
+          display: inline-block;
167
+      }
168
+
169
+          .hiprint-toolbar > ul > li > a {
170
+              position: relative;
171
+              float: left;
172
+              padding: 3px 10px;
173
+              margin-left: -1px;
174
+              line-height: 1.42857143;
175
+              color: #337ab7;
176
+              text-decoration: none;
177
+              background-color: #fff;
178
+              border: 1px solid #ddd;
179
+              margin-right: 4px;
180
+              cursor: pointer;
181
+          }
182
+
183
+
184
+.hiprint-printElement-type .glyphicon-class {
185
+  display: block;
186
+  text-align: center;
187
+  word-wrap: break-word;
188
+  /*font-size: 0.65rem;
189
+font-weight: normal;*/
190
+  font-family: Helvetica, sans-serif;
191
+}
192
+
193
+.hiprint-printElement-type .glyphicon {
194
+  margin-top: 5px;
195
+  margin-bottom: 10px;
196
+  font-size: 37px;
197
+}
198
+
199
+
200
+/*
201
+
202
+
203
+*/
204
+
205
+/*option css*/
206
+/*option css*/
207
+.hiprint-option-items {
208
+  font-size: .75rem;
209
+  padding: 10px 5px;
210
+  display: flex;
211
+  flex-wrap: wrap;
212
+  align-items: flex-end;
213
+  box-sizing: border-box;
214
+  width: 100%;
215
+}
216
+
217
+  .hiprint-option-items .hiprint-option-item {
218
+      box-sizing: border-box;
219
+      float: left;
220
+      width: 50%;
221
+      margin-bottom: 5px;
222
+      padding: 0 5px;
223
+      font-size:14px;
224
+  }
225
+
226
+  .hiprint-option-items .hiprint-option-item-row {
227
+      width: 100%;
228
+  }
229
+
230
+.hiprint-option-item-label {
231
+  margin: 5px 5px 3px 0;
232
+}
233
+
234
+.hiprint-option-items .hiprint-option-item-field input, .hiprint-option-items .hiprint-option-item-field select, .hiprint-option-items .hiprint-option-item-field textarea {
235
+  color: inherit;
236
+  background-color: transparent;
237
+  box-sizing: border-box;
238
+  width: 100%;
239
+  position: relative;
240
+  padding: 3px;
241
+  z-index: 1;
242
+  border: 1px solid rgb(169, 169, 169);
243
+  height: 19pt;
244
+}
245
+
246
+.hiprint-option-item-settingBtn {
247
+    height: 19pt;
248
+    line-height: 19pt;
249
+    font-size: 12px;
250
+    padding: 0 24px;
251
+    background: #00c1de;
252
+    border-color: transparent;
253
+    color: #fff;
254
+    display: inline-block;
255
+    margin: 5px;
256
+    font-weight: 400;
257
+    border: 1px solid transparent;
258
+    font-family: PingFangSC, helvetica neue, hiragino sans gb, arial, microsoft yahei ui, microsoft yahei, simsun, "sans-serif";
259
+    vertical-align: middle;
260
+    transition: .3s cubic-bezier(.4, 0, .2, 1);
261
+    transform: translateZ(0);
262
+}
263
+.hiprint-option-item-deleteBtn {
264
+    background:red;
265
+}
266
+
267
+.hiprint-option-items .minicolors {
268
+    position: relative;
269
+}
270
+
271
+.hiprint-option-items .minicolors-sprite {
272
+  background-image: url(./image/jquery.minicolors.png);
273
+}
274
+
275
+.hiprint-option-items .minicolors-swatch {
276
+  position: absolute;
277
+  vertical-align: middle;
278
+  background-position: -80px 0;
279
+  cursor: text;
280
+  padding: 0;
281
+  margin: 0;
282
+  display: inline-block;
283
+}
284
+
285
+.hiprint-option-items .minicolors-swatch-color {
286
+  position: absolute;
287
+  top: 0;
288
+  left: 0;
289
+  right: 0;
290
+  bottom: 0;
291
+}
292
+
293
+.hiprint-option-items .minicolors input[type=hidden] + .minicolors-swatch {
294
+  width: 28px;
295
+  position: static;
296
+  cursor: pointer;
297
+}
298
+
299
+.hiprint-option-items .minicolors input[type=hidden][disabled] + .minicolors-swatch {
300
+  cursor: default;
301
+}
302
+
303
+/* Panel */
304
+.hiprint-option-items .minicolors-panel {
305
+  position: absolute;
306
+  width: 173px;
307
+  background: white;
308
+  border: solid 1px #CCC;
309
+  box-shadow: 0 0 20px rgba(0, 0, 0, .2);
310
+  z-index: 99999;
311
+  box-sizing: content-box;
312
+  display: none;
313
+}
314
+
315
+  .hiprint-option-items .minicolors-panel.minicolors-visible {
316
+      display: block;
317
+  }
318
+
319
+/* Panel positioning */
320
+.hiprint-option-items .minicolors-position-top .minicolors-panel {
321
+  top: -154px;
322
+}
323
+
324
+.hiprint-option-items .minicolors-position-right .minicolors-panel {
325
+  right: 0;
326
+}
327
+
328
+.hiprint-option-items .minicolors-position-bottom .minicolors-panel {
329
+  top: auto;
330
+}
331
+
332
+.hiprint-option-items .minicolors-position-left .minicolors-panel {
333
+  left: 0;
334
+}
335
+
336
+.hiprint-option-items .minicolors-with-opacity .minicolors-panel {
337
+  width: 194px;
338
+}
339
+
340
+.hiprint-option-items .minicolors .minicolors-grid {
341
+  position: relative;
342
+  top: 1px;
343
+  left: 1px; /* LTR */
344
+  width: 150px;
345
+  height: 150px;
346
+  margin-bottom: 2px;
347
+  background-position: -120px 0;
348
+  cursor: crosshair;
349
+}
350
+
351
+.hiprint-option-items .minicolors .minicolors-grid-inner {
352
+  position: absolute;
353
+  top: 0;
354
+  left: 0;
355
+  width: 150px;
356
+  height: 150px;
357
+}
358
+
359
+.hiprint-option-items .minicolors-slider-saturation .minicolors-grid {
360
+  background-position: -420px 0;
361
+}
362
+
363
+.hiprint-option-items .minicolors-slider-saturation .minicolors-grid-inner {
364
+  background-position: -270px 0;
365
+  background-image: inherit;
366
+}
367
+
368
+.hiprint-option-items .minicolors-slider-brightness .minicolors-grid {
369
+  background-position: -570px 0;
370
+}
371
+
372
+.hiprint-option-items .minicolors-slider-brightness .minicolors-grid-inner {
373
+  background-color: black;
374
+}
375
+
376
+.hiprint-option-items .minicolors-slider-wheel .minicolors-grid {
377
+  background-position: -720px 0;
378
+}
379
+
380
+.hiprint-option-items .minicolors-slider,
381
+.hiprint-option-items .minicolors-opacity-slider {
382
+  position: absolute;
383
+  top: 1px;
384
+  left: 152px; /* LTR */
385
+  width: 20px;
386
+  height: 150px;
387
+  background-color: white;
388
+  background-position: 0 0;
389
+  cursor: row-resize;
390
+}
391
+
392
+.hiprint-option-items .minicolors-slider-saturation .minicolors-slider {
393
+  background-position: -60px 0;
394
+}
395
+
396
+.hiprint-option-items .minicolors-slider-brightness .minicolors-slider {
397
+  background-position: -20px 0;
398
+}
399
+
400
+.hiprint-option-items .minicolors-slider-wheel .minicolors-slider {
401
+  background-position: -20px 0;
402
+}
403
+
404
+.hiprint-option-items .minicolors-opacity-slider {
405
+  left: 173px; /* LTR */
406
+  background-position: -40px 0;
407
+  display: none;
408
+}
409
+
410
+
411
+.hiprint-option-items .minicolors-with-opacity .minicolors-opacity-slider {
412
+  display: block;
413
+}
414
+
415
+/* Pickers */
416
+.hiprint-option-items .minicolors-grid .minicolors-picker {
417
+  position: absolute;
418
+  top: 70px;
419
+  left: 70px;
420
+  width: 12px;
421
+  height: 12px;
422
+  border: solid 1px black;
423
+  border-radius: 10px;
424
+  margin-top: -6px;
425
+  margin-left: -6px;
426
+  background: none;
427
+}
428
+
429
+  .hiprint-option-items .minicolors-grid .minicolors-picker > div {
430
+      position: absolute;
431
+      top: 0;
432
+      left: 0;
433
+      width: 8px;
434
+      height: 8px;
435
+      border-radius: 8px;
436
+      border: solid 2px white;
437
+      box-sizing: content-box;
438
+  }
439
+
440
+.hiprint-option-items .minicolors-picker {
441
+  position: absolute;
442
+  top: 0;
443
+  left: 0;
444
+  width: 18px;
445
+  height: 2px;
446
+  background: white;
447
+  border: solid 1px black;
448
+  margin-top: -2px;
449
+  box-sizing: content-box;
450
+}
451
+
452
+/* Swatches */
453
+.hiprint-option-items .minicolors-swatches,
454
+.hiprint-option-items .minicolors-swatches li {
455
+  margin: 5px 0 3px 5px; /* LTR */
456
+  padding: 0;
457
+  list-style: none;
458
+  overflow: hidden;
459
+}
460
+
461
+  .hiprint-option-items .minicolors-swatches .minicolors-swatch {
462
+      position: relative;
463
+      float: left; /* LTR */
464
+      cursor: pointer;
465
+      margin: 0 4px 0 0; /* LTR */
466
+  }
467
+
468
+
469
+.hiprint-option-items .minicolors-with-opacity .minicolors-swatches .minicolors-swatch {
470
+  margin-right: 7px; /* LTR */
471
+}
472
+
473
+
474
+.hiprint-option-items .minicolors-swatch.selected {
475
+  border-color: #000;
476
+}
477
+
478
+/* Inline controls */
479
+.hiprint-option-items .minicolors-inline {
480
+  display: inline-block;
481
+}
482
+
483
+  .hiprint-option-items .minicolors-inline .minicolors-input {
484
+      display: none !important;
485
+  }
486
+
487
+  .hiprint-option-items .minicolors-inline .minicolors-panel {
488
+      position: relative;
489
+      top: auto;
490
+      left: auto; /* LTR */
491
+      box-shadow: none;
492
+      z-index: auto;
493
+      display: inline-block;
494
+  }
495
+
496
+
497
+
498
+/* Bootstrap theme */
499
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-swatch {
500
+  z-index: 2;
501
+  top: 3px;
502
+  left: 3px;
503
+  width: 17px;
504
+  height: 17px;
505
+}
506
+
507
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch {
508
+  margin-bottom: 2px;
509
+  top: 0;
510
+  left: 0; /* LTR */
511
+  width: 20px;
512
+  height: 20px;
513
+}
514
+
515
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-swatch-color {
516
+  border-radius: inherit;
517
+}
518
+
519
+.hiprint-option-items .minicolors-theme-bootstrap.minicolors-position-right > .minicolors-swatch {
520
+  left: auto; /* LTR */
521
+  right: 3px; /* LTR */
522
+}
523
+
524
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-input {
525
+  float: none;
526
+  padding-left: 23px; /* LTR */
527
+}
528
+
529
+.hiprint-option-items .minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
530
+  padding-right: 44px; /* LTR */
531
+  padding-left: 12px; /* LTR */
532
+}
533
+
534
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch {
535
+  top: 4px;
536
+  left: 4px; /* LTR */
537
+  width: 37px;
538
+  height: 37px;
539
+  border-radius: 5px;
540
+}
541
+
542
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-input.input-sm + .minicolors-swatch {
543
+  width: 24px;
544
+  height: 24px;
545
+}
546
+
547
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-input.input-xs + .minicolors-swatch {
548
+  width: 18px;
549
+  height: 18px;
550
+}
551
+
552
+.hiprint-option-items .input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input {
553
+  border-top-left-radius: 0; /* LTR */
554
+  border-bottom-left-radius: 0; /* LTR */
555
+}
556
+
557
+
558
+
559
+/*hitable reizer*/
560
+.hitable {
561
+}
562
+
563
+
564
+
565
+  .hitable .selected {
566
+      background: #3e66ad;
567
+  }
568
+
569
+
570
+  /*resizer*/
571
+  .hitable tr.resizerRow,
572
+  .hitable .resizerRow td {
573
+      border: 0pt dashed;
574
+      height: 0pt;
575
+      background: #fff;
576
+  }
577
+
578
+      .hitable tr.resizerRow + tr,
579
+      .hitable tr.resizerRow + tr td {
580
+          border-top: 0px !important;
581
+      }
582
+
583
+  .hitable td.resizerColumn {
584
+      border: 0pt dashed;
585
+      width: 0.000001px !important;
586
+      background: #fff;
587
+  }
588
+
589
+
590
+      .hitable td.resizerColumn + td {
591
+          border-left: 0px !important;
592
+      }
593
+
594
+
595
+/*GRIP*/
596
+
597
+.columngrips {
598
+  height: 0px;
599
+  position: absolute;
600
+}
601
+
602
+.columngrip {
603
+  margin-left: -5px;
604
+  position: absolute;
605
+  z-index: 5;
606
+  width: 10px;
607
+}
608
+
609
+  .columngrip .gripResizer {
610
+      position: absolute;
611
+      filter: alpha(opacity=1);
612
+      opacity: 0;
613
+      width: 10px;
614
+      height: 100%;
615
+      cursor: col-resize;
616
+      top: 0px;
617
+  }
618
+
619
+.columngripDraging {
620
+  border-left: 1px dotted black;
621
+}
622
+
623
+.rowgrips {
624
+  height: 0px;
625
+  width: 0px;
626
+  position: absolute;
627
+}
628
+
629
+.rowgrip {
630
+  margin-top: -5px;
631
+  position: absolute;
632
+  z-index: 5;
633
+  height: 10px;
634
+}
635
+
636
+  .rowgrip .gripResizer {
637
+      position: absolute;
638
+      filter: alpha(opacity=1);
639
+      opacity: 0;
640
+      height: 10px;
641
+      width: 100%;
642
+      cursor: row-resize;
643
+      left: 0px;
644
+  }
645
+
646
+.rowgripDraging {
647
+  border-top: 1px dotted black;
648
+}
649
+
650
+.hitable .hitable-editor-text {
651
+  border: 1px solid;
652
+  width: 95%;
653
+  height: 80%;
654
+}
655
+
656
+
657
+
658
+
659
+.hipanel-disable {
660
+    height: 0px;
661
+    display: block !important;
662
+    top: 8500px;
663
+    width: 0px;
664
+    overflow: hidden;
665
+    position: absolute;
666
+}
667
+.hiprint_rul_wrapper {
668
+    position: absolute;
669
+    height: 100%;
670
+    width: 100%;
671
+    overflow: hidden;
672
+    pointer-events: none;
673
+    border: 0;
674
+    border-top: 1px solid rgb(201, 190, 190);
675
+    border-left: 1px solid rgb(201, 190, 190);
676
+    padding-left: 15px;
677
+    margin: -16px
678
+}
679
+
680
+    .hiprint_rul_wrapper .h_img {
681
+        position: absolute;
682
+        top: 0px;
683
+        left: 15px;
684
+        width: 400mm;
685
+        height: 15px;
686
+    }
687
+
688
+    .hiprint_rul_wrapper .v_img {
689
+        width: 400mm;
690
+        transform: rotate(90deg);
691
+        transform-origin: 0 100%;
692
+        height: 15px;
693
+        position: absolute;
694
+        top: -2px;
695
+        left: 0px;
696
+        
697
+    }
698
+
699
+/*hiprint-option-table*/
700
+
701
+.hiprint-option-table-selected-columns {
702
+    color: inherit;
703
+    background-color: transparent;
704
+    box-sizing: border-box;
705
+    width: 100%;
706
+    position: relative;
707
+    padding: 0px;
708
+    list-style: none;
709
+}
710
+
711
+    .hiprint-option-table-selected-columns .hiprint-option-table-selected-item {
712
+        color: inherit;
713
+        background-color: transparent;
714
+        box-sizing: border-box;
715
+        width: 100%;
716
+        padding: 0 3px;
717
+        border: 1px solid rgb(169, 169, 169);
718
+        line-height: 19pt;
719
+        margin: 3px 0;
720
+    }
721
+/*hi-pretty */
722
+.hi-pretty * {
723
+    box-sizing: border-box;
724
+}
725
+
726
+.hi-pretty input:not([type='checkbox']):not([type='radio']) {
727
+    display: none;
728
+}
729
+
730
+.hi-pretty {
731
+    position: relative;
732
+    display: inline-block;
733
+    margin-right: 1em;
734
+    white-space: nowrap;
735
+    line-height: 1;
736
+}
737
+
738
+    .hi-pretty input {
739
+        position: absolute;
740
+        left: 0;
741
+        top: 0;
742
+        min-width: 1em;
743
+        width: 100%;
744
+        height: 100%;
745
+        z-index: 2;
746
+        opacity: 0;
747
+        margin: 0;
748
+        padding: 0;
749
+        cursor: pointer;
750
+    }
751
+
752
+    .hi-pretty .state label {
753
+        position: initial;
754
+        display: inline-block;
755
+        font-weight: normal;
756
+        margin: 0;
757
+        text-indent: 1.5em;
758
+        min-width: calc(1em + 2px);
759
+    }
760
+
761
+        .hi-pretty .state label:before,
762
+        .hi-pretty .state label:after {
763
+            content: '';
764
+            width: calc(1em + 2px);
765
+            height: calc(1em + 2px);
766
+            display: block;
767
+            box-sizing: border-box;
768
+            border-radius: 0;
769
+            border: 1px solid transparent;
770
+            z-index: 0;
771
+            position: absolute;
772
+            left: 0;
773
+            top: calc((0% - (100% - 1em)) - 8%);
774
+            background-color: transparent;
775
+        }
776
+
777
+        .hi-pretty .state label:before {
778
+            border-color: #bdc3c7;
779
+        }
780
+
781
+    .hi-pretty .state.p-is-hover,
782
+    .hi-pretty .state.p-is-indeterminate {
783
+        display: none;
784
+    }
785
+
786
+
787
+    .hi-pretty.p-default.p-fill .state label:after {
788
+        -webkit-transform: scale(1);
789
+        -ms-transform: scale(1);
790
+        transform: scale(1);
791
+    }
792
+
793
+    .hi-pretty.p-default .state label:after {
794
+        -webkit-transform: scale(0.6);
795
+        -ms-transform: scale(0.6);
796
+        transform: scale(0.6);
797
+    }
798
+
799
+    .hi-pretty.p-default input:checked ~ .state label:after {
800
+        background-color: #bdc3c7 !important;
801
+    }
802
+
803
+    .hi-pretty.p-default.p-thick .state label:before,
804
+    .hi-pretty.p-default.p-thick .state label:after {
805
+        border-width: calc(1em / 7);
806
+    }
807
+
808
+    .hi-pretty.p-default.p-thick .state label:after {
809
+        -webkit-transform: scale(0.4) !important;
810
+        -ms-transform: scale(0.4) !important;
811
+        transform: scale(0.4) !important;
812
+    }
813
+
814
+ 

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 6 - 0
public/static/hiprint/content/bootstrap.min.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 7 - 0
public/static/hiprint/content/bootstrap.min.js


+ 814 - 0
public/static/hiprint/css/hiprint.css

@@ -0,0 +1,814 @@
1
+
2
+
3
+/* hiprint-pagination */
4
+.hiprint-pagination {
5
+    display: inline-block;
6
+    padding-left: 0;
7
+}
8
+
9
+    .hiprint-pagination > li {
10
+        border: 1px solid #bdc3c7;
11
+        -moz-border-radius: 2px;
12
+        -webkit-border-radius: 2px;
13
+        display: block;
14
+        float: left;
15
+        padding: 5px;
16
+        text-decoration: none;
17
+        margin-right: 5px;
18
+        margin-bottom: 5px;
19
+        font-family: helvetica;
20
+        font-size: 13px;
21
+        cursor: pointer
22
+    }
23
+.hiprint-pagination > li > span {
24
+    padding: 0 10px 0 10px;
25
+}
26
+
27
+.hiprint-pagination > li > a {
28
+    color: #bdc3c7;
29
+    font-weight: bold;
30
+    text-decoration: none;
31
+    font-size: 11px;
32
+    padding: 3px;
33
+}
34
+
35
+    .hiprint-pagination > li > a:hover {
36
+        color: red;
37
+    }
38
+
39
+
40
+
41
+.hiprint-pagination-sm > li > a {
42
+    padding: 5px 10px;
43
+    font-size: 12px;
44
+    line-height: 1.5;
45
+}
46
+/*rect-printElement-type hiprint-printElement-type */
47
+.rect-printElement-types .hiprint-printElement-type {
48
+  display: block;
49
+}
50
+
51
+.rect-printElement-types .hiprint-printElement-type {
52
+  padding: 0 0 0 0;
53
+  list-style: none;
54
+}
55
+
56
+  .rect-printElement-types .hiprint-printElement-type > li > .title {
57
+      display: block;
58
+      padding: 4px 0px;
59
+      clear: both;
60
+  }
61
+
62
+  .rect-printElement-types .hiprint-printElement-type > li > ul {
63
+      padding: 0 0 0 0;
64
+      display: block;
65
+      list-style: none;
66
+  }
67
+
68
+      .rect-printElement-types .hiprint-printElement-type > li > ul > li {
69
+          display: block;
70
+          width: 50%;
71
+          float: left;
72
+          max-width: 100px;
73
+      }
74
+
75
+          .rect-printElement-types .hiprint-printElement-type > li > ul > li > a {
76
+              height: 92px;
77
+              padding: 12px 6px;
78
+              margin-left: -1px;
79
+              line-height: 1.42857143;
80
+              color: #337ab7;
81
+              text-decoration: none;
82
+              background-color: #fff;
83
+              border: 1px solid #ddd;
84
+              margin-right: 5px;
85
+              width: 95%;
86
+              max-width: 100px;
87
+              display: inline-block;
88
+              text-align: center;
89
+              margin-bottom: 7px;
90
+              box-sizing: border-box;
91
+              color: #b9a5a6;
92
+              border: 1px solid rgba(0,0,0,0.2);
93
+              border-radius: 3px;
94
+              box-shadow: 0 1px 0 0 rgba(0,0,0,0.15);
95
+          }
96
+
97
+
98
+/*small-printElement-type hiprint-printElement-type */
99
+
100
+/*.hiprint-printElement :focus {
101
+    outline: none;
102
+}*/
103
+
104
+.small-printElement-types .hiprint-printElement-type {
105
+    display: block;
106
+}
107
+
108
+.small-printElement-types .hiprint-printElement-type {
109
+  padding: 0 0 0 0;
110
+  list-style: none;
111
+}
112
+
113
+  .small-printElement-types .hiprint-printElement-type > li > .title {
114
+      display: block;
115
+      padding: 4px 0px;
116
+      clear: both;
117
+  }
118
+
119
+  .small-printElement-types .hiprint-printElement-type > li > ul {
120
+      padding: 0 0 0 0;
121
+      display: block;
122
+      list-style: none;
123
+      width: 100%;
124
+  }
125
+
126
+      .small-printElement-types .hiprint-printElement-type > li > ul > li {
127
+          display: block;
128
+          width: 50%;
129
+          float: left;
130
+          padding: 0 4px;
131
+      }
132
+
133
+          .small-printElement-types .hiprint-printElement-type > li > ul > li > a {
134
+              height: 22px;
135
+              /* padding: 12px 6px; */
136
+              /* margin-left: -1px; */
137
+              line-height: 20px;
138
+              color: #337ab7;
139
+              text-decoration: none;
140
+              background-color: #fff;
141
+              border: 1px solid #ddd;
142
+              margin-right: 5px;
143
+              width: 100%;
144
+              display: block;
145
+              text-align: center;
146
+              margin-bottom: 7px;
147
+              box-sizing: border-box;
148
+              color: #b9a5a6;
149
+              border: 1px solid rgba(0,0,0,0.2);
150
+              border-radius: 3px;
151
+              box-shadow: 0 1px 0 0 rgba(0,0,0,0.15);
152
+          }
153
+
154
+
155
+/* hiprint-toolbar*/
156
+
157
+.hiprint-toolbar {
158
+}
159
+
160
+  .hiprint-toolbar > ul {
161
+      padding: 0px;
162
+      margin-bottom: 5px;
163
+  }
164
+
165
+      .hiprint-toolbar > ul > li {
166
+          display: inline-block;
167
+      }
168
+
169
+          .hiprint-toolbar > ul > li > a {
170
+              position: relative;
171
+              float: left;
172
+              padding: 3px 10px;
173
+              margin-left: -1px;
174
+              line-height: 1.42857143;
175
+              color: #337ab7;
176
+              text-decoration: none;
177
+              background-color: #fff;
178
+              border: 1px solid #ddd;
179
+              margin-right: 4px;
180
+              cursor: pointer;
181
+          }
182
+
183
+
184
+.hiprint-printElement-type .glyphicon-class {
185
+  display: block;
186
+  text-align: center;
187
+  word-wrap: break-word;
188
+  /*font-size: 0.65rem;
189
+font-weight: normal;*/
190
+  font-family: Helvetica, sans-serif;
191
+}
192
+
193
+.hiprint-printElement-type .glyphicon {
194
+  margin-top: 5px;
195
+  margin-bottom: 10px;
196
+  font-size: 37px;
197
+}
198
+
199
+
200
+/*
201
+
202
+
203
+*/
204
+
205
+/*option css*/
206
+/*option css*/
207
+.hiprint-option-items {
208
+  font-size: .75rem;
209
+  padding: 10px 5px;
210
+  display: flex;
211
+  flex-wrap: wrap;
212
+  align-items: flex-end;
213
+  box-sizing: border-box;
214
+  width: 100%;
215
+}
216
+
217
+  .hiprint-option-items .hiprint-option-item {
218
+      box-sizing: border-box;
219
+      float: left;
220
+      width: 50%;
221
+      margin-bottom: 5px;
222
+      padding: 0 5px;
223
+      font-size:14px;
224
+  }
225
+
226
+  .hiprint-option-items .hiprint-option-item-row {
227
+      width: 100%;
228
+  }
229
+
230
+.hiprint-option-item-label {
231
+  margin: 5px 5px 3px 0;
232
+}
233
+
234
+.hiprint-option-items .hiprint-option-item-field input, .hiprint-option-items .hiprint-option-item-field select, .hiprint-option-items .hiprint-option-item-field textarea {
235
+  color: inherit;
236
+  background-color: transparent;
237
+  box-sizing: border-box;
238
+  width: 100%;
239
+  position: relative;
240
+  padding: 3px;
241
+  z-index: 1;
242
+  border: 1px solid rgb(169, 169, 169);
243
+  height: 19pt;
244
+}
245
+
246
+.hiprint-option-item-settingBtn {
247
+    height: 19pt;
248
+    line-height: 19pt;
249
+    font-size: 12px;
250
+    padding: 0 24px;
251
+    background: #00c1de;
252
+    border-color: transparent;
253
+    color: #fff;
254
+    display: inline-block;
255
+    margin: 5px;
256
+    font-weight: 400;
257
+    border: 1px solid transparent;
258
+    font-family: PingFangSC, helvetica neue, hiragino sans gb, arial, microsoft yahei ui, microsoft yahei, simsun, "sans-serif";
259
+    vertical-align: middle;
260
+    transition: .3s cubic-bezier(.4, 0, .2, 1);
261
+    transform: translateZ(0);
262
+}
263
+.hiprint-option-item-deleteBtn {
264
+    background:red;
265
+}
266
+
267
+.hiprint-option-items .minicolors {
268
+    position: relative;
269
+}
270
+
271
+.hiprint-option-items .minicolors-sprite {
272
+  background-image: url(./image/jquery.minicolors.png);
273
+}
274
+
275
+.hiprint-option-items .minicolors-swatch {
276
+  position: absolute;
277
+  vertical-align: middle;
278
+  background-position: -80px 0;
279
+  cursor: text;
280
+  padding: 0;
281
+  margin: 0;
282
+  display: inline-block;
283
+}
284
+
285
+.hiprint-option-items .minicolors-swatch-color {
286
+  position: absolute;
287
+  top: 0;
288
+  left: 0;
289
+  right: 0;
290
+  bottom: 0;
291
+}
292
+
293
+.hiprint-option-items .minicolors input[type=hidden] + .minicolors-swatch {
294
+  width: 28px;
295
+  position: static;
296
+  cursor: pointer;
297
+}
298
+
299
+.hiprint-option-items .minicolors input[type=hidden][disabled] + .minicolors-swatch {
300
+  cursor: default;
301
+}
302
+
303
+/* Panel */
304
+.hiprint-option-items .minicolors-panel {
305
+  position: absolute;
306
+  width: 173px;
307
+  background: white;
308
+  border: solid 1px #CCC;
309
+  box-shadow: 0 0 20px rgba(0, 0, 0, .2);
310
+  z-index: 99999;
311
+  box-sizing: content-box;
312
+  display: none;
313
+}
314
+
315
+  .hiprint-option-items .minicolors-panel.minicolors-visible {
316
+      display: block;
317
+  }
318
+
319
+/* Panel positioning */
320
+.hiprint-option-items .minicolors-position-top .minicolors-panel {
321
+  top: -154px;
322
+}
323
+
324
+.hiprint-option-items .minicolors-position-right .minicolors-panel {
325
+  right: 0;
326
+}
327
+
328
+.hiprint-option-items .minicolors-position-bottom .minicolors-panel {
329
+  top: auto;
330
+}
331
+
332
+.hiprint-option-items .minicolors-position-left .minicolors-panel {
333
+  left: 0;
334
+}
335
+
336
+.hiprint-option-items .minicolors-with-opacity .minicolors-panel {
337
+  width: 194px;
338
+}
339
+
340
+.hiprint-option-items .minicolors .minicolors-grid {
341
+  position: relative;
342
+  top: 1px;
343
+  left: 1px; /* LTR */
344
+  width: 150px;
345
+  height: 150px;
346
+  margin-bottom: 2px;
347
+  background-position: -120px 0;
348
+  cursor: crosshair;
349
+}
350
+
351
+.hiprint-option-items .minicolors .minicolors-grid-inner {
352
+  position: absolute;
353
+  top: 0;
354
+  left: 0;
355
+  width: 150px;
356
+  height: 150px;
357
+}
358
+
359
+.hiprint-option-items .minicolors-slider-saturation .minicolors-grid {
360
+  background-position: -420px 0;
361
+}
362
+
363
+.hiprint-option-items .minicolors-slider-saturation .minicolors-grid-inner {
364
+  background-position: -270px 0;
365
+  background-image: inherit;
366
+}
367
+
368
+.hiprint-option-items .minicolors-slider-brightness .minicolors-grid {
369
+  background-position: -570px 0;
370
+}
371
+
372
+.hiprint-option-items .minicolors-slider-brightness .minicolors-grid-inner {
373
+  background-color: black;
374
+}
375
+
376
+.hiprint-option-items .minicolors-slider-wheel .minicolors-grid {
377
+  background-position: -720px 0;
378
+}
379
+
380
+.hiprint-option-items .minicolors-slider,
381
+.hiprint-option-items .minicolors-opacity-slider {
382
+  position: absolute;
383
+  top: 1px;
384
+  left: 152px; /* LTR */
385
+  width: 20px;
386
+  height: 150px;
387
+  background-color: white;
388
+  background-position: 0 0;
389
+  cursor: row-resize;
390
+}
391
+
392
+.hiprint-option-items .minicolors-slider-saturation .minicolors-slider {
393
+  background-position: -60px 0;
394
+}
395
+
396
+.hiprint-option-items .minicolors-slider-brightness .minicolors-slider {
397
+  background-position: -20px 0;
398
+}
399
+
400
+.hiprint-option-items .minicolors-slider-wheel .minicolors-slider {
401
+  background-position: -20px 0;
402
+}
403
+
404
+.hiprint-option-items .minicolors-opacity-slider {
405
+  left: 173px; /* LTR */
406
+  background-position: -40px 0;
407
+  display: none;
408
+}
409
+
410
+
411
+.hiprint-option-items .minicolors-with-opacity .minicolors-opacity-slider {
412
+  display: block;
413
+}
414
+
415
+/* Pickers */
416
+.hiprint-option-items .minicolors-grid .minicolors-picker {
417
+  position: absolute;
418
+  top: 70px;
419
+  left: 70px;
420
+  width: 12px;
421
+  height: 12px;
422
+  border: solid 1px black;
423
+  border-radius: 10px;
424
+  margin-top: -6px;
425
+  margin-left: -6px;
426
+  background: none;
427
+}
428
+
429
+  .hiprint-option-items .minicolors-grid .minicolors-picker > div {
430
+      position: absolute;
431
+      top: 0;
432
+      left: 0;
433
+      width: 8px;
434
+      height: 8px;
435
+      border-radius: 8px;
436
+      border: solid 2px white;
437
+      box-sizing: content-box;
438
+  }
439
+
440
+.hiprint-option-items .minicolors-picker {
441
+  position: absolute;
442
+  top: 0;
443
+  left: 0;
444
+  width: 18px;
445
+  height: 2px;
446
+  background: white;
447
+  border: solid 1px black;
448
+  margin-top: -2px;
449
+  box-sizing: content-box;
450
+}
451
+
452
+/* Swatches */
453
+.hiprint-option-items .minicolors-swatches,
454
+.hiprint-option-items .minicolors-swatches li {
455
+  margin: 5px 0 3px 5px; /* LTR */
456
+  padding: 0;
457
+  list-style: none;
458
+  overflow: hidden;
459
+}
460
+
461
+  .hiprint-option-items .minicolors-swatches .minicolors-swatch {
462
+      position: relative;
463
+      float: left; /* LTR */
464
+      cursor: pointer;
465
+      margin: 0 4px 0 0; /* LTR */
466
+  }
467
+
468
+
469
+.hiprint-option-items .minicolors-with-opacity .minicolors-swatches .minicolors-swatch {
470
+  margin-right: 7px; /* LTR */
471
+}
472
+
473
+
474
+.hiprint-option-items .minicolors-swatch.selected {
475
+  border-color: #000;
476
+}
477
+
478
+/* Inline controls */
479
+.hiprint-option-items .minicolors-inline {
480
+  display: inline-block;
481
+}
482
+
483
+  .hiprint-option-items .minicolors-inline .minicolors-input {
484
+      display: none !important;
485
+  }
486
+
487
+  .hiprint-option-items .minicolors-inline .minicolors-panel {
488
+      position: relative;
489
+      top: auto;
490
+      left: auto; /* LTR */
491
+      box-shadow: none;
492
+      z-index: auto;
493
+      display: inline-block;
494
+  }
495
+
496
+
497
+
498
+/* Bootstrap theme */
499
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-swatch {
500
+  z-index: 2;
501
+  top: 3px;
502
+  left: 3px;
503
+  width: 17px;
504
+  height: 17px;
505
+}
506
+
507
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch {
508
+  margin-bottom: 2px;
509
+  top: 0;
510
+  left: 0; /* LTR */
511
+  width: 20px;
512
+  height: 20px;
513
+}
514
+
515
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-swatch-color {
516
+  border-radius: inherit;
517
+}
518
+
519
+.hiprint-option-items .minicolors-theme-bootstrap.minicolors-position-right > .minicolors-swatch {
520
+  left: auto; /* LTR */
521
+  right: 3px; /* LTR */
522
+}
523
+
524
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-input {
525
+  float: none;
526
+  padding-left: 23px; /* LTR */
527
+}
528
+
529
+.hiprint-option-items .minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
530
+  padding-right: 44px; /* LTR */
531
+  padding-left: 12px; /* LTR */
532
+}
533
+
534
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch {
535
+  top: 4px;
536
+  left: 4px; /* LTR */
537
+  width: 37px;
538
+  height: 37px;
539
+  border-radius: 5px;
540
+}
541
+
542
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-input.input-sm + .minicolors-swatch {
543
+  width: 24px;
544
+  height: 24px;
545
+}
546
+
547
+.hiprint-option-items .minicolors-theme-bootstrap .minicolors-input.input-xs + .minicolors-swatch {
548
+  width: 18px;
549
+  height: 18px;
550
+}
551
+
552
+.hiprint-option-items .input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input {
553
+  border-top-left-radius: 0; /* LTR */
554
+  border-bottom-left-radius: 0; /* LTR */
555
+}
556
+
557
+
558
+
559
+/*hitable reizer*/
560
+.hitable {
561
+}
562
+
563
+
564
+
565
+  .hitable .selected {
566
+      background: #3e66ad;
567
+  }
568
+
569
+
570
+  /*resizer*/
571
+  .hitable tr.resizerRow,
572
+  .hitable .resizerRow td {
573
+      border: 0pt dashed;
574
+      height: 0pt;
575
+      background: #fff;
576
+  }
577
+
578
+      .hitable tr.resizerRow + tr,
579
+      .hitable tr.resizerRow + tr td {
580
+          border-top: 0px !important;
581
+      }
582
+
583
+  .hitable td.resizerColumn {
584
+      border: 0pt dashed;
585
+      width: 0.000001px !important;
586
+      background: #fff;
587
+  }
588
+
589
+
590
+      .hitable td.resizerColumn + td {
591
+          border-left: 0px !important;
592
+      }
593
+
594
+
595
+/*GRIP*/
596
+
597
+.columngrips {
598
+  height: 0px;
599
+  position: absolute;
600
+}
601
+
602
+.columngrip {
603
+  margin-left: -5px;
604
+  position: absolute;
605
+  z-index: 5;
606
+  width: 10px;
607
+}
608
+
609
+  .columngrip .gripResizer {
610
+      position: absolute;
611
+      filter: alpha(opacity=1);
612
+      opacity: 0;
613
+      width: 10px;
614
+      height: 100%;
615
+      cursor: col-resize;
616
+      top: 0px;
617
+  }
618
+
619
+.columngripDraging {
620
+  border-left: 1px dotted black;
621
+}
622
+
623
+.rowgrips {
624
+  height: 0px;
625
+  width: 0px;
626
+  position: absolute;
627
+}
628
+
629
+.rowgrip {
630
+  margin-top: -5px;
631
+  position: absolute;
632
+  z-index: 5;
633
+  height: 10px;
634
+}
635
+
636
+  .rowgrip .gripResizer {
637
+      position: absolute;
638
+      filter: alpha(opacity=1);
639
+      opacity: 0;
640
+      height: 10px;
641
+      width: 100%;
642
+      cursor: row-resize;
643
+      left: 0px;
644
+  }
645
+
646
+.rowgripDraging {
647
+  border-top: 1px dotted black;
648
+}
649
+
650
+.hitable .hitable-editor-text {
651
+  border: 1px solid;
652
+  width: 95%;
653
+  height: 80%;
654
+}
655
+
656
+
657
+
658
+
659
+.hipanel-disable {
660
+    height: 0px;
661
+    display: block !important;
662
+    top: 8500px;
663
+    width: 0px;
664
+    overflow: hidden;
665
+    position: absolute;
666
+}
667
+.hiprint_rul_wrapper {
668
+    position: absolute;
669
+    height: 100%;
670
+    width: 100%;
671
+    overflow: hidden;
672
+    pointer-events: none;
673
+    border: 0;
674
+    border-top: 1px solid rgb(201, 190, 190);
675
+    border-left: 1px solid rgb(201, 190, 190);
676
+    padding-left: 15px;
677
+    margin: -16px
678
+}
679
+
680
+    .hiprint_rul_wrapper .h_img {
681
+        position: absolute;
682
+        top: 0px;
683
+        left: 15px;
684
+        width: 400mm;
685
+        height: 15px;
686
+    }
687
+
688
+    .hiprint_rul_wrapper .v_img {
689
+        width: 400mm;
690
+        transform: rotate(90deg);
691
+        transform-origin: 0 100%;
692
+        height: 15px;
693
+        position: absolute;
694
+        top: -2px;
695
+        left: 0px;
696
+        
697
+    }
698
+
699
+/*hiprint-option-table*/
700
+
701
+.hiprint-option-table-selected-columns {
702
+    color: inherit;
703
+    background-color: transparent;
704
+    box-sizing: border-box;
705
+    width: 100%;
706
+    position: relative;
707
+    padding: 0px;
708
+    list-style: none;
709
+}
710
+
711
+    .hiprint-option-table-selected-columns .hiprint-option-table-selected-item {
712
+        color: inherit;
713
+        background-color: transparent;
714
+        box-sizing: border-box;
715
+        width: 100%;
716
+        padding: 0 3px;
717
+        border: 1px solid rgb(169, 169, 169);
718
+        line-height: 19pt;
719
+        margin: 3px 0;
720
+    }
721
+/*hi-pretty */
722
+.hi-pretty * {
723
+    box-sizing: border-box;
724
+}
725
+
726
+.hi-pretty input:not([type='checkbox']):not([type='radio']) {
727
+    display: none;
728
+}
729
+
730
+.hi-pretty {
731
+    position: relative;
732
+    display: inline-block;
733
+    margin-right: 1em;
734
+    white-space: nowrap;
735
+    line-height: 1;
736
+}
737
+
738
+    .hi-pretty input {
739
+        position: absolute;
740
+        left: 0;
741
+        top: 0;
742
+        min-width: 1em;
743
+        width: 100%;
744
+        height: 100%;
745
+        z-index: 2;
746
+        opacity: 0;
747
+        margin: 0;
748
+        padding: 0;
749
+        cursor: pointer;
750
+    }
751
+
752
+    .hi-pretty .state label {
753
+        position: initial;
754
+        display: inline-block;
755
+        font-weight: normal;
756
+        margin: 0;
757
+        text-indent: 1.5em;
758
+        min-width: calc(1em + 2px);
759
+    }
760
+
761
+        .hi-pretty .state label:before,
762
+        .hi-pretty .state label:after {
763
+            content: '';
764
+            width: calc(1em + 2px);
765
+            height: calc(1em + 2px);
766
+            display: block;
767
+            box-sizing: border-box;
768
+            border-radius: 0;
769
+            border: 1px solid transparent;
770
+            z-index: 0;
771
+            position: absolute;
772
+            left: 0;
773
+            top: calc((0% - (100% - 1em)) - 8%);
774
+            background-color: transparent;
775
+        }
776
+
777
+        .hi-pretty .state label:before {
778
+            border-color: #bdc3c7;
779
+        }
780
+
781
+    .hi-pretty .state.p-is-hover,
782
+    .hi-pretty .state.p-is-indeterminate {
783
+        display: none;
784
+    }
785
+
786
+
787
+    .hi-pretty.p-default.p-fill .state label:after {
788
+        -webkit-transform: scale(1);
789
+        -ms-transform: scale(1);
790
+        transform: scale(1);
791
+    }
792
+
793
+    .hi-pretty.p-default .state label:after {
794
+        -webkit-transform: scale(0.6);
795
+        -ms-transform: scale(0.6);
796
+        transform: scale(0.6);
797
+    }
798
+
799
+    .hi-pretty.p-default input:checked ~ .state label:after {
800
+        background-color: #bdc3c7 !important;
801
+    }
802
+
803
+    .hi-pretty.p-default.p-thick .state label:before,
804
+    .hi-pretty.p-default.p-thick .state label:after {
805
+        border-width: calc(1em / 7);
806
+    }
807
+
808
+    .hi-pretty.p-default.p-thick .state label:after {
809
+        -webkit-transform: scale(0.4) !important;
810
+        -ms-transform: scale(0.4) !important;
811
+        transform: scale(0.4) !important;
812
+    }
813
+
814
+ 

BIN
public/static/hiprint/css/image/hi.png


BIN
public/static/hiprint/css/image/jquery.minicolors.png


+ 281 - 0
public/static/hiprint/css/print-lock.css

@@ -0,0 +1,281 @@
1
+
2
+@media print {
3
+    body {
4
+        margin: 0px;
5
+        padding: 0px;
6
+    }
7
+}
8
+
9
+@page {
10
+    margin: 0;
11
+}
12
+
13
+.hiprint-printPaper * {
14
+    box-sizing: border-box;
15
+    -moz-box-sizing: border-box; /* Firefox */
16
+    -webkit-box-sizing: border-box; /* Safari */
17
+   
18
+}
19
+
20
+    .hiprint-printPaper *:focus {
21
+        outline: -webkit-focus-ring-color auto 0px;
22
+    }
23
+
24
+
25
+.hiprint-page-break-avoid {
26
+    page-break-after: avoid;
27
+}
28
+.hiprint-printPaper {
29
+    position: relative;
30
+    padding: 0 0 0 0;
31
+    page-break-after: always;
32
+    overflow-x: hidden;
33
+    overflow: hidden;
34
+}
35
+    .hiprint-printPaper .hiprint-printPaper-content {
36
+        position: relative;
37
+    }
38
+.hiprint-printPaper.design {
39
+    overflow: visible;
40
+}
41
+
42
+
43
+
44
+.hiprint-printTemplate .hiprint-printPanel {
45
+    page-break-after: always;
46
+}
47
+
48
+.hiprint-printPaper, hiprint-printPanel {
49
+    box-sizing: border-box;
50
+    border: 0px;
51
+}
52
+
53
+.hiprint-printPanel .hiprint-printPaper:last-child {
54
+    page-break-after: avoid;
55
+}
56
+
57
+.hiprint-printTemplate .hiprint-printPanel:last-child {
58
+    page-break-after: avoid;
59
+}
60
+
61
+.hiprint-printPaper .hideheaderLinetarget {
62
+    border-top: 0px dashed rgb(201, 190, 190) !important;
63
+}
64
+
65
+.hiprint-printPaper .hidefooterLinetarget {
66
+    border-top: 0px dashed rgb(201, 190, 190) !important;
67
+}
68
+
69
+.hiprint-printPaper.design {
70
+    border: 1px dashed rgba(170,170,170,0.7);
71
+}
72
+
73
+.design .hiprint-printElement-table-content, .design .hiprint-printElement-longText-content {
74
+    overflow: hidden;
75
+    box-sizing: border-box;
76
+}
77
+
78
+.design .resize-panel {
79
+    box-sizing: border-box;
80
+    border: 1px dotted;
81
+}
82
+
83
+.hiprint-printElement-text {
84
+    background-color: transparent;
85
+    background-repeat: repeat;
86
+    padding: 0 0 0 0;
87
+    border: 0.75pt none rgb(0,0,0);
88
+    direction: ltr;
89
+    font-family: 'SimSun';
90
+    font-size: 9pt;
91
+    font-style: normal;
92
+    font-weight: normal;
93
+    padding-bottom: 0pt;
94
+    padding-left: 0pt;
95
+    padding-right: 0pt;
96
+    padding-top: 0pt;
97
+    text-align: left;
98
+    text-decoration: none;
99
+    line-height: 9.75pt;
100
+    box-sizing: border-box;
101
+    word-wrap: break-word;
102
+    /* word-break: break-all; */
103
+    word-break: keep-all;
104
+}
105
+
106
+.design .hiprint-printElement-text-content {
107
+    border: 1px dashed rgb(206, 188, 188);
108
+    box-sizing: border-box;
109
+}
110
+
111
+.hiprint-printElement-longText {
112
+    background-color: transparent;
113
+    background-repeat: repeat;
114
+    border: 0.75pt none rgb(0,0,0);
115
+    direction: ltr;
116
+    font-family: 'SimSun';
117
+    font-size: 9pt;
118
+    font-style: normal;
119
+    font-weight: normal;
120
+    padding-bottom: 0pt;
121
+    padding-left: 0pt;
122
+    padding-right: 0pt;
123
+    padding-top: 0pt;
124
+    text-align: left;
125
+    text-decoration: none;
126
+    line-height: 9.75pt;
127
+    box-sizing: border-box;
128
+    word-wrap: break-word;
129
+    /* word-break: break-all; */
130
+    /*white-space: pre-wrap*/
131
+    word-break: keep-all;
132
+}
133
+
134
+
135
+
136
+.hiprint-printElement-table {
137
+    background-color: transparent;
138
+    background-repeat: repeat;
139
+    color: rgb(0,0,0);
140
+    border-color: rgb(0,0,0);
141
+    border-style: none;
142
+    direction: ltr;
143
+    font-family: 'SimSun';
144
+    font-size: 9pt;
145
+    font-style: normal;
146
+    font-weight: normal;
147
+    padding-bottom: 0pt;
148
+    padding-left: 0pt;
149
+    padding-right: 0pt;
150
+    padding-top: 0pt;
151
+    text-align: left;
152
+    text-decoration: none;
153
+    padding: 0 0 0 0;
154
+    box-sizing: border-box;
155
+    line-height: 9.75pt;
156
+}
157
+
158
+    .hiprint-printElement-table thead {
159
+        background: #e8e8e8;
160
+        font-weight: 700;
161
+    }
162
+
163
+.hiprint-printElement-tableTarget, .hiprint-printElement-tableTarget tr, .hiprint-printElement-tableTarget td {
164
+    border-color: rgb(0,0,0);
165
+    border-style: none;
166
+    border: 1px solid rgb(0,0,0);
167
+    font-weight: normal;
168
+    direction: ltr;
169
+    padding-bottom: 0pt;
170
+    padding-left: 0pt;
171
+    padding-right: 0pt;
172
+    padding-top: 0pt;
173
+    text-decoration: none;
174
+    vertical-align: middle;
175
+    box-sizing: border-box;
176
+    word-wrap: break-word;
177
+    word-break: break-all;
178
+    /*line-height: 9.75pt;
179
+    font-size: 9pt;*/
180
+}
181
+
182
+    /*.hiprint-printElement-tableTarget tr,*/
183
+    .hiprint-printElement-tableTarget td {
184
+        height: 18pt;
185
+    }
186
+
187
+.hiprint-printPaper .hiprint-paperNumber {
188
+    font-size: 9pt;
189
+}
190
+
191
+.design .hiprint-printElement-table-handle {
192
+    position: absolute;
193
+    height: 21pt;
194
+    width: 21pt;
195
+    background: red;
196
+    z-index:1;
197
+}
198
+
199
+.hiprint-printPaper .hiprint-paperNumber-disabled {
200
+    float: right !important;
201
+    right: 0 !important;
202
+    color: gainsboro !important;
203
+}
204
+
205
+.hiprint-printElement-vline, .hiprint-printElement-hline {
206
+    border: 0px none rgb(0,0,0);
207
+    
208
+}
209
+.hiprint-printElement-vline {
210
+    border-left: 0.75pt solid #000;
211
+    border-right: 0px none rgb(0,0,0) !important;
212
+    border-bottom: 0px none rgb(0,0,0) !important;
213
+    border-top: 0px none rgb(0,0,0) !important;
214
+}
215
+
216
+.hiprint-printElement-hline {
217
+    border-top: 0.75pt solid #000;
218
+    border-right: 0px none rgb(0,0,0) !important;
219
+    border-bottom: 0px none rgb(0,0,0) !important;
220
+    border-left: 0px none rgb(0,0,0) !important;
221
+}
222
+
223
+.hiprint-printElement-oval, .hiprint-printElement-rect {
224
+    border: 0.75pt solid #000;
225
+}
226
+
227
+.hiprint-text-content-middle {
228
+    display:table;
229
+}
230
+.hiprint-text-content-middle>div {
231
+    display: table-cell;
232
+    vertical-align:middle
233
+}
234
+
235
+.hiprint-text-content-bottom {
236
+    display: table;
237
+}
238
+
239
+    .hiprint-text-content-bottom > div {
240
+        display: table-cell;
241
+        vertical-align: bottom
242
+    }
243
+
244
+/*hi-grid-row */
245
+.hi-grid-row {
246
+    position: relative;
247
+    height: auto;
248
+    margin-right: 0;
249
+    margin-left: 0;
250
+    zoom: 1;
251
+    display: block;
252
+    box-sizing: border-box;
253
+}
254
+
255
+    .hi-grid-row::after, .hi-grid-row::before {
256
+        display: table;
257
+        content: '';
258
+        box-sizing: border-box;
259
+    }
260
+
261
+.hi-grid-col {
262
+    display: block;
263
+    box-sizing: border-box;
264
+    position: relative;
265
+    float: left;
266
+    flex: 0 0 auto;
267
+}
268
+
269
+.table-grid-row {
270
+    margin-left: -0pt;
271
+    margin-right: -0pt;
272
+}
273
+
274
+.tableGridColumnsGutterRow {
275
+    padding-left: 0pt;
276
+    padding-right: 0pt;
277
+}
278
+.hiprint-gridColumnsFooter {
279
+    text-align: left;
280
+    clear: both;
281
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 463 - 0
public/static/hiprint/custom.html


+ 106 - 0
public/static/hiprint/custom_test/config-etype-provider.js

@@ -0,0 +1,106 @@
1
+var configElementTypeProvider = (function () {
2
+    return function (options) {
3
+
4
+        var addElementTypes = function (context) {
5
+            context.addPrintElementTypes(
6
+                "testModule",
7
+                [
8
+                    new hiprint.PrintElementTypeGroup("常规", [
9
+                        {
10
+                            tid: 'configModule.name', title: '姓名', field: 'name', data: '古力娜扎', type: 'text',
11
+                            "options": {
12
+
13
+                                "height": 42,
14
+                                "width": 107,
15
+                                "fontSize": 19,
16
+                                "fontWeight": "700",
17
+                                "textAlign": "center",
18
+                                "lineHeight": 39,
19
+                                "hideTitle": true
20
+                            }
21
+                        },
22
+                        {
23
+                            tid: 'configModule.mySite', title: '个人网页', field: 'mySite', data: 'http://www.hinnn.com', type: 'text', "options": {
24
+
25
+                                "height": 50,
26
+                                "width": 50,
27
+                                "fontSize": 19,
28
+                                "fontWeight": "700",
29
+                                "textAlign": "center",
30
+                                "lineHeight": 39,
31
+                                "hideTitle": true,
32
+                                "textType": "qrcode"
33
+                            }
34
+                        },
35
+                        { tid: 'configModule.gender', title: '性别', field: 'gender', data: '男', type: 'text' },
36
+                        { tid: 'configModule.like', title: '爱好', field: 'like', data: '读书写字', type: 'text' },
37
+                        { tid: 'configModule.email', title: '邮箱', field: 'email', data: 'hinnn.com@gmail.com', type: 'text' },
38
+                        { tid: 'configModule.address', title: '地址', field: 'address', data: '北京朝阳区', type: 'text' },
39
+                        { tid: 'configModule.phone', title: '电话', field: 'phone', data: '18888888888', type: 'text' },
40
+                        { tid: 'configModule.target', title: '目标', field: 'target', data: '数据产品经理', type: 'text' },
41
+
42
+
43
+
44
+                        { tid: 'configModule.image', title: '图片', data: '/Content/assets/hi.png', type: 'image' },
45
+                        //{ tid: 'testModule.longText', title: '长文', data: '155123456789', type: 'longText' },
46
+                        {
47
+                            tid: 'configModule.workExperience', field: 'workExperience', title: '工作经历',
48
+                            type: 'table',
49
+                            columns: [
50
+
51
+                                [{ title: '职位', align: 'center', field: 'position', width: 100 },
52
+                                { title: '公司', align: 'center', field: 'company', width: 100 },
53
+                                { title: '地点', align: 'center', field: 'address', width: 100 },
54
+                                { title: '时间', align: 'center', field: 'date', width: 100 },
55
+                                { title: '主要工作', align: 'center', field: 'work', width: 200 }
56
+                                ]
57
+                            ]
58
+                        },
59
+                        {
60
+                            tid: 'configModule.html', title: 'html',
61
+                            formatter: function (data, options) {
62
+                                return $('<div style="height:50pt;width:50pt;background:red;border-radius: 50%;"></div>');
63
+                            },
64
+                            type: 'html'
65
+                        },
66
+                        { tid: 'configModule.customText', title: '自定义文本', customText: '自定义文本', custom: true, type: 'text' }
67
+                    ]),
68
+                    new hiprint.PrintElementTypeGroup("专业", [
69
+                        { tid: 'configModule.professional', title: '专业', field: 'professional', data: '信息管理与信息系统', type: 'text' },
70
+                        { tid: 'configModule.university', title: '大学', field: 'university', data: '北京邮电大学', type: 'text' },
71
+                        { tid: 'configModule.universityAddress', title: '地点', field: 'universityAddress', data: '北京', type: 'text' },
72
+                        { tid: 'configModule.universityDate', title: '时间', field: 'universityDate', data: '2008', type: 'text' },
73
+                        { tid: 'configModule.tech', title: '技能', field: 'tech', data: 'MYSQL,HIVE(数据仓库工具),SPSS(统计产品已服务解决方案),数据挖掘,跨部门沟通能力,业务理解能力,数据解读分析。', type: 'longText' }
74
+                    ]),
75
+                    new hiprint.PrintElementTypeGroup("辅助", [
76
+                        {
77
+                            tid: 'configModule.hline',
78
+                            title: '横线',
79
+                            type: 'hline'
80
+                        },
81
+                        {
82
+                            tid: 'configModule.vline',
83
+                            title: '竖线',
84
+                            type: 'vline'
85
+                        },
86
+                        {
87
+                            tid: 'configModule.rect',
88
+                            title: '矩形',
89
+                            type: 'rect'
90
+                        },
91
+                        {
92
+                            tid: 'testModule.oval',
93
+                            title: '椭圆',
94
+                            type: 'oval'
95
+                        }
96
+                    ])
97
+                ]
98
+            );
99
+        };
100
+
101
+        return {
102
+            addElementTypes: addElementTypes
103
+        };
104
+
105
+    };
106
+})();

+ 19 - 0
public/static/hiprint/custom_test/config-print-data.js

@@ -0,0 +1,19 @@
1
+var printData = {
2
+    name: '黄磊',
3
+    gender: '男',
4
+    like: "读书写字",
5
+    email: 'hinnn.com@gmail.com',
6
+    address: '北京朝阳区二道口',
7
+    phone: '18888888888',
8
+    target:'产品数据分析师',
9
+    workExperience: [
10
+        { position: '数据分析师', company: '某宝', address: '北京', date: '四月-2010-八月-2011', work:'专题分析/模型,根据业务分析分析各类专题,例如:商品等级,会员消费行为营销活动,重要产品数据等。' },
11
+        { position: '数据分析师', company: '某东', address: '北京', date: '九月-2011-三月-2016', work: '数据指标监控,根据产品,运营以及管理的需求,针对产品数据,运营,业务进展及KPI指标的监控,经营分析,对口BU的经营报告,分析KPI进度,交易产品异动原因,分析市场动态,汇报对象为BU经理。' },
12
+        { position: '数据产品经理', company: '大米', address: '北京', date: '四月-2016-至今', work: '负责具体分析项目,例如实时监控,数据后台管理,协调开发资源,控制项目进度。'}
13
+    ],
14
+    professional: '信息管理与信息系统',
15
+    university: '北京邮电大学',
16
+    universityAddress: '北京朝阳区二道口',
17
+    universityDate: '2010',
18
+    tech: 'MYSQL,HIVE(数据仓库工具),SPSS(统计产品已服务解决方案),数据挖掘,跨部门沟通能力,业务理解能力,数据解读分析。'
19
+};

+ 144 - 0
public/static/hiprint/custom_test/config-print-json.js

@@ -0,0 +1,144 @@
1
+var configPrintJson = {
2
+    "panels": [{
3
+        "index": 0,
4
+        "height": 297,
5
+        "width": 210,
6
+        "paperHeader": 0,
7
+        "paperFooter": 805,
8
+        "printElements": [{
9
+            "tid": "configModule.name",
10
+            "options": {
11
+                "left": 20,
12
+                "top": 25,
13
+                "height": 42,
14
+                "width": 107,
15
+                "fontSize": 19,
16
+                "fontWeight": "700",
17
+                "textAlign": "center",
18
+                "lineHeight": 39,
19
+                "hideTitle": "1"
20
+            }
21
+        },
22
+        {
23
+            "tid": "configModule.email",
24
+            "options": {
25
+                "left": 390,
26
+                "top": 35,
27
+                "height": 13,
28
+                "width": 165
29
+            }
30
+        }, {
31
+            "tid": "configModule.address",
32
+            "options": {
33
+                "left": 390,
34
+                "top": 55,
35
+                "height": 13,
36
+                "width": 165
37
+            }
38
+        }, {
39
+            "tid": "configModule.phone",
40
+            "options": {
41
+                "left": 390,
42
+                "top": 75,
43
+                "height": 13,
44
+                "width": 165
45
+            }
46
+        }, {
47
+            "tid": "configModule.hline",
48
+            "options": {
49
+                "left": 10,
50
+                "top": 110,
51
+                "height": 10,
52
+                "width": 573
53
+            }
54
+        }, {
55
+            "tid": "configModule.customText",
56
+            "options": {
57
+                "left": 20,
58
+                "top": 135,
59
+                "height": 13,
60
+                "width": 27,
61
+                "title": "目标",
62
+                "textAlign": "center"
63
+            }
64
+        }, {
65
+            "tid": "configModule.target",
66
+            "options": {
67
+                "left": 20,
68
+                "top": 160,
69
+                "height": 13,
70
+                "width": 562,
71
+                "fontSize": 13,
72
+                "hideTitle": "1"
73
+            }
74
+        }, {
75
+            "tid": "configModule.customText",
76
+            "options": {
77
+                "left": 20,
78
+                "top": 195,
79
+                "height": 13,
80
+                "width": 29,
81
+                "title": "教育",
82
+                "textAlign": "center"
83
+            }
84
+        }, {
85
+            "tid": "configModule.professional",
86
+            "options": {
87
+                "left": 20,
88
+                "top": 230,
89
+                "height": 17,
90
+                "width": 561,
91
+                "fontSize": 12,
92
+                "fontWeight": "600",
93
+                "lineHeight": 17,
94
+                "hideTitle": "1"
95
+            }
96
+        }, {
97
+            "tid": "configModule.university",
98
+            "options": {
99
+                "left": 20,
100
+                "top": 255,
101
+                "height": 15,
102
+                "width": 561,
103
+                "fontWeight": "600",
104
+                "hideTitle": "1"
105
+            }
106
+        }, {
107
+            "tid": "configModule.universityAddress",
108
+            "options": {
109
+                "left": 20,
110
+                "top": 280,
111
+                "height": 13,
112
+                "width": 120,
113
+                "hideTitle": "1"
114
+            }
115
+        }, {
116
+            "tid": "configModule.universityDate",
117
+            "options": {
118
+                "left": 20,
119
+                "top": 305,
120
+                "height": 13,
121
+                "width": 120
122
+            }
123
+        }, {
124
+            "tid": "configModule.tech",
125
+            "options": {
126
+                "left": 20,
127
+                "top": 345,
128
+                "height": 40,
129
+                "width": 561
130
+            }
131
+        }, {
132
+            "tid": "configModule.workExperience",
133
+            "options": {
134
+                "left": 20,
135
+                "top": 420,
136
+                "height": 44,
137
+                "width": 559
138
+            }
139
+        }
140
+        ],
141
+        "paperNumberLeft": 565,
142
+        "paperNumberTop": 819
143
+    }]
144
+}

+ 76 - 0
public/static/hiprint/custom_test/custom-etype-provider.js

@@ -0,0 +1,76 @@
1
+var customElementTypeProvider = (function () {
2
+    return function (options) {
3
+
4
+        var addElementTypes = function (context) {
5
+            context.addPrintElementTypes(
6
+                "testModule",
7
+                [
8
+                    new hiprint.PrintElementTypeGroup("常规", [
9
+                        { tid: 'testModule.text', text: '文本', data: '', type: 'text' },
10
+                        { tid: 'testModule.image', text: '图片', data: '/Content/assets/hi.png', type: 'image' },
11
+                        { tid: 'testModule.longText', text: '长文', data: '', type: 'longText' },
12
+                        {
13
+                            tid: 'testModule.table', field: 'table', text: '表格',
14
+                            type: 'table',
15
+                            groupFields: ['name'],
16
+                            groupFooterFormatter: function (group, option) {
17
+                                return '这里自定义统计脚信息';
18
+                            },
19
+                            columns: [
20
+                                [{ title: '行号', fixed: true, rowspan: 2, field: 'id', width: 70 },
21
+                                { title: '人员信息', colspan: 2 },
22
+                                { title: '销售统计', colspan: 2 }
23
+                                ],
24
+                                [{ title: '姓名', align: 'left', field: 'name', width: 100 },
25
+                                { title: '性别', field: 'gender', width: 100 },
26
+                                { title: '销售数量', field: 'count', width: 100 },
27
+                                { title: '销售金额', field: 'amount', width: 100 }
28
+                                ]
29
+                            ]
30
+                        },
31
+                        {
32
+                            tid: 'testModule.tableCustom',
33
+                            title: '表格',
34
+                            type: 'tableCustom'
35
+                        },
36
+                        {
37
+                            tid: 'testModule.html', title: 'html',
38
+                            formatter: function (data, options) {
39
+                                return $('<div style="height:50pt;width:50pt;background:red;border-radius: 50%;"></div>');
40
+                            },
41
+                            type: 'html'
42
+                        },
43
+                        { tid: 'testModule.customText', text: '自定义文本', customText: '自定义文本', custom: true, type: 'text' }
44
+                    ]),
45
+                    new hiprint.PrintElementTypeGroup("辅助", [
46
+                        {
47
+                            tid: 'testModule.hline',
48
+                            text: '横线',
49
+                            type: 'hline'
50
+                        },
51
+                        {
52
+                            tid: 'testModule.vline',
53
+                            text: '竖线',
54
+                            type: 'vline'
55
+                        },
56
+                        {
57
+                            tid: 'testModule.rect',
58
+                            text: '矩形',
59
+                            type: 'rect'
60
+                        },
61
+                        {
62
+                            tid: 'testModule.oval',
63
+                            text: '椭圆',
64
+                            type: 'oval'
65
+                        }
66
+                    ])
67
+                ]
68
+            );
69
+        };
70
+
71
+        return {
72
+            addElementTypes: addElementTypes
73
+        };
74
+
75
+    };
76
+})();

+ 485 - 0
public/static/hiprint/custom_test/custom-print-json.js

@@ -0,0 +1,485 @@
1
+var customPrintJson = {
2
+    "panels": [{
3
+        "index": 0,
4
+        "height": 297,
5
+        "width": 210,
6
+        "paperHeader": 49.5,
7
+        "paperFooter": 780,
8
+        "printElements": [{
9
+            "options": {
10
+                "left": 175.5,
11
+                "top": 10.5,
12
+                "height": 27,
13
+                "width": 259,
14
+                "title": "HiPrint自定义模块打印插件",
15
+                "fontSize": 19,
16
+                "fontWeight": "600",
17
+                "textAlign": "center",
18
+                "lineHeight": 26
19
+            },
20
+            "printElementType": {
21
+                "title": "自定义文本",
22
+                "type": "text"
23
+            }
24
+        }, {
25
+            "options": {
26
+                "left": 60,
27
+                "top": 27,
28
+                "height": 13,
29
+                "width": 52,
30
+                "title": "页眉线",
31
+                "textAlign": "center"
32
+            },
33
+            "printElementType": {
34
+                "title": "自定义文本",
35
+                "type": "text"
36
+            }
37
+        }, {
38
+            "options": {
39
+                "left": 25.5,
40
+                "top": 57,
41
+                "height": 705,
42
+                "width": 9,
43
+                "fixed": true,
44
+                "borderStyle": "dotted"
45
+            },
46
+            "printElementType": {
47
+                "type": "vline"
48
+            }
49
+        }, {
50
+            "options": {
51
+                "left": 60,
52
+                "top": 61.5,
53
+                "height": 48,
54
+                "width": 87,
55
+                "src": "/Content/assets/hi.png"
56
+            },
57
+            "printElementType": {
58
+                "title": "图片",
59
+                "type": "image"
60
+            }
61
+        }, {
62
+            "options": {
63
+                "left": 153,
64
+                "top": 64.5,
65
+                "height": 39,
66
+                "width": 276,
67
+                "title": "二维码以及条形码均采用svg格式打印。不同打印机打印不会造成失真。图片打印:不同DPI打印可能会导致失真,",
68
+                "fontFamily": "微软雅黑",
69
+                "textAlign": "center",
70
+                "lineHeight": 18
71
+            },
72
+            "printElementType": {
73
+                "title": "自定义文本",
74
+                "type": "text"
75
+            }
76
+        }, {
77
+            "options": {
78
+                "left": 457.5,
79
+                "top": 79.5,
80
+                "height": 13,
81
+                "width": 120,
82
+                "title": "姓名",
83
+                "field": "name",
84
+                "testData": "古力娜扎",
85
+                "color": "#f00808",
86
+                "textDecoration": "underline",
87
+                "textAlign": "center"
88
+            },
89
+            "printElementType": {
90
+                "title": "文本",
91
+                "type": "text"
92
+            }
93
+        }, {
94
+            "options": {
95
+                "left": 499.5,
96
+                "top": 120,
97
+                "height": 43,
98
+                "width": 51,
99
+                "title": "123456789",
100
+                "textType": "qrcode"
101
+            },
102
+            "printElementType": {
103
+                "title": "自定义文本",
104
+                "type": "text"
105
+            }
106
+        }, {
107
+            "options": {
108
+                "left": 285,
109
+                "top": 130.5,
110
+                "height": 34,
111
+                "width": 175,
112
+                "title": "123456789",
113
+                "fontFamily": "微软雅黑",
114
+                "textAlign": "center",
115
+                "textType": "barcode"
116
+            },
117
+            "printElementType": {
118
+                "title": "自定义文本",
119
+                "type": "text"
120
+            }
121
+        }, {
122
+            "options": {
123
+                "left": 60,
124
+                "top": 132,
125
+                "height": 19,
126
+                "width": 213,
127
+                "title": "所有打印元素都可已拖拽的方式来改变元素大小",
128
+                "fontFamily": "微软雅黑",
129
+                "textAlign": "center",
130
+                "lineHeight": 18
131
+            },
132
+            "printElementType": {
133
+                "title": "自定义文本",
134
+                "type": "text"
135
+            }
136
+        }, {
137
+            "options": {
138
+                "left": 153,
139
+                "top": 189,
140
+                "height": 13,
141
+                "width": 238,
142
+                "title": "单击元素,右侧可自定义元素属性",
143
+                "textAlign": "center",
144
+                "fontFamily": "微软雅黑"
145
+            },
146
+            "printElementType": {
147
+                "title": "自定义文本",
148
+                "type": "text"
149
+            }
150
+        }, {
151
+            "options": {
152
+                "left": 60,
153
+                "top": 190.5,
154
+                "height": 13,
155
+                "width": 51,
156
+                "title": "横线",
157
+                "textAlign": "center"
158
+            },
159
+            "printElementType": {
160
+                "title": "自定义文本",
161
+                "type": "text"
162
+            }
163
+        }, {
164
+            "options": {
165
+                "left": 415.5,
166
+                "top": 190.5,
167
+                "height": 13,
168
+                "width": 164,
169
+                "title": "可以配置各属性的默认值",
170
+                "textAlign": "center",
171
+                "fontFamily": "微软雅黑"
172
+            },
173
+            "printElementType": {
174
+                "title": "自定义文本",
175
+                "type": "text"
176
+            }
177
+        }, {
178
+            "options": {
179
+                "left": 60,
180
+                "top": 214.5,
181
+                "height": 10,
182
+                "width": 475.5
183
+            },
184
+            "printElementType": {
185
+                "title": "横线",
186
+                "type": "hline"
187
+            }
188
+        }, {
189
+            "options": {
190
+                "left": 235.5,
191
+                "top": 220.5,
192
+                "height": 32,
193
+                "width": 342,
194
+                "title": "自定义表格:用户可左键选中表头,右键查看可操作项,操作类似Excel,双击表头单元格可进行编辑。内容:title#field",
195
+                "fontFamily": "微软雅黑",
196
+                "textAlign": "center",
197
+                "lineHeight": 15
198
+            },
199
+            "printElementType": {
200
+                "title": "自定义文本",
201
+                "type": "text"
202
+            }
203
+        }, {
204
+            "options": {
205
+                "left": 156,
206
+                "top": 265.5,
207
+                "height": 13,
208
+                "width": 94,
209
+                "title": "表头列大小可拖动",
210
+                "fontFamily": "微软雅黑",
211
+                "textAlign": "center"
212
+            },
213
+            "printElementType": {
214
+                "title": "自定义文本",
215
+                "type": "text"
216
+            }
217
+        }, {
218
+            "options": {
219
+                "left": 60,
220
+                "top": 265.5,
221
+                "height": 13,
222
+                "width": 90,
223
+                "title": "红色区域可拖动",
224
+                "fontFamily": "微软雅黑",
225
+                "textAlign": "center"
226
+            },
227
+            "printElementType": {
228
+                "title": "自定义文本",
229
+                "type": "text"
230
+            }
231
+        }, {
232
+            "options": {
233
+                "left": 60,
234
+                "top": 285,
235
+                "height": 44,
236
+                "width": 511.5,
237
+                "field": "table",
238
+                "columns": [
239
+                    [{
240
+                        "width": 85.25,
241
+                        "colspan": 1,
242
+                        "rowspan": 1
243
+                    }, {
244
+                        "width": 85.25,
245
+                        "colspan": 1,
246
+                        "rowspan": 1
247
+                    }, {
248
+                        "title": "姓名",
249
+                        "field": "name",
250
+                        "width": 85.25,
251
+                        "align": "center",
252
+                        "colspan": 1,
253
+                        "rowspan": 1
254
+                    }, {
255
+                        "width": 85.25,
256
+                        "colspan": 1,
257
+                        "rowspan": 1
258
+                    }, {
259
+                        "width": 85.25,
260
+                        "colspan": 1,
261
+                        "rowspan": 1
262
+                    }, {
263
+                        "width": 85.25,
264
+                        "colspan": 1,
265
+                        "rowspan": 1
266
+                    }]
267
+                ]
268
+            },
269
+            "printElementType": {
270
+                "title": "表格",
271
+                "type": "tableCustom",
272
+				"footerFormatter":function(options,rows,data,currentPageGridRowsData){
273
+			 
274
+					return "<tr><td>"+currentPageGridRowsData.length+"</td></tr>"
275
+				}
276
+            }
277
+        }, {
278
+            "options": {
279
+                "left": 21,
280
+                "top": 346.5,
281
+                "height": 61.5,
282
+                "width": 15,
283
+                "title": "装订线",
284
+                "lineHeight": 18,
285
+                "fixed": true,
286
+                "contentPaddingTop": 3.75,
287
+                "backgroundColor": "#ffffff"
288
+            },
289
+            "printElementType": {
290
+                "type": "text"
291
+            }
292
+        }, {
293
+            "options": {
294
+                "left": 225,
295
+                "top": 349.5,
296
+                "height": 13,
297
+                "width": 346.5,
298
+                "title": "自定义模块:主要为开发人员设计,能够快速,简单,实现自己功能",
299
+                "textAlign": "center"
300
+            },
301
+            "printElementType": {
302
+                "title": "自定义文本",
303
+                "type": "text"
304
+            }
305
+        }, {
306
+            "options": {
307
+                "left": 60,
308
+                "top": 370.5,
309
+                "height": 18,
310
+                "width": 79,
311
+                "title": "配置项表格",
312
+                "textAlign": "center"
313
+            },
314
+            "printElementType": {
315
+                "title": "自定义文本",
316
+                "type": "text"
317
+            }
318
+        }, {
319
+            "options": {
320
+                "left": 225,
321
+                "top": 385.5,
322
+                "height": 38,
323
+                "width": 346.5,
324
+                "title": "配置模块:主要为客户使用,开发人员可以配置属性,字段,标题等,客户直接使用,配置模块请参考实例2",
325
+                "fontFamily": "微软雅黑",
326
+                "lineHeight": 15,
327
+                "textAlign": "center",
328
+                "color": "#d93838"
329
+            },
330
+            "printElementType": {
331
+                "title": "自定义文本",
332
+                "type": "text"
333
+            }
334
+        }, {
335
+            "options": {
336
+                "left": 60,
337
+                "top": 487.5,
338
+                "height": 13,
339
+                "width": 123,
340
+                "title": "长文本会自动分页",
341
+                "textAlign": "center"
342
+            },
343
+            "printElementType": {
344
+                "title": "自定义文本",
345
+                "type": "text"
346
+            }
347
+        }, {
348
+            "options": {
349
+                "left": 60,
350
+                "top": 507,
351
+                "height": 40,
352
+                "width": 511.5,
353
+                "field": "longText"
354
+            },
355
+            "printElementType": {
356
+                "title": "长文",
357
+                "type": "longText"
358
+            }
359
+        }, {
360
+            "options": {
361
+                "left": 475.5,
362
+                "top": 565.5,
363
+                "height": 100,
364
+                "width": 100
365
+            },
366
+            "printElementType": {
367
+                "title": "矩形",
368
+                "type": "rect"
369
+            }
370
+        }, {
371
+            "options": {
372
+                "left": 174,
373
+                "top": 568.5,
374
+                "height": 13,
375
+                "width": 90,
376
+                "title": "竖线",
377
+                "textAlign": "center"
378
+            },
379
+            "printElementType": {
380
+                "title": "自定义文本",
381
+                "type": "text"
382
+            }
383
+        }, {
384
+            "options": {
385
+                "left": 60,
386
+                "top": 574.5,
387
+                "height": 100,
388
+                "width": 10
389
+            },
390
+            "printElementType": {
391
+                "title": "竖线",
392
+                "type": "vline"
393
+            }
394
+        }, {
395
+            "options": {
396
+                "left": 210,
397
+                "top": 604.5,
398
+                "height": 13,
399
+                "width": 120,
400
+                "title": "横线",
401
+                "textAlign": "center"
402
+            },
403
+            "printElementType": {
404
+                "title": "自定义文本",
405
+                "type": "text"
406
+            }
407
+        }, {
408
+            "options": {
409
+                "left": 130.5,
410
+                "top": 625.5,
411
+                "height": 10,
412
+                "width": 277
413
+            },
414
+            "printElementType": {
415
+                "title": "横线",
416
+                "type": "hline"
417
+            }
418
+        }, {
419
+            "options": {
420
+                "left": 364.5,
421
+                "top": 649.5,
422
+                "height": 13,
423
+                "width": 101,
424
+                "title": "矩形",
425
+                "textAlign": "center"
426
+            },
427
+            "printElementType": {
428
+                "title": "自定义文本",
429
+                "type": "text"
430
+            }
431
+        }, {
432
+            "options": {
433
+                "left": 525,
434
+                "top": 784.5,
435
+                "height": 13,
436
+                "width": 63,
437
+                "title": "页尾线",
438
+                "textAlign": "center"
439
+            },
440
+            "printElementType": {
441
+                "title": "自定义文本",
442
+                "type": "text"
443
+            }
444
+        }, {
445
+            "options": {
446
+                "left": 12,
447
+                "top": 786,
448
+                "height": 49,
449
+                "width": 49
450
+            },
451
+            "printElementType": {
452
+                "title": "html",
453
+                "type": "html"
454
+            }
455
+        }, {
456
+            "options": {
457
+                "left": 75,
458
+                "top": 790.5,
459
+                "height": 13,
460
+                "width": 137,
461
+                "title": "红色原型是自动定义的Html",
462
+                "textAlign": "center"
463
+            },
464
+            "printElementType": {
465
+                "title": "自定义文本",
466
+                "type": "text"
467
+            }
468
+        }, {
469
+            "options": {
470
+                "left": 334.5,
471
+                "top": 810,
472
+                "height": 13,
473
+                "width": 205,
474
+                "title": "页眉线已上。页尾下以下每页都会重复打印",
475
+                "textAlign": "center"
476
+            },
477
+            "printElementType": {
478
+                "title": "自定义文本",
479
+                "type": "text"
480
+            }
481
+        }],
482
+        "paperNumberLeft": 565.5,
483
+        "paperNumberTop": 819
484
+    }]
485
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 51 - 0
public/static/hiprint/custom_test/print-data.js


BIN
public/static/hiprint/hi.png


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 7566 - 0
public/static/hiprint/hiprint.bundle.js


+ 755 - 0
public/static/hiprint/hiprint.config.js

@@ -0,0 +1,755 @@
1
+(function () {
2
+    window.HIPRINT_CONFIG = {
3
+        //optionItems: [hiprintCustomOptionItem],//自定义选项
4
+        movingDistance: 1.5, //鼠标拖动一次移动的距离,默认1.5pt
5
+        paperHeightTrim: 1, //纸张html 的高度等于真实高度-1
6
+        text: any = {
7
+            supportOptions: [
8
+
9
+
10
+                // {
11
+                //     name: 'hiprintCustomOptionItem',
12
+                //     hidden: false
13
+                // },
14
+                {
15
+                    name: 'title',
16
+                    hidden: false
17
+                },
18
+                {
19
+                    name: 'field',
20
+                    hidden: false
21
+                },
22
+                {
23
+                    name: 'testData',
24
+                    hidden: false
25
+                },
26
+                {
27
+                    name: 'dataType',
28
+                    hidden: false
29
+                },
30
+                {
31
+                    name: 'fontFamily',
32
+                    hidden: false
33
+                },
34
+                {
35
+                    name: 'fontSize',
36
+                    hidden: false
37
+                },
38
+                {
39
+                    name: 'fontWeight',
40
+                    hidden: false
41
+                },
42
+                {
43
+                    name: 'letterSpacing',
44
+                    hidden: false
45
+                },
46
+                {
47
+                    name: 'color',
48
+                    hidden: false
49
+                },
50
+                {
51
+                    name: 'textDecoration',
52
+                    hidden: false
53
+                },
54
+                {
55
+                    name: 'textAlign',
56
+                    hidden: false
57
+                },
58
+                {
59
+                    name: 'textContentVerticalAlign',
60
+                    hidden: false
61
+                },
62
+
63
+                {
64
+                    name: 'lineHeight',
65
+                    hidden: false
66
+                },
67
+                {
68
+                    name: 'textType',
69
+                    hidden: false
70
+                },
71
+                {
72
+                    name: 'barcodeMode',
73
+                    hidden: false
74
+                },
75
+                {
76
+                    name: 'hideTitle',
77
+                    hidden: false
78
+                },
79
+                {
80
+                    name: 'showInPage',
81
+                    hidden: false
82
+                },
83
+                {
84
+                    name: 'unShowInPage',
85
+                    hidden: false
86
+                },
87
+                {
88
+                    name: 'fixed',
89
+                    hidden: false
90
+                },
91
+                {
92
+                    name: 'axis',
93
+                    hidden: false
94
+                },
95
+                {
96
+                    name: 'transform',
97
+                    hidden: false
98
+                },
99
+                {
100
+                    name: 'optionsGroup',
101
+                    hidden: false
102
+                },
103
+                {
104
+                    name: 'borderLeft',
105
+                    hidden: false
106
+                },
107
+                {
108
+                    name: 'borderTop',
109
+                    hidden: false
110
+                },
111
+                {
112
+                    name: 'borderRight',
113
+                    hidden: false
114
+                },
115
+                {
116
+                    name: 'borderBottom',
117
+                    hidden: false
118
+                },
119
+                {
120
+                    name: 'borderWidth',
121
+                    hidden: false
122
+                },
123
+                {
124
+                    name: 'borderColor',
125
+                    hidden: false
126
+                },
127
+                {
128
+                    name: 'contentPaddingLeft',
129
+                    hidden: false
130
+                },
131
+                {
132
+                    name: 'contentPaddingTop',
133
+                    hidden: false
134
+                },
135
+                {
136
+                    name: 'contentPaddingRight',
137
+                    hidden: false
138
+                },
139
+                {
140
+                    name: 'contentPaddingBottom',
141
+                    hidden: false
142
+                },
143
+                {
144
+                    name: 'backgroundColor',
145
+                    hidden: false
146
+                },
147
+                {
148
+                    name: 'formatter',
149
+                    hidden: false
150
+                },
151
+                {
152
+                    name: 'styler',
153
+                    hidden: false
154
+                }
155
+
156
+            ],
157
+            default: {
158
+                width: 120,
159
+                height: 9.75,
160
+            }
161
+        },
162
+        image: any = {
163
+            supportOptions: [{
164
+                name: 'field',
165
+                hidden: false
166
+            },
167
+            {
168
+                name: 'src',
169
+                hidden: false
170
+            },
171
+            {
172
+                name: 'showInPage',
173
+                hidden: false
174
+            },
175
+            {
176
+                name: 'fixed',
177
+                hidden: false
178
+            },
179
+            {
180
+                name: 'axis',
181
+                hidden: false
182
+            },
183
+            {
184
+                name: 'transform',
185
+                hidden: false
186
+            },
187
+            {
188
+                name: 'formatter',
189
+                hidden: false
190
+            },
191
+            {
192
+                name: 'styler',
193
+                hidden: false
194
+            }
195
+            ],
196
+            default: {
197
+
198
+            }
199
+        },
200
+        longText: any = {
201
+            supportOptions: [{
202
+                name: 'title',
203
+                hidden: false
204
+            },
205
+            {
206
+                name: 'field',
207
+                hidden: false
208
+            },
209
+            {
210
+                name: 'testData',
211
+                hidden: false
212
+            },
213
+            {
214
+                name: 'fontFamily',
215
+                hidden: false
216
+            },
217
+            {
218
+                name: 'fontSize',
219
+                hidden: false
220
+            },
221
+            {
222
+                name: 'fontWeight',
223
+                hidden: false
224
+            },
225
+            {
226
+                name: 'letterSpacing',
227
+                hidden: false
228
+            },
229
+
230
+            {
231
+                name: 'textAlign',
232
+                hidden: false
233
+            },
234
+            {
235
+                name: 'lineHeight',
236
+                hidden: false
237
+            },
238
+            {
239
+                name: 'color',
240
+                hidden: false
241
+            },
242
+            {
243
+                name: 'hideTitle',
244
+                hidden: false
245
+            },
246
+
247
+            {
248
+                name: 'longTextIndent',
249
+                hidden: false
250
+            },
251
+
252
+            {
253
+                name: 'leftSpaceRemoved',
254
+                hidden: false
255
+            },
256
+            {
257
+                name: 'showInPage',
258
+                hidden: false
259
+            },
260
+            {
261
+                name: 'unShowInPage',
262
+                hidden: false
263
+            },
264
+            {
265
+                name: 'fixed',
266
+                hidden: false
267
+            },
268
+            {
269
+                name: 'axis',
270
+                hidden: false
271
+            },
272
+            {
273
+                name: 'lHeight',
274
+                hidden: false
275
+            },
276
+            {
277
+                name: 'transform',
278
+                hidden: false
279
+            },
280
+            {
281
+                name: 'optionsGroup',
282
+                hidden: false
283
+            },
284
+            {
285
+                name: 'borderLeft',
286
+                hidden: false
287
+            },
288
+            {
289
+                name: 'borderTop',
290
+                hidden: false
291
+            },
292
+            {
293
+                name: 'borderRight',
294
+                hidden: false
295
+            },
296
+            {
297
+                name: 'borderBottom',
298
+                hidden: false
299
+            },
300
+            {
301
+                name: 'borderWidth',
302
+                hidden: false
303
+            },
304
+            {
305
+                name: 'borderColor',
306
+                hidden: false
307
+            },
308
+            {
309
+                name: 'contentPaddingLeft',
310
+                hidden: false
311
+            },
312
+            {
313
+                name: 'contentPaddingTop',
314
+                hidden: false
315
+            },
316
+            {
317
+                name: 'contentPaddingRight',
318
+                hidden: false
319
+            },
320
+            {
321
+                name: 'contentPaddingBottom',
322
+                hidden: false
323
+            },
324
+            {
325
+                name: 'backgroundColor',
326
+                hidden: false
327
+            },
328
+            {
329
+                name: 'formatter',
330
+                hidden: false
331
+            },
332
+            {
333
+                name: 'styler',
334
+                hidden: false
335
+            }
336
+
337
+            ],
338
+            default: {
339
+                height: 42,
340
+                width: 550
341
+            }
342
+        },
343
+        table: any = {
344
+            supportOptions: [{
345
+                name: 'field',
346
+                hidden: false
347
+            },
348
+            {
349
+                name: 'fontFamily',
350
+                hidden: false
351
+            },
352
+            {
353
+                name: 'fontSize',
354
+                hidden: false
355
+            },
356
+            {
357
+                name: 'lineHeight',
358
+                hidden: false
359
+            },
360
+            {
361
+                name: 'textAlign',
362
+                hidden: false
363
+            },
364
+            {
365
+                name: 'gridColumns',
366
+                hidden: false
367
+            },
368
+            {
369
+                name: 'gridColumnsGutter',
370
+                hidden: false
371
+            },
372
+
373
+            {
374
+                name: 'tableBorder',
375
+                hidden: false
376
+            },
377
+            {
378
+                name: 'tableHeaderBorder',
379
+                hidden: false
380
+            },
381
+            {
382
+                name: 'tableHeaderCellBorder',
383
+                hidden: false
384
+            },
385
+            {
386
+                name: 'tableHeaderRowHeight',
387
+                hidden: false
388
+            },
389
+            {
390
+                name: 'tableHeaderBackground',
391
+                hidden: false
392
+            },
393
+            {
394
+                name: 'tableHeaderFontSize',
395
+                hidden: false
396
+            },
397
+            {
398
+                name: 'tableHeaderFontWeight',
399
+                hidden: false
400
+            },
401
+
402
+            {
403
+                name: 'tableBodyRowHeight',
404
+                hidden: false
405
+            },
406
+            {
407
+                name: 'tableBodyRowBorder',
408
+                hidden: false
409
+            },
410
+            {
411
+                name: 'tableBodyCellBorder',
412
+                hidden: false
413
+            },
414
+
415
+            {
416
+                name: 'axis',
417
+                hidden: false
418
+            },
419
+            {
420
+                name: 'lHeight',
421
+                hidden: false
422
+            },
423
+
424
+            {
425
+                name: 'autoCompletion',
426
+                hidden: false
427
+            },
428
+            {
429
+                name: 'columns',
430
+                hidden: false
431
+            },
432
+            {
433
+
434
+                name: 'styler',
435
+                hidden: false
436
+            },
437
+            {
438
+
439
+                name: 'rowStyler',
440
+                hidden: false
441
+            },
442
+
443
+            {
444
+
445
+                name: 'tableFooterRepeat',
446
+                hidden: false
447
+            },
448
+            {
449
+
450
+                name: 'footerFormatter',
451
+                hidden: false
452
+            },
453
+            {
454
+                name: 'gridColumnsFooterFormatter',
455
+                hidden: false
456
+
457
+            }
458
+
459
+
460
+            ],
461
+            default: {
462
+
463
+                width: 550
464
+            }
465
+        },
466
+        tableCustom: any = {
467
+            supportOptions: [{
468
+                name: 'field',
469
+                hidden: false
470
+            },
471
+            {
472
+                name: 'fontFamily',
473
+                hidden: false
474
+            },
475
+            {
476
+                name: 'fontSize',
477
+                hidden: false
478
+            },
479
+            {
480
+                name: 'textAlign',
481
+                hidden: false
482
+            },
483
+            {
484
+                name: 'tableBorder',
485
+                hidden: false
486
+            },
487
+            {
488
+                name: 'tableHeaderBorder',
489
+                hidden: false
490
+            },
491
+            {
492
+                name: 'tableHeaderCellBorder',
493
+                hidden: false
494
+            },
495
+            {
496
+                name: 'tableHeaderRowHeight',
497
+                hidden: false
498
+            },
499
+            {
500
+                name: 'tableHeaderFontSize',
501
+                hidden: false
502
+            },
503
+            {
504
+                name: 'tableHeaderFontWeight',
505
+                hidden: false
506
+            },
507
+            {
508
+                name: 'tableHeaderBackground',
509
+                hidden: false
510
+            },
511
+
512
+            {
513
+                name: 'tableBodyRowHeight',
514
+                hidden: false
515
+            },
516
+            {
517
+                name: 'tableBodyRowBorder',
518
+                hidden: false
519
+            },
520
+            {
521
+                name: 'tableBodyCellBorder',
522
+                hidden: false
523
+            },
524
+            {
525
+                name: 'axis',
526
+                hidden: false
527
+            },
528
+            {
529
+                name: 'lHeight',
530
+                hidden: false
531
+            },
532
+            {
533
+                name: 'autoCompletion',
534
+                hidden: false
535
+            }, {
536
+
537
+                name: 'tableFooterRepeat',
538
+                hidden: false
539
+            }
540
+            ],
541
+            default: {
542
+
543
+                width: 550
544
+            }
545
+        },
546
+
547
+
548
+        hline: any = {
549
+            supportOptions: [{
550
+                name: 'borderColor',
551
+                hidden: false
552
+            }, {
553
+                name: 'borderWidth',
554
+                hidden: false
555
+            }, {
556
+                name: 'showInPage',
557
+                hidden: false
558
+            },
559
+            {
560
+                name: 'fixed',
561
+                hidden: false
562
+            },
563
+            {
564
+                name: 'axis',
565
+                hidden: false
566
+            },
567
+            {
568
+                name: 'transform',
569
+                hidden: false
570
+            },
571
+            {
572
+                name: 'borderStyle',
573
+                hidden: false
574
+            }
575
+
576
+            ],
577
+            default: {
578
+                borderWidth: 0.75,
579
+                height: 9,
580
+                width: 90
581
+            }
582
+        },
583
+        vline: any = {
584
+            supportOptions: [{
585
+                name: 'borderColor',
586
+                hidden: false
587
+            }, {
588
+                name: 'borderWidth',
589
+                hidden: false
590
+            }, {
591
+                name: 'showInPage',
592
+                hidden: false
593
+            },
594
+            {
595
+                name: 'fixed',
596
+                hidden: false
597
+            },
598
+            {
599
+                name: 'axis',
600
+                hidden: false
601
+            },
602
+            {
603
+                name: 'transform',
604
+                hidden: false
605
+            },
606
+            {
607
+                name: 'borderStyle',
608
+                hidden: false
609
+            }
610
+            ],
611
+            default: {
612
+                borderWidth: undefined,
613
+                height: 90,
614
+                width: 9
615
+            }
616
+        },
617
+        rect: any = {
618
+            supportOptions: [{
619
+                name: 'borderColor',
620
+                hidden: false
621
+            }, {
622
+                name: 'borderWidth',
623
+                hidden: false
624
+            }, {
625
+                name: 'showInPage',
626
+                hidden: false
627
+            },
628
+            {
629
+                name: 'fixed',
630
+                hidden: false
631
+            },
632
+            {
633
+                name: 'axis',
634
+                hidden: false
635
+            },
636
+            {
637
+                name: 'transform',
638
+                hidden: false
639
+            },
640
+            {
641
+                name: 'borderStyle',
642
+                hidden: false
643
+            }
644
+            ],
645
+            default: {
646
+                borderWidth: undefined,
647
+                height: 90,
648
+                width: 90
649
+            }
650
+        },
651
+        oval: any = {
652
+            supportOptions: [{
653
+                name: 'borderColor',
654
+                hidden: false
655
+            }, {
656
+                name: 'borderWidth',
657
+                hidden: false
658
+            }, {
659
+                name: 'showInPage',
660
+                hidden: false
661
+            },
662
+            {
663
+                name: 'fixed',
664
+                hidden: false
665
+            },
666
+            {
667
+                name: 'axis',
668
+                hidden: false
669
+            }, {
670
+                name: 'transform',
671
+                hidden: false
672
+            },
673
+            {
674
+                name: 'borderStyle',
675
+                hidden: false
676
+            }
677
+            ],
678
+            default: {
679
+                borderWidth: undefined,
680
+                height: 90,
681
+                width: 90
682
+            }
683
+        },
684
+        html: any = {
685
+            supportOptions: [{
686
+                name: 'showInPage',
687
+                hidden: false
688
+            },
689
+            {
690
+                name: 'unShowInPage',
691
+                hidden: false
692
+            },
693
+            {
694
+                name: 'fixed',
695
+                hidden: false
696
+            },
697
+            {
698
+                name: 'axis',
699
+                hidden: false
700
+            },
701
+            {
702
+                name: 'formatter',
703
+                hidden: false
704
+            }
705
+            ],
706
+            default: {
707
+
708
+                height: 90,
709
+                width: 90
710
+            }
711
+        },
712
+        tableColumn: any = {
713
+            supportOptions: [
714
+                {
715
+                    name: 'title',
716
+                    hidden: false
717
+                },
718
+                {
719
+                    name: 'align',
720
+                    hidden: false
721
+                },
722
+                {
723
+                    name: 'halign',
724
+                    hidden: false
725
+                },
726
+                {
727
+                    name: 'vAlign',
728
+                    hidden: false
729
+                },
730
+
731
+
732
+                {
733
+                    name: 'paddingLeft',
734
+                    hidden: false
735
+                },
736
+                {
737
+                    name: 'paddingRight',
738
+                    hidden: false
739
+                },
740
+                {
741
+                    name: 'formatter2',
742
+                    hidden: false
743
+                }, {
744
+                    name: 'styler2',
745
+                    hidden: false
746
+                }
747
+            ],
748
+            default: {
749
+
750
+                height: 90,
751
+                width: 90
752
+            }
753
+        }
754
+    }
755
+})();

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2 - 0
public/static/hiprint/plugins/JsBarcode.all.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 10364 - 0
public/static/hiprint/plugins/jq-3.31.js


+ 113 - 0
public/static/hiprint/plugins/jquery.hiwprint.js

@@ -0,0 +1,113 @@
1
+(function ($) {
2
+    $.fn.hiwprint = function (options) {
3
+        var usedFrame = document.getElementById('hiwprint_iframe');
4
+        if (usedFrame) usedFrame.parentNode.removeChild(usedFrame);
5
+        var opt = $.extend({}, $.fn.hiwprint.defaults, options);
6
+        var $element = this;
7
+        var $iframe = $('<iframe id="hiwprint_iframe"  style="visibility: hidden; height: 0; width: 0; position: absolute;"></iframe>');
8
+        var css = '';
9
+        if (opt.importCss) {
10
+            if ($("link[media=print]").length > 0) {
11
+                $("link[media=print]").each(function () {
12
+                    css += '<link rel="stylesheet" type="text/css" media="print" href="' + $(this).attr("href") + '">';
13
+                });
14
+            }
15
+            else {
16
+                $("link").each(function () {
17
+                    css += '<link rel="stylesheet" type="text/css" media="print" href="' + $(this).attr("href") + '">';
18
+                });
19
+            }
20
+        }
21
+        $iframe[0].srcdoc = '<!DOCTYPE html><html><head><title></title><meta charset="UTF-8">' + css + '</head><body></body></html>';
22
+
23
+        $iframe[0].onload = function () {
24
+            var printDocument = $iframe[0].contentWindow || $iframe[0].contentDocument;
25
+            if (printDocument.document) printDocument = printDocument.document;
26
+            if (!$iframe.attr('srcdoc')) {
27
+                printDocument.write('<!DOCTYPE html><html><head><title></title><meta charset="UTF-8">' + css + '</head><body></body></html>');
28
+            }
29
+            if (opt.printContainer) {
30
+                printDocument.body.innerHTML = $element[0].outerHTML;
31
+            }
32
+            else {
33
+                printDocument.body.innerHTML = $element.html();
34
+            }
35
+            loadAllImages(printDocument, function () {
36
+
37
+                performPrint($iframe[0]);
38
+            });
39
+
40
+        };
41
+
42
+        $iframe.appendTo("body");
43
+
44
+    };
45
+
46
+    $.fn.hiwprint.defaults = {
47
+        importCss: true,
48
+        printContainer: true
49
+    };
50
+
51
+    function performPrint(iframeElement) {
52
+        try {
53
+            iframeElement.focus();
54
+            if (isEdge() || isIE()) {
55
+                try {
56
+                    iframeElement.contentWindow.document.execCommand('print', false, null);
57
+                } catch (e) {
58
+                    iframeElement.contentWindow.print();
59
+                }
60
+            } else {
61
+                // Other browsers
62
+                iframeElement.contentWindow.print();
63
+            }
64
+        } catch (error) {
65
+            console.log(error);
66
+        }
67
+    }
68
+
69
+
70
+    function isIE() {
71
+        return navigator.userAgent.indexOf('MSIE') !== -1 || !!document.documentMode;
72
+    }
73
+
74
+    // Edge 20+
75
+    function isEdge() {
76
+        return !isIE() && !!window.StyleMedia;
77
+    }
78
+
79
+
80
+
81
+    function loadAllImages(printDocument, callback, time) {
82
+        
83
+        if (time === undefined) {
84
+            time = 0;
85
+        }
86
+        var images = printDocument.getElementsByTagName('img');
87
+        var allLoaded = true;
88
+        for (var i = 0; i < images.length; i++) {
89
+            var image = images[i];
90
+            if (image.src && image.src !== window.location.href && image.src.indexOf('base64') == -1) {
91
+               
92
+                if (!image || typeof image.naturalWidth === 'undefined' || image.naturalWidth === 0 || !image.complete) {
93
+                    console.log(image.complete);
94
+                    if (!image.complete) {
95
+                        allLoaded = false;
96
+                    }
97
+                    
98
+                }
99
+            }
100
+        }
101
+        time++;
102
+        if (!allLoaded && time < 10) {
103
+            
104
+            setTimeout(function () {
105
+               loadAllImages(printDocument, callback, time);
106
+            }, 500);
107
+        } else {
108
+            callback();
109
+        }
110
+    }
111
+
112
+
113
+})(jQuery);

+ 77 - 0
public/static/hiprint/plugins/jquery.jqprint-0.3.js

@@ -0,0 +1,77 @@
1
+// -----------------------------------------------------------------------
2
+// Eros Fratini - eros@recoding.it
3
+// jqprint 0.3
4
+//
5
+// - 19/06/2009 - some new implementations, added Opera support
6
+// - 11/05/2009 - first sketch
7
+//
8
+// Printing plug-in for jQuery, evolution of jPrintArea: http://plugins.jquery.com/project/jPrintArea
9
+// requires jQuery 1.3.x
10
+//
11
+// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
12
+//------------------------------------------------------------------------
13
+
14
+(function($) {
15
+    var opt;
16
+
17
+    $.fn.jqprint = function (options) {
18
+        opt = $.extend({}, $.fn.jqprint.defaults, options);
19
+
20
+        var $element = (this instanceof jQuery) ? this : $(this);
21
+        
22
+        if (opt.operaSupport && $.browser.opera) 
23
+        { 
24
+            var tab = window.open("","jqPrint-preview");
25
+            tab.document.open();
26
+
27
+            var doc = tab.document;
28
+        }
29
+        else 
30
+        {
31
+            var $iframe = $("<iframe  />");
32
+        
33
+            if (!opt.debug) { $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-600px", top: "-600px" }); }
34
+
35
+            $iframe.appendTo("body");
36
+            var doc = $iframe[0].contentWindow.document;
37
+        }
38
+        
39
+        if (opt.importCSS)
40
+        {
41
+            
42
+            doc.write('<style media="print"> @page {size: auto;  margin: 0mm;padding:0mm }</style>')
43
+            if ($("link[media=print]").length > 0) 
44
+            {
45
+                $("link[media=print]").each( function() {
46
+                    doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />");
47
+                });
48
+            }
49
+            else 
50
+            {
51
+                $("link").each( function() {
52
+                    doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />");
53
+                });
54
+            }
55
+        }
56
+        
57
+        if (opt.printContainer) { doc.write($element.outer()); }
58
+        else { $element.each( function() { doc.write($(this).html()); }); }
59
+        
60
+        doc.close();
61
+        
62
+        (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).focus();
63
+        setTimeout( function() { (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).print(); if (tab) { tab.close(); } }, 1000);
64
+    }
65
+    
66
+    $.fn.jqprint.defaults = {
67
+		debug: false,
68
+		importCSS: true, 
69
+		printContainer: true,
70
+		operaSupport: true
71
+	};
72
+
73
+    // Thanks to 9__, found at http://users.livejournal.com/9__/380664.html
74
+    jQuery.fn.outer = function() {
75
+      return $($('<div></div>').html(this.clone())).html();
76
+    } 
77
+})(jQuery);

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 8 - 0
public/static/hiprint/plugins/jquery.minicolors.min.js


+ 265 - 0
public/static/hiprint/plugins/jspdf/canvas2image.js

@@ -0,0 +1,265 @@
1
+/**
2
+ * covert canvas to image
3
+ * and save the image file
4
+ */
5
+
6
+var Canvas2Image = function () {
7
+
8
+	// check if support sth.
9
+	var $support = function () {
10
+		var canvas = document.createElement('canvas'),
11
+			ctx = canvas.getContext('2d');
12
+
13
+		return {
14
+			canvas: !!ctx,
15
+			imageData: !!ctx.getImageData,
16
+			dataURL: !!canvas.toDataURL,
17
+			btoa: !!window.btoa
18
+		};
19
+	}();
20
+
21
+	var downloadMime = 'image/octet-stream';
22
+
23
+	function scaleCanvas (canvas, width, height) {
24
+		var w = canvas.width,
25
+			h = canvas.height;
26
+		if (width == undefined) {
27
+			width = w;
28
+		}
29
+		if (height == undefined) {
30
+			height = h;
31
+		}
32
+
33
+		var retCanvas = document.createElement('canvas');
34
+		var retCtx = retCanvas.getContext('2d');
35
+		retCanvas.width = width;
36
+		retCanvas.height = height;
37
+		retCtx.drawImage(canvas, 0, 0, w, h, 0, 0, width, height);
38
+		return retCanvas;
39
+	}
40
+
41
+	function getDataURL (canvas, type, width, height) {
42
+		canvas = scaleCanvas(canvas, width, height);
43
+		return canvas.toDataURL(type);
44
+	}
45
+
46
+	function saveFile (strData) {
47
+		document.location.href = strData;
48
+	}
49
+
50
+	function genImage(strData) {
51
+		var img = document.createElement('img');
52
+		img.src = strData;
53
+		return img;
54
+	}
55
+	function fixType (type) {
56
+		type = type.toLowerCase().replace(/jpg/i, 'jpeg');
57
+		var r = type.match(/png|jpeg|bmp|gif/)[0];
58
+		return 'image/' + r;
59
+	}
60
+	function encodeData (data) {
61
+		if (!window.btoa) { throw 'btoa undefined' }
62
+		var str = '';
63
+		if (typeof data == 'string') {
64
+			str = data;
65
+		} else {
66
+			for (var i = 0; i < data.length; i ++) {
67
+				str += String.fromCharCode(data[i]);
68
+			}
69
+		}
70
+
71
+		return btoa(str);
72
+	}
73
+	function getImageData (canvas) {
74
+		var w = canvas.width,
75
+			h = canvas.height;
76
+		return canvas.getContext('2d').getImageData(0, 0, w, h);
77
+	}
78
+	function makeURI (strData, type) {
79
+		return 'data:' + type + ';base64,' + strData;
80
+	}
81
+
82
+
83
+	/**
84
+	 * create bitmap image
85
+	 * 按照规则生成图片响应头和响应体
86
+	 */
87
+	var genBitmapImage = function (oData) {
88
+
89
+		//
90
+		// BITMAPFILEHEADER: http://msdn.microsoft.com/en-us/library/windows/desktop/dd183374(v=vs.85).aspx
91
+		// BITMAPINFOHEADER: http://msdn.microsoft.com/en-us/library/dd183376.aspx
92
+		//
93
+
94
+		var biWidth  = oData.width;
95
+		var biHeight	= oData.height;
96
+		var biSizeImage = biWidth * biHeight * 3;
97
+		var bfSize  = biSizeImage + 54; // total header size = 54 bytes
98
+
99
+		//
100
+		//  typedef struct tagBITMAPFILEHEADER {
101
+		//  	WORD bfType;
102
+		//  	DWORD bfSize;
103
+		//  	WORD bfReserved1;
104
+		//  	WORD bfReserved2;
105
+		//  	DWORD bfOffBits;
106
+		//  } BITMAPFILEHEADER;
107
+		//
108
+		var BITMAPFILEHEADER = [
109
+			// WORD bfType -- The file type signature; must be "BM"
110
+			0x42, 0x4D,
111
+			// DWORD bfSize -- The size, in bytes, of the bitmap file
112
+			bfSize & 0xff, bfSize >> 8 & 0xff, bfSize >> 16 & 0xff, bfSize >> 24 & 0xff,
113
+			// WORD bfReserved1 -- Reserved; must be zero
114
+			0, 0,
115
+			// WORD bfReserved2 -- Reserved; must be zero
116
+			0, 0,
117
+			// DWORD bfOffBits -- The offset, in bytes, from the beginning of the BITMAPFILEHEADER structure to the bitmap bits.
118
+			54, 0, 0, 0
119
+		];
120
+
121
+		//
122
+		//  typedef struct tagBITMAPINFOHEADER {
123
+		//  	DWORD biSize;
124
+		//  	LONG  biWidth;
125
+		//  	LONG  biHeight;
126
+		//  	WORD  biPlanes;
127
+		//  	WORD  biBitCount;
128
+		//  	DWORD biCompression;
129
+		//  	DWORD biSizeImage;
130
+		//  	LONG  biXPelsPerMeter;
131
+		//  	LONG  biYPelsPerMeter;
132
+		//  	DWORD biClrUsed;
133
+		//  	DWORD biClrImportant;
134
+		//  } BITMAPINFOHEADER, *PBITMAPINFOHEADER;
135
+		//
136
+		var BITMAPINFOHEADER = [
137
+			// DWORD biSize -- The number of bytes required by the structure
138
+			40, 0, 0, 0,
139
+			// LONG biWidth -- The width of the bitmap, in pixels
140
+			biWidth & 0xff, biWidth >> 8 & 0xff, biWidth >> 16 & 0xff, biWidth >> 24 & 0xff,
141
+			// LONG biHeight -- The height of the bitmap, in pixels
142
+			biHeight & 0xff, biHeight >> 8  & 0xff, biHeight >> 16 & 0xff, biHeight >> 24 & 0xff,
143
+			// WORD biPlanes -- The number of planes for the target device. This value must be set to 1
144
+			1, 0,
145
+			// WORD biBitCount -- The number of bits-per-pixel, 24 bits-per-pixel -- the bitmap
146
+			// has a maximum of 2^24 colors (16777216, Truecolor)
147
+			24, 0,
148
+			// DWORD biCompression -- The type of compression, BI_RGB (code 0) -- uncompressed
149
+			0, 0, 0, 0,
150
+			// DWORD biSizeImage -- The size, in bytes, of the image. This may be set to zero for BI_RGB bitmaps
151
+			biSizeImage & 0xff, biSizeImage >> 8 & 0xff, biSizeImage >> 16 & 0xff, biSizeImage >> 24 & 0xff,
152
+			// LONG biXPelsPerMeter, unused
153
+			0,0,0,0,
154
+			// LONG biYPelsPerMeter, unused
155
+			0,0,0,0,
156
+			// DWORD biClrUsed, the number of color indexes of palette, unused
157
+			0,0,0,0,
158
+			// DWORD biClrImportant, unused
159
+			0,0,0,0
160
+		];
161
+
162
+		var iPadding = (4 - ((biWidth * 3) % 4)) % 4;
163
+
164
+		var aImgData = oData.data;
165
+
166
+		var strPixelData = '';
167
+		var biWidth4 = biWidth<<2;
168
+		var y = biHeight;
169
+		var fromCharCode = String.fromCharCode;
170
+
171
+		do {
172
+			var iOffsetY = biWidth4*(y-1);
173
+			var strPixelRow = '';
174
+			for (var x = 0; x < biWidth; x++) {
175
+				var iOffsetX = x<<2;
176
+				strPixelRow += fromCharCode(aImgData[iOffsetY+iOffsetX+2]) +
177
+							   fromCharCode(aImgData[iOffsetY+iOffsetX+1]) +
178
+							   fromCharCode(aImgData[iOffsetY+iOffsetX]);
179
+			}
180
+
181
+			for (var c = 0; c < iPadding; c++) {
182
+				strPixelRow += String.fromCharCode(0);
183
+			}
184
+
185
+			strPixelData += strPixelRow;
186
+		} while (--y);
187
+
188
+		var strEncoded = encodeData(BITMAPFILEHEADER.concat(BITMAPINFOHEADER)) + encodeData(strPixelData);
189
+
190
+		return strEncoded;
191
+	};
192
+
193
+	/**
194
+	 * saveAsImage
195
+	 * @param canvasElement
196
+	 * @param {String} image type
197
+	 * @param {Number} [optional] png width
198
+	 * @param {Number} [optional] png height
199
+	 */
200
+	var saveAsImage = function (canvas, width, height, type) {
201
+		if ($support.canvas && $support.dataURL) {
202
+			if (typeof canvas == "string") { canvas = document.getElementById(canvas); }
203
+			if (type == undefined) { type = 'png'; }
204
+			type = fixType(type);
205
+			if (/bmp/.test(type)) {
206
+				var data = getImageData(scaleCanvas(canvas, width, height));
207
+				var strData = genBitmapImage(data);
208
+				saveFile(makeURI(strData, downloadMime));
209
+			} else {
210
+				var strData = getDataURL(canvas, type, width, height);
211
+				saveFile(strData.replace(type, downloadMime));
212
+			}
213
+		}
214
+	};
215
+
216
+	var convertToImage = function (canvas, width, height, type) {
217
+		if ($support.canvas && $support.dataURL) {
218
+			if (typeof canvas == "string") { canvas = document.getElementById(canvas); }
219
+			if (type == undefined) { type = 'png'; }
220
+			type = fixType(type);
221
+
222
+			if (/bmp/.test(type)) {
223
+				var data = getImageData(scaleCanvas(canvas, width, height));
224
+				var strData = genBitmapImage(data);
225
+				return genImage(makeURI(strData, 'image/bmp'));
226
+			} else {
227
+				var strData = getDataURL(canvas, type, width, height);
228
+				return genImage(strData);
229
+			}
230
+		}
231
+	};
232
+
233
+
234
+
235
+	return {
236
+		saveAsImage: saveAsImage,
237
+		saveAsPNG: function (canvas, width, height) {
238
+			return saveAsImage(canvas, width, height, 'png');
239
+		},
240
+		saveAsJPEG: function (canvas, width, height) {
241
+			return saveAsImage(canvas, width, height, 'jpeg');
242
+		},
243
+		saveAsGIF: function (canvas, width, height) {
244
+			return saveAsImage(canvas, width, height, 'gif');
245
+		},
246
+		saveAsBMP: function (canvas, width, height) {
247
+			return saveAsImage(canvas, width, height, 'bmp');
248
+		},
249
+
250
+		convertToImage: convertToImage,
251
+		convertToPNG: function (canvas, width, height) {
252
+			return convertToImage(canvas, width, height, 'png');
253
+		},
254
+		convertToJPEG: function (canvas, width, height) {
255
+			return convertToImage(canvas, width, height, 'jpeg');
256
+		},
257
+		convertToGIF: function (canvas, width, height) {
258
+			return convertToImage(canvas, width, height, 'gif');
259
+		},
260
+		convertToBMP: function (canvas, width, height) {
261
+			return convertToImage(canvas, width, height, 'bmp');
262
+		}
263
+	};
264
+
265
+}();

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
public/static/hiprint/plugins/jspdf/canvg.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 22 - 0
public/static/hiprint/plugins/jspdf/html2canvas.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 286 - 0
public/static/hiprint/plugins/jspdf/jspdf.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 615 - 0
public/static/hiprint/plugins/qrcode.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 9 - 0
public/static/hiprint/plugins/socket.io.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
public/static/hiprint/polyfill.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2 - 0
public/static/jquery.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2 - 0
public/static/plugins/JsBarcode.all.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 10364 - 0
public/static/plugins/jq-3.31.js


+ 113 - 0
public/static/plugins/jquery.hiwprint.js

@@ -0,0 +1,113 @@
1
+(function ($) {
2
+    $.fn.hiwprint = function (options) {
3
+        var usedFrame = document.getElementById('hiwprint_iframe');
4
+        if (usedFrame) usedFrame.parentNode.removeChild(usedFrame);
5
+        var opt = $.extend({}, $.fn.hiwprint.defaults, options);
6
+        var $element = this;
7
+        var $iframe = $('<iframe id="hiwprint_iframe"  style="visibility: hidden; height: 0; width: 0; position: absolute;"></iframe>');
8
+        var css = '';
9
+        if (opt.importCss) {
10
+            if ($("link[media=print]").length > 0) {
11
+                $("link[media=print]").each(function () {
12
+                    css += '<link rel="stylesheet" type="text/css" media="print" href="' + $(this).attr("href") + '">';
13
+                });
14
+            }
15
+            else {
16
+                $("link").each(function () {
17
+                    css += '<link rel="stylesheet" type="text/css" media="print" href="' + $(this).attr("href") + '">';
18
+                });
19
+            }
20
+        }
21
+        $iframe[0].srcdoc = '<!DOCTYPE html><html><head><title></title><meta charset="UTF-8">' + css + '</head><body></body></html>';
22
+
23
+        $iframe[0].onload = function () {
24
+            var printDocument = $iframe[0].contentWindow || $iframe[0].contentDocument;
25
+            if (printDocument.document) printDocument = printDocument.document;
26
+            if (!$iframe.attr('srcdoc')) {
27
+                printDocument.write('<!DOCTYPE html><html><head><title></title><meta charset="UTF-8">' + css + '</head><body></body></html>');
28
+            }
29
+            if (opt.printContainer) {
30
+                printDocument.body.innerHTML = $element[0].outerHTML;
31
+            }
32
+            else {
33
+                printDocument.body.innerHTML = $element.html();
34
+            }
35
+            loadAllImages(printDocument, function () {
36
+
37
+                performPrint($iframe[0]);
38
+            });
39
+
40
+        };
41
+
42
+        $iframe.appendTo("body");
43
+
44
+    };
45
+
46
+    $.fn.hiwprint.defaults = {
47
+        importCss: true,
48
+        printContainer: true
49
+    };
50
+
51
+    function performPrint(iframeElement) {
52
+        try {
53
+            iframeElement.focus();
54
+            if (isEdge() || isIE()) {
55
+                try {
56
+                    iframeElement.contentWindow.document.execCommand('print', false, null);
57
+                } catch (e) {
58
+                    iframeElement.contentWindow.print();
59
+                }
60
+            } else {
61
+                // Other browsers
62
+                iframeElement.contentWindow.print();
63
+            }
64
+        } catch (error) {
65
+            console.log(error);
66
+        }
67
+    }
68
+
69
+
70
+    function isIE() {
71
+        return navigator.userAgent.indexOf('MSIE') !== -1 || !!document.documentMode;
72
+    }
73
+
74
+    // Edge 20+
75
+    function isEdge() {
76
+        return !isIE() && !!window.StyleMedia;
77
+    }
78
+
79
+
80
+
81
+    function loadAllImages(printDocument, callback, time) {
82
+        
83
+        if (time === undefined) {
84
+            time = 0;
85
+        }
86
+        var images = printDocument.getElementsByTagName('img');
87
+        var allLoaded = true;
88
+        for (var i = 0; i < images.length; i++) {
89
+            var image = images[i];
90
+            if (image.src && image.src !== window.location.href && image.src.indexOf('base64') == -1) {
91
+               
92
+                if (!image || typeof image.naturalWidth === 'undefined' || image.naturalWidth === 0 || !image.complete) {
93
+                    console.log(image.complete);
94
+                    if (!image.complete) {
95
+                        allLoaded = false;
96
+                    }
97
+                    
98
+                }
99
+            }
100
+        }
101
+        time++;
102
+        if (!allLoaded && time < 10) {
103
+            
104
+            setTimeout(function () {
105
+               loadAllImages(printDocument, callback, time);
106
+            }, 500);
107
+        } else {
108
+            callback();
109
+        }
110
+    }
111
+
112
+
113
+})(jQuery);

+ 77 - 0
public/static/plugins/jquery.jqprint-0.3.js

@@ -0,0 +1,77 @@
1
+// -----------------------------------------------------------------------
2
+// Eros Fratini - eros@recoding.it
3
+// jqprint 0.3
4
+//
5
+// - 19/06/2009 - some new implementations, added Opera support
6
+// - 11/05/2009 - first sketch
7
+//
8
+// Printing plug-in for jQuery, evolution of jPrintArea: http://plugins.jquery.com/project/jPrintArea
9
+// requires jQuery 1.3.x
10
+//
11
+// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
12
+//------------------------------------------------------------------------
13
+
14
+(function($) {
15
+    var opt;
16
+
17
+    $.fn.jqprint = function (options) {
18
+        opt = $.extend({}, $.fn.jqprint.defaults, options);
19
+
20
+        var $element = (this instanceof jQuery) ? this : $(this);
21
+        
22
+        if (opt.operaSupport && $.browser.opera) 
23
+        { 
24
+            var tab = window.open("","jqPrint-preview");
25
+            tab.document.open();
26
+
27
+            var doc = tab.document;
28
+        }
29
+        else 
30
+        {
31
+            var $iframe = $("<iframe  />");
32
+        
33
+            if (!opt.debug) { $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-600px", top: "-600px" }); }
34
+
35
+            $iframe.appendTo("body");
36
+            var doc = $iframe[0].contentWindow.document;
37
+        }
38
+        
39
+        if (opt.importCSS)
40
+        {
41
+            
42
+            doc.write('<style media="print"> @page {size: auto;  margin: 0mm;padding:0mm }</style>')
43
+            if ($("link[media=print]").length > 0) 
44
+            {
45
+                $("link[media=print]").each( function() {
46
+                    doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />");
47
+                });
48
+            }
49
+            else 
50
+            {
51
+                $("link").each( function() {
52
+                    doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />");
53
+                });
54
+            }
55
+        }
56
+        
57
+        if (opt.printContainer) { doc.write($element.outer()); }
58
+        else { $element.each( function() { doc.write($(this).html()); }); }
59
+        
60
+        doc.close();
61
+        
62
+        (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).focus();
63
+        setTimeout( function() { (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).print(); if (tab) { tab.close(); } }, 1000);
64
+    }
65
+    
66
+    $.fn.jqprint.defaults = {
67
+		debug: false,
68
+		importCSS: true, 
69
+		printContainer: true,
70
+		operaSupport: true
71
+	};
72
+
73
+    // Thanks to 9__, found at http://users.livejournal.com/9__/380664.html
74
+    jQuery.fn.outer = function() {
75
+      return $($('<div></div>').html(this.clone())).html();
76
+    } 
77
+})(jQuery);

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 8 - 0
public/static/plugins/jquery.minicolors.min.js


+ 265 - 0
public/static/plugins/jspdf/canvas2image.js

@@ -0,0 +1,265 @@
1
+/**
2
+ * covert canvas to image
3
+ * and save the image file
4
+ */
5
+
6
+var Canvas2Image = function () {
7
+
8
+	// check if support sth.
9
+	var $support = function () {
10
+		var canvas = document.createElement('canvas'),
11
+			ctx = canvas.getContext('2d');
12
+
13
+		return {
14
+			canvas: !!ctx,
15
+			imageData: !!ctx.getImageData,
16
+			dataURL: !!canvas.toDataURL,
17
+			btoa: !!window.btoa
18
+		};
19
+	}();
20
+
21
+	var downloadMime = 'image/octet-stream';
22
+
23
+	function scaleCanvas (canvas, width, height) {
24
+		var w = canvas.width,
25
+			h = canvas.height;
26
+		if (width == undefined) {
27
+			width = w;
28
+		}
29
+		if (height == undefined) {
30
+			height = h;
31
+		}
32
+
33
+		var retCanvas = document.createElement('canvas');
34
+		var retCtx = retCanvas.getContext('2d');
35
+		retCanvas.width = width;
36
+		retCanvas.height = height;
37
+		retCtx.drawImage(canvas, 0, 0, w, h, 0, 0, width, height);
38
+		return retCanvas;
39
+	}
40
+
41
+	function getDataURL (canvas, type, width, height) {
42
+		canvas = scaleCanvas(canvas, width, height);
43
+		return canvas.toDataURL(type);
44
+	}
45
+
46
+	function saveFile (strData) {
47
+		document.location.href = strData;
48
+	}
49
+
50
+	function genImage(strData) {
51
+		var img = document.createElement('img');
52
+		img.src = strData;
53
+		return img;
54
+	}
55
+	function fixType (type) {
56
+		type = type.toLowerCase().replace(/jpg/i, 'jpeg');
57
+		var r = type.match(/png|jpeg|bmp|gif/)[0];
58
+		return 'image/' + r;
59
+	}
60
+	function encodeData (data) {
61
+		if (!window.btoa) { throw 'btoa undefined' }
62
+		var str = '';
63
+		if (typeof data == 'string') {
64
+			str = data;
65
+		} else {
66
+			for (var i = 0; i < data.length; i ++) {
67
+				str += String.fromCharCode(data[i]);
68
+			}
69
+		}
70
+
71
+		return btoa(str);
72
+	}
73
+	function getImageData (canvas) {
74
+		var w = canvas.width,
75
+			h = canvas.height;
76
+		return canvas.getContext('2d').getImageData(0, 0, w, h);
77
+	}
78
+	function makeURI (strData, type) {
79
+		return 'data:' + type + ';base64,' + strData;
80
+	}
81
+
82
+
83
+	/**
84
+	 * create bitmap image
85
+	 * 按照规则生成图片响应头和响应体
86
+	 */
87
+	var genBitmapImage = function (oData) {
88
+
89
+		//
90
+		// BITMAPFILEHEADER: http://msdn.microsoft.com/en-us/library/windows/desktop/dd183374(v=vs.85).aspx
91
+		// BITMAPINFOHEADER: http://msdn.microsoft.com/en-us/library/dd183376.aspx
92
+		//
93
+
94
+		var biWidth  = oData.width;
95
+		var biHeight	= oData.height;
96
+		var biSizeImage = biWidth * biHeight * 3;
97
+		var bfSize  = biSizeImage + 54; // total header size = 54 bytes
98
+
99
+		//
100
+		//  typedef struct tagBITMAPFILEHEADER {
101
+		//  	WORD bfType;
102
+		//  	DWORD bfSize;
103
+		//  	WORD bfReserved1;
104
+		//  	WORD bfReserved2;
105
+		//  	DWORD bfOffBits;
106
+		//  } BITMAPFILEHEADER;
107
+		//
108
+		var BITMAPFILEHEADER = [
109
+			// WORD bfType -- The file type signature; must be "BM"
110
+			0x42, 0x4D,
111
+			// DWORD bfSize -- The size, in bytes, of the bitmap file
112
+			bfSize & 0xff, bfSize >> 8 & 0xff, bfSize >> 16 & 0xff, bfSize >> 24 & 0xff,
113
+			// WORD bfReserved1 -- Reserved; must be zero
114
+			0, 0,
115
+			// WORD bfReserved2 -- Reserved; must be zero
116
+			0, 0,
117
+			// DWORD bfOffBits -- The offset, in bytes, from the beginning of the BITMAPFILEHEADER structure to the bitmap bits.
118
+			54, 0, 0, 0
119
+		];
120
+
121
+		//
122
+		//  typedef struct tagBITMAPINFOHEADER {
123
+		//  	DWORD biSize;
124
+		//  	LONG  biWidth;
125
+		//  	LONG  biHeight;
126
+		//  	WORD  biPlanes;
127
+		//  	WORD  biBitCount;
128
+		//  	DWORD biCompression;
129
+		//  	DWORD biSizeImage;
130
+		//  	LONG  biXPelsPerMeter;
131
+		//  	LONG  biYPelsPerMeter;
132
+		//  	DWORD biClrUsed;
133
+		//  	DWORD biClrImportant;
134
+		//  } BITMAPINFOHEADER, *PBITMAPINFOHEADER;
135
+		//
136
+		var BITMAPINFOHEADER = [
137
+			// DWORD biSize -- The number of bytes required by the structure
138
+			40, 0, 0, 0,
139
+			// LONG biWidth -- The width of the bitmap, in pixels
140
+			biWidth & 0xff, biWidth >> 8 & 0xff, biWidth >> 16 & 0xff, biWidth >> 24 & 0xff,
141
+			// LONG biHeight -- The height of the bitmap, in pixels
142
+			biHeight & 0xff, biHeight >> 8  & 0xff, biHeight >> 16 & 0xff, biHeight >> 24 & 0xff,
143
+			// WORD biPlanes -- The number of planes for the target device. This value must be set to 1
144
+			1, 0,
145
+			// WORD biBitCount -- The number of bits-per-pixel, 24 bits-per-pixel -- the bitmap
146
+			// has a maximum of 2^24 colors (16777216, Truecolor)
147
+			24, 0,
148
+			// DWORD biCompression -- The type of compression, BI_RGB (code 0) -- uncompressed
149
+			0, 0, 0, 0,
150
+			// DWORD biSizeImage -- The size, in bytes, of the image. This may be set to zero for BI_RGB bitmaps
151
+			biSizeImage & 0xff, biSizeImage >> 8 & 0xff, biSizeImage >> 16 & 0xff, biSizeImage >> 24 & 0xff,
152
+			// LONG biXPelsPerMeter, unused
153
+			0,0,0,0,
154
+			// LONG biYPelsPerMeter, unused
155
+			0,0,0,0,
156
+			// DWORD biClrUsed, the number of color indexes of palette, unused
157
+			0,0,0,0,
158
+			// DWORD biClrImportant, unused
159
+			0,0,0,0
160
+		];
161
+
162
+		var iPadding = (4 - ((biWidth * 3) % 4)) % 4;
163
+
164
+		var aImgData = oData.data;
165
+
166
+		var strPixelData = '';
167
+		var biWidth4 = biWidth<<2;
168
+		var y = biHeight;
169
+		var fromCharCode = String.fromCharCode;
170
+
171
+		do {
172
+			var iOffsetY = biWidth4*(y-1);
173
+			var strPixelRow = '';
174
+			for (var x = 0; x < biWidth; x++) {
175
+				var iOffsetX = x<<2;
176
+				strPixelRow += fromCharCode(aImgData[iOffsetY+iOffsetX+2]) +
177
+							   fromCharCode(aImgData[iOffsetY+iOffsetX+1]) +
178
+							   fromCharCode(aImgData[iOffsetY+iOffsetX]);
179
+			}
180
+
181
+			for (var c = 0; c < iPadding; c++) {
182
+				strPixelRow += String.fromCharCode(0);
183
+			}
184
+
185
+			strPixelData += strPixelRow;
186
+		} while (--y);
187
+
188
+		var strEncoded = encodeData(BITMAPFILEHEADER.concat(BITMAPINFOHEADER)) + encodeData(strPixelData);
189
+
190
+		return strEncoded;
191
+	};
192
+
193
+	/**
194
+	 * saveAsImage
195
+	 * @param canvasElement
196
+	 * @param {String} image type
197
+	 * @param {Number} [optional] png width
198
+	 * @param {Number} [optional] png height
199
+	 */
200
+	var saveAsImage = function (canvas, width, height, type) {
201
+		if ($support.canvas && $support.dataURL) {
202
+			if (typeof canvas == "string") { canvas = document.getElementById(canvas); }
203
+			if (type == undefined) { type = 'png'; }
204
+			type = fixType(type);
205
+			if (/bmp/.test(type)) {
206
+				var data = getImageData(scaleCanvas(canvas, width, height));
207
+				var strData = genBitmapImage(data);
208
+				saveFile(makeURI(strData, downloadMime));
209
+			} else {
210
+				var strData = getDataURL(canvas, type, width, height);
211
+				saveFile(strData.replace(type, downloadMime));
212
+			}
213
+		}
214
+	};
215
+
216
+	var convertToImage = function (canvas, width, height, type) {
217
+		if ($support.canvas && $support.dataURL) {
218
+			if (typeof canvas == "string") { canvas = document.getElementById(canvas); }
219
+			if (type == undefined) { type = 'png'; }
220
+			type = fixType(type);
221
+
222
+			if (/bmp/.test(type)) {
223
+				var data = getImageData(scaleCanvas(canvas, width, height));
224
+				var strData = genBitmapImage(data);
225
+				return genImage(makeURI(strData, 'image/bmp'));
226
+			} else {
227
+				var strData = getDataURL(canvas, type, width, height);
228
+				return genImage(strData);
229
+			}
230
+		}
231
+	};
232
+
233
+
234
+
235
+	return {
236
+		saveAsImage: saveAsImage,
237
+		saveAsPNG: function (canvas, width, height) {
238
+			return saveAsImage(canvas, width, height, 'png');
239
+		},
240
+		saveAsJPEG: function (canvas, width, height) {
241
+			return saveAsImage(canvas, width, height, 'jpeg');
242
+		},
243
+		saveAsGIF: function (canvas, width, height) {
244
+			return saveAsImage(canvas, width, height, 'gif');
245
+		},
246
+		saveAsBMP: function (canvas, width, height) {
247
+			return saveAsImage(canvas, width, height, 'bmp');
248
+		},
249
+
250
+		convertToImage: convertToImage,
251
+		convertToPNG: function (canvas, width, height) {
252
+			return convertToImage(canvas, width, height, 'png');
253
+		},
254
+		convertToJPEG: function (canvas, width, height) {
255
+			return convertToImage(canvas, width, height, 'jpeg');
256
+		},
257
+		convertToGIF: function (canvas, width, height) {
258
+			return convertToImage(canvas, width, height, 'gif');
259
+		},
260
+		convertToBMP: function (canvas, width, height) {
261
+			return convertToImage(canvas, width, height, 'bmp');
262
+		}
263
+	};
264
+
265
+}();

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
public/static/plugins/jspdf/canvg.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 22 - 0
public/static/plugins/jspdf/html2canvas.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 286 - 0
public/static/plugins/jspdf/jspdf.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 615 - 0
public/static/plugins/qrcode.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 9 - 0
public/static/plugins/socket.io.js


+ 281 - 0
public/static/print-lock.css

@@ -0,0 +1,281 @@
1
+
2
+@media print {
3
+    body {
4
+        margin: 0px;
5
+        padding: 0px;
6
+    }
7
+}
8
+
9
+@page {
10
+    margin: 0;
11
+}
12
+
13
+.hiprint-printPaper * {
14
+    box-sizing: border-box;
15
+    -moz-box-sizing: border-box; /* Firefox */
16
+    -webkit-box-sizing: border-box; /* Safari */
17
+   
18
+}
19
+
20
+    .hiprint-printPaper *:focus {
21
+        outline: -webkit-focus-ring-color auto 0px;
22
+    }
23
+
24
+
25
+.hiprint-page-break-avoid {
26
+    page-break-after: avoid;
27
+}
28
+.hiprint-printPaper {
29
+    position: relative;
30
+    padding: 0 0 0 0;
31
+    page-break-after: always;
32
+    overflow-x: hidden;
33
+    overflow: hidden;
34
+}
35
+    .hiprint-printPaper .hiprint-printPaper-content {
36
+        position: relative;
37
+    }
38
+.hiprint-printPaper.design {
39
+    overflow: visible;
40
+}
41
+
42
+
43
+
44
+.hiprint-printTemplate .hiprint-printPanel {
45
+    page-break-after: always;
46
+}
47
+
48
+.hiprint-printPaper, hiprint-printPanel {
49
+    box-sizing: border-box;
50
+    border: 0px;
51
+}
52
+
53
+.hiprint-printPanel .hiprint-printPaper:last-child {
54
+    page-break-after: avoid;
55
+}
56
+
57
+.hiprint-printTemplate .hiprint-printPanel:last-child {
58
+    page-break-after: avoid;
59
+}
60
+
61
+.hiprint-printPaper .hideheaderLinetarget {
62
+    border-top: 0px dashed rgb(201, 190, 190) !important;
63
+}
64
+
65
+.hiprint-printPaper .hidefooterLinetarget {
66
+    border-top: 0px dashed rgb(201, 190, 190) !important;
67
+}
68
+
69
+.hiprint-printPaper.design {
70
+    border: 1px dashed rgba(170,170,170,0.7);
71
+}
72
+
73
+.design .hiprint-printElement-table-content, .design .hiprint-printElement-longText-content {
74
+    overflow: hidden;
75
+    box-sizing: border-box;
76
+}
77
+
78
+.design .resize-panel {
79
+    box-sizing: border-box;
80
+    border: 1px dotted;
81
+}
82
+
83
+.hiprint-printElement-text {
84
+    background-color: transparent;
85
+    background-repeat: repeat;
86
+    padding: 0 0 0 0;
87
+    border: 0.75pt none rgb(0,0,0);
88
+    direction: ltr;
89
+    font-family: 'SimSun';
90
+    font-size: 9pt;
91
+    font-style: normal;
92
+    font-weight: normal;
93
+    padding-bottom: 0pt;
94
+    padding-left: 0pt;
95
+    padding-right: 0pt;
96
+    padding-top: 0pt;
97
+    text-align: left;
98
+    text-decoration: none;
99
+    line-height: 9.75pt;
100
+    box-sizing: border-box;
101
+    word-wrap: break-word;
102
+    /* word-break: break-all; */
103
+    word-break: keep-all;
104
+}
105
+
106
+.design .hiprint-printElement-text-content {
107
+    border: 1px dashed rgb(206, 188, 188);
108
+    box-sizing: border-box;
109
+}
110
+
111
+.hiprint-printElement-longText {
112
+    background-color: transparent;
113
+    background-repeat: repeat;
114
+    border: 0.75pt none rgb(0,0,0);
115
+    direction: ltr;
116
+    font-family: 'SimSun';
117
+    font-size: 9pt;
118
+    font-style: normal;
119
+    font-weight: normal;
120
+    padding-bottom: 0pt;
121
+    padding-left: 0pt;
122
+    padding-right: 0pt;
123
+    padding-top: 0pt;
124
+    text-align: left;
125
+    text-decoration: none;
126
+    line-height: 9.75pt;
127
+    box-sizing: border-box;
128
+    word-wrap: break-word;
129
+    /* word-break: break-all; */
130
+    word-break: keep-all;
131
+    /*white-space: pre-wrap*/
132
+}
133
+
134
+
135
+
136
+.hiprint-printElement-table {
137
+    background-color: transparent;
138
+    background-repeat: repeat;
139
+    color: rgb(0,0,0);
140
+    border-color: rgb(0,0,0);
141
+    border-style: none;
142
+    direction: ltr;
143
+    font-family: 'SimSun';
144
+    font-size: 9pt;
145
+    font-style: normal;
146
+    font-weight: normal;
147
+    padding-bottom: 0pt;
148
+    padding-left: 0pt;
149
+    padding-right: 0pt;
150
+    padding-top: 0pt;
151
+    text-align: left;
152
+    text-decoration: none;
153
+    padding: 0 0 0 0;
154
+    box-sizing: border-box;
155
+    line-height: 9.75pt;
156
+}
157
+
158
+    .hiprint-printElement-table thead {
159
+        background: #e8e8e8;
160
+        font-weight: 700;
161
+    }
162
+
163
+.hiprint-printElement-tableTarget, .hiprint-printElement-tableTarget tr, .hiprint-printElement-tableTarget td {
164
+    border-color: rgb(0,0,0);
165
+    border-style: none;
166
+    border: 1px solid rgb(0,0,0);
167
+    font-weight: normal;
168
+    direction: ltr;
169
+    padding-bottom: 0pt;
170
+    padding-left: 0pt;
171
+    padding-right: 0pt;
172
+    padding-top: 0pt;
173
+    text-decoration: none;
174
+    vertical-align: middle;
175
+    box-sizing: border-box;
176
+    word-wrap: break-word;
177
+    word-break: break-all;
178
+    /*line-height: 9.75pt;
179
+    font-size: 9pt;*/
180
+}
181
+
182
+    /*.hiprint-printElement-tableTarget tr,*/
183
+    .hiprint-printElement-tableTarget td {
184
+        height: 18pt;
185
+    }
186
+
187
+.hiprint-printPaper .hiprint-paperNumber {
188
+    font-size: 9pt;
189
+}
190
+
191
+.design .hiprint-printElement-table-handle {
192
+    position: absolute;
193
+    height: 21pt;
194
+    width: 21pt;
195
+    background: red;
196
+    z-index:1;
197
+}
198
+
199
+.hiprint-printPaper .hiprint-paperNumber-disabled {
200
+    float: right !important;
201
+    right: 0 !important;
202
+    color: gainsboro !important;
203
+}
204
+
205
+.hiprint-printElement-vline, .hiprint-printElement-hline {
206
+    border: 0px none rgb(0,0,0);
207
+    
208
+}
209
+.hiprint-printElement-vline {
210
+    border-left: 0.75pt solid #000;
211
+    border-right: 0px none rgb(0,0,0) !important;
212
+    border-bottom: 0px none rgb(0,0,0) !important;
213
+    border-top: 0px none rgb(0,0,0) !important;
214
+}
215
+
216
+.hiprint-printElement-hline {
217
+    border-top: 0.75pt solid #000;
218
+    border-right: 0px none rgb(0,0,0) !important;
219
+    border-bottom: 0px none rgb(0,0,0) !important;
220
+    border-left: 0px none rgb(0,0,0) !important;
221
+}
222
+
223
+.hiprint-printElement-oval, .hiprint-printElement-rect {
224
+    border: 0.75pt solid #000;
225
+}
226
+
227
+.hiprint-text-content-middle {
228
+    display:table;
229
+}
230
+.hiprint-text-content-middle>div {
231
+    display: table-cell;
232
+    vertical-align:middle
233
+}
234
+
235
+.hiprint-text-content-bottom {
236
+    display: table;
237
+}
238
+
239
+    .hiprint-text-content-bottom > div {
240
+        display: table-cell;
241
+        vertical-align: bottom
242
+    }
243
+
244
+/*hi-grid-row */
245
+.hi-grid-row {
246
+    position: relative;
247
+    height: auto;
248
+    margin-right: 0;
249
+    margin-left: 0;
250
+    zoom: 1;
251
+    display: block;
252
+    box-sizing: border-box;
253
+}
254
+
255
+    .hi-grid-row::after, .hi-grid-row::before {
256
+        display: table;
257
+        content: '';
258
+        box-sizing: border-box;
259
+    }
260
+
261
+.hi-grid-col {
262
+    display: block;
263
+    box-sizing: border-box;
264
+    position: relative;
265
+    float: left;
266
+    flex: 0 0 auto;
267
+}
268
+
269
+.table-grid-row {
270
+    margin-left: -0pt;
271
+    margin-right: -0pt;
272
+}
273
+
274
+.tableGridColumnsGutterRow {
275
+    padding-left: 0pt;
276
+    padding-right: 0pt;
277
+}
278
+.hiprint-gridColumnsFooter {
279
+    text-align: left;
280
+    clear: both;
281
+}

BIN
public/templateFile/工资核算导入模板.xlsx


+ 82 - 0
src/App.vue

@@ -0,0 +1,82 @@
1
+<script lang="ts" setup>
2
+import { isDark } from '@/utils/is'
3
+import { useAppStore } from '@/store/modules/app'
4
+import { useDesign } from '@/hooks/web/useDesign'
5
+import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
6
+import routerSearch from '@/components/RouterSearch/index.vue'
7
+import { onMounted, onBeforeUnmount } from 'vue'
8
+
9
+defineOptions({ name: 'APP' })
10
+
11
+const { getPrefixCls } = useDesign()
12
+const prefixCls = getPrefixCls('app')
13
+const appStore = useAppStore()
14
+const currentSize = computed(() => appStore.getCurrentSize)
15
+const greyMode = computed(() => appStore.getGreyMode)
16
+const { wsCache } = useCache()
17
+
18
+// 清除所有表格缓存
19
+const clearAllTableCache = () => {
20
+  try {
21
+    // 清除所有以 tableList_queryParams_ 开头的缓存
22
+    for (let i = 0; i < localStorage.length; i++) {
23
+      const key = localStorage.key(i)
24
+      if (key && (key.startsWith('tableList_queryParams_') || key.startsWith('tableList_expandState_'))) {
25
+        localStorage.removeItem(key)
26
+      }
27
+    }
28
+  } catch (error) {
29
+    console.error('清除所有表格缓存失败:', error)
30
+  }
31
+}
32
+
33
+// 根据浏览器当前主题设置系统主题色
34
+const setDefaultTheme = () => {
35
+  let isDarkTheme = wsCache.get(CACHE_KEY.IS_DARK)
36
+  if (isDarkTheme === null) {
37
+    isDarkTheme = isDark()
38
+  }
39
+  appStore.setIsDark(isDarkTheme)
40
+}
41
+setDefaultTheme()
42
+
43
+// 页面关闭/刷新时清除所有表格缓存
44
+onMounted(() => {
45
+  window.addEventListener('beforeunload', clearAllTableCache)
46
+})
47
+
48
+onBeforeUnmount(() => {
49
+  window.removeEventListener('beforeunload', clearAllTableCache)
50
+})
51
+</script>
52
+<template>
53
+  <ConfigGlobal :size="currentSize">
54
+    <RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" />
55
+    <routerSearch />
56
+  </ConfigGlobal>
57
+</template>
58
+<style lang="scss">
59
+$prefix-cls: #{$namespace}-app;
60
+
61
+.size {
62
+  width: 100%;
63
+  height: 100%;
64
+}
65
+
66
+html,
67
+body {
68
+  @extend .size;
69
+
70
+  padding: 0 !important;
71
+  margin: 0;
72
+  overflow: hidden;
73
+
74
+  #app {
75
+    @extend .size;
76
+  }
77
+}
78
+
79
+.#{$prefix-cls}-grey-mode {
80
+  filter: grayscale(100%);
81
+}
82
+</style>

+ 65 - 0
src/api/ai/chat/conversation/index.ts

@@ -0,0 +1,65 @@
1
+import request from '@/config/axios'
2
+
3
+// AI 聊天对话 VO
4
+export interface ChatConversationVO {
5
+  id: number // ID 编号
6
+  userId: number // 用户编号
7
+  title: string // 对话标题
8
+  pinned: boolean // 是否置顶
9
+  roleId: number // 角色编号
10
+  modelId: number // 模型编号
11
+  model: string // 模型标志
12
+  temperature: number // 温度参数
13
+  maxTokens: number // 单条回复的最大 Token 数量
14
+  maxContexts: number // 上下文的最大 Message 数量
15
+  createTime?: Date // 创建时间
16
+  // 额外字段
17
+  systemMessage?: string // 角色设定
18
+  modelName?: string // 模型名字
19
+  roleAvatar?: string // 角色头像
20
+  modelMaxTokens?: string // 模型的单条回复的最大 Token 数量
21
+  modelMaxContexts?: string // 模型的上下文的最大 Message 数量
22
+}
23
+
24
+// AI 聊天对话 API
25
+export const ChatConversationApi = {
26
+  // 获得【我的】聊天对话
27
+  getChatConversationMy: async (id: number) => {
28
+    return await request.get({ url: `/ai/chat/conversation/get-my?id=${id}` })
29
+  },
30
+
31
+  // 新增【我的】聊天对话
32
+  createChatConversationMy: async (data?: ChatConversationVO) => {
33
+    return await request.post({ url: `/ai/chat/conversation/create-my`, data })
34
+  },
35
+
36
+  // 更新【我的】聊天对话
37
+  updateChatConversationMy: async (data: ChatConversationVO) => {
38
+    return await request.put({ url: `/ai/chat/conversation/update-my`, data })
39
+  },
40
+
41
+  // 删除【我的】聊天对话
42
+  deleteChatConversationMy: async (id: string) => {
43
+    return await request.delete({ url: `/ai/chat/conversation/delete-my?id=${id}` })
44
+  },
45
+
46
+  // 删除【我的】所有对话,置顶除外
47
+  deleteChatConversationMyByUnpinned: async () => {
48
+    return await request.delete({ url: `/ai/chat/conversation/delete-by-unpinned` })
49
+  },
50
+
51
+  // 获得【我的】聊天对话列表
52
+  getChatConversationMyList: async () => {
53
+    return await request.get({ url: `/ai/chat/conversation/my-list` })
54
+  },
55
+
56
+  // 获得对话分页
57
+  getChatConversationPage: async (params: any) => {
58
+    return await request.get({ url: `/ai/chat/conversation/page`, params })
59
+  },
60
+
61
+  // 管理员删除消息
62
+  deleteChatConversationByAdmin: async (id: number) => {
63
+    return await request.delete({ url: `/ai/chat/conversation/delete-by-admin?id=${id}` })
64
+  }
65
+}

+ 96 - 0
src/api/ai/chat/message/index.ts

@@ -0,0 +1,96 @@
1
+import request from '@/config/axios'
2
+import { fetchEventSource } from '@microsoft/fetch-event-source'
3
+import { getAccessToken } from '@/utils/auth'
4
+import { config } from '@/config/axios/config'
5
+
6
+// 聊天VO
7
+export interface ChatMessageVO {
8
+  id: number // 编号
9
+  conversationId: number // 对话编号
10
+  type: string // 消息类型
11
+  userId: string // 用户编号
12
+  roleId: string // 角色编号
13
+  model: number // 模型标志
14
+  modelId: number // 模型编号
15
+  content: string // 聊天内容
16
+  tokens: number // 消耗 Token 数量
17
+  segmentIds?: number[] // 段落编号
18
+  segments?: {
19
+    id: number // 段落编号
20
+    content: string // 段落内容
21
+    documentId: number // 文档编号
22
+    documentName: string // 文档名称
23
+  }[]
24
+  createTime: Date // 创建时间
25
+  roleAvatar: string // 角色头像
26
+  userAvatar: string // 用户头像
27
+}
28
+
29
+// AI chat 聊天
30
+export const ChatMessageApi = {
31
+  // 消息列表
32
+  getChatMessageListByConversationId: async (conversationId: number | null) => {
33
+    return await request.get({
34
+      url: `/ai/chat/message/list-by-conversation-id?conversationId=${conversationId}`
35
+    })
36
+  },
37
+
38
+  // 发送 Stream 消息
39
+  // 为什么不用 axios 呢?因为它不支持 SSE 调用
40
+  sendChatMessageStream: async (
41
+    conversationId: number,
42
+    content: string,
43
+    ctrl,
44
+    enableContext: boolean,
45
+    onMessage,
46
+    onError,
47
+    onClose
48
+  ) => {
49
+    const token = getAccessToken()
50
+    return fetchEventSource(`${config.base_url}/ai/chat/message/send-stream`, {
51
+      method: 'post',
52
+      headers: {
53
+        'Content-Type': 'application/json',
54
+        Authorization: `Bearer ${token}`
55
+      },
56
+      openWhenHidden: true,
57
+      body: JSON.stringify({
58
+        conversationId,
59
+        content,
60
+        useContext: enableContext
61
+      }),
62
+      onmessage: onMessage,
63
+      onerror: onError,
64
+      onclose: onClose,
65
+      signal: ctrl.signal
66
+    })
67
+  },
68
+  // 发送消息(段式)
69
+  sendChatMessage: async (data: any) => {
70
+    return await request.post({
71
+      url: `/ai/chat/message/send`,
72
+      data
73
+    })
74
+  },
75
+  // 删除消息
76
+  deleteChatMessage: async (id: string) => {
77
+    return await request.delete({ url: `/ai/chat/message/delete?id=${id}` })
78
+  },
79
+
80
+  // 删除指定对话的消息
81
+  deleteByConversationId: async (conversationId: number) => {
82
+    return await request.delete({
83
+      url: `/ai/chat/message/delete-by-conversation-id?conversationId=${conversationId}`
84
+    })
85
+  },
86
+
87
+  // 获得消息分页
88
+  getChatMessagePage: async (params: any) => {
89
+    return await request.get({ url: '/ai/chat/message/page', params })
90
+  },
91
+
92
+  // 管理员删除消息
93
+  deleteChatMessageByAdmin: async (id: number) => {
94
+    return await request.delete({ url: `/ai/chat/message/delete-by-admin?id=${id}` })
95
+  }
96
+}

+ 102 - 0
src/api/ai/image/index.ts

@@ -0,0 +1,102 @@
1
+import request from '@/config/axios'
2
+
3
+// AI 绘图 VO
4
+export interface ImageVO {
5
+  id: number // 编号
6
+  platform: string // 平台
7
+  model: string // 模型
8
+  prompt: string // 提示词
9
+  width: number // 图片宽度
10
+  height: number // 图片高度
11
+  status: number // 状态
12
+  publicStatus: boolean // 公开状态
13
+  picUrl: string // 任务地址
14
+  errorMessage: string // 错误信息
15
+  options: any // 配置 Map<string, string>
16
+  taskId: number // 任务编号
17
+  buttons: ImageMidjourneyButtonsVO[] // mj 操作按钮
18
+  createTime: Date // 创建时间
19
+  finishTime: Date // 完成时间
20
+}
21
+
22
+export interface ImageDrawReqVO {
23
+  prompt: string // 提示词
24
+  modelId: number // 模型
25
+  style: string // 图像生成的风格
26
+  width: string // 图片宽度
27
+  height: string // 图片高度
28
+  options: object // 绘制参数,Map<String, String>
29
+}
30
+
31
+export interface ImageMidjourneyImagineReqVO {
32
+  prompt: string // 提示词
33
+  modelId: number // 模型
34
+  base64Array: string[] // size不能为空
35
+  width: string // 图片宽度
36
+  height: string // 图片高度
37
+  version: string // 版本
38
+}
39
+
40
+export interface ImageMidjourneyActionVO {
41
+  id: number // 图片编号
42
+  customId: string // MJ::JOB::upsample::1::85a4b4c1-8835-46c5-a15c-aea34fad1862 动作标识
43
+}
44
+
45
+export interface ImageMidjourneyButtonsVO {
46
+  customId: string // MJ::JOB::upsample::1::85a4b4c1-8835-46c5-a15c-aea34fad1862 动作标识
47
+  emoji: string // 图标 emoji
48
+  label: string // Make Variations 文本
49
+  style: number // 样式: 2(Primary)、3(Green)
50
+}
51
+
52
+// AI 图片 API
53
+export const ImageApi = {
54
+  // 获取【我的】绘图分页
55
+  getImagePageMy: async (params: any) => {
56
+    return await request.get({ url: `/ai/image/my-page`, params })
57
+  },
58
+  // 获取【我的】绘图记录
59
+  getImageMy: async (id: number) => {
60
+    return await request.get({ url: `/ai/image/get-my?id=${id}` })
61
+  },
62
+  // 获取【我的】绘图记录列表
63
+  getImageListMyByIds: async (ids: number[]) => {
64
+    return await request.get({ url: `/ai/image/my-list-by-ids`, params: { ids: ids.join(',') } })
65
+  },
66
+  // 生成图片
67
+  drawImage: async (data: ImageDrawReqVO) => {
68
+    return await request.post({ url: `/ai/image/draw`, data })
69
+  },
70
+  // 删除【我的】绘画记录
71
+  deleteImageMy: async (id: number) => {
72
+    return await request.delete({ url: `/ai/image/delete-my?id=${id}` })
73
+  },
74
+
75
+  // ================ midjourney 专属 ================
76
+
77
+  // 【Midjourney】生成图片
78
+  midjourneyImagine: async (data: ImageMidjourneyImagineReqVO) => {
79
+    return await request.post({ url: `/ai/image/midjourney/imagine`, data })
80
+  },
81
+  // 【Midjourney】Action 操作(二次生成图片)
82
+  midjourneyAction: async (data: ImageMidjourneyActionVO) => {
83
+    return await request.post({ url: `/ai/image/midjourney/action`, data })
84
+  },
85
+
86
+  // ================ 绘图管理 ================
87
+
88
+  // 查询绘画分页
89
+  getImagePage: async (params: any) => {
90
+    return await request.get({ url: `/ai/image/page`, params })
91
+  },
92
+
93
+  // 更新绘画发布状态
94
+  updateImage: async (data: any) => {
95
+    return await request.put({ url: '/ai/image/update', data })
96
+  },
97
+
98
+  // 删除绘画
99
+  deleteImage: async (id: number) => {
100
+    return await request.delete({ url: `/ai/image/delete?id=` + id })
101
+  }
102
+}

+ 54 - 0
src/api/ai/knowledge/document/index.ts

@@ -0,0 +1,54 @@
1
+import request from '@/config/axios'
2
+
3
+// AI 知识库文档 VO
4
+export interface KnowledgeDocumentVO {
5
+  id: number // 编号
6
+  knowledgeId: number // 知识库编号
7
+  name: string // 文档名称
8
+  contentLength: number // 字符数
9
+  tokens: number // token 数
10
+  segmentMaxTokens: number // 分片最大 token 数
11
+  retrievalCount: number // 召回次数
12
+  status: number // 是否启用
13
+}
14
+
15
+// AI 知识库文档 API
16
+export const KnowledgeDocumentApi = {
17
+  // 查询知识库文档分页
18
+  getKnowledgeDocumentPage: async (params: any) => {
19
+    return await request.get({ url: `/ai/knowledge/document/page`, params })
20
+  },
21
+
22
+  // 查询知识库文档详情
23
+  getKnowledgeDocument: async (id: number) => {
24
+    return await request.get({ url: `/ai/knowledge/document/get?id=` + id })
25
+  },
26
+
27
+  // 新增知识库文档(单个)
28
+  createKnowledgeDocument: async (data: any) => {
29
+    return await request.post({ url: `/ai/knowledge/document/create`, data })
30
+  },
31
+
32
+  // 新增知识库文档(多个)
33
+  createKnowledgeDocumentList: async (data: any) => {
34
+    return await request.post({ url: `/ai/knowledge/document/create-list`, data })
35
+  },
36
+
37
+  // 修改知识库文档
38
+  updateKnowledgeDocument: async (data: any) => {
39
+    return await request.put({ url: `/ai/knowledge/document/update`, data })
40
+  },
41
+
42
+  // 修改知识库文档状态
43
+  updateKnowledgeDocumentStatus: async (data: any) => {
44
+    return await request.put({
45
+      url: `/ai/knowledge/document/update-status`,
46
+      data
47
+    })
48
+  },
49
+
50
+  // 删除知识库文档
51
+  deleteKnowledgeDocument: async (id: number) => {
52
+    return await request.delete({ url: `/ai/knowledge/document/delete?id=` + id })
53
+  }
54
+}

+ 44 - 0
src/api/ai/knowledge/knowledge/index.ts

@@ -0,0 +1,44 @@
1
+import request from '@/config/axios'
2
+
3
+// AI 知识库 VO
4
+export interface KnowledgeVO {
5
+  id: number // 编号
6
+  name: string // 知识库名称
7
+  description: string // 知识库描述
8
+  embeddingModelId: number // 嵌入模型编号,高质量模式时维护
9
+  topK: number // topK
10
+  similarityThreshold: number // 相似度阈值
11
+}
12
+
13
+// AI 知识库 API
14
+export const KnowledgeApi = {
15
+  // 查询知识库分页
16
+  getKnowledgePage: async (params: any) => {
17
+    return await request.get({ url: `/ai/knowledge/page`, params })
18
+  },
19
+
20
+  // 查询知识库详情
21
+  getKnowledge: async (id: number) => {
22
+    return await request.get({ url: `/ai/knowledge/get?id=` + id })
23
+  },
24
+
25
+  // 新增知识库
26
+  createKnowledge: async (data: KnowledgeVO) => {
27
+    return await request.post({ url: `/ai/knowledge/create`, data })
28
+  },
29
+
30
+  // 修改知识库
31
+  updateKnowledge: async (data: KnowledgeVO) => {
32
+    return await request.put({ url: `/ai/knowledge/update`, data })
33
+  },
34
+
35
+  // 删除知识库
36
+  deleteKnowledge: async (id: number) => {
37
+    return await request.delete({ url: `/ai/knowledge/delete?id=` + id })
38
+  },
39
+
40
+  // 获取知识库简单列表
41
+  getSimpleKnowledgeList: async () => {
42
+    return await request.get({ url: `/ai/knowledge/simple-list` })
43
+  }
44
+}

+ 49 - 0
src/api/ai/knowledge/nl2sql/index.ts

@@ -0,0 +1,49 @@
1
+import request from '@/config/axios'
2
+
3
+// nl2sql配置 VO
4
+export interface Nl2sqlVO {
5
+  id: number // 角色编号
6
+  embeddingModelId: number // 向量模型编号
7
+  embeddingModel: string // 向量模型标识
8
+  name: string // 业务名称
9
+  datasourceId: number // 数据源ID
10
+  tableNames: string // 表名,半角逗号分割
11
+  vectorStoreFile: string // 向量存储文件路径
12
+}
13
+
14
+// nl2sql配置 API
15
+export const Nl2sqlApi = {
16
+  // 查询nl2sql配置分页
17
+  getChatNl2sqlPage: async (params: any) => {
18
+    return await request.get({ url: `/ai/chat-nl2sql/page`, params })
19
+  },
20
+
21
+  // 查询nl2sql配置详情
22
+  getChatNl2sql: async (id: number) => {
23
+    return await request.get({ url: `/ai/chat-nl2sql/get?id=` + id })
24
+  },
25
+
26
+  // 新增nl2sql配置
27
+  createChatNl2sql: async (data: Nl2sqlVO) => {
28
+    return await request.post({ url: `/ai/chat-nl2sql/create`, data })
29
+  },
30
+
31
+  // 修改nl2sql配置
32
+  updateChatNl2sql: async (data: Nl2sqlVO) => {
33
+    return await request.put({ url: `/ai/chat-nl2sql/update`, data })
34
+  },
35
+
36
+  // 删除nl2sql配置
37
+  deleteChatNl2sql: async (id: number) => {
38
+    return await request.delete({ url: `/ai/chat-nl2sql/delete?id=` + id })
39
+  },
40
+
41
+  // 导出nl2sql配置 Excel
42
+  exportChatNl2sql: async (params) => {
43
+    return await request.download({ url: `/ai/chat-nl2sql/export-excel`, params })
44
+  },
45
+  // 查询nl2sql配置分页
46
+  getSimpleNl2sqlList: async () => {
47
+    return await request.get({ url: `/ai/chat-nl2sql/simple-list` })
48
+  }
49
+}

+ 75 - 0
src/api/ai/knowledge/segment/index.ts

@@ -0,0 +1,75 @@
1
+import request from '@/config/axios'
2
+
3
+// AI 知识库分段 VO
4
+export interface KnowledgeSegmentVO {
5
+  id: number // 编号
6
+  documentId: number // 文档编号
7
+  knowledgeId: number // 知识库编号
8
+  vectorId: string // 向量库编号
9
+  content: string // 切片内容
10
+  contentLength: number // 切片内容长度
11
+  tokens: number // token 数量
12
+  retrievalCount: number // 召回次数
13
+  status: number // 文档状态
14
+  createTime: number // 创建时间
15
+}
16
+
17
+// AI 知识库分段 API
18
+export const KnowledgeSegmentApi = {
19
+  // 查询知识库分段分页
20
+  getKnowledgeSegmentPage: async (params: any) => {
21
+    return await request.get({ url: `/ai/knowledge/segment/page`, params })
22
+  },
23
+
24
+  // 查询知识库分段详情
25
+  getKnowledgeSegment: async (id: number) => {
26
+    return await request.get({ url: `/ai/knowledge/segment/get?id=` + id })
27
+  },
28
+
29
+  // 删除知识库分段
30
+  deleteKnowledgeSegment: async (id: number) => {
31
+    return await request.delete({ url: `/ai/knowledge/segment/delete?id=` + id })
32
+  },
33
+
34
+  // 新增知识库分段
35
+  createKnowledgeSegment: async (data: KnowledgeSegmentVO) => {
36
+    return await request.post({ url: `/ai/knowledge/segment/create`, data })
37
+  },
38
+
39
+  // 修改知识库分段
40
+  updateKnowledgeSegment: async (data: KnowledgeSegmentVO) => {
41
+    return await request.put({ url: `/ai/knowledge/segment/update`, data })
42
+  },
43
+
44
+  // 修改知识库分段状态
45
+  updateKnowledgeSegmentStatus: async (data: any) => {
46
+    return await request.put({
47
+      url: `/ai/knowledge/segment/update-status`,
48
+      data
49
+    })
50
+  },
51
+
52
+  // 切片内容
53
+  splitContent: async (url: string, segmentMaxTokens: number) => {
54
+    return await request.get({
55
+      url: `/ai/knowledge/segment/split`,
56
+      params: { url, segmentMaxTokens }
57
+    })
58
+  },
59
+
60
+  // 获取文档处理列表
61
+  getKnowledgeSegmentProcessList: async (documentIds: number[]) => {
62
+    return await request.get({
63
+      url: `/ai/knowledge/segment/get-process-list`,
64
+      params: { documentIds: documentIds.join(',') }
65
+    })
66
+  },
67
+
68
+  // 搜索知识库分段
69
+  searchKnowledgeSegment: async (params: any) => {
70
+    return await request.get({
71
+      url: `/ai/knowledge/segment/search`,
72
+      params
73
+    })
74
+  }
75
+}

+ 60 - 0
src/api/ai/mindmap/index.ts

@@ -0,0 +1,60 @@
1
+import { getAccessToken } from '@/utils/auth'
2
+import { fetchEventSource } from '@microsoft/fetch-event-source'
3
+import { config } from '@/config/axios/config'
4
+import request from '@/config/axios' // AI 思维导图 VO
5
+
6
+// AI 思维导图 VO
7
+export interface MindMapVO {
8
+  id: number // 编号
9
+  userId: number // 用户编号
10
+  prompt: string // 生成内容提示
11
+  generatedContent: string // 生成的思维导图内容
12
+  platform: string // 平台
13
+  model: string // 模型
14
+  errorMessage: string // 错误信息
15
+}
16
+
17
+// AI 思维导图生成 VO
18
+export interface AiMindMapGenerateReqVO {
19
+  prompt: string
20
+}
21
+
22
+export const AiMindMapApi = {
23
+  generateMindMap: ({
24
+    data,
25
+    onClose,
26
+    onMessage,
27
+    onError,
28
+    ctrl
29
+  }: {
30
+    data: AiMindMapGenerateReqVO
31
+    onMessage?: (res: any) => void
32
+    onError?: (...args: any[]) => void
33
+    onClose?: (...args: any[]) => void
34
+    ctrl: AbortController
35
+  }) => {
36
+    const token = getAccessToken()
37
+    return fetchEventSource(`${config.base_url}/ai/mind-map/generate-stream`, {
38
+      method: 'post',
39
+      headers: {
40
+        'Content-Type': 'application/json',
41
+        Authorization: `Bearer ${token}`
42
+      },
43
+      openWhenHidden: true,
44
+      body: JSON.stringify(data),
45
+      onmessage: onMessage,
46
+      onerror: onError,
47
+      onclose: onClose,
48
+      signal: ctrl.signal
49
+    })
50
+  },
51
+
52
+  // 查询思维导图分页
53
+  getMindMapPage: async (params: any) => {
54
+    return await request.get({ url: `/ai/mind-map/page`, params })
55
+  },
56
+  // 删除思维导图
57
+  deleteMindMap: async (id: number) => {
58
+    return await request.delete({ url: `/ai/mind-map/delete?id=` + id })
59
+  }
60
+}

+ 44 - 0
src/api/ai/model/apiKey/index.ts

@@ -0,0 +1,44 @@
1
+import request from '@/config/axios'
2
+
3
+// AI API 密钥 VO
4
+export interface ApiKeyVO {
5
+  id: number // 编号
6
+  name: string // 名称
7
+  apiKey: string // 密钥
8
+  platform: string // 平台
9
+  url: string // 自定义 API 地址
10
+  status: number // 状态
11
+}
12
+
13
+// AI API 密钥 API
14
+export const ApiKeyApi = {
15
+  // 查询 API 密钥分页
16
+  getApiKeyPage: async (params: any) => {
17
+    return await request.get({ url: `/ai/api-key/page`, params })
18
+  },
19
+
20
+  // 获得 API 密钥列表
21
+  getApiKeySimpleList: async () => {
22
+    return await request.get({ url: `/ai/api-key/simple-list` })
23
+  },
24
+
25
+  // 查询 API 密钥详情
26
+  getApiKey: async (id: number) => {
27
+    return await request.get({ url: `/ai/api-key/get?id=` + id })
28
+  },
29
+
30
+  // 新增 API 密钥
31
+  createApiKey: async (data: ApiKeyVO) => {
32
+    return await request.post({ url: `/ai/api-key/create`, data })
33
+  },
34
+
35
+  // 修改 API 密钥
36
+  updateApiKey: async (data: ApiKeyVO) => {
37
+    return await request.put({ url: `/ai/api-key/update`, data })
38
+  },
39
+
40
+  // 删除 API 密钥
41
+  deleteApiKey: async (id: number) => {
42
+    return await request.delete({ url: `/ai/api-key/delete?id=` + id })
43
+  }
44
+}

+ 85 - 0
src/api/ai/model/chatRole/index.ts

@@ -0,0 +1,85 @@
1
+import request from '@/config/axios'
2
+
3
+// AI 聊天角色 VO
4
+export interface ChatRoleVO {
5
+  id: number // 角色编号
6
+  modelId: number // 模型编号
7
+  name: string // 角色名称
8
+  avatar: string // 角色头像
9
+  category: string // 角色类别
10
+  sort: number // 角色排序
11
+  description: string // 角色描述
12
+  systemMessage: string // 角色设定
13
+  welcomeMessage: string // 角色设定
14
+  publicStatus: boolean // 是否公开
15
+  status: number // 状态
16
+  knowledgeIds?: number[] // 引用的知识库 ID 列表
17
+  toolIds?: number[] // 引用的工具 ID 列表
18
+  type: number //角色类型:1-默认;2-text2sql
19
+  datasourceId?: number //数据源ID
20
+  tableNames?: string //表名
21
+}
22
+
23
+// AI 聊天角色 分页请求 vo
24
+export interface ChatRolePageReqVO {
25
+  name?: string // 角色名称
26
+  category?: string // 角色类别
27
+  publicStatus: boolean // 是否公开
28
+  pageNo: number // 是否公开
29
+  pageSize: number // 是否公开
30
+}
31
+
32
+// AI 聊天角色 API
33
+export const ChatRoleApi = {
34
+  // 查询聊天角色分页
35
+  getChatRolePage: async (params: any) => {
36
+    return await request.get({ url: `/ai/chat-role/page`, params })
37
+  },
38
+
39
+  // 查询聊天角色详情
40
+  getChatRole: async (id: number) => {
41
+    return await request.get({ url: `/ai/chat-role/get?id=` + id })
42
+  },
43
+
44
+  // 新增聊天角色
45
+  createChatRole: async (data: ChatRoleVO) => {
46
+    return await request.post({ url: `/ai/chat-role/create`, data })
47
+  },
48
+
49
+  // 修改聊天角色
50
+  updateChatRole: async (data: ChatRoleVO) => {
51
+    return await request.put({ url: `/ai/chat-role/update`, data })
52
+  },
53
+
54
+  // 删除聊天角色
55
+  deleteChatRole: async (id: number) => {
56
+    return await request.delete({ url: `/ai/chat-role/delete?id=` + id })
57
+  },
58
+
59
+  // ======= chat 聊天
60
+
61
+  // 获取 my role
62
+  getMyPage: async (params: ChatRolePageReqVO) => {
63
+    return await request.get({ url: `/ai/chat-role/my-page`, params})
64
+  },
65
+
66
+  // 获取角色分类
67
+  getCategoryList: async () => {
68
+    return await request.get({ url: `/ai/chat-role/category-list`})
69
+  },
70
+
71
+  // 创建角色
72
+  createMy: async (data: ChatRoleVO) => {
73
+    return await request.post({ url: `/ai/chat-role/create-my`, data})
74
+  },
75
+
76
+  // 更新角色
77
+  updateMy: async (data: ChatRoleVO) => {
78
+    return await request.put({ url: `/ai/chat-role/update-my`, data})
79
+  },
80
+
81
+  // 删除角色 my
82
+  deleteMy: async (id: number) => {
83
+    return await request.delete({ url: `/ai/chat-role/delete-my?id=` + id })
84
+  },
85
+}

+ 0 - 0
src/api/ai/model/model/index.ts


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio