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,416 +1,437 @@
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 v-if="rules && rules['required']" class="d-control-label-required"
10
- >*</span
11
- >
12
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
13
- <img src="../../styles/icon/help.png" alt="" style="width: 14px" />
14
- </Tooltip>
15
- </div>
16
- <div class="d-control">
17
- <ValidationProvider
18
- v-if="edit === true"
19
- :name="label"
20
- v-slot="v"
21
- :rules="rules"
22
- >
23
- <TreeSelect
24
- ref="treeSelectView"
25
- v-model="currentValue"
26
- :treeData="treeData"
27
- :showSearch="showSearch"
28
- :replaceFields="replaceFields"
29
- :dropdownMatchSelectWidth="dropdownMatchSelectWidth"
30
- :treeDefaultExpandAll="treeDefaultExpandAll"
31
- :treeDefaultExpandedKeys="treeDefaultExpandedKeys"
32
- @change="changeData"
33
- size="small"
34
- :allowClear="allowClear"
35
- @focus="searchData"
36
- @select="selectData"
37
- :dropdownStyle="{
38
- width: treeWidth + 'px',
39
- height: '300px',
40
- ...widthDropdownStyle,
41
- }"
42
- treeNodeFilterProp="title"
43
- :style="{
44
- width: '100%',
45
- }"
46
- :placeholder="placeholder"
47
- ></TreeSelect>
48
- <div class="d-error-msg">
49
- {{ v.errors[0] }}
50
- </div>
51
- </ValidationProvider>
52
-
53
- <span v-else>
54
- <a v-if="route" @click="routeLinkClick">{{ value }}</a>
55
- <span v-else> {{ value }}</span>
56
- </span>
57
- </div>
58
- </div>
59
- </template>
60
-
61
- <script>
62
- import { Tooltip, TreeSelect } from 'ant-design-vue'
63
- import request from '../../utils/request'
64
- import XEUtils from 'xe-utils'
65
- import { ValidationProvider } from 'vee-validate'
66
- export default {
67
- name: 'BaseTreeSelect',
68
- components: {
69
- Tooltip,
70
- TreeSelect,
71
- ValidationProvider,
72
- },
73
- props: {
74
- label: {
75
- type: String,
76
- },
77
- showLabel: {
78
- type: Boolean,
79
- default: function () {
80
- return true
81
- },
82
- },
83
- labelWidth: {
84
- type: Number,
85
- default: function () {
86
- return 100
87
- },
88
- },
89
- api: {
90
- type: String,
91
- required: true,
92
- },
93
- exps: {
94
- // 条件
95
- type: Array,
96
- default: () => {
97
- return []
98
- },
99
- },
100
- value: {
101
- type: String,
102
- default: function () {
103
- return ''
104
- },
105
- },
106
- tooltip: {
107
- type: String,
108
- default: function () {
109
- return ''
110
- },
111
- },
112
- customTitle: {
113
- type: Array,
114
- default: function () {
115
- return []
116
- },
117
- },
118
- // 输入框宽度
119
- width: {
120
- type: Number,
121
- default: function () {
122
- return 100
123
- },
124
- },
125
- // 树宽度
126
- treeWidth: {
127
- type: Number,
128
- default: function () {
129
- return 200
130
- },
131
- },
132
- // 输入框和选择器同宽
133
- dropdownMatchSelectWidth: {
134
- type: Boolean,
135
- default: function () {
136
- return false
137
- },
138
- },
139
- // 替换展示字段
140
- replaceFields: {
141
- type: Object,
142
- default: function () {
143
- return {
144
- children: 'children',
145
- title: 'title',
146
- key: 'key',
147
- value: 'value',
148
- }
149
- },
150
- },
151
- // 是否默认展开所有树节点
152
- treeDefaultExpandAll: {
153
- type: Boolean,
154
- default: function () {
155
- return false
156
- },
157
- },
158
- size: {
159
- type: String,
160
- default: function () {
161
- return 'small'
162
- },
163
- },
164
- // 下拉中显示搜索框
165
- showSearch: {
166
- type: Boolean,
167
- default: function () {
168
- return true
169
- },
170
- },
171
- // 下拉菜单的样式
172
- widthDropdownStyle: {
173
- type: Object,
174
- default: function () {
175
- return {}
176
- },
177
- },
178
- // 清除按钮
179
- allowClear: {
180
- type: Boolean,
181
- default: function () {
182
- return true
183
- },
184
- },
185
- placeholder: {
186
- type: String,
187
- default: function () {
188
- return ''
189
- },
190
- },
191
- rules: {
192
- type: Object,
193
- default: function () {
194
- return null
195
- },
196
- },
197
- formRow: {
198
- type: Object,
199
- default: function () {
200
- return {}
201
- },
202
- },
203
- row: {
204
- type: Object,
205
- default: function () {
206
- return {}
207
- },
208
- },
209
- edit: {
210
- type: Boolean,
211
- default: function () {
212
- return false
213
- },
214
- },
215
- field: {
216
- type: String,
217
- },
218
- columns: {
219
- // 列集合
220
- type: Array,
221
- default: () => {
222
- return []
223
- },
224
- },
225
- propTableData: {
226
- type: Array,
227
- default: function () {
228
- return []
229
- },
230
- },
231
- linkedField: {
232
- type: String,
233
- required: true,
234
- },
235
- linkedTitle: {
236
- type: [],
237
- default: function () {
238
- return []
239
- },
240
- },
241
- method: {
242
- type: String,
243
- default: function () {
244
- return 'post'
245
- },
246
- },
247
- route: Object,
248
- },
249
- data() {
250
- return {
251
- treeData: [],
252
- currentValue: '',
253
- treeDefaultExpandedKeys: [],
254
- }
255
- },
256
- mounted() {
257
- this.searchData()
258
- if (this.treeData.length) {
259
- this.currentValue = this.row[this.linkedField]
260
- } else {
261
- this.currentValue = this.value
262
- }
263
- },
264
- watch: {
265
- treeData(val) {
266
- if (this.treeData.length) {
267
- this.currentValue = this.row[this.linkedField]
268
- this.treeDefaultExpandedKeys = []
269
- this.treeDefaultExpandedKeys.push(this.currentValue)
270
- } else {
271
- this.currentValue = this.value
272
- }
273
- },
274
- edit(value) {
275
- // debugger
276
- if (value) {
277
- if (this.treeData.length) {
278
- this.currentValue = this.row[this.linkedField]
279
- } else {
280
- this.currentValue = this.value
281
- }
282
- }
283
- },
284
- },
285
- computed: {},
286
- methods: {
287
- /**
288
- * 查询数据
289
- */
290
- searchData() {
291
- let tempExp = {
292
- operator: 'or',
293
- expressions: [],
294
- }
295
-
296
- let postExpression = {
297
- field: this.field,
298
- expression: tempExp,
299
- extendParams: {},
300
- }
301
- let repeatRowInfo = {
302
- field: '',
303
- values: [],
304
- }
305
- //查询之前从外部组件构造其他的条件
306
- this.$emit('preSearch', postExpression, repeatRowInfo, this.row)
307
- let postData = {
308
- begin: 1,
309
- size: 0,
310
- expression: postExpression.expression,
311
- sorts: [],
312
- extendParams: postExpression.extendParams,
313
- }
314
- let tempApi = this.getPostApi(postData)
315
- let vm = this
316
- vm.gridLoading = true
317
- request({
318
- url: tempApi,
319
- method: this.method,
320
- data: postData,
321
- })
322
- .then((responseData) => {
323
- vm.treeData = responseData.content
324
- if (this.linkedTitle.length) {
325
- XEUtils.eachTree(vm.treeData, (item) => {
326
- let title = ''
327
- XEUtils.arrayEach(this.linkedTitle, (newTitle) => {
328
- title = title + item[newTitle] + '-'
329
- })
330
- item[this.replaceFields.title] = title.slice(0, -1)
331
- })
332
- }
333
- })
334
- .catch((error) => {
335
- console.error(error)
336
- })
337
- .finally(() => {
338
- vm.gridLoading = false
339
- })
340
- },
341
- getPostApi(postData) {
342
- let tempApi = this.api
343
- if (this.api.indexOf('?') > 0) {
344
- tempApi = this.api.substring(0, this.api.indexOf('?'))
345
- let tempExtenParams = this.api.substring(this.api.indexOf('?') + 1)
346
- tempExtenParams = replaceParam(tempExtenParams, this.formRow)
347
- let tempSplitParams = tempExtenParams.split('&')
348
- for (let i = 0; i < tempSplitParams.length; i++) {
349
- let tempSplitValue = tempSplitParams[i].split('=')
350
- this.$set(postData.extendParams, tempSplitValue[0], tempSplitValue[1])
351
- }
352
- }
353
- return tempApi
354
- },
355
- routeLinkClick() {
356
- //首先需要判断是否有权限
357
- this.$router.pushRoute({
358
- name: this.route.name,
359
- query: { id: this.row[this.route.field] },
360
- })
361
- },
362
- selectData(value, node) {
363
- // this.row[this.linkedField] = value
364
- // this.row[this.field] = node.title
365
- this.$set(this.row, this.linkedField, value)
366
- this.$set(this.row, this.field, node.title)
367
- this.$emit('selectChanged', this.row)
368
- },
369
- changeData(value) {
370
- if (!value) {
371
- this.$set(this.row, this.linkedField, '')
372
- this.$set(this.row, this.field, '')
373
- this.$emit('selectChanged', this.row)
374
- }
375
- },
376
- },
377
- }
378
- </script>
379
-
380
- <style lang="scss" scoped>
381
- // ::v-deep .ant-select-tree-dropdown::-webkit-scrollbar {
382
- // width: 5px;
383
- // }
384
- // ::v-deep .ant-select-tree-dropdown::-webkit-scrollbar-thumb {
385
- // /*滚动条里面小方块*/
386
- // border-radius: 10px;
387
- // -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
388
- // background: #e5e5e5;
389
- // }
390
- // ::v-deep .ant-select-tree-dropdown::-webkit-scrollbar-track {
391
- // /*滚动条里面轨道*/
392
- // -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
393
- // border-radius: 10px;
394
- // background: #ffffff;
395
- // }
396
- .pulldown-grid {
397
- min-width: 600px;
398
- width: auto;
399
- height: 350px;
400
- background-color: #fff;
401
- box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
402
- }
403
-
404
- .d-grid-control {
405
- height: 30px;
406
- }
407
- .interceptor-class {
408
- padding: 10px;
409
- ::v-deep .ant-btn {
410
- margin: 10px 10px 0;
411
- }
412
- }
413
- </style>
414
- <style lang="less">
415
- @import '../../styles/default.less';
416
- </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 v-if="rules && rules['required']" class="d-control-label-required"
10
+ >*</span
11
+ >
12
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
13
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px" />
14
+ </Tooltip>
15
+ </div>
16
+ <div class="d-control">
17
+ <ValidationProvider
18
+ v-if="edit === true"
19
+ :name="label"
20
+ v-slot="v"
21
+ :rules="rules"
22
+ >
23
+ <TreeSelect
24
+ ref="treeSelectView"
25
+ v-model="currentValue"
26
+ :treeData="treeData"
27
+ :showSearch="showSearch"
28
+ :replaceFields="replaceFields"
29
+ :dropdownMatchSelectWidth="dropdownMatchSelectWidth"
30
+ :treeDefaultExpandAll="treeDefaultExpandAll"
31
+ :treeDefaultExpandedKeys="treeDefaultExpandedKeys"
32
+ :filterTreeNode="filterTreeNode"
33
+ @change="changeData"
34
+ size="small"
35
+ :allowClear="allowClear"
36
+ @focus="searchData"
37
+ @select="selectData"
38
+ :dropdownStyle="{
39
+ width: treeWidth + 'px',
40
+ height: '300px',
41
+ ...widthDropdownStyle,
42
+ }"
43
+ treeNodeFilterProp="title"
44
+ :style="{
45
+ width: '100%',
46
+ }"
47
+ :placeholder="placeholder"
48
+ ></TreeSelect>
49
+ <div class="d-error-msg">
50
+ {{ v.errors[0] }}
51
+ </div>
52
+ </ValidationProvider>
53
+
54
+ <span v-else>
55
+ <a v-if="route" @click="routeLinkClick">{{ value }}</a>
56
+ <span v-else> {{ value }}</span>
57
+ </span>
58
+ </div>
59
+ </div>
60
+ </template>
61
+
62
+ <script>
63
+ import { Tooltip, TreeSelect } from 'ant-design-vue'
64
+ import request from '../../utils/request'
65
+ import XEUtils from 'xe-utils'
66
+ import { ValidationProvider } from 'vee-validate'
67
+ export default {
68
+ name: 'BaseTreeSelect',
69
+ components: {
70
+ Tooltip,
71
+ TreeSelect,
72
+ ValidationProvider,
73
+ },
74
+ props: {
75
+ label: {
76
+ type: String,
77
+ },
78
+ showLabel: {
79
+ type: Boolean,
80
+ default: function () {
81
+ return true
82
+ },
83
+ },
84
+ labelWidth: {
85
+ type: Number,
86
+ default: function () {
87
+ return 100
88
+ },
89
+ },
90
+ api: {
91
+ type: String,
92
+ required: true,
93
+ },
94
+ exps: {
95
+ // 条件
96
+ type: Array,
97
+ default: () => {
98
+ return []
99
+ },
100
+ },
101
+ value: {
102
+ type: String,
103
+ default: function () {
104
+ return ''
105
+ },
106
+ },
107
+ tooltip: {
108
+ type: String,
109
+ default: function () {
110
+ return ''
111
+ },
112
+ },
113
+ customTitle: {
114
+ type: Array,
115
+ default: function () {
116
+ return []
117
+ },
118
+ },
119
+ // 输入框宽度
120
+ width: {
121
+ type: Number,
122
+ default: function () {
123
+ return 100
124
+ },
125
+ },
126
+ // 树宽度
127
+ treeWidth: {
128
+ type: Number,
129
+ default: function () {
130
+ return 200
131
+ },
132
+ },
133
+ // 输入框和选择器同宽
134
+ dropdownMatchSelectWidth: {
135
+ type: Boolean,
136
+ default: function () {
137
+ return false
138
+ },
139
+ },
140
+ // 替换展示字段
141
+ replaceFields: {
142
+ type: Object,
143
+ default: function () {
144
+ return {
145
+ children: 'children',
146
+ title: 'title',
147
+ key: 'key',
148
+ value: 'value',
149
+ }
150
+ },
151
+ },
152
+ // 是否默认展开所有树节点
153
+ treeDefaultExpandAll: {
154
+ type: Boolean,
155
+ default: function () {
156
+ return false
157
+ },
158
+ },
159
+ size: {
160
+ type: String,
161
+ default: function () {
162
+ return 'small'
163
+ },
164
+ },
165
+ // 下拉中显示搜索框
166
+ showSearch: {
167
+ type: Boolean,
168
+ default: function () {
169
+ return true
170
+ },
171
+ },
172
+ // 下拉菜单的样式
173
+ widthDropdownStyle: {
174
+ type: Object,
175
+ default: function () {
176
+ return {}
177
+ },
178
+ },
179
+ // 清除按钮
180
+ allowClear: {
181
+ type: Boolean,
182
+ default: function () {
183
+ return true
184
+ },
185
+ },
186
+ placeholder: {
187
+ type: String,
188
+ default: function () {
189
+ return ''
190
+ },
191
+ },
192
+ rules: {
193
+ type: Object,
194
+ default: function () {
195
+ return null
196
+ },
197
+ },
198
+ formRow: {
199
+ type: Object,
200
+ default: function () {
201
+ return {}
202
+ },
203
+ },
204
+ row: {
205
+ type: Object,
206
+ default: function () {
207
+ return {}
208
+ },
209
+ },
210
+ edit: {
211
+ type: Boolean,
212
+ default: function () {
213
+ return false
214
+ },
215
+ },
216
+ field: {
217
+ type: String,
218
+ },
219
+ columns: {
220
+ // 列集合
221
+ type: Array,
222
+ default: () => {
223
+ return []
224
+ },
225
+ },
226
+ propTableData: {
227
+ type: Array,
228
+ default: function () {
229
+ return []
230
+ },
231
+ },
232
+ linkedField: {
233
+ type: String,
234
+ required: true,
235
+ },
236
+ linkedTitle: {
237
+ type: [],
238
+ default: function () {
239
+ return []
240
+ },
241
+ },
242
+ method: {
243
+ type: String,
244
+ default: function () {
245
+ return 'post'
246
+ },
247
+ },
248
+ route: Object,
249
+ },
250
+ data() {
251
+ return {
252
+ treeData: [],
253
+ currentValue: '',
254
+ treeDefaultExpandedKeys: [],
255
+ }
256
+ },
257
+ mounted() {
258
+ this.searchData()
259
+ if (this.treeData.length) {
260
+ this.currentValue = this.row[this.linkedField]
261
+ } else {
262
+ this.currentValue = this.value
263
+ }
264
+ },
265
+ watch: {
266
+ treeData(val) {
267
+ if (this.treeData.length) {
268
+ this.currentValue = this.row[this.linkedField]
269
+ this.treeDefaultExpandedKeys = []
270
+ this.treeDefaultExpandedKeys.push(this.currentValue)
271
+ } else {
272
+ this.currentValue = this.value
273
+ }
274
+ },
275
+ edit(value) {
276
+ // debugger
277
+ if (value) {
278
+ if (this.treeData.length) {
279
+ this.currentValue = this.row[this.linkedField]
280
+ } else {
281
+ this.currentValue = this.value
282
+ }
283
+ }
284
+ },
285
+ },
286
+ computed: {},
287
+ methods: {
288
+ /**
289
+ * 查询数据
290
+ */
291
+ searchData() {
292
+ let tempExp = {
293
+ operator: 'or',
294
+ expressions: [],
295
+ }
296
+
297
+ let postExpression = {
298
+ field: this.field,
299
+ expression: tempExp,
300
+ extendParams: {},
301
+ }
302
+ let repeatRowInfo = {
303
+ field: '',
304
+ values: [],
305
+ }
306
+ //查询之前从外部组件构造其他的条件
307
+ this.$emit('preSearch', postExpression, repeatRowInfo, this.row)
308
+ let postData = {
309
+ begin: 1,
310
+ size: 0,
311
+ expression: postExpression.expression,
312
+ sorts: [],
313
+ extendParams: postExpression.extendParams,
314
+ }
315
+ let tempApi = this.getPostApi(postData)
316
+ let vm = this
317
+ vm.gridLoading = true
318
+ request({
319
+ url: tempApi,
320
+ method: this.method,
321
+ data: postData,
322
+ })
323
+ .then((responseData) => {
324
+ vm.treeData = responseData.content
325
+ if (this.linkedTitle.length) {
326
+ XEUtils.eachTree(vm.treeData, (item) => {
327
+ let title = ''
328
+ XEUtils.arrayEach(this.linkedTitle, (newTitle) => {
329
+ title = title + item[newTitle] + '-'
330
+ })
331
+ item[this.replaceFields.title] = title.slice(0, -1)
332
+ })
333
+ }
334
+ })
335
+ .catch((error) => {
336
+ console.error(error)
337
+ })
338
+ .finally(() => {
339
+ vm.gridLoading = false
340
+ })
341
+ },
342
+ getPostApi(postData) {
343
+ let tempApi = this.api
344
+ if (this.api.indexOf('?') > 0) {
345
+ tempApi = this.api.substring(0, this.api.indexOf('?'))
346
+ let tempExtenParams = this.api.substring(this.api.indexOf('?') + 1)
347
+ tempExtenParams = replaceParam(tempExtenParams, this.formRow)
348
+ let tempSplitParams = tempExtenParams.split('&')
349
+ for (let i = 0; i < tempSplitParams.length; i++) {
350
+ let tempSplitValue = tempSplitParams[i].split('=')
351
+ this.$set(postData.extendParams, tempSplitValue[0], tempSplitValue[1])
352
+ }
353
+ }
354
+ return tempApi
355
+ },
356
+ routeLinkClick() {
357
+ //首先需要判断是否有权限
358
+ this.$router.pushRoute({
359
+ name: this.route.name,
360
+ query: { id: this.row[this.route.field] },
361
+ })
362
+ },
363
+ selectData(value, node) {
364
+ // this.row[this.linkedField] = value
365
+ // this.row[this.field] = node.title
366
+ this.$set(this.row, this.linkedField, value)
367
+ this.$set(this.row, this.field, node.title)
368
+ this.$emit('selectChanged', this.row)
369
+ },
370
+ filterTreeNode(inputValue,treeNode){
371
+ if(treeNode.data.props.dataRef.name.indexOf(inputValue)>-1){
372
+ //存在inputValue则返回true,显示该节点
373
+ return true;
374
+ }
375
+ //不存在inputValue则检查父节点是否包含inputValue
376
+ let parentId = treeNode.data.props.dataRef.parentId;
377
+ while(parentId){
378
+ let parentNode = XEUtils.findTree(this.treeData, p=>p.id===parentId)
379
+ if(parentNode){
380
+ if(parentNode.item.name.indexOf(inputValue)>-1){
381
+ return true
382
+ }
383
+ parentId = parentNode.item.parentId
384
+ }else{
385
+ break
386
+ }
387
+ }
388
+ return false
389
+ },
390
+ changeData(value) {
391
+ if (!value) {
392
+ this.$set(this.row, this.linkedField, '')
393
+ this.$set(this.row, this.field, '')
394
+ this.$emit('selectChanged', this.row)
395
+ }
396
+ },
397
+ },
398
+ }
399
+ </script>
400
+
401
+ <style lang="scss" scoped>
402
+ // ::v-deep .ant-select-tree-dropdown::-webkit-scrollbar {
403
+ // width: 5px;
404
+ // }
405
+ // ::v-deep .ant-select-tree-dropdown::-webkit-scrollbar-thumb {
406
+ // /*滚动条里面小方块*/
407
+ // border-radius: 10px;
408
+ // -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
409
+ // background: #e5e5e5;
410
+ // }
411
+ // ::v-deep .ant-select-tree-dropdown::-webkit-scrollbar-track {
412
+ // /*滚动条里面轨道*/
413
+ // -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
414
+ // border-radius: 10px;
415
+ // background: #ffffff;
416
+ // }
417
+ .pulldown-grid {
418
+ min-width: 600px;
419
+ width: auto;
420
+ height: 350px;
421
+ background-color: #fff;
422
+ box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
423
+ }
424
+
425
+ .d-grid-control {
426
+ height: 30px;
427
+ }
428
+ .interceptor-class {
429
+ padding: 10px;
430
+ ::v-deep .ant-btn {
431
+ margin: 10px 10px 0;
432
+ }
433
+ }
434
+ </style>
435
+ <style lang="less">
436
+ @import '../../styles/default.less';
437
+ </style>