doway-coms 1.1.52 → 1.1.55

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 (52) hide show
  1. package/lib/doway-coms.common.js +1506 -53
  2. package/lib/doway-coms.umd.js +1506 -53
  3. package/node_modules/vxe-table/package.json +1 -1
  4. package/package.json +13 -4
  5. package/packages/BaseCheckbox/index.js +8 -0
  6. package/packages/BaseCheckbox/src/index.vue +123 -0
  7. package/packages/BaseDate/index.js +8 -0
  8. package/packages/BaseDate/src/index.vue +145 -0
  9. package/packages/BaseDateWeek/index.js +8 -0
  10. package/packages/BaseDateWeek/src/index.vue +115 -0
  11. package/packages/BaseDatetime/index.js +8 -0
  12. package/packages/BaseDatetime/src/index.vue +143 -0
  13. package/packages/BaseForm/index.js +8 -0
  14. package/packages/BaseForm/src/index.vue +631 -0
  15. package/packages/BaseGrid/index.js +10 -0
  16. package/packages/BaseGrid/src/index.vue +2375 -0
  17. package/packages/BaseInput/index.js +8 -0
  18. package/packages/BaseInput/src/index.vue +122 -0
  19. package/packages/BaseIntervalInput/index.js +8 -0
  20. package/packages/BaseIntervalInput/src/index.vue +275 -0
  21. package/packages/BaseNumberInput/index.js +8 -0
  22. package/packages/BaseNumberInput/src/index.vue +216 -0
  23. package/packages/BasePagination/index.js +8 -0
  24. package/packages/BasePagination/src/index.vue +74 -0
  25. package/packages/BasePictureCard/index.js +8 -0
  26. package/packages/BasePictureCard/src/index.vue +580 -0
  27. package/packages/BasePulldown/index.js +8 -0
  28. package/packages/BasePulldown/src/index.vue +817 -0
  29. package/packages/BaseSelect/index.js +8 -0
  30. package/packages/BaseSelect/src/index.vue +141 -0
  31. package/packages/BaseSelectMulti/index.js +8 -0
  32. package/packages/BaseSelectMulti/src/index.vue +135 -0
  33. package/packages/BaseTextArea/index.js +8 -0
  34. package/packages/BaseTextArea/src/index.vue +138 -0
  35. package/packages/BaseTime/index.js +8 -0
  36. package/packages/BaseTime/src/index.vue +117 -0
  37. package/packages/BaseTool/index.js +8 -0
  38. package/packages/BaseTool/src/index.vue +350 -0
  39. package/packages/BaseToolStatus/index.js +8 -0
  40. package/packages/BaseToolStatus/src/index.vue +384 -0
  41. package/packages/index.js +138 -0
  42. package/packages/styles/default.less +79 -0
  43. package/packages/utils/api.js +35 -0
  44. package/packages/utils/auth.js +38 -0
  45. package/packages/utils/common.js +259 -0
  46. package/packages/utils/dom.js +181 -0
  47. package/packages/utils/enum.js +81 -0
  48. package/packages/utils/filters.js +459 -0
  49. package/packages/utils/msg.js +17 -0
  50. package/packages/utils/patchFiles.js +45 -0
  51. package/packages/utils/request.js +80 -0
  52. package/packages/utils/store.js +117 -0
