cnhis-design-vue 2.1.144 → 2.1.145
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 +29 -15
- 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 +71 -71
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +33 -33
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/card-reader-sdk/index.js +1 -1
- 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/direct/index.js +16 -16
- 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/ellipsis/index.js +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +129 -70
- package/es/fabric-chart/style.css +1 -1
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +74 -74
- package/es/full-calendar/index.js +4 -4
- package/es/index/index.js +700 -592
- 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 +125 -109
- package/es/multi-chat/style.css +1 -1
- package/es/multi-chat-client/index.js +121 -105
- 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 +66 -49
- package/es/multi-chat-setting/style.css +1 -1
- 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-container/index.js +9 -9
- package/es/scale-view/index.js +27 -27
- package/es/select/index.js +12 -12
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +2 -2
- package/es/select-tag/index.js +4 -4
- package/es/shortcut-setter/index.js +10 -10
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/slider-tree/index.js +9 -9
- 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 +75 -75
- 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 +708 -600
- package/lib/cui.umd.js +708 -600
- package/lib/cui.umd.min.js +26 -26
- package/package.json +1 -1
- package/packages/fabric-chart/src/FabricChart.vue +10 -1
- package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +0 -1
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +26 -5
- package/packages/fabric-chart/src/utils/index.js +8 -0
- package/packages/multi-chat/chat/client/clientChat.vue +14 -2
- package/packages/multi-chat/chat/index.vue +14 -2
- package/packages/multi-chat/setting/index.vue +13 -1
package/package.json
CHANGED
|
@@ -31,7 +31,6 @@ import FabricGrid from './FabricGrid';
|
|
|
31
31
|
import FabricTextGroup from './fabric-chart/FabricTextGroup';
|
|
32
32
|
import FabricScaleValue from './fabric-chart/FabricScaleValue';
|
|
33
33
|
import FabricLines from './fabric-chart/FabricLines';
|
|
34
|
-
import { isObject } from './utils';
|
|
35
34
|
|
|
36
35
|
export default create({
|
|
37
36
|
name: 'fabric-chart',
|
|
@@ -50,6 +49,12 @@ export default create({
|
|
|
50
49
|
FabricLines
|
|
51
50
|
},
|
|
52
51
|
computed: {
|
|
52
|
+
fabric() {
|
|
53
|
+
return this.$refs.canvasEle?.fabric;
|
|
54
|
+
},
|
|
55
|
+
canvas() {
|
|
56
|
+
return this.$refs.canvasEle?.canvas;
|
|
57
|
+
},
|
|
53
58
|
polylines() {
|
|
54
59
|
const list = [];
|
|
55
60
|
if (this.templateData?.right?.rightYScalevalue?.dataList?.length) {
|
|
@@ -84,6 +89,10 @@ export default create({
|
|
|
84
89
|
this.canvasWidth = `${this.templateData.canvasWidth}px` || '1000px';
|
|
85
90
|
},
|
|
86
91
|
methods: {
|
|
92
|
+
computedX() {
|
|
93
|
+
if (!this.$refs.polylines?.computedX) return;
|
|
94
|
+
return this.$refs.polylines?.computedX(...arguments);
|
|
95
|
+
},
|
|
87
96
|
setTimeRange(enabled) {
|
|
88
97
|
this.$refs.polylines.timeRangeData.enabled = enabled;
|
|
89
98
|
},
|
|
@@ -14,7 +14,8 @@ import MouseRightClick from '../components/MouseRightClick';
|
|
|
14
14
|
import DropPopup from '../components/DropPopup';
|
|
15
15
|
import defaultVaule from '../const/defaultVaule';
|
|
16
16
|
import Bus from '../utils/bus';
|
|
17
|
-
import { nearlyEqual } from '../utils';
|
|
17
|
+
import { nearlyEqual, getUuid } from '../utils';
|
|
18
|
+
import vexutils from '@/utils/vexutils';
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* @description: 递归遍历节点,设置颜色属性
|
|
@@ -1100,7 +1101,7 @@ export default {
|
|
|
1100
1101
|
// 如果往回拖动则删除经过的已存在的节点
|
|
1101
1102
|
if (startLength > 0) {
|
|
1102
1103
|
if (isRight) {
|
|
1103
|
-
this.removeLeftClonePoint(originLeft);
|
|
1104
|
+
this.removeLeftClonePoint(originLeft - this.spaceWidth);
|
|
1104
1105
|
this.addPointList = this.addPointList.filter(v => v.left >= originLeft);
|
|
1105
1106
|
if (this.addPointList.length > 0 && currentLeft <= this.addPointList[this.addPointList.length - 1].left) {
|
|
1106
1107
|
this.removePolyline('increasePointBatch', left);
|
|
@@ -1117,7 +1118,7 @@ export default {
|
|
|
1117
1118
|
}
|
|
1118
1119
|
}
|
|
1119
1120
|
} else {
|
|
1120
|
-
this.removePolyline('increasePointBatch', originLeft);
|
|
1121
|
+
this.removePolyline('increasePointBatch', originLeft + this.spaceWidth);
|
|
1121
1122
|
this.addPointList = this.addPointList.filter(v => v.left <= originLeft);
|
|
1122
1123
|
if (this.addPointList.length > 0 && currentLeft >= this.addPointList[this.addPointList.length - 1].left) {
|
|
1123
1124
|
this.removeLeftClonePoint(left);
|
|
@@ -1292,15 +1293,35 @@ export default {
|
|
|
1292
1293
|
this.rightClickNode.push(item);
|
|
1293
1294
|
}
|
|
1294
1295
|
});
|
|
1296
|
+
this.addExtraMenu();
|
|
1295
1297
|
this.isRightVisible = true;
|
|
1296
1298
|
}
|
|
1297
1299
|
});
|
|
1298
1300
|
},
|
|
1301
|
+
addExtraMenu() {
|
|
1302
|
+
const { menuList } = this.propItems.table?.extraMenuConfig || {};
|
|
1303
|
+
if (Array.isArray(menuList) && menuList.length > 0) {
|
|
1304
|
+
menuList.forEach(item => {
|
|
1305
|
+
this.rightClickNode.push({
|
|
1306
|
+
name: item.label,
|
|
1307
|
+
type: item.key || getUuid(),
|
|
1308
|
+
extra: true,
|
|
1309
|
+
origin: item
|
|
1310
|
+
});
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1313
|
+
},
|
|
1299
1314
|
// 关闭右键菜单,打开添加节点弹窗表单
|
|
1300
|
-
handleRightClick({ type, name }) {
|
|
1315
|
+
handleRightClick({ type, name, extra, origin }) {
|
|
1301
1316
|
this.isRightVisible = false;
|
|
1302
1317
|
const { left, top } = this._active;
|
|
1303
|
-
|
|
1318
|
+
const data = this._currentPoint?.id ? this.getDataByPoint(this._currentPoint) : this.getValue({ left, top });
|
|
1319
|
+
if (extra) {
|
|
1320
|
+
const { click } = this.propItems.table?.extraMenuConfig || {};
|
|
1321
|
+
if (!vexutils.isFunction(click)) return;
|
|
1322
|
+
click(data, origin);
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1304
1325
|
if (type == 'add') {
|
|
1305
1326
|
if (name.includes('左')) {
|
|
1306
1327
|
data.range = {
|
|
@@ -87,3 +87,11 @@ export function sortByTime(list = []) {
|
|
|
87
87
|
|
|
88
88
|
return list;
|
|
89
89
|
}
|
|
90
|
+
|
|
91
|
+
export function getUuid() {
|
|
92
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
|
93
|
+
const r = (Math.random() * 16) | 0,
|
|
94
|
+
v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
95
|
+
return v.toString(16);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
@@ -59,6 +59,9 @@ export default {
|
|
|
59
59
|
isCustomServe: {
|
|
60
60
|
type: Boolean,
|
|
61
61
|
default: false
|
|
62
|
+
},
|
|
63
|
+
decrypt: {
|
|
64
|
+
type: Function
|
|
62
65
|
}
|
|
63
66
|
},
|
|
64
67
|
computed: {
|
|
@@ -201,12 +204,21 @@ export default {
|
|
|
201
204
|
}
|
|
202
205
|
}).then(({ data }) => {
|
|
203
206
|
if (data.result === 'SUCCESS') {
|
|
204
|
-
|
|
207
|
+
let useObj = data?.obj || {}
|
|
208
|
+
const {isEncrypt, obj} = useObj;
|
|
209
|
+
if(isEncrypt && obj && this.decrypt && typeof this.decrypt === 'function') {
|
|
210
|
+
try {
|
|
211
|
+
useObj = JSON.parse(this.decrypt(obj)) || {};
|
|
212
|
+
} catch(err) {
|
|
213
|
+
console.log(err)
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
const { sdkAppId, host, vendor, wsUrl, turnUrl, turnUsername, turnCredential } = useObj;
|
|
205
217
|
this.setSdkInfo({ sdkAppId, host, vendor, wsUrl, turnUrl, turnUsername, turnCredential });
|
|
206
218
|
// 江苏省
|
|
207
219
|
if (vendor == 3) {
|
|
208
220
|
this.initUniRTC({
|
|
209
|
-
...
|
|
221
|
+
...useObj,
|
|
210
222
|
params: {
|
|
211
223
|
assemblyId: this.assemblyId
|
|
212
224
|
}
|
|
@@ -421,6 +421,9 @@ export default {
|
|
|
421
421
|
rightPanelHide: {
|
|
422
422
|
type: Boolean,
|
|
423
423
|
default: false
|
|
424
|
+
},
|
|
425
|
+
decrypt: {
|
|
426
|
+
type: Function
|
|
424
427
|
}
|
|
425
428
|
},
|
|
426
429
|
async created() {
|
|
@@ -1343,12 +1346,21 @@ export default {
|
|
|
1343
1346
|
})
|
|
1344
1347
|
.then(({ data }) => {
|
|
1345
1348
|
if (data.result === 'SUCCESS') {
|
|
1346
|
-
|
|
1349
|
+
let useObj = data?.obj || {}
|
|
1350
|
+
const {isEncrypt, obj} = useObj;
|
|
1351
|
+
if(isEncrypt && obj && this.decrypt && typeof this.decrypt === 'function') {
|
|
1352
|
+
try {
|
|
1353
|
+
useObj = JSON.parse(this.decrypt(obj)) || {};
|
|
1354
|
+
} catch(err) {
|
|
1355
|
+
console.log(err)
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
const { sdkAppId, host, vendor, wsUrl, turnUrl, turnUsername, turnCredential } = useObj;
|
|
1347
1359
|
this.setSdkInfo({ sdkAppId, host, vendor, wsUrl, turnUrl, turnUsername, turnCredential });
|
|
1348
1360
|
// 江苏省
|
|
1349
1361
|
if (vendor == 3) {
|
|
1350
1362
|
this.initUniRTC({
|
|
1351
|
-
...
|
|
1363
|
+
...useObj,
|
|
1352
1364
|
vueSelf: this,
|
|
1353
1365
|
params: {
|
|
1354
1366
|
assemblyId: this.assemblyId
|
|
@@ -61,6 +61,9 @@ export default {
|
|
|
61
61
|
isOtherEntry: {
|
|
62
62
|
type: Boolean,
|
|
63
63
|
default: false
|
|
64
|
+
},
|
|
65
|
+
decrypt: {
|
|
66
|
+
type: Function
|
|
64
67
|
}
|
|
65
68
|
},
|
|
66
69
|
data() {
|
|
@@ -187,7 +190,16 @@ export default {
|
|
|
187
190
|
})
|
|
188
191
|
.then(({ data }) => {
|
|
189
192
|
if (data.result === "SUCCESS") {
|
|
190
|
-
|
|
193
|
+
let useObj = data?.obj || {}
|
|
194
|
+
const {isEncrypt, obj} = useObj;
|
|
195
|
+
if(isEncrypt && obj && this.decrypt && typeof this.decrypt === 'function') {
|
|
196
|
+
try {
|
|
197
|
+
useObj = JSON.parse(this.decrypt(obj)) || {};
|
|
198
|
+
} catch(err) {
|
|
199
|
+
console.log(err)
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
const { vendor } = useObj;
|
|
191
203
|
this.skdVender = vendor;
|
|
192
204
|
}
|
|
193
205
|
});
|