cnhis-design-vue 2.1.11 → 2.1.14
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/CHANGELOG.md +45 -18
- package/es/affix/index.js +8 -8
- package/es/age/index.js +10 -10
- package/es/alert/index.js +8 -8
- package/es/anchor/index.js +8 -8
- package/es/auto-complete/index.js +8 -8
- package/es/avatar/index.js +8 -8
- package/es/back-top/index.js +8 -8
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +342 -234
- package/es/big-table/style.css +1 -1
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +55 -55
- package/es/button/style.css +1 -1
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/carousel/index.js +8 -8
- package/es/cascader/index.js +8 -8
- package/es/checkbox/index.js +9 -9
- package/es/col/index.js +8 -8
- package/es/collapse/index.js +8 -8
- package/es/color-picker/index.js +1 -1
- package/es/comment/index.js +8 -8
- package/es/config-provider/index.js +8 -8
- package/es/date-picker/index.js +8 -8
- package/es/descriptions/index.js +8 -8
- package/es/divider/index.js +8 -8
- package/es/drag-layout/index.js +3 -3
- package/es/drawer/index.js +8 -8
- package/es/dropdown/index.js +8 -8
- package/es/editor/index.js +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +88 -92
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +62 -62
- package/es/index/index.js +1415 -1024
- package/es/index/style.css +1 -1
- package/es/input/index.js +9 -9
- package/es/input-number/index.js +8 -8
- package/es/layout/index.js +8 -8
- package/es/list/index.js +8 -8
- package/es/locale-provider/index.js +8 -8
- package/es/map/index.js +9 -9
- package/es/mentions/index.js +8 -8
- package/es/menu/index.js +8 -8
- package/es/message/index.js +8 -8
- package/es/multi-chat/index.js +230 -127
- package/es/multi-chat/style.css +1 -1
- package/es/multi-chat-client/index.js +255 -147
- package/es/multi-chat-client/style.css +1 -1
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +14 -14
- package/es/multi-chat-setting/index.js +23 -23
- package/es/multi-chat-sip/index.js +1 -1
- package/es/notification/index.js +8 -8
- package/es/page-header/index.js +8 -8
- package/es/pagination/index.js +8 -8
- package/es/popconfirm/index.js +8 -8
- package/es/popover/index.js +8 -8
- package/es/progress/index.js +8 -8
- package/es/radio/index.js +9 -9
- package/es/rate/index.js +8 -8
- package/es/result/index.js +8 -8
- package/es/row/index.js +8 -8
- package/es/scale-view/index.js +132 -218
- package/es/scale-view/style.css +1 -1
- package/es/select/index.js +11 -11
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +2 -2
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/space/index.js +8 -8
- package/es/spin/index.js +8 -8
- package/es/statistic/index.js +8 -8
- package/es/steps/index.js +8 -8
- package/es/switch/index.js +8 -8
- package/es/table-filter/index.js +433 -168
- package/es/table-filter/style.css +1 -1
- package/es/tabs/index.js +8 -8
- package/es/tag/index.js +9 -9
- package/es/time-picker/index.js +8 -8
- package/es/timeline/index.js +8 -8
- package/es/tooltip/index.js +8 -8
- package/es/transfer/index.js +8 -8
- package/es/tree/index.js +8 -8
- package/es/tree-select/index.js +8 -8
- package/es/upload/index.js +8 -8
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +1573 -1171
- package/lib/cui.umd.js +1573 -1171
- package/lib/cui.umd.min.js +45 -45
- package/package.json +2 -2
- package/packages/big-table/src/BigTable.vue +191 -127
- package/packages/big-table/src/assets/style/table-base.less +11 -1
- package/packages/big-table/src/utils/bigTableProps.js +2 -1
- package/packages/button/src/ButtonPrint/index.vue +5 -4
- package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +3 -1
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +25 -39
- package/packages/multi-chat/chat/chatHeader.vue +9 -4
- package/packages/multi-chat/chat/client/clientChat.vue +3 -0
- package/packages/multi-chat/chat/quickReply.vue +90 -12
- package/packages/multi-chat/store/actions.js +1 -1
- package/packages/scale-view/formitem/r-choice.vue +45 -103
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +6 -2
- package/packages/table-filter/src/components/c-tree-select/tree-select.vue +1 -1
- package/packages/table-filter/src/components/multi-select/multi-select.vue +8 -4
- package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +1 -1
- package/packages/table-filter/src/const/dataOptions.js +43 -0
- package/packages/table-filter/src/mixins/mixins.js +15 -2
- package/packages/table-filter/src/quick-search/QuickSearch.vue +113 -36
|
@@ -206,6 +206,16 @@ body {
|
|
|
206
206
|
height: 100%;
|
|
207
207
|
line-height: unset;
|
|
208
208
|
width: 100%;
|
|
209
|
+
.table-title-wrap {
|
|
210
|
+
flex: 1;
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
}
|
|
214
|
+
.table-title-wrap-describe {
|
|
215
|
+
.text-over-tooltip-components {
|
|
216
|
+
max-width: calc(98% - 16px);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
209
219
|
}
|
|
210
220
|
}
|
|
211
221
|
.vxe-table--footer-wrapper.body--wrapper,
|
|
@@ -237,7 +247,7 @@ body {
|
|
|
237
247
|
display: flex;
|
|
238
248
|
align-items: center;
|
|
239
249
|
width: 100%;
|
|
240
|
-
.
|
|
250
|
+
.table-title-wrap {
|
|
241
251
|
max-width: calc(100% - 20px);
|
|
242
252
|
}
|
|
243
253
|
.vxe-filter--btn {
|
|
@@ -643,10 +643,11 @@ export default create({
|
|
|
643
643
|
},
|
|
644
644
|
/* */
|
|
645
645
|
prevFnError() {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
646
|
+
// 前置条件执行错误这里不弹提示,“前置条件”事件内有弹提示了
|
|
647
|
+
// let error = {
|
|
648
|
+
// message: '前置条件执行错误'
|
|
649
|
+
// };
|
|
650
|
+
// this.$emit('error', error);
|
|
650
651
|
},
|
|
651
652
|
/* */
|
|
652
653
|
callLocalServicesSuccessCb(res, type) {
|
|
@@ -371,6 +371,13 @@ export default {
|
|
|
371
371
|
lockMovementY: true
|
|
372
372
|
}
|
|
373
373
|
: {};
|
|
374
|
+
|
|
375
|
+
const addCanvas = async point => {
|
|
376
|
+
point.hasControls = point.hasBorders = false;
|
|
377
|
+
this.pointEvent(point);
|
|
378
|
+
this.canvas.add(point);
|
|
379
|
+
this.canvas.requestRenderAll();
|
|
380
|
+
};
|
|
374
381
|
if (this.isObject(v) && !v.value) {
|
|
375
382
|
const option = Object.assign({}, obj.iconStyle || {}, v || {}, {
|
|
376
383
|
...common,
|
|
@@ -384,64 +391,44 @@ export default {
|
|
|
384
391
|
ele: ele || '',
|
|
385
392
|
...option
|
|
386
393
|
});
|
|
387
|
-
|
|
388
|
-
|
|
394
|
+
addCanvas(img);
|
|
395
|
+
} else if (v.value) {
|
|
396
|
+
if (v.seq) {
|
|
397
|
+
// 标记增加序号
|
|
389
398
|
const circle = await this.createPoint('circle', {
|
|
390
399
|
...common,
|
|
391
400
|
radius: 5,
|
|
392
401
|
strokeWidth: 1,
|
|
393
402
|
stroke: '#000',
|
|
394
403
|
fill: 'transparent',
|
|
395
|
-
...obj.
|
|
396
|
-
left: 0,
|
|
397
|
-
top: 0
|
|
404
|
+
...(obj.seqStyle?.circle || {})
|
|
398
405
|
});
|
|
399
|
-
const text = new this.fabric.Text(String(v.
|
|
406
|
+
const text = new this.fabric.Text(String(v.value), {
|
|
400
407
|
...defaultVaule.textStyle,
|
|
401
408
|
...common,
|
|
402
|
-
...(obj.
|
|
403
|
-
left: 0,
|
|
404
|
-
top: 0
|
|
409
|
+
...(obj.seqStyle?.text || {})
|
|
405
410
|
});
|
|
406
411
|
const group = new this.fabric.Group([circle, text], {
|
|
407
412
|
...common,
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
selectable: false,
|
|
411
|
-
evented: false
|
|
413
|
+
// hoverCursor: 'default',
|
|
414
|
+
...eventStyle
|
|
412
415
|
});
|
|
413
|
-
|
|
416
|
+
addCanvas(group);
|
|
417
|
+
} else {
|
|
418
|
+
const text = new this.fabric.Text(String(v.value), {
|
|
419
|
+
...defaultVaule.textStyle,
|
|
420
|
+
...obj.style,
|
|
421
|
+
...common,
|
|
422
|
+
...eventStyle
|
|
423
|
+
});
|
|
424
|
+
addCanvas(text);
|
|
414
425
|
}
|
|
415
|
-
img.hasControls = img.hasBorders = false;
|
|
416
|
-
this.pointEvent(img);
|
|
417
|
-
this.canvas.add(img);
|
|
418
|
-
img.number && this.canvas.add(img.number);
|
|
419
|
-
this.canvas.requestRenderAll();
|
|
420
|
-
} else {
|
|
421
|
-
const text = new this.fabric.Text(String(v.value), {
|
|
422
|
-
...defaultVaule.textStyle,
|
|
423
|
-
...obj.style,
|
|
424
|
-
...common,
|
|
425
|
-
...eventStyle
|
|
426
|
-
});
|
|
427
|
-
text.hasControls = text.hasBorders = false;
|
|
428
|
-
// textList.push(text);
|
|
429
|
-
this.pointEvent(text);
|
|
430
|
-
this.canvas.add(text);
|
|
431
|
-
this.canvas.renderAll();
|
|
432
426
|
}
|
|
433
427
|
});
|
|
434
428
|
}
|
|
435
429
|
});
|
|
436
430
|
// this.canvas.add(...textList);
|
|
437
431
|
},
|
|
438
|
-
// 标记移动时 setCoords()方法手动更新相关联的序号等坐标
|
|
439
|
-
updateNumber(point) {
|
|
440
|
-
if (point.number) {
|
|
441
|
-
point.number.setCoords();
|
|
442
|
-
point.number.set({ left: point.left - (point.width * point.scale) / 2 - defaultVaule.bottomNumberLeftSpace, top: point.top });
|
|
443
|
-
}
|
|
444
|
-
},
|
|
445
432
|
pointEvent(point) {
|
|
446
433
|
point.on('mouseover', () => {
|
|
447
434
|
this.showDrapPopup(point, true);
|
|
@@ -453,7 +440,6 @@ export default {
|
|
|
453
440
|
if (this.eventStyle.evented) {
|
|
454
441
|
point.on('moving', () => {
|
|
455
442
|
this.moveLimit(point);
|
|
456
|
-
this.updateNumber(point);
|
|
457
443
|
this.canvas.renderAll();
|
|
458
444
|
this.showDrapPopup(point);
|
|
459
445
|
});
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
</div>
|
|
24
24
|
<div class="chat-header-opt">
|
|
25
|
-
<a-button class="chat-header-opt-btn" v-if="isShow('TRANSFER') && sessionType == 1 && onChating" @click="handleConvertShow" :disabled="!onChating && !!convertButtonTitle">{{
|
|
25
|
+
<a-button class="chat-header-opt-btn" v-if="isShow('TRANSFER') && sessionType == 1 && onChating" @click="handleConvertShow" :disabled="!onChating && !!convertButtonTitle">{{
|
|
26
|
+
convertButtonTitle
|
|
27
|
+
}}</a-button>
|
|
26
28
|
<!-- 状态切换 -->
|
|
27
29
|
<UserStatus class="chat-header-opt-btn" />
|
|
28
30
|
<!-- <a-dropdown placement="bottomCenter">
|
|
@@ -121,7 +123,7 @@ export default {
|
|
|
121
123
|
[Input.TextArea.name]: Input.TextArea,
|
|
122
124
|
SvgIcon,
|
|
123
125
|
Avatar,
|
|
124
|
-
UserStatus
|
|
126
|
+
UserStatus
|
|
125
127
|
},
|
|
126
128
|
props: {
|
|
127
129
|
hideHeader: {
|
|
@@ -134,7 +136,7 @@ export default {
|
|
|
134
136
|
convertShow: false,
|
|
135
137
|
serviceList: [],
|
|
136
138
|
converUserId: '',
|
|
137
|
-
converMark: ''
|
|
139
|
+
converMark: ''
|
|
138
140
|
// status: 'ON-LINE' // 客服状态
|
|
139
141
|
};
|
|
140
142
|
},
|
|
@@ -195,6 +197,9 @@ export default {
|
|
|
195
197
|
sessionTime = sessionTime - 3600 * hour;
|
|
196
198
|
let minute = Math.floor(sessionTime / 60);
|
|
197
199
|
let second = sessionTime % 60;
|
|
200
|
+
if (sessionTime <= 0) {
|
|
201
|
+
hour = minute = second = 0;
|
|
202
|
+
}
|
|
198
203
|
return [hour, minute, second].map(x => `${x < 10 ? 0 : ''}${x}`).join(':');
|
|
199
204
|
}
|
|
200
205
|
},
|
|
@@ -218,7 +223,7 @@ export default {
|
|
|
218
223
|
'setSessionHistoryList',
|
|
219
224
|
'setClientParams',
|
|
220
225
|
'setClientId',
|
|
221
|
-
'setVoiceAlert'
|
|
226
|
+
'setVoiceAlert'
|
|
222
227
|
]),
|
|
223
228
|
...mapActions(['setChatTimer']),
|
|
224
229
|
/**
|
|
@@ -132,6 +132,9 @@ export default {
|
|
|
132
132
|
sessionTime = sessionTime - 3600 * hour;
|
|
133
133
|
let minute = Math.floor(sessionTime / 60);
|
|
134
134
|
let second = sessionTime % 60;
|
|
135
|
+
if (sessionTime <= 0) {
|
|
136
|
+
hour = minute = second = 0;
|
|
137
|
+
}
|
|
135
138
|
return [hour, minute, second].map(x => `${x < 10 ? 0 : ''}${x}`).join(':');
|
|
136
139
|
}
|
|
137
140
|
},
|
|
@@ -8,30 +8,68 @@
|
|
|
8
8
|
<template slot="tab">{{ data.category }}</template>
|
|
9
9
|
<ul class="quick-reply-wrapper" ref="quick-reply" v-if="data.list.length > 0">
|
|
10
10
|
<template v-for="(item, index) in data.list">
|
|
11
|
-
<li
|
|
11
|
+
<li
|
|
12
|
+
class="quick-reply-item"
|
|
13
|
+
:class="{ 'quick-input': item.edit }"
|
|
14
|
+
:key="index"
|
|
15
|
+
v-if="item.content !== undefined"
|
|
16
|
+
>
|
|
12
17
|
<div class="text" v-if="!item.edit" @click="setFooterMessage(item.content)">
|
|
13
18
|
{{ item.content }}
|
|
14
19
|
<span class="operate">
|
|
15
|
-
<svg-icon
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
<svg-icon
|
|
21
|
+
v-if="quickReplyKey === `个人`"
|
|
22
|
+
icon-class="a-xitongtubiaoliaotianzhiding"
|
|
23
|
+
@click.stop="handleQuickEdit(item, 'top', data.list, index, k)"
|
|
24
|
+
style="font-size: 16px;"
|
|
25
|
+
class="quick-replay-to-top"
|
|
26
|
+
></svg-icon>
|
|
27
|
+
<svg-icon
|
|
28
|
+
icon-class="fasong"
|
|
29
|
+
@click.stop="handleQuickEdit(item, 'send')"
|
|
30
|
+
style="font-size: 16px;"
|
|
31
|
+
></svg-icon>
|
|
32
|
+
<a-icon
|
|
33
|
+
v-if="quickReplyKey === `个人`"
|
|
34
|
+
type="edit"
|
|
35
|
+
@click.stop="handleQuickEdit(item, 'show')"
|
|
36
|
+
/>
|
|
37
|
+
<a-icon
|
|
38
|
+
v-if="quickReplyKey === `个人`"
|
|
39
|
+
type="delete"
|
|
40
|
+
@click.stop="handleQuickDelete(item)"
|
|
41
|
+
/>
|
|
18
42
|
</span>
|
|
19
43
|
</div>
|
|
20
44
|
<div class="input" v-else>
|
|
21
|
-
<a-textarea
|
|
45
|
+
<a-textarea
|
|
46
|
+
:placeholder="i18nText('1.9.40') + '...'"
|
|
47
|
+
autoSize
|
|
48
|
+
:maxLength="200"
|
|
49
|
+
@change="handleChange"
|
|
50
|
+
v-model="item.editValue"
|
|
51
|
+
/>
|
|
22
52
|
<div class="confirm">
|
|
23
|
-
<span
|
|
53
|
+
<span
|
|
54
|
+
style="color: #969696;"
|
|
55
|
+
@click.stop="handleQuickEdit(item, 'cancel')"
|
|
56
|
+
>{{ i18nText('1.1.1.1.4') }}</span>
|
|
24
57
|
|
|
|
25
|
-
<span
|
|
58
|
+
<span
|
|
59
|
+
style="color: #5585F5;"
|
|
60
|
+
@click.stop="handleQuickEdit(item, 'ok')"
|
|
61
|
+
>{{ i18nText('1.1.1.1.3') }}</span>
|
|
26
62
|
</div>
|
|
27
63
|
</div>
|
|
28
64
|
</li>
|
|
29
65
|
</template>
|
|
30
|
-
<div style="text-align: center;margin-top: 10px;">
|
|
66
|
+
<div style="text-align: center;margin-top: 10px;">{{ i18nText('3.5.13') }}~</div>
|
|
31
67
|
</ul>
|
|
32
68
|
<div v-else class="quick-reply-no-wrapper">
|
|
33
69
|
<img src="../img/no-data.png" />
|
|
34
|
-
<span
|
|
70
|
+
<span
|
|
71
|
+
style="display: inline-block;margin-top: 20px;font-size: 20px;"
|
|
72
|
+
>{{ i18nText('1.1.6.11') }}</span>
|
|
35
73
|
</div>
|
|
36
74
|
</a-tab-pane>
|
|
37
75
|
</a-tabs>
|
|
@@ -115,8 +153,45 @@ export default {
|
|
|
115
153
|
methods: {
|
|
116
154
|
...mapMutations(['setFooterMessage']),
|
|
117
155
|
...mapActions(['sendMessage', 'sendRobotMessage']),
|
|
118
|
-
|
|
156
|
+
topPersonalData(item, list, index, tabIndex) {
|
|
157
|
+
const params = { id: item.id };
|
|
158
|
+
fetch.post('/fastReply/topPersonalData', this.$qs.stringify(params)).then(({ data }) => {
|
|
159
|
+
if (data.result !== 'SUCCESS') {
|
|
160
|
+
this.$message.error(data.resultMsg || '置顶失败');
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
list.splice(index, 1);
|
|
164
|
+
list.unshift(item);
|
|
165
|
+
this.$forceUpdate();
|
|
166
|
+
// 如果input search 中有值 this.quickData也要排序
|
|
167
|
+
if (this.keyword) {
|
|
168
|
+
let curList = this.quickData[tabIndex]?.list;
|
|
169
|
+
if (curList.length) {
|
|
170
|
+
let curIndex = curList.findIndex(v => v.id === item.id);
|
|
171
|
+
if (curIndex > -1) {
|
|
172
|
+
let curItem = curList[curIndex];
|
|
173
|
+
curList.splice(curIndex, 1);
|
|
174
|
+
curList.unshift(curItem);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
let target = this.$refs['quick-reply'];
|
|
179
|
+
if (!target.length || !target[tabIndex]) return;
|
|
180
|
+
this.$nextTick(() => {
|
|
181
|
+
target[tabIndex].scrollTo({
|
|
182
|
+
left: 0,
|
|
183
|
+
top: 0,
|
|
184
|
+
behavior: 'instant'
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
handleQuickEdit(item, type, list, index, tabIndex) {
|
|
119
190
|
switch (type) {
|
|
191
|
+
case 'top':
|
|
192
|
+
if (!item.id) return;
|
|
193
|
+
this.topPersonalData(item, list, index, tabIndex);
|
|
194
|
+
break;
|
|
120
195
|
case 'send':
|
|
121
196
|
var body = {
|
|
122
197
|
content: `<div>${item.content}</div>`,
|
|
@@ -182,8 +257,8 @@ export default {
|
|
|
182
257
|
}
|
|
183
258
|
},
|
|
184
259
|
handleQuickAdd() {
|
|
185
|
-
let quickData = this.quickData
|
|
186
|
-
let length = quickData
|
|
260
|
+
let quickData = this.quickData?.find(item => item.category == this.quickReplyKey);
|
|
261
|
+
let length = quickData?.list?.length;
|
|
187
262
|
if (length > 0 && !quickData.list[length - 1].id) {
|
|
188
263
|
this.$message.warning(`${this.i18nText('1.9.361')}!`);
|
|
189
264
|
return;
|
|
@@ -308,6 +383,9 @@ export default {
|
|
|
308
383
|
&:hover {
|
|
309
384
|
border: none;
|
|
310
385
|
}
|
|
386
|
+
.quick-replay-to-top {
|
|
387
|
+
margin-right: 10px;
|
|
388
|
+
}
|
|
311
389
|
.operate {
|
|
312
390
|
display: none;
|
|
313
391
|
float: right;
|
|
@@ -295,7 +295,7 @@ export default {
|
|
|
295
295
|
const countdownDesc = (isObject && Number(data.countdownDesc)) || 0;
|
|
296
296
|
commit('setSessionTotalTime', isObject && showMode ? count + countdownDesc : 0); // 正序时记录总时长
|
|
297
297
|
sessionTimer = setInterval(() => {
|
|
298
|
-
commit('setSessionTime', isASC ? ++state.sessionTime : --state.sessionTime);
|
|
298
|
+
commit('setSessionTime', isASC ? ++state.sessionTime : (!state.sessionTime ? 0 : --state.sessionTime));
|
|
299
299
|
}, 1000);
|
|
300
300
|
commit('setSessionTimer', sessionTimer);
|
|
301
301
|
},
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
v-model="choiceValue"
|
|
122
122
|
placeholder="请选择"
|
|
123
123
|
show-search
|
|
124
|
-
:mode="
|
|
124
|
+
:mode="showMulti"
|
|
125
125
|
:disabled="isLock"
|
|
126
126
|
@search="handleSearch"
|
|
127
127
|
@change="handleSelectChange"
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
:notFoundContent="fetching ? undefined : '暂无数据'"
|
|
131
131
|
>
|
|
132
132
|
<a-spin v-if="fetching" slot="notFoundContent" size="small" />
|
|
133
|
-
<a-select-option v-for="(v, i) in curOptions" :key="i" :value="v
|
|
133
|
+
<a-select-option v-for="(v, i) in curOptions" :key="i" :value="v[columnKey]">{{ v[labelKey] }}</a-select-option>
|
|
134
134
|
</a-select>
|
|
135
135
|
<a-cascader
|
|
136
136
|
v-else-if="cloneItem.type == 'SEARCH_CASCADE'"
|
|
@@ -238,6 +238,32 @@ export default {
|
|
|
238
238
|
return function (o) {
|
|
239
239
|
return o.prefix || o.suffix;
|
|
240
240
|
};
|
|
241
|
+
},
|
|
242
|
+
isDynamic2Static() {
|
|
243
|
+
// 分享链接的量表用 optionType 1:静态,2:动态,3:动态转静态
|
|
244
|
+
let { targetSource = {}, options = [], optionType } = this.item || {};
|
|
245
|
+
if (targetSource.target_id && (options.length || optionType == 3)) return true;
|
|
246
|
+
return false;
|
|
247
|
+
},
|
|
248
|
+
isMultiple() {
|
|
249
|
+
return this.item?.setting?.isMultiple;
|
|
250
|
+
},
|
|
251
|
+
showMulti() {
|
|
252
|
+
return this.isMultiple ? 'multiple' : 'default';
|
|
253
|
+
},
|
|
254
|
+
// 取值字段
|
|
255
|
+
columnKey() {
|
|
256
|
+
let { target_id, values } = this.item?.targetSource || {};
|
|
257
|
+
if (!target_id || !values) return 'value';
|
|
258
|
+
if (this.isDynamic2Static) return values || 'value';
|
|
259
|
+
return values;
|
|
260
|
+
},
|
|
261
|
+
// 显示字段
|
|
262
|
+
labelKey() {
|
|
263
|
+
let { target_id, showField } = this.item?.targetSource || {};
|
|
264
|
+
if (!target_id || !showField) return 'label';
|
|
265
|
+
if (this.isDynamic2Static) return showField || 'label';
|
|
266
|
+
return showField;
|
|
241
267
|
}
|
|
242
268
|
},
|
|
243
269
|
watch: {
|
|
@@ -255,8 +281,6 @@ export default {
|
|
|
255
281
|
selectParams: { tableType: 'TABLE_LIST', pageSize: 20, page: 1 },
|
|
256
282
|
cascaderParams: { tableType: 'TABLE_LIST' },
|
|
257
283
|
cloneItem: {},
|
|
258
|
-
columnName: '', // 取值字段
|
|
259
|
-
showField: '', // 显示字段
|
|
260
284
|
curvalue: '',
|
|
261
285
|
curCheckboxValue: [],
|
|
262
286
|
othersText: '',
|
|
@@ -463,11 +487,10 @@ export default {
|
|
|
463
487
|
async initSelectOptions() {
|
|
464
488
|
// 分享链接的量表用 optionType 1:静态,2:动态,3:动态转静态
|
|
465
489
|
const { targetSource, type, options = [], optionType = 1 } = this.cloneItem;
|
|
466
|
-
this.showField = 'label';
|
|
467
490
|
if (!targetSource?.target_id) return;
|
|
468
491
|
// 动态数据源转静态数据
|
|
469
|
-
if (type == 'SELECT' &&
|
|
470
|
-
this.curOptions = options;
|
|
492
|
+
if (type == 'SELECT' && this.isDynamic2Static) {
|
|
493
|
+
this.curOptions = this.handleDynamic2StaticOptions(options);
|
|
471
494
|
return;
|
|
472
495
|
}
|
|
473
496
|
if (type === 'SELECT') {
|
|
@@ -477,113 +500,32 @@ export default {
|
|
|
477
500
|
} else {
|
|
478
501
|
this.curOptions = await this.getCascadeOptions(this.cloneItem);
|
|
479
502
|
}
|
|
480
|
-
this.columnName = targetSource?.values;
|
|
481
|
-
this.showField = targetSource?.showField || targetSource?.values;
|
|
482
|
-
// this.findDetails(targetSource).then(obj => {
|
|
483
|
-
// if (type == "SEARCH_CASCADE") {
|
|
484
|
-
// this.findCascader(obj);
|
|
485
|
-
// } else if (type == "SELECT") {
|
|
486
|
-
// this.findTableData(obj);
|
|
487
|
-
// }
|
|
488
|
-
// });
|
|
489
|
-
},
|
|
490
|
-
// 下拉组件查询列表数据配置
|
|
491
|
-
findDetails({ target_id, values, primaryField, relationField, showField }) {
|
|
492
|
-
const url = '/tableList/getDetail';
|
|
493
|
-
const params = {
|
|
494
|
-
tableId: target_id,
|
|
495
|
-
tableType: 'TABLE_LIST'
|
|
496
|
-
};
|
|
497
|
-
this.columnName = values;
|
|
498
|
-
this.showField = showField || values;
|
|
499
|
-
return axios.get(url, { params }).then(({ data }) => {
|
|
500
|
-
const { detailAutograph, tableId, fieldList = [], buttonList = [] } = data.map;
|
|
501
|
-
const { type } = this.cloneItem;
|
|
502
|
-
fieldList.forEach(item => {
|
|
503
|
-
item.attrType = (item.settingObj && item.settingObj.attr) || '';
|
|
504
|
-
});
|
|
505
|
-
this.fieldList = fieldList;
|
|
506
|
-
this.buttonList = buttonList;
|
|
507
|
-
if (type == 'SELECT') {
|
|
508
|
-
Object.assign(this.selectParams, {
|
|
509
|
-
autograph: detailAutograph,
|
|
510
|
-
tableId
|
|
511
|
-
});
|
|
512
|
-
} else if (type == 'SEARCH_CASCADE') {
|
|
513
|
-
Object.assign(this.cascaderParams, {
|
|
514
|
-
autograph: detailAutograph,
|
|
515
|
-
tableId,
|
|
516
|
-
primaryKey: primaryField,
|
|
517
|
-
levelKey: relationField
|
|
518
|
-
});
|
|
519
|
-
}
|
|
520
|
-
return { values, showField: this.showField };
|
|
521
|
-
});
|
|
522
503
|
},
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
}
|
|
530
|
-
return axios.post(url, this.$qs.stringify(this.selectParams)).then(({ data }) => {
|
|
531
|
-
const { rows } = data.map;
|
|
532
|
-
const options = rows.map(row => {
|
|
533
|
-
return Object.assign(row, {
|
|
534
|
-
// label: row[showField],
|
|
535
|
-
value: row[values]
|
|
504
|
+
handleDynamic2StaticOptions(options) {
|
|
505
|
+
if (!options || !options.length) return [];
|
|
506
|
+
return options.map(item => {
|
|
507
|
+
if ('cascadeData' in item) {
|
|
508
|
+
Object.assign(item, {
|
|
509
|
+
...item.cascadeData
|
|
536
510
|
});
|
|
537
|
-
});
|
|
538
|
-
let optionsList = this.uniqArrObj(options, 'value');
|
|
539
|
-
optionsList = this.formatData({
|
|
540
|
-
tableList: optionsList,
|
|
541
|
-
fieldList: this.fieldList,
|
|
542
|
-
btnList: this.buttonList,
|
|
543
|
-
oldtableData: optionsList,
|
|
544
|
-
showButtonTop: 0
|
|
545
|
-
});
|
|
546
|
-
this.curOptions = optionsList;
|
|
547
|
-
});
|
|
548
|
-
},
|
|
549
|
-
// 级联组件查询列表数据
|
|
550
|
-
findCascader({ values }) {
|
|
551
|
-
const url = '/tableReader/getTableData';
|
|
552
|
-
return axios.post(url, this.$qs.stringify(this.cascaderParams)).then(({ data }) => {
|
|
553
|
-
const { rows } = data.map;
|
|
554
|
-
this.curOptions = this.initTreeData(rows, values);
|
|
555
|
-
});
|
|
556
|
-
},
|
|
557
|
-
// 初始化树
|
|
558
|
-
initTreeData(rows, values) {
|
|
559
|
-
return rows.map(row => {
|
|
560
|
-
const valObj = { label: row[values], value: row[values], id: row.id };
|
|
561
|
-
if (row.parent_id) {
|
|
562
|
-
Object.assign(valObj, { parent_id: row.parent_id });
|
|
563
511
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
});
|
|
512
|
+
// 容错 没有配置的key 添加一个
|
|
513
|
+
if (!(this.columnKey in item)) {
|
|
514
|
+
item[this.columnKey] = item.value || item.label;
|
|
568
515
|
}
|
|
569
|
-
|
|
516
|
+
if (!(this.labelKey in item)) {
|
|
517
|
+
item[this.labelKey] = item.label;
|
|
518
|
+
}
|
|
519
|
+
return item;
|
|
570
520
|
});
|
|
571
521
|
},
|
|
572
|
-
// 数组对象去重
|
|
573
|
-
uniqArrObj(arr, name) {
|
|
574
|
-
let obj = {};
|
|
575
|
-
return arr.reduce((cur, next) => {
|
|
576
|
-
obj[next[name]] ? '' : (obj[next[name]] = true && cur.push(next));
|
|
577
|
-
return cur;
|
|
578
|
-
}, []);
|
|
579
|
-
},
|
|
580
522
|
// 下拉组件搜索
|
|
581
523
|
async handleSearch(value) {
|
|
582
524
|
try {
|
|
583
525
|
this.curOptions = await this.getSearchOptions(
|
|
584
526
|
{
|
|
585
|
-
values: this.
|
|
586
|
-
showField: this.
|
|
527
|
+
values: this.columnKey,
|
|
528
|
+
showField: this.labelKey,
|
|
587
529
|
keyword: value
|
|
588
530
|
},
|
|
589
531
|
this.cloneItem
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<li v-if="isShowSetting('hideSearch') && !showRelatedTreeBtn" ref="inputSearchLi" class="baseSearch-input-search">
|
|
56
56
|
<template v-if="outSearchFieldList && outSearchFieldList.length">
|
|
57
57
|
<a-input
|
|
58
|
-
:style="{ width: inputSearchW + 'px', margin: '0 8px 8px 0' }"
|
|
58
|
+
:style="{ width: (searchInputWidth || inputSearchW) + 'px', margin: '0 8px 8px 0' }"
|
|
59
59
|
allowClear
|
|
60
60
|
:placeholder="searchPlaceHolder"
|
|
61
61
|
:value="currentValue"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
<a-input-search
|
|
77
77
|
v-else
|
|
78
78
|
class="my-input-search input-search-com"
|
|
79
|
-
:style="{ width: inputSearchW + 'px' }"
|
|
79
|
+
:style="{ width: (searchInputWidth || inputSearchW) + 'px' }"
|
|
80
80
|
@search="onSearch"
|
|
81
81
|
allowClear
|
|
82
82
|
:placeholder="searchPlaceHolder"
|
|
@@ -423,6 +423,10 @@ export default create({
|
|
|
423
423
|
width: {
|
|
424
424
|
default: '400px'
|
|
425
425
|
},
|
|
426
|
+
searchInputWidth:{ // 设置检索框的宽度
|
|
427
|
+
type: Number,
|
|
428
|
+
default:0
|
|
429
|
+
},
|
|
426
430
|
onSearch: Function,
|
|
427
431
|
rowBtnList: {
|
|
428
432
|
type: Array,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
:maxTagPlaceholder="handleMaxTag"
|
|
9
9
|
showSearch
|
|
10
10
|
multiple
|
|
11
|
-
style="width:
|
|
11
|
+
:style="`width: ${item.advanceColWidth||160}px`"
|
|
12
12
|
:class="[!showRemoveIcon && 'c-a-tree-select-show-hide-icon','c-a-quick-input-tree-mul']"
|
|
13
13
|
:dropdown-style="{ maxHeight: '292px', overflow: 'auto' }"
|
|
14
14
|
:tree-data="treeData"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<a-select
|
|
3
|
-
mode="
|
|
3
|
+
:mode="mode"
|
|
4
4
|
v-if="item.com == 'SelectMui'"
|
|
5
5
|
:placeholder="`请选择${item.alias || item.title}`"
|
|
6
|
-
style="width:
|
|
6
|
+
:style="{width: `${item.advanceColWidth||160}px`}"
|
|
7
7
|
:dropdownMatchSelectWidth="false"
|
|
8
8
|
:maxTagCount="handleMaxTagCount(item)"
|
|
9
9
|
:maxTagPlaceholder="handleMaxTag(item)"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
</a-select-option>
|
|
44
44
|
</template>
|
|
45
45
|
<template v-else>
|
|
46
|
-
<a-select-option v-for="(i, d) in item.labelList" :key="d" :disabled="(!showRemoveIcon && item.value && item.value.includes(d))">
|
|
46
|
+
<a-select-option v-for="(i, d) in item.labelList" :key="d" :value="d" :disabled="(!showRemoveIcon && item.value && item.value.includes(d))">
|
|
47
47
|
{{ i.labelName || '' }}
|
|
48
48
|
</a-select-option>
|
|
49
49
|
</template>
|
|
@@ -78,7 +78,7 @@ export default {
|
|
|
78
78
|
render: (h, ctx) => ctx.props.vnodes
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
-
props: ['item', 'maxTagPlaceholder', 'outFilterChange', 'handleWordBookSearch', 'dropdownVisibleChange', 'source', 'fetchingWordbook'],
|
|
81
|
+
props: ['item', 'maxTagPlaceholder', 'outFilterChange', 'handleWordBookSearch', 'dropdownVisibleChange', 'source', 'fetchingWordbook',],
|
|
82
82
|
data() {
|
|
83
83
|
return {};
|
|
84
84
|
},
|
|
@@ -123,6 +123,9 @@ export default {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
return true;
|
|
126
|
+
},
|
|
127
|
+
mode(){
|
|
128
|
+
return String(this?.item?.advanceOptionSetting) == '0'? 'default' : 'multiple'
|
|
126
129
|
}
|
|
127
130
|
},
|
|
128
131
|
watch: {},
|
|
@@ -135,6 +138,7 @@ export default {
|
|
|
135
138
|
// 方法
|
|
136
139
|
methods: {
|
|
137
140
|
createSuffixIcon() {
|
|
141
|
+
if(this.mode === 'default') return;
|
|
138
142
|
let refDom = this.$refs.quickInputSelect;
|
|
139
143
|
if (!refDom) return;
|
|
140
144
|
let selectDom = refDom.$el;
|