sks-plugin-el-erp 1.0.1 → 1.0.4-beta.1

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 (45) hide show
  1. package/.idea/modules.xml +8 -0
  2. package/.idea/sks-plugin-el-erp.iml +12 -0
  3. package/.idea/vcs.xml +6 -0
  4. package/.idea/watcherTasks.xml +25 -0
  5. package/LICENSE +20 -0
  6. package/README.md +90 -0
  7. package/index.js +124 -2
  8. package/lib/clipboard.js +36 -0
  9. package/lib/core.js +1447 -0
  10. package/lib/dialog-form.js +252 -0
  11. package/lib/modal.js +32 -0
  12. package/lib/print-dialog-form.js +176 -0
  13. package/lib/ref.js +7 -0
  14. package/lib/scroll-to.js +58 -0
  15. package/lib/sks-app-utils.js +125 -0
  16. package/lib/sks-mock.js +89 -0
  17. package/lib/sks-model-utils.js +129 -0
  18. package/lib/sks-number-utils.js +23 -0
  19. package/lib/sks-page.js +297 -0
  20. package/lib/sksConfig.js +9 -0
  21. package/lib/style/element-ui.css +56 -0
  22. package/lib/style/element-ui.css.map +1 -0
  23. package/lib/style/sks-main.css +13 -0
  24. package/lib/style-sass/element-ui.scss +64 -0
  25. package/lib/ui/core/sks-table-prop-table.vue +129 -0
  26. package/lib/ui/sks-button/index.vue +130 -0
  27. package/lib/ui/sks-date-ymd-range/index.vue +123 -0
  28. package/lib/ui/sks-dict-label-tag/index.js +8 -0
  29. package/lib/ui/sks-dict-label-tag/src/index.vue +25 -0
  30. package/lib/ui/sks-image-use-img-url/index.js +8 -0
  31. package/lib/ui/sks-image-use-img-url/src/index.vue +44 -0
  32. package/lib/ui/sks-pagination/index.js +8 -0
  33. package/lib/ui/sks-pagination/src/main.vue +102 -0
  34. package/lib/ui/sks-right-toolbar/index.js +8 -0
  35. package/lib/ui/sks-right-toolbar/src/index.vue +99 -0
  36. package/lib/ui/sks-table/index.js +8 -0
  37. package/lib/ui/sks-table/src/SksTable.vue +424 -0
  38. package/lib/validate.js +83 -0
  39. package/package-lock.bak.json +14317 -0
  40. package/package-lock.mint.bak.json +14379 -0
  41. package/package-lock.win.bak.json +14724 -0
  42. package/package.bak.json +31 -0
  43. package/package.json +36 -16
  44. package/serverless.yml.bak +19 -0
  45. package/vue.config.js +44 -0
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/sks-plugin-el-erp.iml" filepath="$PROJECT_DIR$/.idea/sks-plugin-el-erp.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="WEB_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/temp" />
6
+ <excludeFolder url="file://$MODULE_DIR$/.tmp" />
7
+ <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
+ </content>
9
+ <orderEntry type="inheritedJdk" />
10
+ <orderEntry type="sourceFolder" forTests="false" />
11
+ </component>
12
+ </module>
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/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Ruoyi Autumn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ 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, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,13 +1,103 @@
1
1
  # element用于erp的扩展
2
2
 
3
3
  # 发布新版本
4
+ ## 正式版
4
5
  ```shell
5
6
  npm publish
6
7
  ```
7
8
 
9
+ ## 测试版
10
+ ```shell
11
+ npm publish --tag beta
12
+ ```
13
+
8
14
  ## 撤销发布包
9
15
  千万不要使用
10
16
  即使你撤销了发布的包,发包的时候也不能再和被撤销的包的名称和版本重复了
11
17
  ```shell
12
18
  #npm unpublish
13
19
  ```
20
+
21
+ ## 依赖说明
22
+
23
+ ```
24
+ npm版本 6.14.12
25
+ nodejs版本 v10.24.1
26
+ ```
27
+
28
+ ## win笔记本使用
29
+ 能够编译成静态
30
+ ```
31
+ nodejs版本 v14.17.3
32
+ npm版本 6.14.13
33
+ ```
34
+
35
+ ## linux mint使用
36
+ 能够编译成静态
37
+ ```
38
+ nodejs版本 v14.17.3
39
+ npm版本 6.14.13
40
+ ```
41
+
42
+
43
+ ## nginx配置
44
+ ### 开发配置
45
+
46
+ ```nginx
47
+ server {
48
+ listen 38088;
49
+ server_name location;
50
+
51
+ location /{
52
+ proxy_set_header Host $http_host;
53
+ proxy_set_header X-Real-IP $remote_addr;
54
+ proxy_set_header REMOTE-HOST $remote_addr;
55
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
56
+ proxy_pass http://127.0.0.1:28088/;
57
+ }
58
+
59
+ location /sks-plugin-el-erp/ {
60
+ #location 路径不能改,实际目录为 /home/shoukaiseki/gitwork/sks-plugin-el-erp;
61
+ #否则无法正确映射到实际路径
62
+ root /home/shoukaiseki/gitwork;
63
+ autoindex on; #开启目录浏览功能;
64
+ autoindex_exact_size off; #关闭详细文件大小统计,让文件大小显示MB,GB单位,默认为b;
65
+ autoindex_localtime on; #开启以服务器本地时区显示文件修改日期!
66
+ }
67
+ }
68
+
69
+ ```
70
+ ### 正式配置
71
+
72
+ ```nginx
73
+ server {
74
+ #fastcgi_intercept_errors on;
75
+ listen 80;
76
+ server_name www.shoukaiseki.top;
77
+
78
+ location /{
79
+
80
+ proxy_set_header Host $http_host;
81
+ proxy_set_header X-Real-IP $remote_addr;
82
+ proxy_set_header REMOTE-HOST $remote_addr;
83
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
84
+ proxy_pass http://127.0.0.1:81/syntaxhighlighter/;
85
+ }
86
+
87
+ location /sks-plugin-el-erp/ {
88
+ #location 路径不能改,实际目录为 D:/gitproject/sks-plugin-el-erp;
89
+ #否则无法正确映射到实际路径
90
+ root D:/gitproject/;
91
+ autoindex on; #开启目录浏览功能;
92
+ autoindex_exact_size off; #关闭详细文件大小统计,让文件大小显示MB,GB单位,默认为b;
93
+ autoindex_localtime on; #开启以服务器本地时区显示文件修改日期!
94
+ }
95
+
96
+ error_page 500 502 503 504 /50x.html;
97
+ location = /50x.html {
98
+ root html;
99
+ }
100
+ }
101
+
102
+
103
+ ```
package/index.js CHANGED
@@ -1,13 +1,135 @@
1
1
  import Vue from 'vue'
2
- import {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'
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";
3
33
 
4
34
 
5
35
  const sksUtils={
36
+ parseTime,
37
+ notNullAndNotUndefined,
6
38
  isNullOrUndefined,
39
+ ifNull,
7
40
  strIsEmpty,
8
41
  strIfEmpty,
9
- strLength
42
+ equalsObj,
43
+ strLength,
44
+ baseFormatOptionLabel,
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,
10
80
  }
11
81
 
12
82
 
83
+ Vue.prototype.clearFormValidate=clearFormValidate
84
+ //ref
85
+ Vue.prototype.resetForm=resetForm
86
+
13
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
+ }