doway-coms 2.2.18 → 2.2.21

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 (73) hide show
  1. package/.browserslistrc +2 -2
  2. package/README.md +28 -28
  3. package/package.json +53 -53
  4. package/packages/AuditsList/index.js +7 -7
  5. package/packages/AuditsList/src/index.vue +262 -262
  6. package/packages/BaseButton/index.js +7 -7
  7. package/packages/BaseButton/src/index.vue +241 -241
  8. package/packages/BaseCheckbox/index.js +7 -7
  9. package/packages/BaseCheckbox/src/index.vue +134 -134
  10. package/packages/BaseDate/index.js +7 -7
  11. package/packages/BaseDate/src/index.vue +197 -197
  12. package/packages/BaseDateWeek/index.js +7 -7
  13. package/packages/BaseDateWeek/src/index.vue +163 -163
  14. package/packages/BaseDatetime/index.js +7 -7
  15. package/packages/BaseDatetime/src/index.vue +196 -196
  16. package/packages/BaseForm/index.js +7 -7
  17. package/packages/BaseForm/src/index.vue +728 -728
  18. package/packages/BaseGantt/index.js +9 -9
  19. package/packages/BaseGantt/src/index.vue +608 -608
  20. package/packages/BaseGrid/index.js +9 -9
  21. package/packages/BaseGrid/src/SeqSetting.vue +278 -278
  22. package/packages/BaseGrid/src/index.vue +3580 -3580
  23. package/packages/BaseGridAdjust/index.js +9 -9
  24. package/packages/BaseGridAdjust/src/index.vue +482 -482
  25. package/packages/BaseInput/index.js +7 -7
  26. package/packages/BaseInput/src/index.vue +164 -164
  27. package/packages/BaseIntervalInput/index.js +7 -7
  28. package/packages/BaseIntervalInput/src/index.vue +310 -310
  29. package/packages/BaseKanbanEmpty/index.js +7 -7
  30. package/packages/BaseKanbanEmpty/src/index.vue +176 -176
  31. package/packages/BaseNumberInput/index.js +7 -7
  32. package/packages/BaseNumberInput/src/index.vue +293 -293
  33. package/packages/BasePagination/index.js +7 -7
  34. package/packages/BasePagination/src/index.vue +91 -91
  35. package/packages/BasePictureCard/index.js +7 -7
  36. package/packages/BasePictureCard/src/index.vue +580 -580
  37. package/packages/BasePrintPreview/index.js +7 -7
  38. package/packages/BasePrintPreview/src/index.vue +129 -129
  39. package/packages/BasePulldown/index.js +7 -7
  40. package/packages/BasePulldown/src/index.vue +1265 -1265
  41. package/packages/BaseSearch/index.js +7 -7
  42. package/packages/BaseSearch/src/index.vue +935 -935
  43. package/packages/BaseSelect/index.js +7 -7
  44. package/packages/BaseSelect/src/index.vue +155 -155
  45. package/packages/BaseSelectMulti/index.js +7 -7
  46. package/packages/BaseSelectMulti/src/index.vue +148 -148
  47. package/packages/BaseTextArea/index.js +7 -7
  48. package/packages/BaseTextArea/src/index.vue +178 -178
  49. package/packages/BaseTime/index.js +7 -7
  50. package/packages/BaseTime/src/index.vue +166 -166
  51. package/packages/BaseTool/index.js +7 -7
  52. package/packages/BaseTool/src/index.vue +349 -349
  53. package/packages/BaseToolStatus/index.js +7 -7
  54. package/packages/BaseToolStatus/src/index.vue +388 -388
  55. package/packages/BaseTreeSelect/index.js +8 -8
  56. package/packages/BaseTreeSelect/src/index.vue +437 -416
  57. package/packages/LeaveAMessage/index.js +7 -7
  58. package/packages/LeaveAMessage/src/index.vue +597 -597
  59. package/packages/index.js +191 -191
  60. package/packages/styles/default.css +78 -78
  61. package/packages/styles/default.less +84 -84
  62. package/packages/utils/api.js +107 -107
  63. package/packages/utils/auth.js +38 -38
  64. package/packages/utils/common.js +610 -610
  65. package/packages/utils/dom.js +181 -181
  66. package/packages/utils/enum.js +86 -86
  67. package/packages/utils/filters.js +472 -472
  68. package/packages/utils/gridFormat.js +66 -66
  69. package/packages/utils/msg.js +84 -84
  70. package/packages/utils/patchFiles.js +44 -44
  71. package/packages/utils/request.js +178 -178
  72. package/packages/utils/store.js +305 -303
  73. package/vue.config.js +59 -59
