cnhis-design-vue 2.0.8 → 2.0.11
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 +32 -3
- 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 +10 -10
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +92 -91
- package/es/big-table/style.css +1 -1
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +28 -28
- 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 +3 -3
- 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 +47 -17
- 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 +630 -526
- 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 +102 -100
- package/es/multi-chat/style.css +1 -1
- package/es/multi-chat-client/index.js +69 -69
- 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 +22 -22
- 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 +67 -67
- 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 +118 -47
- package/es/select-person/style.css +1 -1
- 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 +53 -53
- 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/index.js +24 -2
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +5181 -9508
- package/lib/cui.umd.js +5181 -9508
- package/lib/cui.umd.min.js +91 -91
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +4 -3
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +2 -2
- package/packages/fabric-chart/src/mixins/draw.js +18 -0
- package/packages/multi-chat/chat/index.vue +2 -0
- package/packages/scale-view/scaleView.vue +22 -22
- package/packages/select-person/select-person.vue +55 -14
- package/src/utils/index.js +15 -0
package/package.json
CHANGED
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
<span> 已勾选数据共{{ allSelectedLength }}条 </span>
|
|
23
23
|
<span v-show="visibleCheckAllWrapMore"> (当前页{{ currentPageSelectedLength }}条) </span>
|
|
24
24
|
</p>
|
|
25
|
-
<template v-if="visibleCheckAllWrapMore
|
|
25
|
+
<template v-if="visibleCheckAllWrapMore">
|
|
26
26
|
,
|
|
27
27
|
<p v-if="!visibleCancelCheckAllBtn" class="check-wrap-btn" @click="handleCheckAll">
|
|
28
|
-
|
|
28
|
+
<!-- asyncCount 性能模式也可以“勾选全部” -->
|
|
29
|
+
<span v-if="pageVO.total > MAX_CHECK_SIZE">
|
|
29
30
|
<!-- {{ `最大勾选“${tableName}” ${MAX_CHECK_SIZE}条数据` }} -->
|
|
30
31
|
{{ `勾选全部页 ${MAX_CHECK_SIZE}条数据` }}
|
|
31
32
|
</span>
|
|
@@ -434,7 +435,7 @@ export default create({
|
|
|
434
435
|
this.handleTableImageSize(val, 'LIST_FIELD_SMALL', v + 'px');
|
|
435
436
|
}
|
|
436
437
|
},
|
|
437
|
-
|
|
438
|
+
|
|
438
439
|
// $route(val) {
|
|
439
440
|
// this.resetTableInlineEditStatus();
|
|
440
441
|
// },
|
|
@@ -220,6 +220,7 @@ export default {
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
const eventStyle = { selectable: false, evented: false };
|
|
223
|
+
const types = ['arrow', '+', 'shjs', 'shks', 'cg', 'jxtq'];
|
|
223
224
|
leftTitleList.forEach(async (v, i) => {
|
|
224
225
|
const baseTop = canvasHeight - lableMargin[1];
|
|
225
226
|
const top = baseTop - i * lableLineHeight;
|
|
@@ -235,8 +236,7 @@ export default {
|
|
|
235
236
|
...defaultVaule.style,
|
|
236
237
|
id: pointId
|
|
237
238
|
});
|
|
238
|
-
const isOriginXCenter =
|
|
239
|
-
|
|
239
|
+
const isOriginXCenter = types.includes(v.type);
|
|
240
240
|
const iconLeft = isOriginXCenter ? text.width + text.left + 10 : text.width + text.left + 5;
|
|
241
241
|
const option = {
|
|
242
242
|
left: iconLeft,
|
|
@@ -165,6 +165,22 @@ export default {
|
|
|
165
165
|
...data,
|
|
166
166
|
})
|
|
167
167
|
},
|
|
168
|
+
// 机械通气
|
|
169
|
+
createJXTQ(data) {
|
|
170
|
+
const width = data.width || 25;
|
|
171
|
+
const height = data.height || 10;
|
|
172
|
+
return new this.fabric.Polyline([
|
|
173
|
+
{ x: 0, y: height },
|
|
174
|
+
{ x: width / 5, y: 0 },
|
|
175
|
+
{ x: width / 5 * 2, y: height },
|
|
176
|
+
{ x: width / 5 * 3, y: 0 },
|
|
177
|
+
{ x: width / 5 * 4, y: height },
|
|
178
|
+
{ x: width / 5 * 5, y: 0 }
|
|
179
|
+
], {
|
|
180
|
+
scale: 1,
|
|
181
|
+
...data,
|
|
182
|
+
})
|
|
183
|
+
},
|
|
168
184
|
ceateLineArrow(data) {
|
|
169
185
|
const line = new this.fabric.Line([data.left, data.top, data.left + data.width, data.top], {
|
|
170
186
|
stroke: data.stroke,
|
|
@@ -273,6 +289,8 @@ export default {
|
|
|
273
289
|
scale: 1,
|
|
274
290
|
...data,
|
|
275
291
|
})
|
|
292
|
+
case 'jxtq':
|
|
293
|
+
return this.createJXTQ(data);
|
|
276
294
|
default:
|
|
277
295
|
// 文字(默认:比如 type === x)
|
|
278
296
|
data.stroke && delete data.stroke;
|
|
@@ -1770,6 +1770,7 @@ export default create({
|
|
|
1770
1770
|
if (!Object.keys(tempObj).length) return {};
|
|
1771
1771
|
for (let key in tempObj) {
|
|
1772
1772
|
let itemTemp = this.formArray.find(item => this.formKey(item) == key);
|
|
1773
|
+
let curValue = tempObj[key];
|
|
1773
1774
|
if (key && itemTemp) {
|
|
1774
1775
|
let keyTemp;
|
|
1775
1776
|
if (itemTemp && itemTemp.databaseTitle) keyTemp = itemTemp.databaseTitle;
|
|
@@ -1778,40 +1779,39 @@ export default create({
|
|
|
1778
1779
|
itemTemp &&
|
|
1779
1780
|
itemTemp.setting &&
|
|
1780
1781
|
itemTemp.setting.startToStop != 1 &&
|
|
1781
|
-
|
|
1782
|
+
curValue &&
|
|
1782
1783
|
itemTemp.type == "DATETIME"
|
|
1783
1784
|
) {
|
|
1784
|
-
if (itemTemp.setting && itemTemp.setting.dateType == "time" &&
|
|
1785
|
-
|
|
1786
|
-
if (itemTemp.setting && itemTemp.setting.dateType == "date" &&
|
|
1787
|
-
|
|
1788
|
-
moment(
|
|
1785
|
+
if (itemTemp.setting && itemTemp.setting.dateType == "time" && curValue)
|
|
1786
|
+
curValue = moment().format("YYYY-MM-DD ") + curValue;
|
|
1787
|
+
if (itemTemp.setting && itemTemp.setting.dateType == "date" && curValue)
|
|
1788
|
+
curValue =
|
|
1789
|
+
moment(curValue).format("YYYY-MM-DD ") + moment().format("HH:mm:ss");
|
|
1789
1790
|
}
|
|
1790
|
-
if (key.includes("~-~")) {
|
|
1791
|
-
let newKey = keyTemp ? keyTemp.replace(/~-~/g, ".") : key.replace(/~-~/g, ".");
|
|
1792
|
-
res[newKey] = tempObj[key];
|
|
1793
|
-
} else {
|
|
1794
|
-
res[keyTemp || key] = !tempObj[key] ? null : tempObj[key];
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
1791
|
|
|
1798
1792
|
// 处理choice选项 将key替换为value
|
|
1799
1793
|
let isChoice = ["RADIO_BLOCK", "CHECKBOX_BLOCK"].includes(itemTemp.type);
|
|
1800
1794
|
if (isChoice) {
|
|
1801
1795
|
let { options } = itemTemp;
|
|
1802
|
-
let
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
if (itemTemp.type === "RADIO_BLOCK" && value) {
|
|
1806
|
-
res[useKey] = this.handleChoiceItem(value, options, obj);
|
|
1796
|
+
let obj = this.choiceComObj[key];
|
|
1797
|
+
if (itemTemp.type === "RADIO_BLOCK" && curValue) {
|
|
1798
|
+
curValue = this.handleChoiceItem(curValue, options, obj);
|
|
1807
1799
|
}
|
|
1808
|
-
if (itemTemp.type === "CHECKBOX_BLOCK" &&
|
|
1809
|
-
let resArr = this.handleCheckboxParams(
|
|
1810
|
-
|
|
1800
|
+
if (itemTemp.type === "CHECKBOX_BLOCK" && curValue?.length) {
|
|
1801
|
+
let resArr = this.handleCheckboxParams(curValue, options, obj);
|
|
1802
|
+
curValue = resArr;
|
|
1811
1803
|
}
|
|
1812
1804
|
}
|
|
1805
|
+
|
|
1806
|
+
if (key.includes("~-~")) {
|
|
1807
|
+
let newKey = keyTemp ? keyTemp.replace(/~-~/g, ".") : key.replace(/~-~/g, ".");
|
|
1808
|
+
res[newKey] = curValue;
|
|
1809
|
+
} else {
|
|
1810
|
+
res[keyTemp || key] = !curValue ? null : curValue;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
1813
|
} else {
|
|
1814
|
-
res[key] =
|
|
1814
|
+
res[key] = curValue;
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
1817
|
console.log("res", res);
|
|
@@ -126,7 +126,7 @@ import { Icon, Checkbox, Tree, Tooltip, Input, Spin } from 'ant-design-vue';
|
|
|
126
126
|
import searchTree from './search-tree';
|
|
127
127
|
import create from '@/core/create';
|
|
128
128
|
import vexutils from '@/utils/vexutils';
|
|
129
|
-
import { filterTree, deepTraversalFirst } from '@/utils';
|
|
129
|
+
import { filterTree, deepTraversalFirst, getAllParentId } from '@/utils';
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
132
|
* 查询没有部门的分类时,parent_id_obj 为 undefined a-tree 展示异常。
|
|
@@ -313,15 +313,17 @@ export default create({
|
|
|
313
313
|
return this.checkedKeys.other.includes(item.key);
|
|
314
314
|
});
|
|
315
315
|
let mainItems = this.dataList.main.filter(item => {
|
|
316
|
+
// let f = this.currentKey === 'main';
|
|
317
|
+
// if(!f) return f;
|
|
316
318
|
let { isLeaf, key } = item;
|
|
317
319
|
let parentId = this.getParentId(item);
|
|
318
320
|
let showKeys = [...this.checkedKeys.main, ...otherItems];
|
|
319
321
|
let checked = showKeys.includes(key);
|
|
320
322
|
// 父级全选,子级不展示
|
|
321
323
|
/** String(parentId) 类型不相等 */
|
|
322
|
-
if (isLeaf && parentId && this.checkedKeys.
|
|
323
|
-
|
|
324
|
-
}
|
|
324
|
+
// if (isLeaf && parentId && this.checkedKeys.temp.some(v => v == parentId)) {
|
|
325
|
+
// checked = false;
|
|
326
|
+
// }
|
|
325
327
|
item.itemType = 'person';
|
|
326
328
|
return checked && item.type == 2;
|
|
327
329
|
});
|
|
@@ -373,6 +375,10 @@ export default create({
|
|
|
373
375
|
return this.onLoadData;
|
|
374
376
|
}
|
|
375
377
|
return null;
|
|
378
|
+
},
|
|
379
|
+
|
|
380
|
+
currentKey() {
|
|
381
|
+
return { person: 'main', dept: 'dept', role: 'role', multiple: 'main' }[this.selectType];
|
|
376
382
|
}
|
|
377
383
|
},
|
|
378
384
|
watch: {
|
|
@@ -595,6 +601,10 @@ export default create({
|
|
|
595
601
|
}
|
|
596
602
|
}
|
|
597
603
|
});
|
|
604
|
+
if (this.currentKey === 'main') {
|
|
605
|
+
this.checkedKeys.temp = this.checkedKeys.main;
|
|
606
|
+
this.treeData.temp = this.treeData.main;
|
|
607
|
+
}
|
|
598
608
|
this.spinning = false;
|
|
599
609
|
} catch (error) {
|
|
600
610
|
this.spinning = false;
|
|
@@ -1049,10 +1059,10 @@ export default create({
|
|
|
1049
1059
|
.map(i => {
|
|
1050
1060
|
return i.key;
|
|
1051
1061
|
});
|
|
1052
|
-
|
|
1053
|
-
this.checkedKeys.main = this.checkedKeys.main.filter(i => {
|
|
1062
|
+
const checkedKeys = this.checkedKeys.main.filter(i => {
|
|
1054
1063
|
return !needRemoveChildKeys.includes(i);
|
|
1055
1064
|
});
|
|
1065
|
+
this.checkedKeys.main = checkedKeys;
|
|
1056
1066
|
},
|
|
1057
1067
|
|
|
1058
1068
|
removedCheckedkeysMain(tag) {
|
|
@@ -1086,7 +1096,6 @@ export default create({
|
|
|
1086
1096
|
let checkedKeys = this.checkedKeys.dept;
|
|
1087
1097
|
let parentId = this.getParentId(tag);
|
|
1088
1098
|
for (let i = 0; i < checkedKeys.length; i++) {
|
|
1089
|
-
console.log(tag, checkedKeys[i], parentId, 'forfor');
|
|
1090
1099
|
if (tag.key == checkedKeys[i] && tag.key == parentId) {
|
|
1091
1100
|
this.removeCheckedkeysIncludeChildrenDept(tag.key);
|
|
1092
1101
|
return false;
|
|
@@ -1254,7 +1263,7 @@ export default create({
|
|
|
1254
1263
|
if (!this.title) {
|
|
1255
1264
|
// 如果为空恢复默认数据
|
|
1256
1265
|
const key = ['main', 'dept', 'role'][this.typeActiveIndex];
|
|
1257
|
-
this.treeData
|
|
1266
|
+
this.$set(this.treeData, 'temp', this.treeData[key]);
|
|
1258
1267
|
return;
|
|
1259
1268
|
}
|
|
1260
1269
|
let copyData = JSON.parse(JSON.stringify(this.treeData.temp));
|
|
@@ -1271,7 +1280,7 @@ export default create({
|
|
|
1271
1280
|
item.children = item.children.filter(child => child.visible);
|
|
1272
1281
|
}
|
|
1273
1282
|
});
|
|
1274
|
-
this.treeData
|
|
1283
|
+
this.$set(this.treeData, 'temp', copyData);
|
|
1275
1284
|
this.expandedKeys = expandedKeys;
|
|
1276
1285
|
},
|
|
1277
1286
|
getStaticSearchParentKey(treeData, expandedKeys, orgId) {
|
|
@@ -1313,7 +1322,6 @@ export default create({
|
|
|
1313
1322
|
// 断掉了父子关系 要不然当存在一二级科室的时候 搜索二级科室 再选中会把一级也选中 ; 后续与产品沟通 不需要断 只取最后一级科室
|
|
1314
1323
|
const propStr = ['main', 'dept', 'role'][this.typeActiveIndex];
|
|
1315
1324
|
let totalCheckedKeys = [];
|
|
1316
|
-
const childKeys = [];
|
|
1317
1325
|
// const keyData = this.dataList[propStr].find(item => item.key === node.eventKey);
|
|
1318
1326
|
// let keyData = {};
|
|
1319
1327
|
// vexutils.searchTree(this.treeData[propStr], item => {
|
|
@@ -1331,10 +1339,43 @@ export default create({
|
|
|
1331
1339
|
// // totalCheckedKeys = checkedKeys;
|
|
1332
1340
|
// totalCheckedKeys = this.isSingleCheck ? [] : checkedKeys.filter(key => !childKeys.includes(key));
|
|
1333
1341
|
// }
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1342
|
+
// 如果是选中就把之前选中和现在选中的合并做为temp值(兼容搜索的情况),
|
|
1343
|
+
if (checked) {
|
|
1344
|
+
const preChecked = this.checkedKeys[propStr];
|
|
1345
|
+
// 搜索时选中上级也要把它所有下级给选中 如果是选中一个下级但是也把其上级选中了要把上级选中给去掉
|
|
1346
|
+
const childKeys = [];
|
|
1347
|
+
let keyData = {};
|
|
1348
|
+
vexutils.searchTree(this.treeData[propStr], item => {
|
|
1349
|
+
if (item.key === node.eventKey) {
|
|
1350
|
+
keyData = item;
|
|
1351
|
+
}
|
|
1352
|
+
});
|
|
1353
|
+
vexutils.searchTree(keyData.children, item => {
|
|
1354
|
+
childKeys.push(item.key);
|
|
1355
|
+
});
|
|
1356
|
+
const allParentIds = getAllParentId(this.treeData[propStr], node.eventKey).filter(Boolean);
|
|
1357
|
+
totalCheckedKeys = [...new Set(preChecked.concat(checkedKeys, childKeys))].filter(id => !allParentIds.includes(id));
|
|
1358
|
+
} else {
|
|
1359
|
+
// 如果是取消从之前的选择中把当前点击的及其子级去除选中作为temp值(兼容搜索的情况)
|
|
1360
|
+
let keyData = {};
|
|
1361
|
+
const needCancelKeys = [node.eventKey];
|
|
1362
|
+
const preChecked = this.checkedKeys[propStr];
|
|
1363
|
+
vexutils.searchTree(this.treeData[propStr], item => {
|
|
1364
|
+
if (item.key === node.eventKey) {
|
|
1365
|
+
keyData = item;
|
|
1366
|
+
}
|
|
1367
|
+
});
|
|
1368
|
+
vexutils.searchTree(keyData.children, item => {
|
|
1369
|
+
needCancelKeys.push(item.key);
|
|
1370
|
+
});
|
|
1371
|
+
const allParentIds = getAllParentId(this.treeData[propStr], node.eventKey).filter(Boolean);
|
|
1372
|
+
console.log('cancel: ', this.treeData[propStr], allParentIds);
|
|
1373
|
+
totalCheckedKeys = [...new Set(preChecked.filter(key => !needCancelKeys.includes(key)))].filter(id => !allParentIds.includes(id));
|
|
1374
|
+
}
|
|
1375
|
+
this.checkedKeys.temp = totalCheckedKeys;
|
|
1376
|
+
this.checkedKeys[propStr] = totalCheckedKeys;
|
|
1377
|
+
this.isAllCheck(totalCheckedKeys);
|
|
1378
|
+
this.isSearchAllCheck(totalCheckedKeys);
|
|
1338
1379
|
this.$emit('pubCheckedTreeItem', [...this.checkedTreeItem, ...this.defaultShowList]);
|
|
1339
1380
|
this.$emit('check', [...this.checkedTreeItem, ...this.defaultShowList]);
|
|
1340
1381
|
},
|
package/src/utils/index.js
CHANGED
|
@@ -64,3 +64,18 @@ export const deepTraversalFirst = (node, nodeList = []) => {
|
|
|
64
64
|
}
|
|
65
65
|
return nodeList;
|
|
66
66
|
};
|
|
67
|
+
|
|
68
|
+
// 查找节点的父元素
|
|
69
|
+
export function getAllParentId(list, id, key = 'children') {
|
|
70
|
+
for (let i in list) {
|
|
71
|
+
if (list[i].id == id) {
|
|
72
|
+
return [list[i].parentId];
|
|
73
|
+
}
|
|
74
|
+
if (list[i][key]) {
|
|
75
|
+
let node = getAllParentId(list[i][key], id);
|
|
76
|
+
if (node !== undefined) {
|
|
77
|
+
return node.concat(list[i].parentId);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|