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.
- package/lib/doway-coms.common.js +1506 -53
- package/lib/doway-coms.umd.js +1506 -53
- package/node_modules/vxe-table/package.json +1 -1
- package/package.json +13 -4
- package/packages/BaseCheckbox/index.js +8 -0
- package/packages/BaseCheckbox/src/index.vue +123 -0
- package/packages/BaseDate/index.js +8 -0
- package/packages/BaseDate/src/index.vue +145 -0
- package/packages/BaseDateWeek/index.js +8 -0
- package/packages/BaseDateWeek/src/index.vue +115 -0
- package/packages/BaseDatetime/index.js +8 -0
- package/packages/BaseDatetime/src/index.vue +143 -0
- package/packages/BaseForm/index.js +8 -0
- package/packages/BaseForm/src/index.vue +631 -0
- package/packages/BaseGrid/index.js +10 -0
- package/packages/BaseGrid/src/index.vue +2375 -0
- package/packages/BaseInput/index.js +8 -0
- package/packages/BaseInput/src/index.vue +122 -0
- package/packages/BaseIntervalInput/index.js +8 -0
- package/packages/BaseIntervalInput/src/index.vue +275 -0
- package/packages/BaseNumberInput/index.js +8 -0
- package/packages/BaseNumberInput/src/index.vue +216 -0
- package/packages/BasePagination/index.js +8 -0
- package/packages/BasePagination/src/index.vue +74 -0
- package/packages/BasePictureCard/index.js +8 -0
- package/packages/BasePictureCard/src/index.vue +580 -0
- package/packages/BasePulldown/index.js +8 -0
- package/packages/BasePulldown/src/index.vue +817 -0
- package/packages/BaseSelect/index.js +8 -0
- package/packages/BaseSelect/src/index.vue +141 -0
- package/packages/BaseSelectMulti/index.js +8 -0
- package/packages/BaseSelectMulti/src/index.vue +135 -0
- package/packages/BaseTextArea/index.js +8 -0
- package/packages/BaseTextArea/src/index.vue +138 -0
- package/packages/BaseTime/index.js +8 -0
- package/packages/BaseTime/src/index.vue +117 -0
- package/packages/BaseTool/index.js +8 -0
- package/packages/BaseTool/src/index.vue +350 -0
- package/packages/BaseToolStatus/index.js +8 -0
- package/packages/BaseToolStatus/src/index.vue +384 -0
- package/packages/index.js +138 -0
- package/packages/styles/default.less +79 -0
- package/packages/utils/api.js +35 -0
- package/packages/utils/auth.js +38 -0
- package/packages/utils/common.js +259 -0
- package/packages/utils/dom.js +181 -0
- package/packages/utils/enum.js +81 -0
- package/packages/utils/filters.js +459 -0
- package/packages/utils/msg.js +17 -0
- package/packages/utils/patchFiles.js +45 -0
- package/packages/utils/request.js +80 -0
- package/packages/utils/store.js +117 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-control-container">
|
|
3
|
+
<div
|
|
4
|
+
class="d-control-label"
|
|
5
|
+
:style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
|
|
6
|
+
>
|
|
7
|
+
{{ label
|
|
8
|
+
}}<span v-if="rules && rules['required']" class="d-control-label-required"
|
|
9
|
+
>*</span
|
|
10
|
+
>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="d-control">
|
|
13
|
+
<ValidationProvider
|
|
14
|
+
:name="label"
|
|
15
|
+
v-slot="v"
|
|
16
|
+
:rules="rules"
|
|
17
|
+
v-if="edit === true"
|
|
18
|
+
>
|
|
19
|
+
<Select
|
|
20
|
+
v-model="currentValue"
|
|
21
|
+
:placeholder="placeholder"
|
|
22
|
+
:size="'small'"
|
|
23
|
+
@change="selectChange"
|
|
24
|
+
style="width: 100%"
|
|
25
|
+
:class="{ 'd-error-input': v.errors.length > 0 }"
|
|
26
|
+
>
|
|
27
|
+
<SelectOption
|
|
28
|
+
v-for="loopSource in dataSource"
|
|
29
|
+
:key="loopSource.value"
|
|
30
|
+
:value="loopSource.value"
|
|
31
|
+
>{{ loopSource.caption }}</SelectOption
|
|
32
|
+
>
|
|
33
|
+
</Select>
|
|
34
|
+
<div class="d-error-msg">
|
|
35
|
+
{{ v.errors[0] }}
|
|
36
|
+
</div>
|
|
37
|
+
</ValidationProvider>
|
|
38
|
+
<span v-else>{{ currentValue | displaySelectCaption(dataSource) }}</span>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
import { Select } from 'ant-design-vue'
|
|
45
|
+
import { ValidationProvider } from 'vee-validate'
|
|
46
|
+
import { displaySelectCaption } from '../../utils/filters'
|
|
47
|
+
export default {
|
|
48
|
+
filters:{
|
|
49
|
+
displaySelectCaption:displaySelectCaption
|
|
50
|
+
},
|
|
51
|
+
name: 'BaseSelect',
|
|
52
|
+
components:{
|
|
53
|
+
Select,
|
|
54
|
+
SelectOption:Select.Option,
|
|
55
|
+
ValidationProvider
|
|
56
|
+
},
|
|
57
|
+
data() {
|
|
58
|
+
return {
|
|
59
|
+
filterCols: [],
|
|
60
|
+
gridLoading: false,
|
|
61
|
+
gridPagerConfig: {
|
|
62
|
+
total: 0,
|
|
63
|
+
currentPage: 1,
|
|
64
|
+
pageSize: 10
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
computed: {
|
|
69
|
+
currentValue: {
|
|
70
|
+
// 动态计算currentValue的值
|
|
71
|
+
get: function() {
|
|
72
|
+
return this.value // 将props中的value赋值给currentValue
|
|
73
|
+
},
|
|
74
|
+
set: function(val) {
|
|
75
|
+
this.$emit('input', val) // 通过$emit触发父组件
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
props: {
|
|
80
|
+
labelWidth: {
|
|
81
|
+
type: Number,
|
|
82
|
+
default: function() {
|
|
83
|
+
return 0
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
rules: {
|
|
87
|
+
type: Object,
|
|
88
|
+
default: function() {
|
|
89
|
+
return null
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
value: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: function() {
|
|
95
|
+
return ''
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
dataSource: {
|
|
99
|
+
type: Array,
|
|
100
|
+
default: function() {
|
|
101
|
+
return []
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
edit: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: function() {
|
|
107
|
+
return false
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
name: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: function() {
|
|
113
|
+
return ''
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
label: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: function() {
|
|
119
|
+
return ''
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
placeholder: {
|
|
123
|
+
type: String,
|
|
124
|
+
default: function() {
|
|
125
|
+
return ''
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
created() {},
|
|
130
|
+
methods: {
|
|
131
|
+
selectChange() {
|
|
132
|
+
this.$emit('change', null)
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
</script>
|
|
137
|
+
|
|
138
|
+
<style lang="scss" scoped></style>
|
|
139
|
+
<style lang="less">
|
|
140
|
+
@import '../../styles/default.less';
|
|
141
|
+
</style>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-control-container">
|
|
3
|
+
<div class="d-control-label">
|
|
4
|
+
{{ label
|
|
5
|
+
}}<span v-if="rules && rules['required']" class="d-control-label-required"
|
|
6
|
+
>*</span
|
|
7
|
+
>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="d-control">
|
|
10
|
+
<ValidationProvider
|
|
11
|
+
:name="label"
|
|
12
|
+
v-slot="v"
|
|
13
|
+
:rules="rules"
|
|
14
|
+
v-if="edit === true"
|
|
15
|
+
>
|
|
16
|
+
<Select
|
|
17
|
+
v-model="currentValue"
|
|
18
|
+
:placeholder="placeholder"
|
|
19
|
+
mode="multiple"
|
|
20
|
+
:size="'small'"
|
|
21
|
+
@change="selectChange"
|
|
22
|
+
style="width: 100%"
|
|
23
|
+
:class="{ 'd-error-input': v.errors.length > 0 }"
|
|
24
|
+
>
|
|
25
|
+
<SelectOption
|
|
26
|
+
v-for="loopSource in dataSource"
|
|
27
|
+
:key="loopSource.value"
|
|
28
|
+
:value="loopSource.value"
|
|
29
|
+
>{{ loopSource.caption }}</SelectOption
|
|
30
|
+
>
|
|
31
|
+
</Select>
|
|
32
|
+
<div class="d-error-msg">
|
|
33
|
+
{{ v.errors[0] }}
|
|
34
|
+
</div>
|
|
35
|
+
</ValidationProvider>
|
|
36
|
+
<span v-else>{{
|
|
37
|
+
currentValue | displaySelectMultiCaption(dataSource)
|
|
38
|
+
}}</span>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
import { Select } from 'ant-design-vue'
|
|
45
|
+
import { ValidationProvider } from 'vee-validate'
|
|
46
|
+
import { displaySelectMultiCaption } from '../../utils/filters'
|
|
47
|
+
export default {
|
|
48
|
+
name: 'BaseSelectMulti',
|
|
49
|
+
filters:{
|
|
50
|
+
displaySelectMultiCaption:displaySelectMultiCaption
|
|
51
|
+
},
|
|
52
|
+
components:{
|
|
53
|
+
Select,
|
|
54
|
+
SelectOption:Select.Option,
|
|
55
|
+
ValidationProvider
|
|
56
|
+
},
|
|
57
|
+
data() {
|
|
58
|
+
return {
|
|
59
|
+
filterCols: [],
|
|
60
|
+
gridLoading: false,
|
|
61
|
+
gridPagerConfig: {
|
|
62
|
+
total: 0,
|
|
63
|
+
currentPage: 1,
|
|
64
|
+
pageSize: 10
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
computed: {
|
|
69
|
+
currentValue: {
|
|
70
|
+
// 动态计算currentValue的值
|
|
71
|
+
get: function() {
|
|
72
|
+
return this.value // 将props中的value赋值给currentValue
|
|
73
|
+
},
|
|
74
|
+
set: function(val) {
|
|
75
|
+
this.$emit('input', val) // 通过$emit触发父组件
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
props: {
|
|
80
|
+
rules: {
|
|
81
|
+
type: Object,
|
|
82
|
+
default: function() {
|
|
83
|
+
return null
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
value: {
|
|
87
|
+
type: Array,
|
|
88
|
+
default: function() {
|
|
89
|
+
return []
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
dataSource: {
|
|
93
|
+
type: Array,
|
|
94
|
+
default: function() {
|
|
95
|
+
return []
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
edit: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: function() {
|
|
101
|
+
return false
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
name: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: function() {
|
|
107
|
+
return ''
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
label: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: function() {
|
|
113
|
+
return ''
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
placeholder: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: function() {
|
|
119
|
+
return ''
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
created() {},
|
|
124
|
+
methods: {
|
|
125
|
+
selectChange() {
|
|
126
|
+
this.$emit('change', null)
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
</script>
|
|
131
|
+
|
|
132
|
+
<style lang="scss" scoped></style>
|
|
133
|
+
<style lang="less">
|
|
134
|
+
@import '../../styles/default.less';
|
|
135
|
+
</style>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-control-container">
|
|
3
|
+
<div class="d-control-label" v-if="showLabel === true">
|
|
4
|
+
{{ label
|
|
5
|
+
}}<span v-if="rules && rules['required']" class="d-control-label-required"
|
|
6
|
+
>*</span
|
|
7
|
+
>
|
|
8
|
+
</div>
|
|
9
|
+
<div
|
|
10
|
+
:style="{ width: width ? width : '100%', height: height ? height : '' }"
|
|
11
|
+
>
|
|
12
|
+
<ValidationProvider
|
|
13
|
+
:name="label"
|
|
14
|
+
v-slot="v"
|
|
15
|
+
:rules="rules"
|
|
16
|
+
v-if="edit === true"
|
|
17
|
+
>
|
|
18
|
+
<a-textarea
|
|
19
|
+
:size="'small'"
|
|
20
|
+
v-model="currentValue"
|
|
21
|
+
:placeholder="placeholder"
|
|
22
|
+
@change="change"
|
|
23
|
+
style="height:100%;width:100%"
|
|
24
|
+
:class="{ 'd-error-input': v.errors.length > 0 }"
|
|
25
|
+
/>
|
|
26
|
+
<div class="d-error-msg">
|
|
27
|
+
{{ v.errors[0] }}
|
|
28
|
+
</div>
|
|
29
|
+
</ValidationProvider>
|
|
30
|
+
<span v-else>{{ currentValue }}</span>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
import { Input } from 'ant-design-vue'
|
|
37
|
+
import { ValidationProvider } from 'vee-validate'
|
|
38
|
+
export default {
|
|
39
|
+
name: 'BaseTextArea',
|
|
40
|
+
components:{
|
|
41
|
+
'a-textarea':Input.TextArea,
|
|
42
|
+
ValidationProvider
|
|
43
|
+
},
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
filterValue: '',
|
|
47
|
+
isInputChanged: false,
|
|
48
|
+
inputTimeout: null,
|
|
49
|
+
searchRows: [],
|
|
50
|
+
filterCols: [],
|
|
51
|
+
gridLoading: false,
|
|
52
|
+
gridPagerConfig: {
|
|
53
|
+
total: 0,
|
|
54
|
+
currentPage: 1,
|
|
55
|
+
pageSize: 10
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
computed: {
|
|
60
|
+
currentValue: {
|
|
61
|
+
// 动态计算currentValue的值
|
|
62
|
+
get: function() {
|
|
63
|
+
return this.value // 将props中的value赋值给currentValue
|
|
64
|
+
},
|
|
65
|
+
set: function(val) {
|
|
66
|
+
this.$emit('input', val) // 通过$emit触发父组件
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
props: {
|
|
71
|
+
showLabel: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: function() {
|
|
74
|
+
return true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
width: {
|
|
78
|
+
type: String,
|
|
79
|
+
default: function() {
|
|
80
|
+
return null
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
height: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: function() {
|
|
86
|
+
return null
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
rules: {
|
|
90
|
+
type: Object,
|
|
91
|
+
default: function() {
|
|
92
|
+
return null
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
value: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: function() {
|
|
98
|
+
return ''
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
edit: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: function() {
|
|
104
|
+
return false
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
name: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: function() {
|
|
110
|
+
return ''
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
label: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: function() {
|
|
116
|
+
return ''
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
placeholder: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: function() {
|
|
122
|
+
return ''
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
created() {},
|
|
127
|
+
methods: {
|
|
128
|
+
change() {
|
|
129
|
+
this.$emit('change')
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
</script>
|
|
134
|
+
|
|
135
|
+
<style lang="scss" scoped></style>
|
|
136
|
+
<style lang="less">
|
|
137
|
+
@import '../../styles/default.less';
|
|
138
|
+
</style>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-control-container">
|
|
3
|
+
<div class="d-control-label">
|
|
4
|
+
{{ label
|
|
5
|
+
}}<span v-if="rules && rules['required']" class="d-control-label-required"
|
|
6
|
+
>*</span
|
|
7
|
+
>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="d-control">
|
|
10
|
+
<ValidationProvider
|
|
11
|
+
:name="label"
|
|
12
|
+
v-slot="v"
|
|
13
|
+
:rules="rules"
|
|
14
|
+
v-if="edit === true"
|
|
15
|
+
>
|
|
16
|
+
<TimePicker
|
|
17
|
+
:size="'small'"
|
|
18
|
+
placeholder="选择时间"
|
|
19
|
+
v-model="currentValue"
|
|
20
|
+
format="HH:mm:ss"
|
|
21
|
+
value-format="HH:mm:ss"
|
|
22
|
+
style="width: 100%"
|
|
23
|
+
:class="{ 'd-error-input': v.errors.length > 0 }"
|
|
24
|
+
/>
|
|
25
|
+
<div class="d-error-msg">
|
|
26
|
+
{{ v.errors[0] }}
|
|
27
|
+
</div>
|
|
28
|
+
</ValidationProvider>
|
|
29
|
+
<span v-else>{{ currentValue }}</span>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import moment from 'moment'
|
|
36
|
+
import { TimePicker } from 'ant-design-vue'
|
|
37
|
+
import { ValidationProvider } from 'vee-validate'
|
|
38
|
+
export default {
|
|
39
|
+
name: 'BaseTime',
|
|
40
|
+
components:{
|
|
41
|
+
TimePicker,
|
|
42
|
+
ValidationProvider
|
|
43
|
+
},
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
moment,
|
|
47
|
+
filterValue: '',
|
|
48
|
+
isInputChanged: false,
|
|
49
|
+
inputTimeout: null,
|
|
50
|
+
searchRows: [],
|
|
51
|
+
filterCols: [],
|
|
52
|
+
gridLoading: false,
|
|
53
|
+
gridPagerConfig: {
|
|
54
|
+
total: 0,
|
|
55
|
+
currentPage: 1,
|
|
56
|
+
pageSize: 10
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
computed: {
|
|
61
|
+
currentValue: {
|
|
62
|
+
// 动态计算currentValue的值
|
|
63
|
+
get: function() {
|
|
64
|
+
return this.value // 将props中的value赋值给currentValue
|
|
65
|
+
},
|
|
66
|
+
set: function(val) {
|
|
67
|
+
this.$emit('input', val) // 通过$emit触发父组件
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
props: {
|
|
72
|
+
rules: {
|
|
73
|
+
type: Object,
|
|
74
|
+
default: function() {
|
|
75
|
+
return null
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
value: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: function() {
|
|
81
|
+
return ''
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
edit: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: function() {
|
|
87
|
+
return false
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
name: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: function() {
|
|
93
|
+
return ''
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
label: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: function() {
|
|
99
|
+
return ''
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
placeholder: {
|
|
103
|
+
type: String,
|
|
104
|
+
default: function() {
|
|
105
|
+
return ''
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
created() {},
|
|
110
|
+
methods: {}
|
|
111
|
+
}
|
|
112
|
+
</script>
|
|
113
|
+
|
|
114
|
+
<style lang="scss" scoped></style>
|
|
115
|
+
<style lang="less">
|
|
116
|
+
@import '../../styles/default.less';
|
|
117
|
+
</style>
|