doway-coms 1.3.3 → 1.3.5
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/dist/css/{index.86478f73.css → index.7946d50b.css} +1 -3
- package/dist/js/{chunk-vendors.307eaa8f.js → chunk-vendors.28fda91d.js} +64 -71
- package/dist/js/index.49bc6add.js +2 -0
- package/lib/doway-coms.common.js +120397 -0
- package/lib/doway-coms.css +1 -0
- package/lib/doway-coms.umd.js +120407 -0
- package/lib/doway-coms.umd.min.js +328 -0
- package/package.json +51 -50
- package/packages/BaseDateWeek/src/index.vue +113 -109
- package/packages/BaseDatetime/src/index.vue +144 -142
- package/packages/BaseForm/src/index.vue +617 -599
- package/packages/BaseGantt/src/index.vue +22 -0
- package/packages/BasePictureCard/src/index.vue +2 -0
- package/packages/BaseTime/src/index.vue +113 -110
- package/dist/js/index.48e7f7ac.js +0 -2
|
@@ -99,12 +99,14 @@
|
|
|
99
99
|
isCurrent: isCurrent,
|
|
100
100
|
isHover: true
|
|
101
101
|
}"
|
|
102
|
+
:treeConfig="treeConfig"
|
|
102
103
|
:cell-class-name="cellClassName"
|
|
103
104
|
:row-class-name="rowClassName"
|
|
104
105
|
@cell-click="cellClick"
|
|
105
106
|
@scroll="bodyScroll"
|
|
106
107
|
:loading="loading"
|
|
107
108
|
@filter-change="filterChangeEvent"
|
|
109
|
+
@toggle-tree-expand="toggleTreeExpand"
|
|
108
110
|
>
|
|
109
111
|
<template #content="{ row, rowIndex }">
|
|
110
112
|
<div>
|
|
@@ -143,6 +145,7 @@ import { Space, Radio } from "ant-design-vue";
|
|
|
143
145
|
import XEUtils from 'xe-utils'
|
|
144
146
|
import moment from 'moment'
|
|
145
147
|
import draggable from 'vuedraggable'
|
|
148
|
+
import resizeDetector from 'element-resize-detector';
|
|
146
149
|
export default {
|
|
147
150
|
name: "BaseGantt",
|
|
148
151
|
components: {
|
|
@@ -211,6 +214,12 @@ export default {
|
|
|
211
214
|
rowClassName: {
|
|
212
215
|
type: Function,
|
|
213
216
|
default: function() {}
|
|
217
|
+
},
|
|
218
|
+
treeConfig:{
|
|
219
|
+
type: Object,
|
|
220
|
+
default: function() {
|
|
221
|
+
return null
|
|
222
|
+
}
|
|
214
223
|
}
|
|
215
224
|
},
|
|
216
225
|
computed: {
|
|
@@ -219,10 +228,20 @@ export default {
|
|
|
219
228
|
}
|
|
220
229
|
},
|
|
221
230
|
mounted() {
|
|
231
|
+
|
|
232
|
+
let erd = resizeDetector();
|
|
233
|
+
let gridBodyDiv = this.$refs.bodyGrid.$el.getElementsByClassName('vxe-table--body')[0]
|
|
234
|
+
let vm = this
|
|
235
|
+
erd.listenTo(gridBodyDiv, () => {
|
|
236
|
+
vm.lineHeight = gridBodyDiv.clientHeight
|
|
237
|
+
});
|
|
222
238
|
this.timeViewValue = this.timeValue
|
|
223
239
|
},
|
|
224
240
|
created() {},
|
|
225
241
|
methods: {
|
|
242
|
+
toggleTreeExpand(scope){
|
|
243
|
+
// console.debug(this.$refs.bodyGrid.$el.getElementsByClassName('vxe-table--body')[0].clientHeight)
|
|
244
|
+
},
|
|
226
245
|
filterChangeEvent({ column }) {},
|
|
227
246
|
// headerDayCellStyle({ column, columnIndex }){
|
|
228
247
|
// return {
|
|
@@ -265,6 +284,9 @@ export default {
|
|
|
265
284
|
// filters:[{data:null}],
|
|
266
285
|
// filterRender:{name: 'input'}
|
|
267
286
|
}
|
|
287
|
+
if(this.leftCols[i].treeNode===true){
|
|
288
|
+
obj['treeNode'] = true
|
|
289
|
+
}
|
|
268
290
|
|
|
269
291
|
if (this.leftCols[i].slots) {
|
|
270
292
|
obj.slots = this.leftCols[i].slots
|
|
@@ -1,131 +1,134 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<span v-if="rules && rules['required']" class="d-control-label-required"
|
|
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"
|
|
7
6
|
>*</span
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</div>
|
|
13
|
-
<div class="d-control">
|
|
14
|
-
<ValidationProvider
|
|
15
|
-
:name="label"
|
|
16
|
-
v-slot="v"
|
|
17
|
-
:rules="rules"
|
|
18
|
-
v-if="edit === true"
|
|
19
|
-
>
|
|
20
|
-
<TimePicker
|
|
21
|
-
:size="'small'"
|
|
22
|
-
placeholder="选择时间"
|
|
23
|
-
v-model="currentValue"
|
|
24
|
-
format="HH:mm:ss"
|
|
25
|
-
value-format="HH:mm:ss"
|
|
26
|
-
style="width: 100%"
|
|
27
|
-
:class="{ 'd-error-input': v.errors.length > 0 }"
|
|
28
|
-
/>
|
|
29
|
-
<div class="d-error-msg">
|
|
30
|
-
{{ v.errors[0] }}
|
|
31
|
-
</div>
|
|
32
|
-
</ValidationProvider>
|
|
33
|
-
<span v-else>{{ currentValue }}</span>
|
|
34
|
-
</div>
|
|
7
|
+
>
|
|
8
|
+
<Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
|
|
9
|
+
<img src="../../styles/icon/help.png" alt="" style="width: 14px" />
|
|
10
|
+
</Tooltip>
|
|
35
11
|
</div>
|
|
36
|
-
|
|
12
|
+
<div class="d-control">
|
|
13
|
+
<ValidationProvider
|
|
14
|
+
:name="label"
|
|
15
|
+
v-slot="v"
|
|
16
|
+
:rules="rules"
|
|
17
|
+
v-if="edit === true"
|
|
18
|
+
>
|
|
19
|
+
<TimePicker
|
|
20
|
+
:size="'small'"
|
|
21
|
+
placeholder="选择时间"
|
|
22
|
+
v-model="currentValue"
|
|
23
|
+
format="HH:mm:ss"
|
|
24
|
+
value-format="HH:mm:ss"
|
|
25
|
+
style="width: 100%"
|
|
26
|
+
:class="{ 'd-error-input': v.errors.length > 0 }"
|
|
27
|
+
@change="change"
|
|
28
|
+
/>
|
|
29
|
+
<div class="d-error-msg">
|
|
30
|
+
{{ v.errors[0] }}
|
|
31
|
+
</div>
|
|
32
|
+
</ValidationProvider>
|
|
33
|
+
<span v-else>{{ currentValue }}</span>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
37
|
|
|
38
38
|
<script>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
import moment from "moment";
|
|
40
|
+
import { TimePicker } from "ant-design-vue";
|
|
41
|
+
import { ValidationProvider } from "vee-validate";
|
|
42
|
+
import { Tooltip } from "ant-design-vue";
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
export default {
|
|
45
|
+
name: "BaseTime",
|
|
46
|
+
components: {
|
|
47
|
+
TimePicker,
|
|
48
48
|
ValidationProvider,
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
Tooltip,
|
|
50
|
+
},
|
|
51
|
+
data() {
|
|
52
|
+
return {
|
|
53
|
+
moment,
|
|
54
|
+
filterValue: "",
|
|
55
|
+
isInputChanged: false,
|
|
56
|
+
inputTimeout: null,
|
|
57
|
+
searchRows: [],
|
|
58
|
+
filterCols: [],
|
|
59
|
+
gridLoading: false,
|
|
60
|
+
gridPagerConfig: {
|
|
61
|
+
total: 0,
|
|
62
|
+
currentPage: 1,
|
|
63
|
+
pageSize: 10,
|
|
64
|
+
},
|
|
65
|
+
};
|
|
51
66
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
gridPagerConfig: {
|
|
62
|
-
total: 0,
|
|
63
|
-
currentPage: 1,
|
|
64
|
-
pageSize: 10
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
+
computed: {
|
|
68
|
+
currentValue: {
|
|
69
|
+
// 动态计算currentValue的值
|
|
70
|
+
get: function () {
|
|
71
|
+
return this.value; // 将props中的value赋值给currentValue
|
|
72
|
+
},
|
|
73
|
+
set: function (val) {
|
|
74
|
+
this.$emit("input", val); // 通过$emit触发父组件
|
|
75
|
+
},
|
|
67
76
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this.$emit('input', val) // 通过$emit触发父组件
|
|
76
|
-
}
|
|
77
|
-
}
|
|
77
|
+
},
|
|
78
|
+
props: {
|
|
79
|
+
rules: {
|
|
80
|
+
type: Object,
|
|
81
|
+
default: function () {
|
|
82
|
+
return null;
|
|
83
|
+
},
|
|
78
84
|
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return null
|
|
84
|
-
}
|
|
85
|
+
value: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: function () {
|
|
88
|
+
return "";
|
|
85
89
|
},
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
},
|
|
91
|
+
edit: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: function () {
|
|
94
|
+
return false;
|
|
91
95
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
},
|
|
97
|
+
name: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: function () {
|
|
100
|
+
return "";
|
|
97
101
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
},
|
|
103
|
+
label: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: function () {
|
|
106
|
+
return "";
|
|
103
107
|
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
},
|
|
109
|
+
placeholder: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: function () {
|
|
112
|
+
return "";
|
|
109
113
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
},
|
|
115
|
+
tooltip: {
|
|
116
|
+
type: String,
|
|
117
|
+
default: function () {
|
|
118
|
+
return "";
|
|
115
119
|
},
|
|
116
|
-
tooltip: {
|
|
117
|
-
type: String,
|
|
118
|
-
default: function() {
|
|
119
|
-
return ''
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
120
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
121
|
+
},
|
|
122
|
+
created() {},
|
|
123
|
+
methods: {
|
|
124
|
+
change() {
|
|
125
|
+
this.$emit('change')
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
</script>
|
|
127
130
|
|
|
128
131
|
<style lang="scss" scoped></style>
|
|
129
132
|
<style lang="less">
|
|
130
|
-
@import
|
|
133
|
+
@import "../../styles/default.less";
|
|
131
134
|
</style>
|