cnhis-design-vue 2.1.18 → 2.1.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.
- package/CHANGELOG.md +51 -0
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +112 -134
- package/es/big-table/style.css +1 -1
- package/es/button/index.js +35 -38
- package/es/captcha/index.js +3 -3
- package/es/checkbox/index.js +1 -1
- package/es/color-picker/index.js +1 -1
- package/es/drag-layout/index.js +36 -39
- package/es/editor/index.js +11 -31
- package/es/fabric-chart/index.js +491 -393
- package/es/fabric-chart/style.css +1 -1
- package/es/form-table/index.js +62 -85
- package/es/index/index.js +971 -807
- package/es/index/style.css +1 -1
- package/es/input/index.js +1 -1
- package/es/map/index.js +1 -1
- package/es/multi-chat/index.js +210 -196
- package/es/multi-chat/style.css +1 -1
- package/es/multi-chat-client/index.js +203 -189
- package/es/multi-chat-client/style.css +1 -1
- package/es/multi-chat-history/index.js +37 -40
- package/es/multi-chat-record/index.js +37 -40
- package/es/multi-chat-setting/index.js +54 -57
- package/es/multi-chat-sip/index.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/scale-view/index.js +70 -93
- package/es/select/index.js +36 -39
- package/es/select-label/index.js +47 -70
- package/es/select-person/index.js +35 -38
- package/es/table-filter/index.js +191 -186
- package/es/table-filter/style.css +1 -1
- package/es/tag/index.js +34 -37
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +1107 -939
- package/lib/cui.umd.js +1107 -939
- package/lib/cui.umd.min.js +79 -79
- package/package.json +2 -2
- package/packages/big-table/src/BigTable.vue +20 -19
- package/packages/fabric-chart/src/components/TimeScaleValue.vue +1 -5
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +185 -90
- package/packages/fabric-chart/src/mixins/draw.js +70 -62
- package/packages/fabric-chart/src/mixins/eventCommon.js +9 -10
- package/packages/multi-chat/chat/chatFooter.vue +1 -5
- package/packages/multi-chat/chat/chatMain.vue +29 -5
- package/packages/table-filter/src/components/search-condition/SearchCondition.vue +1825 -1824
- package/packages/table-filter/src/const/dataOptions.js +10 -10
- package/packages/table-filter/src/quick-search/QuickSearch.vue +26 -0
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isNumber,
|
|
3
|
-
isObject
|
|
4
|
-
} from './type';
|
|
1
|
+
import { isNumber, isObject } from './type';
|
|
5
2
|
|
|
6
3
|
export default {
|
|
7
4
|
name: 'draw',
|
|
@@ -33,7 +30,7 @@ export default {
|
|
|
33
30
|
defaultGroupStyle: {
|
|
34
31
|
evented: false,
|
|
35
32
|
selectable: false
|
|
36
|
-
}
|
|
33
|
+
}
|
|
37
34
|
};
|
|
38
35
|
},
|
|
39
36
|
components: {},
|
|
@@ -43,9 +40,11 @@ export default {
|
|
|
43
40
|
if (!Array.isArray(points)) return null; // 坐标点非数组
|
|
44
41
|
if (points.length < 4) return null; // 坐标点位数不足 无法完成线的绘制
|
|
45
42
|
if (points.filter(point => isNumber(point)).length < 4) return null; // 坐标点内可用数值不足 无法完成线的绘制
|
|
46
|
-
const lineStyle = this.isObject(style)
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
const lineStyle = this.isObject(style)
|
|
44
|
+
? {
|
|
45
|
+
...style
|
|
46
|
+
}
|
|
47
|
+
: {};
|
|
49
48
|
return new this.fabric.Line(points, {
|
|
50
49
|
...this.defaultLineStyle,
|
|
51
50
|
...lineStyle
|
|
@@ -57,18 +56,24 @@ export default {
|
|
|
57
56
|
// },
|
|
58
57
|
// 绘制文本区
|
|
59
58
|
drawTextGroup(rectStyle, fontStyle, groupStyle) {
|
|
60
|
-
const rect_style = this.isObject(rectStyle)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
59
|
+
const rect_style = this.isObject(rectStyle)
|
|
60
|
+
? {
|
|
61
|
+
...rectStyle
|
|
62
|
+
}
|
|
63
|
+
: {};
|
|
64
|
+
const font_style = this.isObject(fontStyle)
|
|
65
|
+
? {
|
|
66
|
+
...fontStyle
|
|
67
|
+
}
|
|
68
|
+
: {};
|
|
69
|
+
const group_style = this.isObject(groupStyle)
|
|
70
|
+
? {
|
|
71
|
+
...groupStyle
|
|
72
|
+
}
|
|
73
|
+
: {
|
|
74
|
+
left: 0,
|
|
75
|
+
top: 0
|
|
76
|
+
};
|
|
72
77
|
if (!this.isNumber(rect_style.width) || !this.isNumber(rect_style.height)) return null; // rect容器宽高必须全部是可用数字类型 否则无法画出正确的容器
|
|
73
78
|
|
|
74
79
|
!this.isNumber(group_style.left) && (group_style.left = 0);
|
|
@@ -121,8 +126,8 @@ export default {
|
|
|
121
126
|
img.setAttribute('src', src);
|
|
122
127
|
img.onload = () => {
|
|
123
128
|
resolve(img);
|
|
124
|
-
}
|
|
125
|
-
})
|
|
129
|
+
};
|
|
130
|
+
});
|
|
126
131
|
},
|
|
127
132
|
// 画出+
|
|
128
133
|
createAdd(data) {
|
|
@@ -138,8 +143,8 @@ export default {
|
|
|
138
143
|
});
|
|
139
144
|
return new this.fabric.Group([line1, line2], {
|
|
140
145
|
scale: 1,
|
|
141
|
-
...data
|
|
142
|
-
})
|
|
146
|
+
...data
|
|
147
|
+
});
|
|
143
148
|
},
|
|
144
149
|
// 画出圆边框
|
|
145
150
|
createCircleBorder(data) {
|
|
@@ -149,37 +154,43 @@ export default {
|
|
|
149
154
|
radius: data.width / 2,
|
|
150
155
|
scale: 1,
|
|
151
156
|
fill: '#fff',
|
|
152
|
-
...data
|
|
157
|
+
...data
|
|
153
158
|
});
|
|
154
159
|
},
|
|
155
160
|
// 画出v
|
|
156
161
|
createArrow(data) {
|
|
157
162
|
const width = data.width || 10;
|
|
158
163
|
const height = data.height || 10;
|
|
159
|
-
return new this.fabric.Polyline(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
return new this.fabric.Polyline(
|
|
165
|
+
[
|
|
166
|
+
{ x: 0, y: 0 },
|
|
167
|
+
{ x: width / 2, y: height },
|
|
168
|
+
{ x: width, y: 0 }
|
|
169
|
+
],
|
|
170
|
+
{
|
|
171
|
+
scale: 1,
|
|
172
|
+
...data
|
|
173
|
+
}
|
|
174
|
+
);
|
|
167
175
|
},
|
|
168
176
|
// 机械通气
|
|
169
177
|
createJXTQ(data) {
|
|
170
178
|
const width = data.width || 25;
|
|
171
179
|
const height = data.height || 10;
|
|
172
|
-
return new this.fabric.Polyline(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
return new this.fabric.Polyline(
|
|
181
|
+
[
|
|
182
|
+
{ x: 0, y: height },
|
|
183
|
+
{ x: width / 5, y: 0 },
|
|
184
|
+
{ x: (width / 5) * 2, y: height },
|
|
185
|
+
{ x: (width / 5) * 3, y: 0 },
|
|
186
|
+
{ x: (width / 5) * 4, y: height },
|
|
187
|
+
{ x: (width / 5) * 5, y: 0 }
|
|
188
|
+
],
|
|
189
|
+
{
|
|
190
|
+
scale: 1,
|
|
191
|
+
...data
|
|
192
|
+
}
|
|
193
|
+
);
|
|
183
194
|
},
|
|
184
195
|
ceateLineArrow(data) {
|
|
185
196
|
const line = new this.fabric.Line([data.left, data.top, data.left + data.width, data.top], {
|
|
@@ -199,10 +210,11 @@ export default {
|
|
|
199
210
|
});
|
|
200
211
|
return new this.fabric.Group([line, arrow], {
|
|
201
212
|
scale: 1,
|
|
202
|
-
...data
|
|
213
|
+
...data
|
|
203
214
|
});
|
|
204
215
|
},
|
|
205
216
|
async createPoint(type, data) {
|
|
217
|
+
data.hoverCursor = 'pointer';
|
|
206
218
|
let obj1, obj2;
|
|
207
219
|
switch (type) {
|
|
208
220
|
case 'triangle':
|
|
@@ -228,21 +240,18 @@ export default {
|
|
|
228
240
|
const common = {
|
|
229
241
|
originX: 'center',
|
|
230
242
|
originY: 'center',
|
|
231
|
-
...data
|
|
243
|
+
...data
|
|
232
244
|
};
|
|
233
245
|
if (data.url) {
|
|
234
|
-
this.fabric.Image.fromURL(data.url, function
|
|
235
|
-
const {
|
|
236
|
-
width,
|
|
237
|
-
height
|
|
238
|
-
} = img;
|
|
246
|
+
this.fabric.Image.fromURL(data.url, function(img) {
|
|
247
|
+
const { width, height } = img;
|
|
239
248
|
img.set({
|
|
240
249
|
...common,
|
|
241
250
|
scaleX: (data.width || width) / width,
|
|
242
251
|
scaleY: (data.height || height) / height,
|
|
243
252
|
width: width || data.width,
|
|
244
253
|
height: height || data.height,
|
|
245
|
-
scale: (data.width || width) / width
|
|
254
|
+
scale: (data.width || width) / width
|
|
246
255
|
});
|
|
247
256
|
resolve(img);
|
|
248
257
|
});
|
|
@@ -266,7 +275,7 @@ export default {
|
|
|
266
275
|
scale: 1,
|
|
267
276
|
...data,
|
|
268
277
|
angle: 0
|
|
269
|
-
})
|
|
278
|
+
});
|
|
270
279
|
case 'shks':
|
|
271
280
|
obj1 = new this.fabric.Circle({
|
|
272
281
|
objectCaching: false,
|
|
@@ -280,15 +289,15 @@ export default {
|
|
|
280
289
|
obj2 = this.createCircleBorder(data);
|
|
281
290
|
return new this.fabric.Group([obj2, obj1], {
|
|
282
291
|
scale: 1,
|
|
283
|
-
...data
|
|
284
|
-
})
|
|
292
|
+
...data
|
|
293
|
+
});
|
|
285
294
|
case 'cg':
|
|
286
295
|
obj1 = this.ceateLineArrow(data);
|
|
287
296
|
obj2 = this.createCircleBorder(data);
|
|
288
297
|
return new this.fabric.Group([obj2, obj1], {
|
|
289
298
|
scale: 1,
|
|
290
|
-
...data
|
|
291
|
-
})
|
|
299
|
+
...data
|
|
300
|
+
});
|
|
292
301
|
case 'jxtq':
|
|
293
302
|
return this.createJXTQ(data);
|
|
294
303
|
default:
|
|
@@ -299,10 +308,9 @@ export default {
|
|
|
299
308
|
scale: 1,
|
|
300
309
|
fontSize: 14,
|
|
301
310
|
fill: '#000',
|
|
302
|
-
...data
|
|
303
|
-
})
|
|
304
|
-
|
|
311
|
+
...data
|
|
312
|
+
});
|
|
305
313
|
}
|
|
306
|
-
}
|
|
314
|
+
}
|
|
307
315
|
}
|
|
308
|
-
};
|
|
316
|
+
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
1
|
export default {
|
|
3
2
|
name: 'eventCommon',
|
|
4
3
|
data() {
|
|
5
|
-
return {
|
|
6
|
-
};
|
|
4
|
+
return {};
|
|
7
5
|
},
|
|
8
6
|
mounted() {
|
|
9
7
|
if (this.eventStyle.evented) {
|
|
@@ -13,16 +11,17 @@ export default {
|
|
|
13
11
|
},
|
|
14
12
|
methods: {
|
|
15
13
|
// 折线点移动限制 目前仅限制不能移动出画布
|
|
16
|
-
pointMoveLimit(point) {
|
|
14
|
+
pointMoveLimit(point, isLimit = true) {
|
|
17
15
|
point.setCoords(); // 需调用setCoords()才能重新计算控制位置(改变Object状态)
|
|
18
16
|
// const objBoundingBox = point.getBoundingRect(); // 此方式会导致结果不精准,应该用point的top值判断
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
const { originX, endX, originY, endY } = this.propItems;
|
|
18
|
+
const leftLimit = point.prevPoint?.get('left') || originX;
|
|
19
|
+
const rightLimit = (isLimit && point.nextPoint?.get('left')) || endX;
|
|
20
|
+
if (point.top < originY) {
|
|
21
|
+
point.set('top', originY);
|
|
23
22
|
}
|
|
24
|
-
if (point.top >
|
|
25
|
-
point.set('top',
|
|
23
|
+
if (point.top > endY) {
|
|
24
|
+
point.set('top', endY);
|
|
26
25
|
}
|
|
27
26
|
if (point.left < leftLimit) {
|
|
28
27
|
point.set('left', leftLimit);
|
|
@@ -121,11 +121,7 @@
|
|
|
121
121
|
destroyOnClose
|
|
122
122
|
:okText="i18nText('1.2.1.11.6')"
|
|
123
123
|
:footer="null"
|
|
124
|
-
@cancel="
|
|
125
|
-
() => {
|
|
126
|
-
this.modalShow = false;
|
|
127
|
-
}
|
|
128
|
-
"
|
|
124
|
+
@cancel="handleClose"
|
|
129
125
|
@ok="handleOk"
|
|
130
126
|
>
|
|
131
127
|
<iframe id="toolbarIframe" v-if="modalData.targetType === 'LINK_ADDRESS'" width="100%" height="100%" frameborder="0" :src="modalData.address" allow="camera;midi"></iframe>
|
|
@@ -199,11 +199,7 @@
|
|
|
199
199
|
destroyOnClose
|
|
200
200
|
:okText="i18nText('1.2.1.11.6')"
|
|
201
201
|
:footer="null"
|
|
202
|
-
@cancel="
|
|
203
|
-
() => {
|
|
204
|
-
this.modalShow = false;
|
|
205
|
-
}
|
|
206
|
-
"
|
|
202
|
+
@cancel="handleClose"
|
|
207
203
|
>
|
|
208
204
|
<iframe id="chat-footer-modal" v-if="modalData.targetType === 'LINK_ADDRESS'" width="100%" height="100%" frameborder="0" :src="modalData.address" allow="camera;midi"></iframe>
|
|
209
205
|
</a-modal>
|
|
@@ -648,10 +644,38 @@ export default {
|
|
|
648
644
|
this.modalData = Object.assign({}, data, {
|
|
649
645
|
address
|
|
650
646
|
});
|
|
647
|
+
this.$nextTick().then(() => {
|
|
648
|
+
window.addEventListener('message', this.iframeEvent);
|
|
649
|
+
});
|
|
651
650
|
return;
|
|
652
651
|
}
|
|
653
652
|
}
|
|
654
653
|
},
|
|
654
|
+
iframeEvent(event) {
|
|
655
|
+
const method = event?.data?.method;
|
|
656
|
+
this[method]?.(event);
|
|
657
|
+
},
|
|
658
|
+
// 发送
|
|
659
|
+
handleParentMessageSend({ data, source, origin }) {
|
|
660
|
+
let params = {
|
|
661
|
+
assemblyId: this.assemblyId,
|
|
662
|
+
sessionId: this.sessionId,
|
|
663
|
+
orgId: this.orgId
|
|
664
|
+
};
|
|
665
|
+
params = Object.assign(params, data.data);
|
|
666
|
+
return fetch.post('/chat/access/sendToolBarData', qs.stringify(params)).then(({ data }) => {
|
|
667
|
+
if (data.result === 'SUCCESS') {
|
|
668
|
+
source.postMessage({ status: 0, resultMsg: data.resultMsg }, origin);
|
|
669
|
+
} else {
|
|
670
|
+
source.postMessage({ status: 1, resultMsg: data.resultMsg }, origin);
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
},
|
|
674
|
+
// 关闭
|
|
675
|
+
handleClose() {
|
|
676
|
+
this.modalShow = false;
|
|
677
|
+
window.removeEventListener('message', this.iframeEvent);
|
|
678
|
+
},
|
|
655
679
|
handleTemplateDetail(item) {
|
|
656
680
|
let content = this.getContent(item) || {};
|
|
657
681
|
let setting = content.customerSetting || {};
|