cnhis-design-vue 2.1.40 → 2.1.42
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 +25 -31
- 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 +91 -91
- package/es/big-table/style.css +1 -1
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +92 -46
- 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 +104 -96
- 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 +969 -609
- 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 +80 -82
- package/es/multi-chat-client/index.js +74 -76
- 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 +27 -29
- 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 +33 -33
- package/es/select/index.js +353 -45
- package/es/select/style.css +1 -1
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +2 -2
- package/es/shortcut-setter/index.js +10 -10
- 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 +199 -112
- 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/utils/UniRTCv2.js +2 -2
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +972 -593
- package/lib/cui.umd.js +972 -593
- package/lib/cui.umd.min.js +22 -22
- package/package.json +2 -2
- package/packages/big-table/src/BigTable.vue +1 -1
- package/packages/button/src/ButtonPrint/index.vue +47 -9
- package/packages/fabric-chart/src/const/defaultVaule.js +59 -59
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +56 -50
- package/packages/multi-chat/store/actions.js +6 -6
- package/packages/scale-view/scaleView.vue +2010 -2010
- package/packages/select/src/Select/Select.vue +231 -0
- package/packages/select/src/{Select.jsx → Select/index.js} +2 -1
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +37 -4
- package/src/utils/UniRTCv2.js +2 -2
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a-select ref="selectRef" v-bind="$attrs" v-on="$listeners" class="c-select" @deselect="onDeselect">
|
|
3
|
+
<template v-for="(i, name) in $slots" :slot="name">
|
|
4
|
+
<slot :name="name" />
|
|
5
|
+
</template>
|
|
6
|
+
<template #removeIcon v-if="!$slots.removeIcon">
|
|
7
|
+
<section class="c-select__tagIcons" v-check="{ options: [], editable: createdTagEditable }">
|
|
8
|
+
<a-icon type="edit" @click="edit" />
|
|
9
|
+
<a-icon type="close" />
|
|
10
|
+
</section>
|
|
11
|
+
</template>
|
|
12
|
+
</a-select>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import { Icon, Select } from 'ant-design-vue';
|
|
17
|
+
|
|
18
|
+
function isObject(target) {
|
|
19
|
+
return target !== null && typeof target === 'object';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function isString(target) {
|
|
23
|
+
return typeof target === 'string';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @param {string} target
|
|
28
|
+
* @param {string[]}matchers
|
|
29
|
+
* @returns {boolean}
|
|
30
|
+
*/
|
|
31
|
+
function includesList(target, matchers) {
|
|
32
|
+
return matchers.some(matcher => target.includes(matcher));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @param {HTMLElement} el
|
|
37
|
+
* @returns {null|HTMLElement}
|
|
38
|
+
*/
|
|
39
|
+
function findAncestorTag(el) {
|
|
40
|
+
let result = null;
|
|
41
|
+
let current = el.parentNode;
|
|
42
|
+
while (current) {
|
|
43
|
+
if (current.classList.contains('ant-select-selection__choice')) {
|
|
44
|
+
result = current;
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
current = current.parentNode;
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @param {HTMLElement} el
|
|
54
|
+
* @param {Array<Record<string,any>>} value
|
|
55
|
+
*/
|
|
56
|
+
function checkEditIcon(el, { value: { options, editable } }) {
|
|
57
|
+
if (!editable || !Array.isArray(options)) return;
|
|
58
|
+
|
|
59
|
+
const parentTag = findAncestorTag(el);
|
|
60
|
+
|
|
61
|
+
if (!parentTag) return;
|
|
62
|
+
|
|
63
|
+
if (notEditable()) {
|
|
64
|
+
parentTag.classList.remove('c-select--showEditIcon');
|
|
65
|
+
} else {
|
|
66
|
+
parentTag.classList.add('c-select--showEditIcon');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function notEditable() {
|
|
70
|
+
return false;
|
|
71
|
+
// return options.find(option => option.label === parentTag.innerText) || parentTag.querySelector('[uni-flag]');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default {
|
|
76
|
+
model: { prop: 'value', event: 'change' },
|
|
77
|
+
directives: {
|
|
78
|
+
check: {
|
|
79
|
+
inserted: checkEditIcon,
|
|
80
|
+
update: checkEditIcon
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
props: {
|
|
84
|
+
createdTagEditable: { type: Boolean, default: false }
|
|
85
|
+
},
|
|
86
|
+
data() {
|
|
87
|
+
return {
|
|
88
|
+
isEdit: false
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
components: {
|
|
92
|
+
ASelect: Select,
|
|
93
|
+
AIcon: Icon
|
|
94
|
+
},
|
|
95
|
+
methods: {
|
|
96
|
+
edit() {
|
|
97
|
+
this.isEdit = true;
|
|
98
|
+
},
|
|
99
|
+
/**
|
|
100
|
+
* @param {string} value
|
|
101
|
+
*/
|
|
102
|
+
onDeselect(value) {
|
|
103
|
+
if (!this.createdTagEditable) return;
|
|
104
|
+
try {
|
|
105
|
+
if (
|
|
106
|
+
// this.normalizedOptions().find(option => option.value === value)
|
|
107
|
+
!this.isEdit ||
|
|
108
|
+
!this.$el
|
|
109
|
+
)
|
|
110
|
+
return;
|
|
111
|
+
|
|
112
|
+
const inputELe = this.$el.querySelector('.ant-select-search__field');
|
|
113
|
+
if (!inputELe) return;
|
|
114
|
+
|
|
115
|
+
inputELe.value = value;
|
|
116
|
+
inputELe.dispatchEvent(new CustomEvent('input'));
|
|
117
|
+
inputELe.focus();
|
|
118
|
+
} finally {
|
|
119
|
+
this.isEdit = false;
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
/**
|
|
123
|
+
* @returns {Array<Record<string,string>>}
|
|
124
|
+
*/
|
|
125
|
+
normalizedOptions() {
|
|
126
|
+
if (!this.createdTagEditable) return [];
|
|
127
|
+
|
|
128
|
+
if (Array.isArray(this.$attrs.options)) {
|
|
129
|
+
return this.$attrs.options;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (!Array.isArray(this.$slots.default)) return [];
|
|
133
|
+
|
|
134
|
+
function traverse(optionVNodes, result = []) {
|
|
135
|
+
optionVNodes.forEach(node => {
|
|
136
|
+
if (!isObject(node) || !isString(node.tag)) return;
|
|
137
|
+
|
|
138
|
+
if (includesList(node.tag, ['select-option', 'SelectOption'])) {
|
|
139
|
+
return result.push(getOptionInfo(node));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (includesList(node.tag, ['select-opt-group', 'SelectOptGroup'])) {
|
|
143
|
+
traverse(node.componentOptions?.children ?? [], result);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
return result;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @param {VNode} node
|
|
151
|
+
* @returns {Record<string,string>}
|
|
152
|
+
*/
|
|
153
|
+
function getOptionInfo(node) {
|
|
154
|
+
const value = node.componentOptions?.propsData?.value ?? node.key;
|
|
155
|
+
bindUniFlag(node);
|
|
156
|
+
return { value, label: findNodeLabel(node) };
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const { $createElement } = this;
|
|
160
|
+
|
|
161
|
+
function bindUniFlag(node) {
|
|
162
|
+
if (Array.isArray(node.componentOptions?.children)) {
|
|
163
|
+
node.componentOptions.children = [
|
|
164
|
+
$createElement(
|
|
165
|
+
'div',
|
|
166
|
+
{
|
|
167
|
+
attrs: { 'uni-flag': '' }
|
|
168
|
+
},
|
|
169
|
+
node.componentOptions.children
|
|
170
|
+
)
|
|
171
|
+
];
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const optionLabelProp = this.$attrs.optionLabelProp ?? this.$attrs['option-label-prop'];
|
|
176
|
+
|
|
177
|
+
function findNodeLabel(node) {
|
|
178
|
+
if (isString(optionLabelProp)) {
|
|
179
|
+
if (optionLabelProp === 'label') {
|
|
180
|
+
return node.componentOptions?.propsData.label;
|
|
181
|
+
} else {
|
|
182
|
+
return node.data?.attrs?.[optionLabelProp];
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return '';
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return traverse(this.$slots.default);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
</script>
|
|
193
|
+
|
|
194
|
+
<style lang="less">
|
|
195
|
+
.c-select {
|
|
196
|
+
.ant-select-selection__choice {
|
|
197
|
+
&__remove {
|
|
198
|
+
display: inline-flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
height: 100%;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.anticon-edit {
|
|
205
|
+
display: none;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.c-select--showEditIcon {
|
|
209
|
+
padding-right: 40px;
|
|
210
|
+
|
|
211
|
+
.anticon-edit {
|
|
212
|
+
display: inline;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&__tagIcons {
|
|
217
|
+
height: 100%;
|
|
218
|
+
display: flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
gap: 4px;
|
|
221
|
+
|
|
222
|
+
.anticon {
|
|
223
|
+
color: rgba(0, 0, 0, 0.45) !important;
|
|
224
|
+
|
|
225
|
+
&:hover {
|
|
226
|
+
color: rgba(0, 0, 0, 0.75) !important;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
</style>
|
|
@@ -116,6 +116,16 @@
|
|
|
116
116
|
</a-button>
|
|
117
117
|
</li>
|
|
118
118
|
|
|
119
|
+
<!-- 批量选择 -->
|
|
120
|
+
<li v-if="isCard">
|
|
121
|
+
<a-button v-if="isCardNewBatch" type="primary" @click="() =>changeCardNewBatch(false)" style="margin: 0 8px 8px 0">
|
|
122
|
+
取消批量选择
|
|
123
|
+
</a-button>
|
|
124
|
+
<a-button v-else type="primary" @click="() =>changeCardNewBatch(true)" style="margin: 0 8px 8px 0">
|
|
125
|
+
批量选择
|
|
126
|
+
</a-button>
|
|
127
|
+
</li>
|
|
128
|
+
|
|
119
129
|
<!-- 平铺列表 tree -->
|
|
120
130
|
<template v-if="showRelatedTreeBtn">
|
|
121
131
|
<li v-if="showRelatedSearch" :class="[isRelatedSearchFold ? 'related-search-input' : 'related-search-input-expand']">
|
|
@@ -580,7 +590,9 @@ export default create({
|
|
|
580
590
|
preventReTime: {
|
|
581
591
|
type: Number,
|
|
582
592
|
default: 1000
|
|
583
|
-
}
|
|
593
|
+
},
|
|
594
|
+
isCardNewBatch: {type: Boolean, deafult: false},
|
|
595
|
+
isBatchSelect: {type: [Number, Boolean, String], default: ''}
|
|
584
596
|
},
|
|
585
597
|
components: {
|
|
586
598
|
[Button.name]: Button,
|
|
@@ -786,6 +798,9 @@ export default create({
|
|
|
786
798
|
},
|
|
787
799
|
showBaseTabs() {
|
|
788
800
|
return this.conditionType === 'keyword' && this.tabConditionList?.length && !this.visibleInlineOperateBtn && !this.isRowEditing;
|
|
801
|
+
},
|
|
802
|
+
isCard() {
|
|
803
|
+
return this.TypeOfDisplay === 'cardNew' && this.isBatchSelect == 1
|
|
789
804
|
}
|
|
790
805
|
},
|
|
791
806
|
data() {
|
|
@@ -1292,7 +1307,7 @@ export default create({
|
|
|
1292
1307
|
if (!showButtonTop) return false;
|
|
1293
1308
|
|
|
1294
1309
|
list.forEach(item => {
|
|
1295
|
-
let relationBtnId = JSON.parse(item.setting)
|
|
1310
|
+
let relationBtnId = item.setting && JSON.parse(item.setting)?.relationBtnId;
|
|
1296
1311
|
if (item.type === 'BATCH' && relationBtnId) {
|
|
1297
1312
|
this.relationBtnBatchBtnIds.push(item.id);
|
|
1298
1313
|
this.batchRelationBtnIds.push(relationBtnId);
|
|
@@ -1414,9 +1429,24 @@ export default create({
|
|
|
1414
1429
|
// }
|
|
1415
1430
|
// });
|
|
1416
1431
|
// }
|
|
1417
|
-
if (!this.rowBtnList?.length) return;
|
|
1418
|
-
this.setBatchRelationBtnIds(this.rowBtnList);
|
|
1419
1432
|
let rowBtnList = this.rowBtnList;
|
|
1433
|
+
// 新卡片视图 有进入批量模式的按钮
|
|
1434
|
+
if (this.isCard) {
|
|
1435
|
+
if(this.isCardNewBatch) {
|
|
1436
|
+
rowBtnList = rowBtnList.map(v => {
|
|
1437
|
+
if(v.type == 'BATCH') return v
|
|
1438
|
+
return null
|
|
1439
|
+
}).filter(Boolean);
|
|
1440
|
+
} else {
|
|
1441
|
+
rowBtnList = rowBtnList.map(v => {
|
|
1442
|
+
if(v.type != 'BATCH') return v;
|
|
1443
|
+
return null;
|
|
1444
|
+
}).filter(Boolean);
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
if (!rowBtnList?.length) return;
|
|
1448
|
+
this.setBatchRelationBtnIds(rowBtnList);
|
|
1449
|
+
|
|
1420
1450
|
|
|
1421
1451
|
// 子列表只留下行级按钮
|
|
1422
1452
|
// if (this.isNestTableClick) {
|
|
@@ -1595,6 +1625,9 @@ export default create({
|
|
|
1595
1625
|
handleReset() {
|
|
1596
1626
|
this.$emit('handleReset', { targetType: 'outQuickSearchReset' });
|
|
1597
1627
|
},
|
|
1628
|
+
changeCardNewBatch(val) {
|
|
1629
|
+
this.$emit('changeCardNewBatch', val)
|
|
1630
|
+
},
|
|
1598
1631
|
handleUploadChange(info) {
|
|
1599
1632
|
const { file, fileList } = info;
|
|
1600
1633
|
if (file.status !== 'uploading') {
|
package/src/utils/UniRTCv2.js
CHANGED
|
@@ -248,8 +248,8 @@ function UniRTCObject(appId, tokenProvider, vueSelf) {
|
|
|
248
248
|
|
|
249
249
|
function _connect() {
|
|
250
250
|
// 创建链接
|
|
251
|
-
|
|
252
|
-
_socket = io.connect('https://t.jsehealth.com:9997'); // 测试环境
|
|
251
|
+
_socket = io.connect('https://video.jsehealth.com:9999'); // 生产环境
|
|
252
|
+
// _socket = io.connect('https://t.jsehealth.com:9997'); // 测试环境
|
|
253
253
|
// _socket = io.connect('http://127.0.0.1:9090');
|
|
254
254
|
// _socket = io.connect("https://dli.xikang.com:9999");
|
|
255
255
|
// 注册事件处理函数
|