sks-plugin-el-erp 1.0.3 → 1.0.4-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.idea/modules.xml +1 -1
  2. package/.idea/{bbb.iml → sks-plugin-el-erp.iml} +0 -0
  3. package/.idea/vcs.xml +6 -0
  4. package/.idea/watcherTasks.xml +25 -0
  5. package/README.md +95 -0
  6. package/index.js +120 -1
  7. package/lib/clipboard.js +36 -0
  8. package/lib/core.js +277 -151
  9. package/lib/dialog-form.js +252 -0
  10. package/lib/modal.js +32 -0
  11. package/lib/print-dialog-form.js +176 -0
  12. package/lib/ref.js +7 -0
  13. package/lib/scroll-to.js +58 -0
  14. package/lib/sks-app-utils.js +125 -0
  15. package/lib/sks-mock.js +89 -0
  16. package/lib/sks-model-utils.js +129 -0
  17. package/lib/sks-number-utils.js +23 -0
  18. package/lib/sks-page.js +297 -0
  19. package/lib/sksConfig.js +9 -0
  20. package/lib/style/element-ui.css +56 -0
  21. package/lib/style/element-ui.css.map +1 -0
  22. package/lib/style/sks-main.css +13 -0
  23. package/lib/style-sass/element-ui.scss +64 -0
  24. package/lib/ui/core/sks-table-prop-table.vue +129 -0
  25. package/lib/ui/sks-button/index.vue +130 -0
  26. package/lib/ui/sks-date-ymd-range/index.vue +123 -0
  27. package/lib/ui/sks-dict-label-tag/index.js +8 -0
  28. package/lib/ui/sks-dict-label-tag/src/index.vue +25 -0
  29. package/lib/ui/sks-image-use-img-url/index.js +8 -0
  30. package/lib/ui/sks-image-use-img-url/src/index.vue +44 -0
  31. package/lib/ui/sks-pagination/index.js +8 -0
  32. package/lib/ui/sks-pagination/src/main.vue +102 -0
  33. package/lib/ui/sks-right-toolbar/index.js +8 -0
  34. package/lib/ui/sks-right-toolbar/src/index.vue +99 -0
  35. package/lib/ui/sks-table/index.js +8 -0
  36. package/lib/ui/sks-table/src/SksTable.vue +424 -0
  37. package/package-lock.bak.json +14317 -0
  38. package/package-lock.mint.bak.json +14379 -0
  39. package/package-lock.win.bak.json +14724 -0
  40. package/package.bak.json +31 -0
  41. package/package.json +35 -21
  42. package/serverless.yml.bak +19 -0
  43. package/vue.config.js +44 -0
package/.idea/modules.xml CHANGED
@@ -2,7 +2,7 @@
2
2
  <project version="4">
3
3
  <component name="ProjectModuleManager">
4
4
  <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/bbb.iml" filepath="$PROJECT_DIR$/.idea/bbb.iml" />
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/sks-plugin-el-erp.iml" filepath="$PROJECT_DIR$/.idea/sks-plugin-el-erp.iml" />
6
6
  </modules>
7
7
  </component>
8
8
  </project>
File without changes
package/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectTasksOptions">
4
+ <TaskOptions isEnabled="false">
5
+ <option name="arguments" value="$FileName$:$FileNameWithoutExtension$.css" />
6
+ <option name="checkSyntaxErrors" value="true" />
7
+ <option name="description" />
8
+ <option name="exitCodeBehavior" value="ERROR" />
9
+ <option name="fileExtension" value="scss" />
10
+ <option name="immediateSync" value="true" />
11
+ <option name="name" value="SCSS" />
12
+ <option name="output" value="$FileNameWithoutExtension$.css:$FileNameWithoutExtension$.css.map" />
13
+ <option name="outputFilters">
14
+ <array />
15
+ </option>
16
+ <option name="outputFromStdout" value="false" />
17
+ <option name="program" value="sass" />
18
+ <option name="runOnExternalChanges" value="true" />
19
+ <option name="scopeName" value="Project Files" />
20
+ <option name="trackOnlyRoot" value="true" />
21
+ <option name="workingDir" value="$FileDir$" />
22
+ <envs />
23
+ </TaskOptions>
24
+ </component>
25
+ </project>
package/README.md CHANGED
@@ -1,10 +1,28 @@
1
1
  # element用于erp的扩展
2
2
 
3
3
  # 发布新版本
4
+ ## 正式版
4
5
  ```shell
5
6
  npm publish
6
7
  ```
7
8
 
9
+ ## 测试版
10
+
11
+ ```json
12
+ {
13
+ "version": "1.0.4-beta.2",
14
+ "package.json": "发布时文件中的版本号,下个测试版最后面的版本号+1,例如 1.0.4-beta.3"
15
+ }
16
+ ```
17
+ ### 发布测试版
18
+ ```shell
19
+ npm publish --tag beta1
20
+ ```
21
+ ### 按照测试版
22
+ ```shell
23
+ npm install sks-plugin-el-erp@beta1
24
+ ```
25
+
8
26
  ## 撤销发布包
