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.
@@ -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
@@ -118,6 +118,8 @@
118
118
  show-zoom
119
119
  transfer
120
120
  resize
121
+ :height="550"
122
+ :width="800"
121
123
  destroy-on-close
122
124
  :fullscreen="isFullscreen || dialogViewType == 'application/pdf'"
123
125
  :z-index="999"
@@ -1,131 +1,134 @@
1
1
  <template>
2
- <div class="d-control-container">
3
- <div class="d-control-label">
4
- {{ label
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
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
10
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
11
- </Tooltip>
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
- </template>
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
- import moment from 'moment'
40
- import { TimePicker } from 'ant-design-vue'
41
- import { ValidationProvider } from 'vee-validate'
42
- import { Tooltip } from 'ant-design-vue'
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
- export default {
45
- name: 'BaseTime',
46
- components:{
47
- TimePicker,
44
+ export default {
45
+ name: "BaseTime",
46
+ components: {
47
+ TimePicker,
48
48
  ValidationProvider,
49
- Tooltip,
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
- data() {
53
- return {
54
- moment,
55
- filterValue: '',
56
- isInputChanged: false,
57
- inputTimeout: null,
58
- searchRows: [],
59
- filterCols: [],
60
- gridLoading: false,
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
- 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
- }
77
+ },
78
+ props: {
79
+ rules: {
80
+ type: Object,
81
+ default: function () {
82
+ return null;
83
+ },
78
84
  },
79
- props: {
80
- rules: {
81
- type: Object,
82
- default: function() {
83
- return null
84
- }
85
+ value: {
86
+ type: String,
87
+ default: function () {
88
+ return "";
85
89
  },
86
- value: {
87
- type: String,
88
- default: function() {
89
- return ''
90
- }
90
+ },
91
+ edit: {
92
+ type: Boolean,
93
+ default: function () {
94
+ return false;
91
95
  },
92
- edit: {
93
- type: Boolean,
94
- default: function() {
95
- return false
96
- }
96
+ },
97
+ name: {
98
+ type: String,
99
+ default: function () {
100
+ return "";
97
101
  },
98
- name: {
99
- type: String,
100
- default: function() {
101
- return ''
102
- }
102
+ },
103
+ label: {
104
+ type: String,
105
+ default: function () {
106
+ return "";
103
107
  },
104
- label: {
105
- type: String,
106
- default: function() {
107
- return ''
108
- }
108
+ },
109
+ placeholder: {
110
+ type: String,
111
+ default: function () {
112
+ return "";
109
113
  },
110
- placeholder: {
111
- type: String,
112
- default: function() {
113
- return ''
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
- created() {},
124
- methods: {}
125
- }
126
- </script>
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 '../../styles/default.less';
133
+ @import "../../styles/default.less";
131
134
  </style>