@@ -1,293 +1,293 @@
1
- <template>
2
- <div class="d-control-container">
3
- <div
4
- class="d-control-label"
5
- v-if="showLabel === true"
6
- :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
7
- >
8
- {{ label }}
9
- <span
10
- v-if="rules && Object.getOwnPropertyNames(rules).length > 0"
11
- class="d-control-label-required"
12
- >*</span
13
- >
14
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
15
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
16
- </Tooltip>
17
- </div>
18
- <div
19
- :class="{
20
- 'd-control': showLabel === true,
21
- 'd-grid-control': showLabel === false
22
- }"
23
- >
24
- <ValidationProvider
25
- :name="label"
26
- v-slot="v"
27
- :rules="rules"
28
- v-if="edit === true"
29
- >
30
- <span v-if="percent">
31
- <InputNumber
32
- :size="'small'"
33
- v-model="percentValue"
34
- @change="numberChange"
35
- @blur="blur"
36
- :placeholder="placeholder"
37
- :formatter="numberFormatter"
38
- :parser="numberParse"
39
- style="width: 100%"
40
- :class="{ 'd-error-input': v.errors.length > 0 }"
41
- />
42
- </span>
43
- <span v-else>
44
- <InputNumber
45
- :size="'small'"
46
- v-model="currentValue"
47
- @change="numberChange"
48
- @blur="blur"
49
- :placeholder="placeholder"
50
- :formatter="numberFormatter"
51
- :parser="numberParse"
52
- style="width: 100%"
53
- :class="{ 'd-error-input': v.errors.length > 0 }"
54
- />
55
- </span>
56
- <div class="d-error-msg">
57
- {{ v.errors[0] }}
58
- </div>
59
- </ValidationProvider>
60
- <span v-else>
61
- <span v-if="percent">{{ getFormatValue(currentValue)}}</span>
62
- <span v-else>{{ getFormatValue(currentValue) }}</span>
63
- </span>
64
- </div>
65
- </div>
66
- </template>
67
-
68
- <script>
69
- import XEUtils from 'xe-utils'
70
- import { InputNumber } from 'ant-design-vue'
71
- import { ValidationProvider } from 'vee-validate'
72
- import { Tooltip } from 'ant-design-vue'
73
-
74
- export default {
75
- name: 'BaseNumberInput',
76
- components:{
77
- InputNumber,
78
- ValidationProvider,
79
- Tooltip,
80
-
81
- },
82
- data() {
83
- return {
84
- testValue: 0,
85
- filterValue: '',
86
- isInputChanged: false,
87
- inputTimeout: null,
88
- searchRows: [],
89
- filterCols: [],
90
- gridLoading: false,
91
- gridPagerConfig: {
92
- total: 0,
93
- currentPage: 1,
94
- pageSize: 10
95
- },
96
- percentValue: 0,
97
- }
98
- },
99
- computed: {
100
- currentValue: {
101
- // 动态计算currentValue的值
102
- get: function() {
103
- if (this.percent) {
104
- this.percentValue = this.value*100
105
- }
106
- return this.value // 将props中的value赋值给currentValue
107
- },
108
- set: function(val) {
109
- if (val === '') {
110
- val = 0
111
- }
112
- if (XEUtils.isNumber(val)) {
113
- this.$emit('input', val)
114
- }
115
- // 通过$emit触发父组件
116
- }
117
- }
118
- },
119
- props: {
120
- showLabel: {
121
- type: Boolean,
122
- default: function() {
123
- return true
124
- }
125
- },
126
- labelWidth: {
127
- type: Number,
128
- default: function() {
129
- return 0
130
- }
131
- },
132
- value: {
133
- type: Number,
134
- default: function() {
135
- return 0
136
- }
137
- },
138
- max: {
139
- //最大值
140
- type: Number,
141
- default: function() {
142
- return null
143
- }
144
- },
145
- min: {
146
- //最小值
147
- type: Number,
148
- default: function() {
149
- return 0
150
- }
151
- },
152
- precision: {
153
- //小数位精度
154
- type: Number,
155
- default: function() {
156
- return 0
157
- }
158
- },
159
- rules: {
160
- type: Object,
161
- default: function() {
162
- return null
163
- }
164
- },
165
- edit: {
166
- type: Boolean,
167
- default: function() {
168
- return false
169
- }
170
- },
171
- name: {
172
- type: String,
173
- default: function() {
174
- return ''
175
- }
176
- },
177
- label: {
178
- type: String,
179
- default: function() {
180
- return ''
181
- }
182
- },
183
- placeholder: {
184
- type: String,
185
- default: function() {
186
- return ''
187
- }
188
- },
189
- tooltip: {
190
- type: String,
191
- default: function() {
192
- return ''
193
- }
194
- },
195
- percent: {
196
- type: Boolean,
197
- default: function() {
198
- return false
199
- }
200
- },
201
- doFormat:{
202
- type:Boolean,
203
- default:function(){
204
- return false
205
- }
206
- }
207
- },
208
- created() {},
209
- methods: {
210
- numberChange(value) {
211
- if (this.percent) {
212
- this.currentValue = value/100
213
- }
214
- this.$emit('change')
215
- },
216
- blur() {
217
- this.$emit('blur')
218
- },
219
- numberFormatter(value) {
220
- // 百分比格式化
221
- if (this.percent) {
222
-
223
- if(this.precision){
224
- return XEUtils.round(value,this.precision) +'%'
225
- }else{
226
- return value + '%'
227
- }
228
- }
229
- return value
230
- },
231
- numberParse(value) {
232
- // 百分比格式化
233
- if (this.percent) {
234
- value.replace('%', '')
235
- }
236
- if (value === null || value === '') {
237
- return value
238
- }
239
- let returnValue = value
240
- let tempPrecision = XEUtils.toNumber(this.precision)
241
- let reg = new RegExp(
242
- '^((-?)|(-?([1-9]{1}\\d*)|-?([0]{1})))(\\.(\\d){0,' +
243
- tempPrecision +
244
- '})?$'
245
- )
246
- if (!reg.test(value)) {
247
- //小数点验证不通过
248
- returnValue = XEUtils.floor(value, tempPrecision)
249
- }
250
- if (
251
- this.max !== null &&
252
- this.max !== undefined &&
253
- XEUtils.toNumber(returnValue) > this.max
254
- ) {
255
- returnValue = this.max
256
- }
257
- if (
258
- this.min !== null &&
259
- this.min !== undefined &&
260
- XEUtils.toNumber(returnValue) < this.min
261
- ) {
262
- returnValue = this.min
263
- }
264
- return returnValue
265
- },
266
- getFormatValue(value){
267
- if (this.percent) {
268
- if(this.precision){
269
- return XEUtils.round(this.percentValue,this.precision) +'%'
270
- }else{
271
- return this.percentValue + '%'
272
- }
273
- }
274
- console.log('inner',this.doFormat)
275
- if(this.doFormat&&this.precision){
276
-
277
- return XEUtils.round(value,this.precision)
278
- }
279
- return value
280
- }
281
- }
282
- }
283
- </script>
284
-
285
- <style lang="scss" scoped></style>
286
- <style>
287
- .ant-input-number-handler-wrap {
288
- display: none;
289
- }
290
- </style>
291
- <style lang="less">
292
- @import '../../styles/default.less';
293
- </style>
1
+ <template>
2
+ <div class="d-control-container">
3
+ <div
4
+ class="d-control-label"
5
+ v-if="showLabel === true"
6
+ :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
7
+ >
8
+ {{ label }}
9
+ <span
10
+ v-if="rules && Object.getOwnPropertyNames(rules).length > 0"
11
+ class="d-control-label-required"
12
+ >*</span
13
+ >
14
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
15
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
16
+ </Tooltip>
17
+ </div>
18
+ <div
19
+ :class="{
20
+ 'd-control': showLabel === true,
21
+ 'd-grid-control': showLabel === false
22
+ }"
23
+ >
24
+ <ValidationProvider
25
+ :name="label"
26
+ v-slot="v"
27
+ :rules="rules"
28
+ v-if="edit === true"
29
+ >
30
+ <span v-if="percent">
31
+ <InputNumber
32
+ :size="'small'"
33
+ v-model="percentValue"
34
+ @change="numberChange"
35
+ @blur="blur"
36
+ :placeholder="placeholder"
37
+ :formatter="numberFormatter"
38
+ :parser="numberParse"
39
+ style="width: 100%"
40
+ :class="{ 'd-error-input': v.errors.length > 0 }"
41
+ />
42
+ </span>
43
+ <span v-else>
44
+ <InputNumber
45
+ :size="'small'"
46
+ v-model="currentValue"
47
+ @change="numberChange"
48
+ @blur="blur"
49
+ :placeholder="placeholder"
50
+ :formatter="numberFormatter"
51
+ :parser="numberParse"
52
+ style="width: 100%"
53
+ :class="{ 'd-error-input': v.errors.length > 0 }"
54
+ />
55
+ </span>
56
+ <div class="d-error-msg">
57
+ {{ v.errors[0] }}
58
+ </div>
59
+ </ValidationProvider>
60
+ <span v-else>
61
+ <span v-if="percent">{{ getFormatValue(currentValue)}}</span>
62
+ <span v-else>{{ getFormatValue(currentValue) }}</span>
63
+ </span>
64
+ </div>
65
+ </div>
66
+ </template>
67
+
68
+ <script>
69
+ import XEUtils from 'xe-utils'
70
+ import { InputNumber } from 'ant-design-vue'
71
+ import { ValidationProvider } from 'vee-validate'
72
+ import { Tooltip } from 'ant-design-vue'
73
+
74
+ export default {
75
+ name: 'BaseNumberInput',
76
+ components:{
77
+ InputNumber,
78
+ ValidationProvider,
79
+ Tooltip,
80
+
81
+ },
82
+ data() {
83
+ return {
84
+ testValue: 0,
85
+ filterValue: '',
86
+ isInputChanged: false,
87
+ inputTimeout: null,
88
+ searchRows: [],
89
+ filterCols: [],
90
+ gridLoading: false,
91
+ gridPagerConfig: {
92
+ total: 0,
93
+ currentPage: 1,
94
+ pageSize: 10
95
+ },
96
+ percentValue: 0,
97
+ }
98
+ },
99
+ computed: {
100
+ currentValue: {
101
+ // 动态计算currentValue的值
102
+ get: function() {
103
+ if (this.percent) {
104
+ this.percentValue = this.value*100
105
+ }
106
+ return this.value // 将props中的value赋值给currentValue
107
+ },
108
+ set: function(val) {
109
+ if (val === '') {
110
+ val = 0
111
+ }
112
+ if (XEUtils.isNumber(val)) {
113
+ this.$emit('input', val)
114
+ }
115
+ // 通过$emit触发父组件
116
+ }
117
+ }
118
+ },
119
+ props: {
120
+ showLabel: {
121
+ type: Boolean,
122
+ default: function() {
123
+ return true
124
+ }
125
+ },
126
+ labelWidth: {
127
+ type: Number,
128
+ default: function() {
129
+ return 0
130
+ }
131
+ },
132
+ value: {
133
+ type: Number,
134
+ default: function() {
135
+ return 0
136
+ }
137
+ },
138
+ max: {
139
+ //最大值
140
+ type: Number,
141
+ default: function() {
142
+ return null
143
+ }
144
+ },
145
+ min: {
146
+ //最小值
147
+ type: Number,
148
+ default: function() {
149
+ return 0
150
+ }
151
+ },
152
+ precision: {
153
+ //小数位精度
154
+ type: Number,
155
+ default: function() {
156
+ return 0
157
+ }
158
+ },
159
+ rules: {
160
+ type: Object,
161
+ default: function() {
162
+ return null
163
+ }
164
+ },
165
+ edit: {
166
+ type: Boolean,
167
+ default: function() {
168
+ return false
169
+ }
170
+ },
171
+ name: {
172
+ type: String,
173
+ default: function() {
174
+ return ''
175
+ }
176
+ },
177
+ label: {
178
+ type: String,
179
+ default: function() {
180
+ return ''
181
+ }
182
+ },
183
+ placeholder: {
184
+ type: String,
185
+ default: function() {
186
+ return ''
187
+ }
188
+ },
189
+ tooltip: {
190
+ type: String,
191
+ default: function() {
192
+ return ''
193
+ }
194
+ },
195
+ percent: {
196
+ type: Boolean,
197
+ default: function() {
198
+ return false
199
+ }
200
+ },
201
+ doFormat:{
202
+ type:Boolean,
203
+ default:function(){
204
+ return false
205
+ }
206
+ }
207
+ },
208
+ created() {},
209
+ methods: {
210
+ numberChange(value) {
211
+ if (this.percent) {
212
+ this.currentValue = value/100
213
+ }
214
+ this.$emit('change')
215
+ },
216
+ blur() {
217
+ this.$emit('blur')
218
+ },
219
+ numberFormatter(value) {
220
+ // 百分比格式化
221
+ if (this.percent) {
222
+
223
+ if(this.precision){
224
+ return XEUtils.round(value,this.precision) +'%'
225
+ }else{
226
+ return value + '%'
227
+ }
228
+ }
229
+ return value
230
+ },
231
+ numberParse(value) {
232
+ // 百分比格式化
233
+ if (this.percent) {
234
+ value.replace('%', '')
235
+ }
236
+ if (value === null || value === '') {
237
+ return value
238
+ }
239
+ let returnValue = value
240
+ let tempPrecision = XEUtils.toNumber(this.precision)
241
+ let reg = new RegExp(
242
+ '^((-?)|(-?([1-9]{1}\\d*)|-?([0]{1})))(\\.(\\d){0,' +
243
+ tempPrecision +
244
+ '})?$'
245
+ )
246
+ if (!reg.test(value)) {
247
+ //小数点验证不通过
248
+ returnValue = XEUtils.floor(value, tempPrecision)
249
+ }
250
+ if (
251
+ this.max !== null &&
252
+ this.max !== undefined &&
253
+ XEUtils.toNumber(returnValue) > this.max
254
+ ) {
255
+ returnValue = this.max
256
+ }
257
+ if (
258
+ this.min !== null &&
259
+ this.min !== undefined &&
260
+ XEUtils.toNumber(returnValue) < this.min
261
+ ) {
262
+ returnValue = this.min
263
+ }
264
+ return returnValue
265
+ },
266
+ getFormatValue(value){
267
+ if (this.percent) {
268
+ if(this.precision){
269
+ return XEUtils.round(this.percentValue,this.precision) +'%'
270
+ }else{
271
+ return this.percentValue + '%'
272
+ }
273
+ }
274
+ console.log('inner',this.doFormat)
275
+ if(this.doFormat&&this.precision){
276
+
277
+ return XEUtils.round(value,this.precision)
278
+ }
279
+ return value
280
+ }
281
+ }
282
+ }
283
+ </script>
284
+
285
+ <style lang="scss" scoped></style>
286
+ <style>
287
+ .ant-input-number-handler-wrap {
288
+ display: none;
289
+ }
290
+ </style>
291
+ <style lang="less">
292
+ @import '../../styles/default.less';
293
+ </style>
@@ -1,8 +1,8 @@
1
- // 导入组件,组件必须声明 name
2
- import BasePagination from './src/index.vue';
3
- // 为组件提供 install 安装方法,供按需引入
4
- BasePagination.install = function(Vue) {
5
- Vue.component(BasePagination.name, BasePagination);
6
- };
7
- // 默认导出组件
1
+ // 导入组件,组件必须声明 name
2
+ import BasePagination from './src/index.vue';
3
+ // 为组件提供 install 安装方法,供按需引入
4
+ BasePagination.install = function(Vue) {
5
+ Vue.component(BasePagination.name, BasePagination);
6
+ };
7
+ // 默认导出组件
8
8
  export default BasePagination;