doway-coms 2.11.61 → 2.11.66

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 (94) hide show
  1. package/.browserslistrc +2 -2
  2. package/README.md +28 -28
  3. package/dist/css/chunk-vendors.7f83d8f9.css +8 -0
  4. package/dist/css/index.7946d50b.css +1 -0
  5. package/dist/favicon.ico +0 -0
  6. package/dist/js/chunk-vendors.28fda91d.js +340 -0
  7. package/dist/js/index.49bc6add.js +2 -0
  8. package/lib/doway-coms.common.js +120397 -0
  9. package/lib/doway-coms.css +1 -0
  10. package/lib/doway-coms.umd.js +120407 -0
  11. package/lib/doway-coms.umd.min.js +328 -0
  12. package/package.json +62 -62
  13. package/packages/AuditsList/index.js +7 -7
  14. package/packages/AuditsList/src/index.vue +314 -314
  15. package/packages/BaseButton/index.js +7 -7
  16. package/packages/BaseButton/src/index.vue +242 -242
  17. package/packages/BaseCheckbox/index.js +7 -7
  18. package/packages/BaseCheckbox/src/index.vue +134 -134
  19. package/packages/BaseDate/index.js +7 -7
  20. package/packages/BaseDate/src/index.vue +233 -233
  21. package/packages/BaseDateMonth/index.js +7 -7
  22. package/packages/BaseDateMonth/src/index.vue +163 -163
  23. package/packages/BaseDateWeek/index.js +7 -7
  24. package/packages/BaseDateWeek/src/index.vue +163 -163
  25. package/packages/BaseDatetime/index.js +7 -7
  26. package/packages/BaseDatetime/src/index.vue +196 -196
  27. package/packages/BaseFileGroup/index.js +7 -7
  28. package/packages/BaseFileGroup/src/index.vue +724 -724
  29. package/packages/BaseForm/index.js +7 -7
  30. package/packages/BaseForm/src/index.vue +901 -901
  31. package/packages/BaseGantt/index.js +9 -9
  32. package/packages/BaseGantt/src/index.vue +617 -617
  33. package/packages/BaseGrid/index.js +9 -9
  34. package/packages/BaseGrid/src/exportCmp.vue +105 -105
  35. package/packages/BaseGrid/src/gridApi.js +32 -32
  36. package/packages/BaseGrid/src/index.vue +4591 -4375
  37. package/packages/BaseGridAdjust/index.js +9 -9
  38. package/packages/BaseGridAdjust/src/index.vue +482 -482
  39. package/packages/BaseInput/index.js +7 -7
  40. package/packages/BaseInput/src/index.vue +207 -207
  41. package/packages/BaseIntervalInput/index.js +7 -7
  42. package/packages/BaseIntervalInput/src/index.vue +310 -310
  43. package/packages/BaseKanbanEmpty/index.js +7 -7
  44. package/packages/BaseKanbanEmpty/src/index.vue +176 -176
  45. package/packages/BaseNumberInput/index.js +7 -7
  46. package/packages/BaseNumberInput/src/index.vue +291 -291
  47. package/packages/BasePagination/index.js +7 -7
  48. package/packages/BasePagination/src/index.vue +90 -90
  49. package/packages/BasePictureCard/index.js +7 -7
  50. package/packages/BasePictureCard/src/index.vue +671 -671
  51. package/packages/BasePrintPreview/index.js +7 -7
  52. package/packages/BasePrintPreview/src/index.vue +150 -150
  53. package/packages/BasePulldown/index.js +7 -7
  54. package/packages/BasePulldown/src/index.vue +1400 -1396
  55. package/packages/BaseSearch/index.js +7 -7
  56. package/packages/BaseSearch/src/index.vue +935 -935
  57. package/packages/BaseSelect/index.js +7 -7
  58. package/packages/BaseSelect/src/index.vue +162 -162
  59. package/packages/BaseSelectMulti/index.js +7 -7
  60. package/packages/BaseSelectMulti/src/index.vue +148 -148
  61. package/packages/BaseTextArea/index.js +7 -7
  62. package/packages/BaseTextArea/src/index.vue +197 -197
  63. package/packages/BaseTime/index.js +7 -7
  64. package/packages/BaseTime/src/index.vue +166 -166
  65. package/packages/BaseTool/index.js +7 -7
  66. package/packages/BaseTool/src/index.vue +353 -353
  67. package/packages/BaseToolStatus/index.js +7 -7
  68. package/packages/BaseToolStatus/src/ApprovalPersonsGroup.vue +41 -41
  69. package/packages/BaseToolStatus/src/index.vue +439 -439
  70. package/packages/BaseTreeSelect/index.js +8 -8
  71. package/packages/BaseTreeSelect/src/index.vue +437 -437
  72. package/packages/HistoryModal/index.js +8 -8
  73. package/packages/HistoryModal/src/index.vue +161 -161
  74. package/packages/LeaveAMessage/index.js +7 -7
  75. package/packages/LeaveAMessage/src/index.vue +601 -601
  76. package/packages/directive/clickoutside.js +44 -44
  77. package/packages/index.js +197 -197
  78. package/packages/styles/default.css +78 -78
  79. package/packages/styles/default.less +91 -91
  80. package/packages/styles/hps/default.less +73 -73
  81. package/packages/utils/api.js +128 -122
  82. package/packages/utils/auth.js +38 -38
  83. package/packages/utils/common.js +728 -728
  84. package/packages/utils/dom.js +181 -181
  85. package/packages/utils/enum.js +86 -86
  86. package/packages/utils/filters.js +495 -495
  87. package/packages/utils/gridFormat.js +66 -66
  88. package/packages/utils/msg.js +104 -104
  89. package/packages/utils/patchFiles.js +44 -44
  90. package/packages/utils/request.js +181 -181
  91. package/packages/utils/store.js +378 -373
  92. package/packages/utils/tscPrinter.js +101 -101
  93. package/sync.bash +6 -6
  94. package/vue.config.js +59 -59