9
27
  千万不要使用
10
28
  即使你撤销了发布的包,发包的时候也不能再和被撤销的包的名称和版本重复了
@@ -18,3 +36,80 @@ npm publish
18
36
  npm版本 6.14.12
19
37
  nodejs版本 v10.24.1
20
38
  ```
39
+
40
+ ## win笔记本使用
41
+ 能够编译成静态
42
+ ```
43
+ nodejs版本 v14.17.3
44
+ npm版本 6.14.13
45
+ ```
46
+
47
+ ## linux mint使用
48
+ 能够编译成静态
49
+ ```
50
+ nodejs版本 v14.17.3
51
+ npm版本 6.14.13
52
+ ```
53
+
54
+
55
+ ## nginx配置
56
+ ### 开发配置
57
+
58
+ ```nginx
59
+ server {
60
+ listen 38088;
61
+ server_name location;
62
+
63
+ location /{
64
+ proxy_set_header Host $http_host;
65
+ proxy_set_header X-Real-IP $remote_addr;
66
+ proxy_set_header REMOTE-HOST $remote_addr;
67
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
68
+ proxy_pass http://127.0.0.1:28088/;
69
+ }
70
+
71
+ location /sks-plugin-el-erp/ {
72
+ #location 路径不能改,实际目录为 /home/shoukaiseki/gitwork/sks-plugin-el-erp;
73
+ #否则无法正确映射到实际路径
74
+ root /home/shoukaiseki/gitwork;
75
+ autoindex on; #开启目录浏览功能;
76
+ autoindex_exact_size off; #关闭详细文件大小统计,让文件大小显示MB,GB单位,默认为b;
77
+ autoindex_localtime on; #开启以服务器本地时区显示文件修改日期!
78
+ }
79
+ }
80
+
81
+ ```
82
+ ### 正式配置
83
+
84
+ ```nginx
85
+ server {
86
+ #fastcgi_intercept_errors on;
87
+ listen 80;
88
+ server_name www.shoukaiseki.top;
89
+
90
+ location /{
91
+
92
+ proxy_set_header Host $http_host;
93
+ proxy_set_header X-Real-IP $remote_addr;
94
+ proxy_set_header REMOTE-HOST $remote_addr;
95
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
96
+ proxy_pass http://127.0.0.1:81/syntaxhighlighter/;
97
+ }
98
+
99
+ location /sks-plugin-el-erp/ {
100
+ #location 路径不能改,实际目录为 D:/gitproject/sks-plugin-el-erp;
101
+ #否则无法正确映射到实际路径
102
+ root D:/gitproject/;
103
+ autoindex on; #开启目录浏览功能;
104
+ autoindex_exact_size off; #关闭详细文件大小统计,让文件大小显示MB,GB单位,默认为b;
105
+ autoindex_localtime on; #开启以服务器本地时区显示文件修改日期!
106
+ }
107
+
108
+ error_page 500 502 503 504 /50x.html;
109
+ location = /50x.html {
110
+ root html;
111
+ }
112
+ }
113
+
114
+
115
+ ```
package/index.js CHANGED
@@ -1,16 +1,135 @@
1
1
  import Vue from 'vue'
2
- import {baseFormatOptionLabel, isNullOrUndefined, strIfEmpty, strIsEmpty, strLength} from "./lib/core";
2
+ import {
3
+ addShowAllToFirst,
4
+ baseFormatOptionLabel,
5
+ DICT_DATA_CSS_CLASS,
6
+ CHANGE_BIT_FLAG,
7
+ clearFormValidate,
8
+ dictValueTypeToInteger, equalsObj,
9
+ findRowIndexInListFromAttrName,
10
+ formatOssUrl, ifNull,
11
+ isInArray,
12
+ isInvalid,
13
+ isNullOrUndefined,
14
+ mergeFromObject, notNullAndNotUndefined, parseTime,
15
+ resetSksTableBefore,
16
+ safeGet,
17
+ safeGetNullEmpty,
18
+ safeGetStr,
19
+ setSksTableDataByPage,
20
+ strIfEmpty,
21
+ strIsEmpty,
22
+ strLength
23
+ } from "./lib/core";
24
+ import {newTableColumnList} from "./lib/sks-model-utils";
25
+ import './lib/style/sks-main.css'
26
+ import './lib/style/element-ui.css'
3
27
  import {isExternal} from "./lib/validate";
28
+ import {msgError, msgInfo, msgLoading, msgSuccess} from "./lib/modal";
29
+ import {resetForm} from "./lib/ref";
30
+ import {absNumber, negateNumber} from "./lib/sks-number-utils";
31
+ import {sksConfig} from "./lib/sksConfig";
32
+ import {rowStyleElTable} from "./lib/sks-app-utils";
4
33
 
5
34
 
6
35
  const sksUtils={
36
+ parseTime,
37
+ notNullAndNotUndefined,
7
38
  isNullOrUndefined,
39
+ ifNull,
8
40
  strIsEmpty,
9
41
  strIfEmpty,
42
+ equalsObj,
10
43
  strLength,
11
44
  baseFormatOptionLabel,
12
45
  isExternal,
46
+ safeGet,
47
+ safeGetStr,
48
+ safeGetNullEmpty,
49
+ formatOssUrl,
50
+ mergeFromObject,
51
+ isInArray,
52
+ findRowIndexInListFromAttrName,
53
+ isInvalid,
54
+ dictValueTypeToInteger,
55
+ addShowAllToFirst,
56
+
57
+ //modelUtils
58
+ newTableColumnList,
59
+
60
+ //numberUtils
61
+ negateNumber,
62
+ absNumber,
63
+
64
+ //sksTable
65
+ resetSksTableBefore,
66
+ setSksTableDataByPage,
67
+ rowStyleElTable,
68
+
69
+ //modal
70
+ msgError,
71
+ msgSuccess,
72
+ msgLoading,
73
+ msgInfo,
74
+
75
+
76
+
77
+ //constants
78
+ CHANGE_BIT_FLAG,
79
+ DICT_DATA_CSS_CLASS,
13
80
  }
14
81
 
15
82
 
83
+ Vue.prototype.clearFormValidate=clearFormValidate
84
+ //ref
85
+ Vue.prototype.resetForm=resetForm
86
+
16
87
  Vue.prototype.sksUtils=sksUtils
88
+
89
+ //配置信息,基础配置/缓存配置
90
+ Vue.prototype.sksConfig=sksConfig
91
+
92
+ import SksButton from "./lib/ui/sks-button/index.vue";
93
+ import SksDateYmdRange from "./lib/ui/sks-date-ymd-range/index.vue";
94
+ import SksImageUseImgUrl from './lib/ui/sks-image-use-img-url/index.js'
95
+ import SksTablePropTable from './lib/ui/core/sks-table-prop-table.vue'
96
+ import SksDictLabelTag from './lib/ui/sks-dict-label-tag/index.js'
97
+ import SksRightToolbar from './lib/ui/sks-right-toolbar/index.js'
98
+ import SksTable from './lib/ui/sks-table/index.js'
99
+ import SksPagination from './lib/ui/sks-pagination/index.js'
100
+
101
+ const components = [
102
+ SksButton,
103
+ SksDateYmdRange,
104
+ SksImageUseImgUrl,
105
+ SksTablePropTable,
106
+ SksDictLabelTag,
107
+ SksRightToolbar,
108
+ SksTable,
109
+ SksPagination,
110
+ ]
111
+
112
+
113
+ const install = function(Vue, opts = {}) {
114
+ components.forEach(component => {
115
+ Vue.component(component.name, component);
116
+ });
117
+ }
118
+
119
+ /* istanbul ignore if */
120
+ if (typeof window !== 'undefined' && window.Vue) {
121
+ install(window.Vue);
122
+ }
123
+
124
+ export default {
125
+ version: '2.15.3',
126
+ install,
127
+ SksButton,
128
+ SksDateYmdRange,
129
+ SksImageUseImgUrl,
130
+ SksTablePropTable,
131
+ SksDictLabelTag,
132
+ SksRightToolbar,
133
+ SksTable,
134
+ SksPagination,
135
+ }
@@ -0,0 +1,36 @@
1
+ import Vue from 'vue'
2
+ import Clipboard from 'clipboard'
3
+
4
+ function clipboardSuccess() {
5
+ Vue.prototype.$message({
6
+ message: '复制成功',
7
+ type: 'success',
8
+ duration: 1500
9
+ })
10
+ }
11
+
12
+ function clipboardError() {
13
+ Vue.prototype.$message({
14
+ message: '复制失败',
15
+ type: 'error'
16
+ })
17
+ }
18
+
19
+ export default function handleClipboard(text, event) {
20
+ const clipboard = new Clipboard(event.target, {
21
+ text: () => text
22
+ })
23
+ clipboard.on('success', () => {
24
+ clipboardSuccess()
25
+ clipboard.off('error')
26
+ clipboard.off('success')
27
+ clipboard.destroy()
28
+ })
29
+ clipboard.on('error', () => {
30
+ clipboardError()
31
+ clipboard.off('error')
32
+ clipboard.off('success')
33
+ clipboard.destroy()
34
+ })
35
+ clipboard.onClick(event)
36
+ }