sks-plugin-el-erp 1.0.2 → 1.0.4-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/modules.xml +1 -1
- package/.idea/{bbb.iml → sks-plugin-el-erp.iml} +0 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/watcherTasks.xml +25 -0
- package/README.md +95 -0
- package/babel.config.js +13 -0
- package/index.js +155 -1
- package/lib/clipboard.js +36 -0
- package/lib/core.js +284 -154
- package/lib/dialog-form.js +252 -0
- package/lib/modal.js +32 -0
- package/lib/print-dialog-form.js +176 -0
- package/lib/ref.js +7 -0
- package/lib/scroll-to.js +58 -0
- package/lib/sks-app-utils.js +125 -0
- package/lib/sks-mock.js +89 -0
- package/lib/sks-model-utils.js +129 -0
- package/lib/sks-number-utils.js +23 -0
- package/lib/sks-page.js +297 -0
- package/lib/sksConfig.js +13 -0
- package/lib/style/element-ui.css +56 -0
- package/lib/style/element-ui.css.map +1 -0
- package/lib/style/sks-main.css +13 -0
- package/lib/style-sass/element-ui.scss +64 -0
- package/lib/ui/core/sks-table-prop-table.vue +129 -0
- package/lib/ui/filter-param/sks-filter-param-date-range/index.js +8 -0
- package/lib/ui/filter-param/sks-filter-param-date-range/src/main.vue +169 -0
- package/lib/ui/filter-param/sks-filter-param-dict-select/index.js +8 -0
- package/lib/ui/filter-param/sks-filter-param-dict-select/src/main.vue +95 -0
- package/lib/ui/filter-param/sks-filter-param-input/index.js +8 -0
- package/lib/ui/filter-param/sks-filter-param-input/src/main.vue +83 -0
- package/lib/ui/sks-button/index.vue +130 -0
- package/lib/ui/sks-checkbox/index.js +8 -0
- package/lib/ui/sks-checkbox/src/main.vue +96 -0
- package/lib/ui/sks-date/index.js +8 -0
- package/lib/ui/sks-date/src/main.vue +127 -0
- package/lib/ui/sks-date-ymd-range/index.vue +123 -0
- package/lib/ui/sks-dict-label-tag/index.js +8 -0
- package/lib/ui/sks-dict-label-tag/src/index.vue +25 -0
- package/lib/ui/sks-image-use-img-url/index.js +8 -0
- package/lib/ui/sks-image-use-img-url/src/index.vue +44 -0
- package/lib/ui/sks-pagination/index.js +8 -0
- package/lib/ui/sks-pagination/src/main.vue +102 -0
- package/lib/ui/sks-right-toolbar/index.js +8 -0
- package/lib/ui/sks-right-toolbar/src/index.vue +99 -0
- package/lib/ui/sks-select-multiple-by-lookup-controller/index.js +8 -0
- package/lib/ui/sks-select-multiple-by-lookup-controller/src/main.vue +440 -0
- package/lib/ui/sks-select-single-by-lookup-controller/index.js +8 -0
- package/lib/ui/sks-select-single-by-lookup-controller/src/main.vue +463 -0
- package/lib/ui/sks-status-select/index.js +8 -0
- package/lib/ui/sks-status-select/src/main.vue +202 -0
- package/lib/ui/sks-table/index.js +8 -0
- package/lib/ui/sks-table/src/SksTable.vue +425 -0
- package/lib/ui/sks-table-query-form-el/index.js +8 -0
- package/lib/ui/sks-table-query-form-el/src/main.vue +345 -0
- package/package-lock.bak.json +16097 -0
- package/package-lock.mint.bak.json +14379 -0
- package/package-lock.win.bak.json +14724 -0
- package/package.bak.json +31 -0
- package/package.json +37 -20
- package/serverless.yml.bak +19 -0
- package/vue.config.js +50 -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/
|
|
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,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/babel.config.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
presets: [
|
|
3
|
+
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
|
|
4
|
+
'@vue/cli-plugin-babel/preset'
|
|
5
|
+
],
|
|
6
|
+
'env': {
|
|
7
|
+
'development': {
|
|
8
|
+
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
|
|
9
|
+
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
|
|
10
|
+
'plugins': ['dynamic-import-node']
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
package/index.js
CHANGED
|
@@ -1,16 +1,170 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
|
-
import {
|
|
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, generateUUID, initListVueVirtualUUID
|
|
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 {request, 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
|
+
generateUUID,
|
|
69
|
+
initListVueVirtualUUID,
|
|
70
|
+
|
|
71
|
+
//modal
|
|
72
|
+
msgError,
|
|
73
|
+
msgSuccess,
|
|
74
|
+
msgLoading,
|
|
75
|
+
msgInfo,
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
//constants
|
|
80
|
+
CHANGE_BIT_FLAG,
|
|
81
|
+
DICT_DATA_CSS_CLASS,
|
|
13
82
|
}
|
|
14
83
|
|
|
15
84
|
|
|
85
|
+
Vue.prototype.clearFormValidate=clearFormValidate
|
|
86
|
+
//ref
|
|
87
|
+
Vue.prototype.resetForm=resetForm
|
|
88
|
+
|
|
16
89
|
Vue.prototype.sksUtils=sksUtils
|
|
90
|
+
|
|
91
|
+
//配置信息,基础配置/缓存配置
|
|
92
|
+
Vue.prototype.sksConfig=sksConfig
|
|
93
|
+
|
|
94
|
+
import SksButton from "./lib/ui/sks-button/index.vue";
|
|
95
|
+
import SksDateYmdRange from "./lib/ui/sks-date-ymd-range/index.vue";
|
|
96
|
+
import SksImageUseImgUrl from './lib/ui/sks-image-use-img-url/index.js'
|
|
97
|
+
import SksTablePropTable from './lib/ui/core/sks-table-prop-table.vue'
|
|
98
|
+
import SksDictLabelTag from './lib/ui/sks-dict-label-tag/index.js'
|
|
99
|
+
import SksRightToolbar from './lib/ui/sks-right-toolbar/index.js'
|
|
100
|
+
import SksTable from './lib/ui/sks-table/index.js'
|
|
101
|
+
import SksPagination from './lib/ui/sks-pagination/index.js'
|
|
102
|
+
import SksSelectSingleByLookupController from './lib/ui/sks-select-single-by-lookup-controller/index.js'
|
|
103
|
+
import SksSelectMultipleByLookupService from "./lib/ui/sks-select-multiple-by-lookup-controller/index.js";
|
|
104
|
+
import SksFilterParamDateRange from "./lib/ui/filter-param/sks-filter-param-date-range/index.js";
|
|
105
|
+
import SksFilterParamInput from "./lib/ui/filter-param/sks-filter-param-input/index.js";
|
|
106
|
+
import SksFilterParamDictSelect from "./lib/ui/filter-param/sks-filter-param-dict-select/index.js";
|
|
107
|
+
import SksCheckbox from './lib/ui/sks-checkbox/index.js'
|
|
108
|
+
import SksDate from './lib/ui/sks-date/index.js'
|
|
109
|
+
import SksStatusSelect from './lib/ui/sks-status-select/index.js'
|
|
110
|
+
import SksTableQueryFormEl from './lib/ui/sks-table-query-form-el/index.js'
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
const components = [
|
|
116
|
+
SksButton,
|
|
117
|
+
SksDateYmdRange,
|
|
118
|
+
SksImageUseImgUrl,
|
|
119
|
+
SksTablePropTable,
|
|
120
|
+
SksDictLabelTag,
|
|
121
|
+
SksRightToolbar,
|
|
122
|
+
SksTable,
|
|
123
|
+
SksPagination,
|
|
124
|
+
SksSelectSingleByLookupController,
|
|
125
|
+
SksSelectMultipleByLookupService,
|
|
126
|
+
SksFilterParamDateRange,
|
|
127
|
+
SksFilterParamInput,
|
|
128
|
+
SksFilterParamDictSelect,
|
|
129
|
+
SksCheckbox,
|
|
130
|
+
SksDate,
|
|
131
|
+
SksStatusSelect,
|
|
132
|
+
SksTableQueryFormEl,
|
|
133
|
+
]
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
const install = function(Vue, opts = {}) {
|
|
137
|
+
components.forEach(component => {
|
|
138
|
+
Vue.component(component.name, component);
|
|
139
|
+
});
|
|
140
|
+
Vue.prototype.$SKS_PLUGIN_EL_ERP = {
|
|
141
|
+
request: opts.request||request
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* istanbul ignore if */
|
|
146
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
147
|
+
install(window.Vue);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export default {
|
|
151
|
+
version: '2.15.3',
|
|
152
|
+
install,
|
|
153
|
+
SksButton,
|
|
154
|
+
SksDateYmdRange,
|
|
155
|
+
SksImageUseImgUrl,
|
|
156
|
+
SksTablePropTable,
|
|
157
|
+
SksDictLabelTag,
|
|
158
|
+
SksRightToolbar,
|
|
159
|
+
SksTable,
|
|
160
|
+
SksPagination,
|
|
161
|
+
SksSelectSingleByLookupController,
|
|
162
|
+
SksSelectMultipleByLookupService,
|
|
163
|
+
SksFilterParamDateRange,
|
|
164
|
+
SksFilterParamInput,
|
|
165
|
+
SksFilterParamDictSelect,
|
|
166
|
+
SksCheckbox,
|
|
167
|
+
SksDate,
|
|
168
|
+
SksStatusSelect,
|
|
169
|
+
SksTableQueryFormEl,
|
|
170
|
+
}
|
package/lib/clipboard.js
ADDED
|
@@ -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
|
+
}
|