@@ -0,0 +1,384 @@
1
+ <template>
2
+ <div class="status-bar">
3
+ <div class="status-bar-btns">
4
+ <a-button
5
+ class="status-bar-btn"
6
+ size="small"
7
+ :type="btn.isPrimary === true ? 'primary' : 'default'"
8
+ v-show="btn.visible === true"
9
+ :loading="btn.isLoading"
10
+ @click="btnClick(btn)"
11
+ v-for="btn in internalBtns"
12
+ :key="btn.code"
13
+ >{{ btn.caption }}</a-button
14
+ >
15
+ </div>
16
+ <div class="status-bar-status">
17
+ <div class="el-status-btn-wrapper">
18
+ <div
19
+ v-for="(status, index) in statuss"
20
+ :key="index"
21
+ style="display:inline-block"
22
+ >
23
+ <a-button
24
+ v-if="!status.notButton"
25
+ class="status-primary"
26
+ :class="
27
+ status.value === formRow.status
28
+ ? 'current-status'
29
+ : 'inactive-status'
30
+ "
31
+ type="text"
32
+ >
33
+ {{ status.caption }}</a-button
34
+ >
35
+ <div
36
+ v-else
37
+ class="progressBar"
38
+ :class="
39
+ formRow.value == 'progress' ? 'progressBar' : 'progressBarStop'
40
+ "
41
+ >
42
+ <div class="inProgressBar" :style="{ width: status.progress }">
43
+ <div class="text">
44
+ {{ status.progress }}
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </template>
53
+
54
+ <script>
55
+ import { Button } from 'ant-design-vue'
56
+ export default {
57
+ name: 'BaseToolStatus',
58
+ components:{
59
+ 'a-button': Button
60
+ },
61
+ data() {
62
+ return {
63
+ internalWorkFlowBtns: [],
64
+ internalBtns: [],
65
+ internalStatuss: [],
66
+ internalFormRow: {}
67
+ }
68
+ },
69
+ props: {
70
+ workFlowBtns: {
71
+ type: Array,
72
+ default: () => {
73
+ return []
74
+ }
75
+ },
76
+ actionData: {
77
+ type: Object,
78
+ default: () => {
79
+ return {}
80
+ },
81
+ deep: true
82
+ },
83
+ objectName: {
84
+ // 对象信息
85
+ type: String,
86
+ default: 'artRout'
87
+ },
88
+ formRow: {
89
+ type: Object,
90
+ default: function() {
91
+ return {}
92
+ }
93
+ },
94
+ btns: {
95
+ // 按钮
96
+ type: Array,
97
+ default: function() {
98
+ return []
99
+ }
100
+ },
101
+ statuss: {
102
+ // 状态栏
103
+ type: Array,
104
+ default: function() {
105
+ return []
106
+ }
107
+ }
108
+ },
109
+ watch: {
110
+ workFlowBtns: {
111
+ handler: function(newVal) {
112
+ this.internalWorkFlowBtns = newVal
113
+ },
114
+ deep: true
115
+ },
116
+ btns: {
117
+ handler: function(newVal) {
118
+ this.internalBtns = newVal
119
+ },
120
+ deep: true
121
+ }
122
+ },
123
+ created() {
124
+ this.internalWorkFlowBtns = this.workFlowBtns
125
+ this.internalBtns = this.btns
126
+ },
127
+ methods: {
128
+ btnClick(btn) {
129
+ this.$emit(btn.code, btn)
130
+ }
131
+ }
132
+ }
133
+ </script>
134
+ <style lang="scss" scoped>
135
+ .progressBarStop {
136
+ background-color: #fafafa;
137
+ width: 90px;
138
+ height: 32px;
139
+ margin-bottom: -12px !important;
140
+ .inProgressBar {
141
+ background: 0;
142
+ }
143
+ }
144
+ .progressBar {
145
+ position: relative;
146
+ background-color: #fafafa;
147
+ width: 90px;
148
+ height: 32px;
149
+ margin-bottom: -12px !important;
150
+ }
151
+ .progressBar:after {
152
+ content: "";
153
+ position: absolute;
154
+ top: 0;
155
+ right: 0;
156
+ background-color: #ccc;
157
+ width: 1px;
158
+ height: 32px;
159
+ }
160
+ .inProgressBar {
161
+ width: 90px;
162
+ height: 32px;
163
+ background: -webkit-repeating-linear-gradient(
164
+ 30deg,
165
+ #83a7cf 0,
166
+ #83a7cf 10px,
167
+ #93b3d6 10px,
168
+ #93b3d6 20px
169
+ );
170
+ -webkit-animation: move 5s linear infinite;
171
+ }
172
+ .text {
173
+ position: absolute;
174
+ top: 20%;
175
+ left: 40%;
176
+ color: black;
177
+ font-size: 14px;
178
+ }
179
+ @-webkit-keyframes move {
180
+ 0% {
181
+ background-position: 0 0;
182
+ }
183
+ 100% {
184
+ background-position: -200px 0;
185
+ }
186
+ }
187
+ //所在状态状态提示样式
188
+ .current-status {
189
+ color: #010101 !important;
190
+ font-weight: bold;
191
+ background-color: #ffc56b !important;
192
+ }
193
+ //所在状态状态指向提示样式
194
+ .current-status::before {
195
+ content: " ";
196
+ display: block;
197
+ position: absolute;
198
+ top: 0px;
199
+ left: auto;
200
+ bottom: auto;
201
+ right: -12px;
202
+ border-top: 16px solid transparent;
203
+ border-bottom: 18px solid transparent;
204
+ border-right: none;
205
+ border-left: 11px solid #ffc56b !important;
206
+ z-index: 10;
207
+ }
208
+ //所在状态状态指向提示样式
209
+ .current-status::after {
210
+ content: " ";
211
+ display: block;
212
+ position: absolute;
213
+ top: 0px;
214
+ left: auto;
215
+ bottom: auto;
216
+ right: -11px;
217
+ border-left: 11px solid #ffc56b !important;
218
+ border-top: 16px solid transparent;
219
+ border-bottom: 18px solid transparent;
220
+ border-right: none;
221
+ z-index: 11;
222
+ }
223
+ //未使用的状态提示样式
224
+ .inactive-status {
225
+ background-color: #f9f9f9;
226
+ }
227
+ //未使用的状态指向提示样式
228
+ .inactive-status::before {
229
+ content: " ";
230
+ display: block;
231
+ position: absolute;
232
+ top: 0px;
233
+ left: auto;
234
+ bottom: auto;
235
+ right: -12px;
236
+ border-top: 16px solid transparent;
237
+ border-bottom: 18px solid transparent;
238
+ border-right: none;
239
+ border-left: 11px solid #ccc !important;
240
+ z-index: 10;
241
+ }
242
+ //未使用的状态指向提示样式
243
+ .inactive-status::after {
244
+ content: " ";
245
+ display: block;
246
+ position: absolute;
247
+ top: 0px;
248
+ left: auto;
249
+ bottom: auto;
250
+ right: -11px;
251
+ border-left: 11px solid #f9f9f9 !important;
252
+ border-top: 16px solid transparent;
253
+ border-bottom: 18px solid transparent;
254
+ border-right: none;
255
+ z-index: 11;
256
+ }
257
+ //状态条样式
258
+ .status-bar {
259
+ display: flex;
260
+ justify-content: space-between;
261
+ border-bottom: 1px solid #ccc;
262
+ border-top: 1px solid #ccc;
263
+ // padding-top: 1px;
264
+
265
+ padding-left: 8px;
266
+ // padding-bottom: 1px;
267
+ // border-left: none;
268
+ //状态栏高度
269
+ .status-bar-btns {
270
+ line-height: 30px;
271
+ float: left;
272
+ margin-left: 10px;
273
+ //状态工作按钮样式
274
+ .status-bar-btn {
275
+ // margin-top: 1px;
276
+ // border-radius: 3px;
277
+ // height: 28px;
278
+ // font-size: 12px;
279
+ // padding: 5px 10px;
280
+ margin-right: 8px;
281
+ }
282
+ //状态工作按钮样式
283
+ .btn-primary {
284
+ color: #efefef;
285
+ background-color: #219bff;
286
+ cursor: pointer;
287
+ // margin-top: 1px;
288
+ }
289
+ }
290
+ //状态提示按钮样式
291
+ .status-bar-status {
292
+ overflow: hidden;
293
+ .el-status-btn-wrapper {
294
+ overflow: visible;
295
+ border-left: 1px solid #ccc;
296
+ // border-bottom: 1px solid #ccc;
297
+ .el-status-btn {
298
+ margin-left: 0px !important;
299
+ color: #000;
300
+ padding-left: 20px;
301
+ padding-right: 20px;
302
+ position: relative;
303
+ padding-left: 22px;
304
+ cursor: default;
305
+ font-size: 11px;
306
+ background-color: #fff;
307
+ }
308
+ .el-status-btn::before {
309
+ content: " ";
310
+ display: block;
311
+ position: absolute;
312
+ top: 0px;
313
+ left: auto;
314
+ bottom: auto;
315
+ right: -12px;
316
+ border-top: 16px solid transparent;
317
+ border-bottom: 18px solid transparent;
318
+ border-right: none;
319
+ border-left: 11px solid #ccc !important;
320
+ z-index: 10;
321
+ }
322
+ .el-status-btn::after {
323
+ content: " ";
324
+ display: block;
325
+ position: absolute;
326
+ top: 0px;
327
+ left: auto;
328
+ bottom: auto;
329
+ right: -11px;
330
+ border-left: 11px solid white !important;
331
+ border-top: 16px solid transparent;
332
+ border-bottom: 18px solid transparent;
333
+ border-right: none;
334
+ z-index: 11;
335
+ }
336
+ .status-primary {
337
+ color: #0b0b0b;
338
+ font-size: 12px;
339
+ border-radius: 0;
340
+ background-color: #fafafa;
341
+ margin-left: 0px !important;
342
+ padding-left: 20px;
343
+ padding-right: 20px;
344
+ position: relative;
345
+ padding-left: 22px;
346
+ cursor: default;
347
+ }
348
+ .status-primary::before {
349
+ content: " ";
350
+ display: block;
351
+ position: absolute;
352
+ top: 0px;
353
+ left: auto;
354
+ bottom: auto;
355
+ right: -12px;
356
+ border-top: 16px solid transparent;
357
+ border-bottom: 18px solid transparent;
358
+ border-right: none;
359
+ border-left: 11px solid #ccc;
360
+ z-index: 10;
361
+ }
362
+
363
+ .status-primary::after {
364
+ content: " ";
365
+ display: block;
366
+ position: absolute;
367
+ top: 0px;
368
+ left: auto;
369
+ bottom: auto;
370
+ right: -11px;
371
+ border-left: 11px solid #f9f9f9;
372
+ border-top: 16px solid transparent;
373
+ border-bottom: 18px solid transparent;
374
+ border-right: none;
375
+ z-index: 11;
376
+ }
377
+ }
378
+ }
379
+ }
380
+ </style>
381
+ <style lang="less">
382
+ @import '../../styles/default.less';
383
+ </style>
384
+
@@ -0,0 +1,138 @@
1
+ // 导入组件
2
+ import BaseInput from './BaseInput/index';
3
+ import BaseCheckbox from './BaseCheckbox/index';
4
+ import BaseDate from './BaseDate/index';
5
+ import BaseDatetime from './BaseDatetime/index';
6
+ import BaseDateWeek from './BaseDateWeek/index';
7
+ import BaseTextArea from './BaseTextArea/index';
8
+ import BaseSelect from './BaseSelect/index';
9
+ import BaseSelectMulti from './BaseSelectMulti/index';
10
+ import BaseTime from './BaseTime/index';
11
+ import BasePagination from './BasePagination/index';
12
+ import BaseNumberInput from './BaseNumberInput/index';
13
+ import BaseTool from './BaseTool/index';
14
+ import BaseToolStatus from './BaseToolStatus/index';
15
+ import BasePulldown from './BasePulldown/index';
16
+ import BaseIntervalInput from './BaseIntervalInput/index';
17
+ import BaseForm from './BaseForm/index';
18
+ import BasePictureCard from './BasePictureCard/index';
19
+
20
+ import store from './utils/store'
21
+ import request from './utils/request'
22
+ import BaseGrid from './BaseGrid/index';
23
+
24
+ // 存储组件列表
25
+ const components = [BaseInput,BaseCheckbox,BaseDate,BaseDatetime,BaseDateWeek,BaseTextArea,BaseSelect,BaseSelectMulti
26
+ ,BaseTime,BasePagination,
27
+ BaseNumberInput,BaseTool,BaseToolStatus,BasePulldown,BaseIntervalInput,BaseForm,BasePictureCard,BaseGrid];
28
+ // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
29
+
30
+ import 'vxe-table/lib/style.css'
31
+ import VXETable from 'vxe-table'
32
+
33
+
34
+ const popupInterceptor = (params)=>{
35
+ // 比如点击了某个组件的弹出层面板之后,此时被激活单元格不应该被自动关闭,通过返回 false 可以阻止默认的行为。
36
+ let parentElement = (params.$event.target.shadowRoot && params.$event.composed) ?
37
+ (params.$event.composedPath()[0] || params.$event.target) : params.$event.target
38
+ while (true) {
39
+ // console.debug(parentElement)
40
+ if (
41
+ parentElement &&
42
+ (parentElement.className.indexOf('vxe-modal--wrapper') > -1 ||
43
+ parentElement.className.indexOf('ant-calendar') > -1 ||
44
+ parentElement.className.indexOf('ant-select-dropdown-menu-item') > -1 ||
45
+ parentElement.className.indexOf('interceptor-class') > -1 ||
46
+ parentElement.className.indexOf('ant-time-picker-panel') > -1)
47
+ ) {
48
+ //定义网格弹出框不能对焦问题
49
+ return false
50
+ }
51
+ if (parentElement.parentElement) {
52
+ parentElement = parentElement.parentElement
53
+ } else {
54
+ break
55
+ }
56
+ }
57
+
58
+ }
59
+ //网格弹出点击拦截器
60
+ VXETable.interceptor.add('event.clearActived', (params) => {
61
+ return popupInterceptor(params)
62
+ })
63
+ //网格筛选点击拦截器
64
+ VXETable.interceptor.add('event.clearFilter', (params) => {
65
+ return popupInterceptor(params)
66
+ })
67
+
68
+
69
+
70
+ const install = function (Vue) {
71
+
72
+ //注册grid组件
73
+ Vue.use(VXETable)
74
+
75
+ // 遍历注册全局组件
76
+ components.forEach((component) => {
77
+ Vue.component(component.name, component);
78
+ });
79
+ };
80
+
81
+ // 判断是否是直接引入文件
82
+ if (typeof window !== 'undefined' && window.Vue) {
83
+ install(window.Vue);
84
+ }
85
+
86
+ //表单输入框验证
87
+ import {
88
+ extend,
89
+ localize
90
+ } from 'vee-validate'
91
+ //引入校验规则 安装所有规则
92
+ import * as rules from 'vee-validate/dist/rules'
93
+ Object.keys(rules).forEach(rule => {
94
+ extend(rule, rules[rule])
95
+ })
96
+ localize({
97
+ en: {
98
+ messages: {
99
+ required: '必填',
100
+ min: '不能小于 {length} 个字符',
101
+ max: (_, { length }) => `不能大于 ${length} 个字符`,
102
+ email: '邮箱输入不符合规则'
103
+ }
104
+ }
105
+ })
106
+
107
+ export default {
108
+ // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
109
+ install
110
+ // 以下是具体的组件列表
111
+ };
112
+ export * from './utils/enum'
113
+ export * from './utils/common'
114
+ export * from './utils/filters'
115
+ export * from './utils/msg'
116
+
117
+ export {
118
+ BaseInput,
119
+ BaseCheckbox,
120
+ BaseDate,
121
+ BaseDatetime,
122
+ BaseDateWeek,
123
+ BaseTextArea,
124
+ BaseSelect,
125
+ BaseSelectMulti,
126
+ BaseTime,
127
+ BasePagination,
128
+ BaseNumberInput,
129
+ BaseTool,
130
+ BaseToolStatus,
131
+ BasePulldown,
132
+ BaseIntervalInput,
133
+ BaseForm,
134
+ BaseGrid,
135
+ BasePictureCard,
136
+ store,
137
+ request,
138
+ }
@@ -0,0 +1,79 @@
1
+ .d-control-container {
2
+ display: flex;
3
+ }
4
+ .d-control-label {
5
+ font-size:12px;
6
+ // position: absolute;
7
+ // display: inline;
8
+ font-weight: bold;
9
+ width:100px;
10
+ }
11
+ .d-control {
12
+ flex:1;
13
+ // display: inline;
14
+ // padding-left: 80px;
15
+ width: 100%;
16
+ height: 30px;
17
+ }
18
+ .d-control-label-required{
19
+ color:red;
20
+ }
21
+ .d-error-input{
22
+ border-color: #f22435 !important;
23
+ input{
24
+ border-color: #f22435 !important;
25
+ }
26
+ input:hover{
27
+ border-color: #f22435!important;
28
+ }
29
+ div{
30
+ border-color: #f22435!important;
31
+ }
32
+ }
33
+ .d-error-msg{
34
+ color:#f22435;
35
+ font-size: 0.75em;
36
+ }
37
+
38
+ .d-form-items {
39
+ // margin-top: 100px;
40
+ // margin-left: 100px;
41
+ // margin-right: 100px;
42
+ display: flex;
43
+ flex-flow: row wrap;
44
+ justify-content: flex-start;
45
+ padding: 8px 8px 8px 8px;
46
+ overflow-y: auto;
47
+ .d-form-item-ghost {
48
+ visibility: hidden;
49
+ height: 0;
50
+ min-height: 0px !important;
51
+ flex-grow: 1;
52
+ flex-shrink: 1;
53
+ flex-basis: auto;
54
+ border: 1px solid #9ad4dc;
55
+ min-width: 150px;
56
+ width: 280px;
57
+ margin-right: 8px;
58
+ margin-left: 8px;
59
+ border-radius: 6px;
60
+ }
61
+ .d-form-item {
62
+ width: 280px;
63
+ flex-grow: 1;
64
+ flex-shrink: 1;
65
+ flex-basis: auto;
66
+ margin-top: 0px;
67
+ margin-right: 8px;
68
+ margin-bottom: 0px;
69
+ margin-left: 8px;
70
+ padding: 6px 8px 6px 8px;
71
+ min-width: 150px;
72
+ border-radius: 6px;
73
+ .search-view-icon {
74
+ float: left;
75
+ width: 64px;
76
+ height: 64px;
77
+ }
78
+ }
79
+ }
@@ -0,0 +1,35 @@
1
+ import request from './request'
2
+ import store from './store'
3
+ export function loadViewInfo(moduleCode) {
4
+ return request({
5
+ url: store.getters.umsUrl + '/v1/module/loadViewInfo',
6
+ method: 'get',
7
+ params: {
8
+ moduleCode: moduleCode
9
+ }
10
+ })
11
+ }
12
+
13
+ export function saveUserModuleDataFieldApi(data) {
14
+ return request({
15
+ url: store.getters.umsUrl + '/v1/user/saveUserModuleDataField',
16
+ method: 'post',
17
+ data: data
18
+ })
19
+ }
20
+
21
+ export function attachGetAttachUrlApi() {
22
+ return store.getters.msgUrl + '/v1/Attach'
23
+ }
24
+
25
+ /**
26
+ * 获取cust信息列表
27
+ * @param postData 提交的数据,分页信息
28
+ */
29
+ export function attachSearchApi(postData) {
30
+ return request({
31
+ url: store.getters.msgUrl + '/v1/Attach/Search',
32
+ method: 'post',
33
+ data: postData
34
+ })
35
+ }
@@ -0,0 +1,38 @@
1
+ import Cookies from 'js-cookie'
2
+
3
+ const TokenKey = 'token'
4
+ const RefreshTokenKey = 'refreshToken'
5
+ const ExpireAt = 'token_expire_at'
6
+
7
+ export function getToken() {
8
+ return Cookies.get(TokenKey)
9
+ }
10
+
11
+ export function setToken(token) {
12
+ return Cookies.set(TokenKey, token)
13
+ }
14
+
15
+ export function removeCookie(cookieKey) {
16
+ return Cookies.remove(cookieKey)
17
+ }
18
+
19
+ export function removeToken() {
20
+ return Cookies.remove(TokenKey)
21
+ }
22
+ export function getRefreshToken() {
23
+ return Cookies.get(RefreshTokenKey)
24
+ }
25
+
26
+ export function setRefreshToken(token) {
27
+ return Cookies.set(RefreshTokenKey, token)
28
+ }
29
+ export function setTokenExpireTime(expireTime) {
30
+ return Cookies.set(ExpireAt, expireTime)
31
+ }
32
+ export function getTokenExpireTime() {
33
+ return Cookies.get(ExpireAt)
34
+ }
35
+
36
+ export function removeRefreshToken() {
37
+ return Cookies.remove(RefreshTokenKey)
38
+ }