@@ -1,291 +1,291 @@
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
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
14
- <img src="../../styles/icon/help.png" alt style="width: 14px" />
15
- </Tooltip>
16
- <Tooltip :title="warnTooltip" v-else-if="warnTooltip" style="margin: 0 2px">
17
- <a-icon type="exclamation-circle" theme="filled" style="width: 14px;color:#FF3333" />
18
- </Tooltip>
19
- </div>
20
- <div
21
- :class="{
22
- 'd-control': showLabel === true,
23
- 'd-grid-control': showLabel === false
24
- }"
25
- >
26
- <ValidationProvider :name="label" v-slot="v" :rules="rules" v-if="edit === true">
27
- <span v-if="percent">
28
- <InputNumber
29
- :size="'small'"
30
- v-model="percentValue"
31
- @change="numberChange"
32
- @blur="blur"
33
- :placeholder="placeholder"
34
- :formatter="numberFormatter"
35
- :parser="numberParse"
36
- style="width: 100%"
37
- :class="{ 'd-error-input': v.errors.length > 0 }"
38
- />
39
- </span>
40
- <span v-else>
41
- <InputNumber
42
- :size="'small'"
43
- v-model="currentValue"
44
- @change="numberChange"
45
- @blur="blur"
46
- :placeholder="placeholder"
47
- :formatter="numberFormatter"
48
- :parser="numberParse"
49
- style="width: 100%"
50
- :class="{ 'd-error-input': v.errors.length > 0 }"
51
- />
52
- </span>
53
- <div class="d-error-msg">{{ v.errors[0] }}</div>
54
- </ValidationProvider>
55
- <span v-else>
56
- <span v-if="percent">{{ getFormatValue(currentValue)}}</span>
57
- <span v-else>{{ getFormatValue(currentValue) }}</span>
58
- </span>
59
- </div>
60
- <slot name="right" :field="name"></slot>
61
- </div>
62
- </template>
63
-
64
- <script>
65
- import XEUtils from "xe-utils";
66
- import { InputNumber } from "ant-design-vue";
67
- import { ValidationProvider } from "vee-validate";
68
- import { Tooltip } from "ant-design-vue";
69
-
70
- export default {
71
- name: "BaseNumberInput",
72
- components: {
73
- InputNumber,
74
- ValidationProvider,
75
- Tooltip
76
- },
77
- data() {
78
- return {
79
- testValue: 0,
80
- filterValue: "",
81
- isInputChanged: false,
82
- inputTimeout: null,
83
- searchRows: [],
84
- filterCols: [],
85
- gridLoading: false,
86
- gridPagerConfig: {
87
- total: 0,
88
- currentPage: 1,
89
- pageSize: 10
90
- },
91
- percentValue: 0
92
- };
93
- },
94
- computed: {
95
- currentValue: {
96
- // 动态计算currentValue的值
97
- get: function() {
98
- if (this.percent) {
99
- this.percentValue = this.value * 100;
100
- }
101
- return this.value; // 将props中的value赋值给currentValue
102
- },
103
- set: function(val) {
104
- if (val === "") {
105
- val = 0;
106
- }
107
- if (XEUtils.isNumber(val)) {
108
- this.$emit("input", val);
109
- }
110
- // 通过$emit触发父组件
111
- }
112
- }
113
- },
114
- props: {
115
- showLabel: {
116
- type: Boolean,
117
- default: function() {
118
- return true;
119
- }
120
- },
121
- labelWidth: {
122
- type: Number,
123
- default: function() {
124
- return 0;
125
- }
126
- },
127
- value: {
128
- type: Number,
129
- default: function() {
130
- return 0;
131
- }
132
- },
133
- max: {
134
- //最大值
135
- type: Number,
136
- default: function() {
137
- return null;
138
- }
139
- },
140
- min: {
141
- //最小值
142
- type: Number,
143
- default: function() {
144
- return 0;
145
- }
146
- },
147
- precision: {
148
- //小数位精度
149
- type: Number,
150
- default: function() {
151
- return 0;
152
- }
153
- },
154
- rules: {
155
- type: Object,
156
- default: function() {
157
- return null;
158
- }
159
- },
160
- edit: {
161
- type: Boolean,
162
- default: function() {
163
- return false;
164
- }
165
- },
166
- name: {
167
- type: String,
168
- default: function() {
169
- return "";
170
- }
171
- },
172
- label: {
173
- type: String,
174
- default: function() {
175
- return "";
176
- }
177
- },
178
- placeholder: {
179
- type: String,
180
- default: function() {
181
- return "";
182
- }
183
- },
184
- tooltip: {
185
- type: String,
186
- default: function() {
187
- return "";
188
- }
189
- },
190
- warnTooltip: {
191
- type: String,
192
- default: function() {
193
- return "";
194
- }
195
- },
196
- percent: {
197
- type: Boolean,
198
- default: function() {
199
- return false;
200
- }
201
- },
202
- doFormat: {
203
- type: Boolean,
204
- default: function() {
205
- return false;
206
- }
207
- }
208
- },
209
- created() {},
210
- methods: {
211
- numberChange(value) {
212
- if (this.percent) {
213
- this.currentValue = value / 100;
214
- }
215
- this.$emit("change");
216
- },
217
- blur() {
218
- this.$emit("blur");
219
- },
220
- numberFormatter(value) {
221
- // 百分比格式化
222
- if (this.percent) {
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
- if (this.doFormat && this.precision) {
275
- return XEUtils.round(value, this.precision);
276
- }
277
- return value;
278
- }
279
- }
280
- };
281
- </script>
282
-
283
- <style lang="scss" scoped></style>
284
- <style>
285
- .ant-input-number-handler-wrap {
286
- display: none;
287
- }
288
- </style>
289
- <style lang="less">
290
- @import "../../styles/default.less";
291
- </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
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
14
+ <img src="../../styles/icon/help.png" alt style="width: 14px" />
15
+ </Tooltip>
16
+ <Tooltip :title="warnTooltip" v-else-if="warnTooltip" style="margin: 0 2px">
17
+ <a-icon type="exclamation-circle" theme="filled" style="width: 14px;color:#FF3333" />
18
+ </Tooltip>
19
+ </div>
20
+ <div
21
+ :class="{
22
+ 'd-control': showLabel === true,
23
+ 'd-grid-control': showLabel === false
24
+ }"
25
+ >
26
+ <ValidationProvider :name="label" v-slot="v" :rules="rules" v-if="edit === true">
27
+ <span v-if="percent">
28
+ <InputNumber
29
+ :size="'small'"
30
+ v-model="percentValue"
31
+ @change="numberChange"
32
+ @blur="blur"
33
+ :placeholder="placeholder"
34
+ :formatter="numberFormatter"
35
+ :parser="numberParse"
36
+ style="width: 100%"
37
+ :class="{ 'd-error-input': v.errors.length > 0 }"
38
+ />
39
+ </span>
40
+ <span v-else>
41
+ <InputNumber
42
+ :size="'small'"
43
+ v-model="currentValue"
44
+ @change="numberChange"
45
+ @blur="blur"
46
+ :placeholder="placeholder"
47
+ :formatter="numberFormatter"
48
+ :parser="numberParse"
49
+ style="width: 100%"
50
+ :class="{ 'd-error-input': v.errors.length > 0 }"
51
+ />
52
+ </span>
53
+ <div class="d-error-msg">{{ v.errors[0] }}</div>
54
+ </ValidationProvider>
55
+ <span v-else>
56
+ <span v-if="percent">{{ getFormatValue(currentValue)}}</span>
57
+ <span v-else>{{ getFormatValue(currentValue) }}</span>
58
+ </span>
59
+ </div>
60
+ <slot name="right" :field="name"></slot>
61
+ </div>
62
+ </template>
63
+
64
+ <script>
65
+ import XEUtils from "xe-utils";
66
+ import { InputNumber } from "ant-design-vue";
67
+ import { ValidationProvider } from "vee-validate";
68
+ import { Tooltip } from "ant-design-vue";
69
+
70
+ export default {
71
+ name: "BaseNumberInput",
72
+ components: {
73
+ InputNumber,
74
+ ValidationProvider,
75
+ Tooltip
76
+ },
77
+ data() {
78
+ return {
79
+ testValue: 0,
80
+ filterValue: "",
81
+ isInputChanged: false,
82
+ inputTimeout: null,
83
+ searchRows: [],
84
+ filterCols: [],
85
+ gridLoading: false,
86
+ gridPagerConfig: {
87
+ total: 0,
88
+ currentPage: 1,
89
+ pageSize: 10
90
+ },
91
+ percentValue: 0
92
+ };
93
+ },
94
+ computed: {
95
+ currentValue: {
96
+ // 动态计算currentValue的值
97
+ get: function() {
98
+ if (this.percent) {
99
+ this.percentValue = this.value * 100;
100
+ }
101
+ return this.value; // 将props中的value赋值给currentValue
102
+ },
103
+ set: function(val) {
104
+ if (val === "") {
105
+ val = 0;
106
+ }
107
+ if (XEUtils.isNumber(val)) {
108
+ this.$emit("input", val);
109
+ }
110
+ // 通过$emit触发父组件
111
+ }
112
+ }
113
+ },
114
+ props: {
115
+ showLabel: {
116
+ type: Boolean,
117
+ default: function() {
118
+ return true;
119
+ }
120
+ },
121
+ labelWidth: {
122
+ type: Number,
123
+ default: function() {
124
+ return 0;
125
+ }
126
+ },
127
+ value: {
128
+ type: Number,
129
+ default: function() {
130
+ return 0;
131
+ }
132
+ },
133
+ max: {
134
+ //最大值
135
+ type: Number,
136
+ default: function() {
137
+ return null;
138
+ }
139
+ },
140
+ min: {
141
+ //最小值
142
+ type: Number,
143
+ default: function() {
144
+ return 0;
145
+ }
146
+ },
147
+ precision: {
148
+ //小数位精度
149
+ type: Number,
150
+ default: function() {
151
+ return 0;
152
+ }
153
+ },
154
+ rules: {
155
+ type: Object,
156
+ default: function() {
157
+ return null;
158
+ }
159
+ },
160
+ edit: {
161
+ type: Boolean,
162
+ default: function() {
163
+ return false;
164
+ }
165
+ },
166
+ name: {
167
+ type: String,
168
+ default: function() {
169
+ return "";
170
+ }
171
+ },
172
+ label: {
173
+ type: String,
174
+ default: function() {
175
+ return "";
176
+ }
177
+ },
178
+ placeholder: {
179
+ type: String,
180
+ default: function() {
181
+ return "";
182
+ }
183
+ },
184
+ tooltip: {
185
+ type: String,
186
+ default: function() {
187
+ return "";
188
+ }
189
+ },
190
+ warnTooltip: {
191
+ type: String,
192
+ default: function() {
193
+ return "";
194
+ }
195
+ },
196
+ percent: {
197
+ type: Boolean,
198
+ default: function() {
199
+ return false;
200
+ }
201
+ },
202
+ doFormat: {
203
+ type: Boolean,
204
+ default: function() {
205
+ return false;
206
+ }
207
+ }
208
+ },
209
+ created() {},
210
+ methods: {
211
+ numberChange(value) {
212
+ if (this.percent) {
213
+ this.currentValue = value / 100;
214
+ }
215
+ this.$emit("change");
216
+ },
217
+ blur() {
218
+ this.$emit("blur");
219
+ },
220
+ numberFormatter(value) {
221
+ // 百分比格式化
222
+ if (this.percent) {
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
+ if (this.doFormat && this.precision) {
275
+ return XEUtils.round(value, this.precision);
276
+ }
277
+ return value;
278
+ }
279
+ }
280
+ };
281
+ </script>
282
+
283
+ <style lang="scss" scoped></style>
284
+ <style>
285
+ .ant-input-number-handler-wrap {
286
+ display: none;
287
+ }
288
+ </style>
289
+ <style lang="less">
290
+ @import "../../styles/default.less";
291
+ </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;