@das-fed/ui 6.4.0-beta.15.7 → 6.4.0-beta.15.9
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/esm-map.json +2 -1
- package/i18n-collection/en.js +11 -11
- package/i18n-collection/zh-CN.js +11 -11
- package/package.json +5 -5
- package/packages/business-components/upload-file/index.js +31 -30
- package/packages/business-components/upload-file/index.js.gz +0 -0
- package/packages/business-components/upload-file/src/type.d.ts +3 -0
- package/packages/business-components/urgent-panel/index.d.ts +2 -2
- package/packages/components/dimple-layout/index.js +3 -7
- package/packages/components/dimple-layout/index.js.gz +0 -0
- package/packages/components/dimple-layout/style.css +1 -1
- package/packages/components/dimple-layout/style.css.gz +0 -0
- package/packages/components/tree-table/index.js +69 -68
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-table/style.css +1 -1
- package/packages/components/tree-table/style.css.gz +0 -0
package/esm-map.json
CHANGED
|
@@ -380,5 +380,6 @@
|
|
|
380
380
|
"urgentMonitorPanelShow": "/packages/business-components/urgent-panel/index",
|
|
381
381
|
"closeUrgentMonitorPanel": "/packages/business-components/urgent-panel/index",
|
|
382
382
|
"DasBusinessUploadFile": "/packages/business-components/upload-file/index",
|
|
383
|
-
"DasBusinessUploadFileRef": "/packages/business-components/upload-file/index"
|
|
383
|
+
"DasBusinessUploadFileRef": "/packages/business-components/upload-file/index",
|
|
384
|
+
"closeUrgentPanel": "/packages/business-components/urgent-panel/index"
|
|
384
385
|
}
|
package/i18n-collection/en.js
CHANGED
|
@@ -78,15 +78,15 @@ export default {
|
|
|
78
78
|
"das-upload-delete": "test",
|
|
79
79
|
"das-upload-tips": "test",
|
|
80
80
|
设备面板给综合看板: "",
|
|
81
|
+
选择登录企业: "",
|
|
82
|
+
搜索企业名称: "",
|
|
83
|
+
进入: "",
|
|
81
84
|
修改密码: "",
|
|
82
85
|
旧密码: "",
|
|
83
86
|
新密码: "",
|
|
84
87
|
确认新密码: "",
|
|
85
88
|
取消: "",
|
|
86
89
|
确定: "",
|
|
87
|
-
选择登录企业: "",
|
|
88
|
-
搜索企业名称: "",
|
|
89
|
-
进入: "",
|
|
90
90
|
返回主页: "",
|
|
91
91
|
抱歉: "",
|
|
92
92
|
您无权访问此页面: "",
|
|
@@ -317,12 +317,6 @@ export default {
|
|
|
317
317
|
检查项: "",
|
|
318
318
|
任务详情: "",
|
|
319
319
|
异常: "",
|
|
320
|
-
基础信息: "",
|
|
321
|
-
升: "",
|
|
322
|
-
停: "",
|
|
323
|
-
降: "",
|
|
324
|
-
可设置的最大值为: "",
|
|
325
|
-
可设置的最小值为: "",
|
|
326
320
|
年: "",
|
|
327
321
|
月: "",
|
|
328
322
|
今日: "",
|
|
@@ -344,6 +338,12 @@ export default {
|
|
|
344
338
|
周四: "",
|
|
345
339
|
周五: "",
|
|
346
340
|
周六: "",
|
|
341
|
+
基础信息: "",
|
|
342
|
+
升: "",
|
|
343
|
+
停: "",
|
|
344
|
+
降: "",
|
|
345
|
+
可设置的最大值为: "",
|
|
346
|
+
可设置的最小值为: "",
|
|
347
347
|
报修位置: "",
|
|
348
348
|
报修时间: "",
|
|
349
349
|
实时预览: "",
|
|
@@ -459,13 +459,13 @@ export default {
|
|
|
459
459
|
支持手动录入也支持从地图上选择位置: "",
|
|
460
460
|
发布成功: "",
|
|
461
461
|
添加用户: "",
|
|
462
|
+
检查项内容: "",
|
|
463
|
+
超出正常范围值: "",
|
|
462
464
|
基本信息: "",
|
|
463
465
|
任务名称: "",
|
|
464
466
|
任务编码: "",
|
|
465
467
|
任务内容清单: "",
|
|
466
468
|
消防栓箱柜: "",
|
|
467
|
-
检查项内容: "",
|
|
468
|
-
超出正常范围值: "",
|
|
469
469
|
耗材记录: "",
|
|
470
470
|
备注说明: "",
|
|
471
471
|
耗材信息: "",
|
package/i18n-collection/zh-CN.js
CHANGED
|
@@ -79,15 +79,15 @@ export default {
|
|
|
79
79
|
"das-upload-delete": "删除",
|
|
80
80
|
"das-upload-tips": "提示: ",
|
|
81
81
|
设备面板给综合看板: "设备面板给综合看板",
|
|
82
|
+
选择登录企业: "选择登录企业",
|
|
83
|
+
搜索企业名称: "搜索企业名称",
|
|
84
|
+
进入: "进入",
|
|
82
85
|
修改密码: "修改密码",
|
|
83
86
|
旧密码: "旧密码",
|
|
84
87
|
新密码: "新密码",
|
|
85
88
|
确认新密码: "确认新密码",
|
|
86
89
|
取消: "取消",
|
|
87
90
|
确定: "确定",
|
|
88
|
-
选择登录企业: "选择登录企业",
|
|
89
|
-
搜索企业名称: "搜索企业名称",
|
|
90
|
-
进入: "进入",
|
|
91
91
|
返回主页: "返回主页",
|
|
92
92
|
抱歉: "抱歉",
|
|
93
93
|
您无权访问此页面: "您无权访问此页面",
|
|
@@ -318,12 +318,6 @@ export default {
|
|
|
318
318
|
检查项: "检查项",
|
|
319
319
|
任务详情: "任务详情",
|
|
320
320
|
异常: "异常",
|
|
321
|
-
基础信息: "基础信息",
|
|
322
|
-
升: "升",
|
|
323
|
-
停: "停",
|
|
324
|
-
降: "降",
|
|
325
|
-
可设置的最大值为: "可设置的最大值为",
|
|
326
|
-
可设置的最小值为: "可设置的最小值为",
|
|
327
321
|
年: "年",
|
|
328
322
|
月: "月",
|
|
329
323
|
今日: "今日",
|
|
@@ -345,6 +339,12 @@ export default {
|
|
|
345
339
|
周四: "周四",
|
|
346
340
|
周五: "周五",
|
|
347
341
|
周六: "周六",
|
|
342
|
+
基础信息: "基础信息",
|
|
343
|
+
升: "升",
|
|
344
|
+
停: "停",
|
|
345
|
+
降: "降",
|
|
346
|
+
可设置的最大值为: "可设置的最大值为",
|
|
347
|
+
可设置的最小值为: "可设置的最小值为",
|
|
348
348
|
报修位置: "报修位置",
|
|
349
349
|
报修时间: "报修时间",
|
|
350
350
|
实时预览: "实时预览",
|
|
@@ -460,13 +460,13 @@ export default {
|
|
|
460
460
|
支持手动录入也支持从地图上选择位置: "支持手动录入也支持从地图上选择位置",
|
|
461
461
|
发布成功: "发布成功",
|
|
462
462
|
添加用户: "添加用户",
|
|
463
|
+
检查项内容: "检查项内容",
|
|
464
|
+
超出正常范围值: "超出正常范围值",
|
|
463
465
|
基本信息: "基本信息",
|
|
464
466
|
任务名称: "任务名称",
|
|
465
467
|
任务编码: "任务编码",
|
|
466
468
|
任务内容清单: "任务内容清单",
|
|
467
469
|
消防栓箱柜: "消防栓箱柜",
|
|
468
|
-
检查项内容: "检查项内容",
|
|
469
|
-
超出正常范围值: "超出正常范围值",
|
|
470
470
|
耗材记录: "耗材记录",
|
|
471
471
|
备注说明: "备注说明",
|
|
472
472
|
耗材信息: "耗材信息",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/ui",
|
|
3
|
-
"version": "6.4.0-beta.15.
|
|
3
|
+
"version": "6.4.0-beta.15.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@antv/x6-plugin-snapline": "^2.1.7",
|
|
27
27
|
"@antv/x6-plugin-transform": "^2.1.8",
|
|
28
28
|
"@antv/x6-vue-shape": "^2.1.2",
|
|
29
|
-
"@das-fed/cli": "6.4.0-dev.
|
|
29
|
+
"@das-fed/cli": "6.4.0-dev.52",
|
|
30
30
|
"@element-plus/icons-vue": "^2.3.1",
|
|
31
31
|
"@types/lodash": "^4.14.194",
|
|
32
32
|
"@types/lodash-es": "^4.17.9",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"vue-tsc": "^2.0.29"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@das-fed/ui": "6.4.0-dev.
|
|
60
|
-
"@das-fed/utils": "6.4.0-dev.
|
|
61
|
-
"@das-fed/web": "6.4.0-dev.
|
|
59
|
+
"@das-fed/ui": "6.4.0-dev.52",
|
|
60
|
+
"@das-fed/utils": "6.4.0-dev.52",
|
|
61
|
+
"@das-fed/web": "6.4.0-dev.52",
|
|
62
62
|
"@wangeditor/editor": "^5.1.23",
|
|
63
63
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
|
64
64
|
"@wangeditor/plugin-upload-attachment": "^1.1.0",
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/business-components/upload-file/style.css';
|
|
2
|
-
import { ref as V, computed as h, defineComponent as
|
|
3
|
-
import { withInstall as
|
|
4
|
-
import { DasInput as
|
|
2
|
+
import { ref as V, computed as h, defineComponent as y, useCssVars as z, openBlock as f, createElementBlock as c, createVNode as g, unref as d, mergeProps as v, isRef as w, createCommentVNode as U, normalizeClass as k, createElementVNode as B } from "vue";
|
|
3
|
+
import { withInstall as F } from "@das-fed/utils/with-install/index";
|
|
4
|
+
import { DasInput as b } from "@das-fed/ui/packages/components/input/index";
|
|
5
5
|
import { DasUpload as S } from "@das-fed/ui/packages/components/upload/index";
|
|
6
|
-
import { useCalculateSize as
|
|
7
|
-
import { i18n as
|
|
6
|
+
import { useCalculateSize as C, minioUpload as D, DasImageViewer as P } from "@das-fed/ui/packages/components/image-viewer/index";
|
|
7
|
+
import { i18n as x } from "@das-fed/web/packages/i18n/index";
|
|
8
8
|
import { DasMessage as N } from "@das-fed/ui/packages/components/message/index";
|
|
9
9
|
const I = (i, n) => {
|
|
10
|
-
const a = V(!1), { size2B: r } =
|
|
10
|
+
const a = V(!1), { size2B: r } = C(), { upload: u } = D(i), m = (t) => {
|
|
11
11
|
if (i.maxSize) {
|
|
12
|
-
const { finalSize: e, sizeText:
|
|
13
|
-
if (
|
|
14
|
-
const
|
|
15
|
-
return N.warning(
|
|
12
|
+
const { finalSize: e, sizeText: o } = r(i.maxSize);
|
|
13
|
+
if (t.size > e) {
|
|
14
|
+
const l = x(`上传的文件大小不能超过${o}`).value;
|
|
15
|
+
return N.warning(l), !1;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
return !0;
|
|
19
19
|
}, p = h({
|
|
20
20
|
get: () => i.modelValue,
|
|
21
|
-
set: (
|
|
21
|
+
set: (t) => n("update:modelValue", t)
|
|
22
22
|
});
|
|
23
23
|
return {
|
|
24
24
|
loading: a,
|
|
25
25
|
imgUrl: p,
|
|
26
|
-
uploadFile: async (
|
|
27
|
-
if (a.value = !0, m(
|
|
28
|
-
const e = await u(
|
|
29
|
-
p.value = e, n("upload-success",
|
|
26
|
+
uploadFile: async (t) => {
|
|
27
|
+
if (a.value = !0, m(t)) {
|
|
28
|
+
const e = await u(t);
|
|
29
|
+
p.value = e, n("upload-success", t, e);
|
|
30
30
|
}
|
|
31
31
|
a.value = !1;
|
|
32
32
|
}
|
|
@@ -34,7 +34,7 @@ const I = (i, n) => {
|
|
|
34
34
|
}, A = { class: "das-business-file-upload" }, H = {
|
|
35
35
|
key: 0,
|
|
36
36
|
class: "input-box"
|
|
37
|
-
},
|
|
37
|
+
}, T = { class: "upload-box" }, W = /* @__PURE__ */ y({
|
|
38
38
|
inheritAttrs: !1,
|
|
39
39
|
__name: "App",
|
|
40
40
|
props: {
|
|
@@ -50,22 +50,23 @@ const I = (i, n) => {
|
|
|
50
50
|
pathPrefix: {},
|
|
51
51
|
bucketName: {},
|
|
52
52
|
minioTokenApi: { default: "token" },
|
|
53
|
+
autoContentType: { type: Boolean },
|
|
53
54
|
inputProps: { default: () => ({}) },
|
|
54
55
|
imageProps: { default: () => ({}) }
|
|
55
56
|
},
|
|
56
57
|
emits: ["update:modelValue", "upload-success"],
|
|
57
58
|
setup(i, { emit: n }) {
|
|
58
|
-
|
|
59
|
+
z((e) => ({
|
|
59
60
|
"66b28a84": m.value,
|
|
60
61
|
"52afe674": e.imageHeight
|
|
61
62
|
}));
|
|
62
|
-
const a = i, r = n, u = V([]), m = h(() => (a == null ? void 0 : a.width) ?? "100%"), { loading: p, imgUrl:
|
|
63
|
-
return (e,
|
|
63
|
+
const a = i, r = n, u = V([]), m = h(() => (a == null ? void 0 : a.width) ?? "100%"), { loading: p, imgUrl: s, uploadFile: t } = I(a, r);
|
|
64
|
+
return (e, o) => (f(), c("div", A, [
|
|
64
65
|
e.type === "input" ? (f(), c("div", H, [
|
|
65
|
-
g(d(
|
|
66
|
+
g(d(b), v({
|
|
66
67
|
width: "100%",
|
|
67
|
-
modelValue: d(
|
|
68
|
-
"onUpdate:modelValue":
|
|
68
|
+
modelValue: d(s),
|
|
69
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => w(s) ? s.value = l : null),
|
|
69
70
|
"is-view": e.isView
|
|
70
71
|
}, e.inputProps), null, 16, ["modelValue", "is-view"])
|
|
71
72
|
])) : U("v-if", !0),
|
|
@@ -76,10 +77,10 @@ const I = (i, n) => {
|
|
|
76
77
|
class: k(["image-box", e.isView ? "is-view" : ""])
|
|
77
78
|
},
|
|
78
79
|
[
|
|
79
|
-
g(d(
|
|
80
|
+
g(d(P), v({
|
|
80
81
|
style: { width: e.imageWidth, height: e.imageHeight },
|
|
81
|
-
modelValue: d(
|
|
82
|
-
"onUpdate:modelValue":
|
|
82
|
+
modelValue: d(s),
|
|
83
|
+
"onUpdate:modelValue": o[1] || (o[1] = (l) => w(s) ? s.value = l : null),
|
|
83
84
|
status: "info",
|
|
84
85
|
"is-view": !0
|
|
85
86
|
}, e.imageProps), null, 16, ["style", "modelValue"])
|
|
@@ -87,23 +88,23 @@ const I = (i, n) => {
|
|
|
87
88
|
2
|
|
88
89
|
/* CLASS */
|
|
89
90
|
)) : U("v-if", !0),
|
|
90
|
-
|
|
91
|
+
B("div", T, [
|
|
91
92
|
g(d(S), v({
|
|
92
93
|
modelValue: u.value,
|
|
93
|
-
"onUpdate:modelValue":
|
|
94
|
+
"onUpdate:modelValue": o[2] || (o[2] = (l) => u.value = l),
|
|
94
95
|
draggle: !1,
|
|
95
|
-
onFileUpload: d(
|
|
96
|
+
onFileUpload: d(t),
|
|
96
97
|
"is-view": e.isView
|
|
97
98
|
}, e.$attrs), null, 16, ["modelValue", "onFileUpload", "is-view"])
|
|
98
99
|
])
|
|
99
100
|
]));
|
|
100
101
|
}
|
|
101
|
-
}),
|
|
102
|
+
}), E = (i, n) => {
|
|
102
103
|
const a = i.__vccOpts || i;
|
|
103
104
|
for (const [r, u] of n)
|
|
104
105
|
a[r] = u;
|
|
105
106
|
return a;
|
|
106
|
-
},
|
|
107
|
+
}, M = /* @__PURE__ */ E(W, [["__scopeId", "data-v-57c87228"]]), G = F(M), J = () => V(null), K = { name: "复合型文件上传 upload-file" };
|
|
107
108
|
export {
|
|
108
109
|
G as DasBusinessUploadFile,
|
|
109
110
|
J as DasBusinessUploadFileRef,
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { urgentPanelShow, urgentMonitorPanelShow, closeUrgentMonitorPanel } from './src/render-panel';
|
|
1
|
+
import { urgentPanelShow, closeUrgentPanel, urgentMonitorPanelShow, closeUrgentMonitorPanel } from './src/render-panel';
|
|
2
2
|
declare const DasUrgentPanelModal: import("@das-fed/utils").SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
3
3
|
setConfigData: (code: any) => void;
|
|
4
4
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -11,7 +11,7 @@ declare const DasUrgentPanelModal: import("@das-fed/utils").SFCWithInstall<impor
|
|
|
11
11
|
onResizePanel?: ((...args: any[]) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
13
13
|
export * from './src/render-panel';
|
|
14
|
-
export { DasUrgentPanelModal, urgentPanelShow, urgentMonitorPanelShow, closeUrgentMonitorPanel };
|
|
14
|
+
export { DasUrgentPanelModal, urgentPanelShow, urgentMonitorPanelShow, closeUrgentMonitorPanel, closeUrgentPanel };
|
|
15
15
|
declare const _default: {
|
|
16
16
|
name: string;
|
|
17
17
|
};
|
|
@@ -19970,15 +19970,11 @@ const Hw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
19970
19970
|
html() {
|
|
19971
19971
|
return M;
|
|
19972
19972
|
}
|
|
19973
|
-
})
|
|
19974
|
-
const I = e.addNode({
|
|
19973
|
+
}), e.addNode({
|
|
19975
19974
|
shape: n,
|
|
19976
19975
|
x: w.x,
|
|
19977
19976
|
y: w.y
|
|
19978
|
-
});
|
|
19979
|
-
I.toFront(), setTimeout(() => {
|
|
19980
|
-
I.size({ width: M.clientWidth, height: M.clientHeight });
|
|
19981
|
-
}, 50);
|
|
19977
|
+
}).toFront();
|
|
19982
19978
|
const D = s.open || {};
|
|
19983
19979
|
for (const A in D)
|
|
19984
19980
|
(R = D[A]) == null || R.call(D, w);
|
|
@@ -24715,7 +24711,7 @@ const eC = (i, t) => {
|
|
|
24715
24711
|
/* NEED_PATCH */
|
|
24716
24712
|
));
|
|
24717
24713
|
}
|
|
24718
|
-
}), hC = /* @__PURE__ */ Ur(cC, [["__scopeId", "data-v-
|
|
24714
|
+
}), hC = /* @__PURE__ */ Ur(cC, [["__scopeId", "data-v-ea43ec69"]]), xC = ua(hC), wC = () => qt(null), uC = (i) => {
|
|
24719
24715
|
const t = qt(), e = Ii(), n = {
|
|
24720
24716
|
autoResize: !1,
|
|
24721
24717
|
// 自动大小
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.dimple-layout-editor-rule-container[data-v-6cdf9d8b]{width:100%;height:100%;overflow:hidden}.dimple-layout-editor-rule[data-v-6cdf9d8b]{background:#fafafa;display:flex;height:100%;overflow:visible}.dimple-layout-editor-rule-rule-item[data-v-6cdf9d8b]{position:relative;flex-shrink:0}.dimple-layout-editor-rule-rule-item-label[data-v-6cdf9d8b],.dimple-layout-editor-rule-rule-item-tick[data-v-6cdf9d8b]{position:absolute}.dimple-layout-editor[data-v-
|
|
1
|
+
.dimple-layout-editor-rule-container[data-v-6cdf9d8b]{width:100%;height:100%;overflow:hidden}.dimple-layout-editor-rule[data-v-6cdf9d8b]{background:#fafafa;display:flex;height:100%;overflow:visible}.dimple-layout-editor-rule-rule-item[data-v-6cdf9d8b]{position:relative;flex-shrink:0}.dimple-layout-editor-rule-rule-item-label[data-v-6cdf9d8b],.dimple-layout-editor-rule-rule-item-tick[data-v-6cdf9d8b]{position:absolute}.dimple-layout-editor[data-v-ea43ec69]{height:100%;width:100%;overflow:hidden;display:flex;flex-direction:column}.dimple-layout-editor-canvas-main[data-v-ea43ec69]{flex:1;width:100%;min-height:0;overflow:hidden;display:flex}.dimple-layout-editor-canvas-container[data-v-ea43ec69]{flex:1;height:100%;overflow:hidden;min-width:0}.dimple-layout-editor-canvas[data-v-ea43ec69]{height:100%;width:100%;overflow:hidden}.dimple-layout-editor-rule-top[data-v-ea43ec69]{width:100%;height:27px;padding-left:27px;background:#fafafa;flex-shrink:0}.dimple-layout-editor-rule-left[data-v-ea43ec69]{width:27px;height:100%;z-index:1;flex-shrink:0;background:#fafafa}.x6-graph-scroller{overflow:auto}.x6-widget-selection-box,.x6-widget-transform{margin:0!important;padding:0!important;box-sizing:border-box;transform:translateY(-3px) translate(-2px) scaleY(.99) scaleX(.99)}.x6-node foreignObject>body{overflow:visible!important}.x6-graph{touch-action:none}.dimple-layout-render[data-v-97154aa4]{height:100%;width:100%;overflow:hidden}
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/tree-table/style.css';
|
|
2
|
-
import { defineComponent as fe, mergeModels as x, ref as U, useModel as he, computed as I, watch as ee, openBlock as w, createElementBlock as V, normalizeClass as
|
|
2
|
+
import { defineComponent as fe, mergeModels as x, ref as U, useModel as he, computed as I, watch as ee, openBlock as w, createElementBlock as V, normalizeClass as te, normalizeStyle as j, createElementVNode as $, toDisplayString as A, renderSlot as L, createCommentVNode as p, Fragment as G, renderList as J, createBlock as Q, unref as N, withCtx as F, createTextVNode as S, withDirectives as M, createVNode as W, vShow as H } from "vue";
|
|
3
3
|
import { withInstall as ce } from "@das-fed/utils/with-install/index";
|
|
4
4
|
import { setThemeRule as ve } from "@das-fed/web/packages/theme/index";
|
|
5
5
|
import { DasTree as ke } from "@das-fed/ui/packages/components/tree/index";
|
|
@@ -8,43 +8,43 @@ import { DasCheckbox as X } from "@das-fed/ui/packages/components/checkbox/index
|
|
|
8
8
|
import { vOverlay as le } from "@das-fed/ui/packages/components/overlay/index";
|
|
9
9
|
import { DasEmpty as ye } from "@das-fed/ui/packages/components/empty/index";
|
|
10
10
|
import { DasSpin as ge } from "@das-fed/ui/packages/components/spin/index";
|
|
11
|
-
import { treeFind as me, flatTree as
|
|
12
|
-
const Ce = (n, B, r,
|
|
11
|
+
import { treeFind as me, flatTree as ae } from "@das-fed/utils/common-tools";
|
|
12
|
+
const Ce = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
13
13
|
let d = null;
|
|
14
14
|
if (g ? d = (i) => {
|
|
15
15
|
var u, c, h;
|
|
16
16
|
i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
|
|
17
|
-
d && d(o), o[v + "-targetId"] == T && n.nodeKey && !
|
|
17
|
+
d && d(o), o[v + "-targetId"] == T && n.nodeKey && !t(i, K) && !y(i) && (b[i[n.nodeKey]].data[v] = !0, b[i[n.nodeKey]].data[v + "-targetId"] = T);
|
|
18
18
|
});
|
|
19
19
|
} : d = (i) => {
|
|
20
20
|
var u, c, h;
|
|
21
21
|
i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
|
|
22
|
-
i[v + "-targetId"] == o[E.value] && n.nodeKey && !
|
|
22
|
+
i[v + "-targetId"] == o[E.value] && n.nodeKey && !t(o, K) && !y(o) && (b[o[n.nodeKey]].data[v] = !1, b[o[n.nodeKey]].data[v + "-targetId"] = o[n.nodeKey]), d && d(o);
|
|
23
23
|
});
|
|
24
24
|
}, k.value && k.value.length)
|
|
25
25
|
for (let i = 0; i < k.value.length; i++)
|
|
26
26
|
d && d(k.value[i]);
|
|
27
|
-
} }), pe = (n, B, r,
|
|
27
|
+
} }), pe = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
28
28
|
let d = null;
|
|
29
29
|
if (g ? d = (i) => {
|
|
30
30
|
var u, c, h;
|
|
31
31
|
i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
|
|
32
|
-
i[v + "-targetId"] == o[E.value] && n.nodeKey && (!
|
|
32
|
+
i[v + "-targetId"] == o[E.value] && n.nodeKey && (!t(o, K) && !y(o) && (b[o[n.nodeKey]].data[v] = !0), b[o[n.nodeKey]].data[v + "-targetId"] = o.id), d && d(o);
|
|
33
33
|
});
|
|
34
34
|
} : d = (i) => {
|
|
35
35
|
var u, c, h;
|
|
36
36
|
i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
|
|
37
|
-
d && d(o), o[v + "-targetId"] == T && n.nodeKey && (!
|
|
37
|
+
d && d(o), o[v + "-targetId"] == T && n.nodeKey && (!t(i, K) && !y(i) && (b[i[n.nodeKey]].data[v] = !1), b[i[n.nodeKey]].data[v + "-targetId"] = T);
|
|
38
38
|
});
|
|
39
39
|
}, k.value && k.value.length)
|
|
40
40
|
for (let i = 0; i < k.value.length; i++)
|
|
41
41
|
d && d(k.value[i]);
|
|
42
|
-
} }), we = (n, B, r,
|
|
42
|
+
} }), we = (n, B, r, t, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
43
43
|
let d = null;
|
|
44
44
|
if (g ? d = (i) => {
|
|
45
45
|
var u, c, h;
|
|
46
46
|
i[(u = r.value) == null ? void 0 : u.children] && i[(c = r.value) == null ? void 0 : c.children].length && i[(h = r.value) == null ? void 0 : h.children].forEach((o) => {
|
|
47
|
-
i[v + "-targetId"] == o[E.value] && n.nodeKey && (!
|
|
47
|
+
i[v + "-targetId"] == o[E.value] && n.nodeKey && (!t(o, K) && !y(o) && (b[o[n.nodeKey]].data[v] = !0), b[o[n.nodeKey]].data[v + "-targetId"] = o.id), d && d(o);
|
|
48
48
|
});
|
|
49
49
|
} : d = (i) => {
|
|
50
50
|
var u, c, h;
|
|
@@ -59,7 +59,7 @@ const Ce = (n, B, r, a, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
59
59
|
key: 0,
|
|
60
60
|
class: "table-label"
|
|
61
61
|
}, Ie = {
|
|
62
|
-
class: /* @__PURE__ */
|
|
62
|
+
class: /* @__PURE__ */ te(["table-body", "das-tree-box"])
|
|
63
63
|
}, Ve = { class: "tree-node" }, $e = { class: "tree-node" }, Ne = { class: "first-column" }, Ee = { class: "title" }, De = { class: "tree-node" }, Ae = { class: "tree-node" }, Be = { class: "first-column" }, Re = { class: "title" }, Fe = {
|
|
64
64
|
name: "DasTreeTable",
|
|
65
65
|
inheritAttrs: !1
|
|
@@ -93,108 +93,109 @@ const Ce = (n, B, r, a, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
93
93
|
}),
|
|
94
94
|
emits: /* @__PURE__ */ x(["update:data", "update:keyword", "all-check", "item-check"], ["update:keyword"]),
|
|
95
95
|
setup(n, { expose: B, emit: r }) {
|
|
96
|
-
const
|
|
96
|
+
const t = n, y = r, E = U(), k = he(n, "keyword"), D = I(() => {
|
|
97
97
|
var e;
|
|
98
|
-
return
|
|
99
|
-
}), T = I(() =>
|
|
100
|
-
if (
|
|
101
|
-
if (typeof
|
|
102
|
-
if (
|
|
103
|
-
if (
|
|
98
|
+
return t.checkNum ?? ((e = t.checkboxLabels) == null ? void 0 : e.length) ?? 0;
|
|
99
|
+
}), T = I(() => t != null && t.height ? t.height + "px" : "100%"), v = I(() => {
|
|
100
|
+
if (t != null && t.height) {
|
|
101
|
+
if (typeof t.height == "string") {
|
|
102
|
+
if (t.height.includes("%")) return;
|
|
103
|
+
if (t.height.includes("px")) return Number(t.height.replace("px", ""));
|
|
104
104
|
}
|
|
105
|
-
return
|
|
105
|
+
return t.height;
|
|
106
106
|
}
|
|
107
107
|
}), g = I(() => {
|
|
108
|
-
const e = { ...
|
|
108
|
+
const e = { ...t.props };
|
|
109
109
|
return e != null && e.disabled && delete e.disabled, e != null && e.hidden && delete e.hidden, e != null && e.parentId && delete e.parentId, { label: "name", children: "children", disabled: "disabled", isLeaf: "leaf", ...e };
|
|
110
110
|
}), b = I(() => {
|
|
111
111
|
var e;
|
|
112
|
-
return ((e =
|
|
112
|
+
return ((e = t.props) == null ? void 0 : e.parentId) ?? "parentId";
|
|
113
113
|
}), K = I(() => {
|
|
114
|
-
var
|
|
114
|
+
var a, l, s, f, C, R;
|
|
115
115
|
let e = [];
|
|
116
|
-
return (
|
|
117
|
-
}), d = (e,
|
|
116
|
+
return (a = t.props) != null && a.disabled && ((l = t.props) != null && l.disabled.length) ? ((s = t.props) != null && s.disabled[0] ? e[0] = (f = t.props) == null ? void 0 : f.disabled[0] : e[0] = "disabled1", (C = t.props) != null && C.disabled[1] ? e[1] = (R = t.props) == null ? void 0 : R.disabled[1] : e[1] = "disabled2") : e = ["disabled1", "disabled2"], e;
|
|
117
|
+
}), d = (e, a) => typeof K.value[a] == "function" ? K.value[a](e, a) : e[K.value[a]], i = I(() => {
|
|
118
118
|
var e;
|
|
119
|
-
return ((e =
|
|
119
|
+
return ((e = t.props) == null ? void 0 : e.hidden) ?? "hidden";
|
|
120
120
|
}), u = (e) => typeof i.value == "function" ? i.value(e) : e[i.value], c = U(), h = U([!1, !1]), o = U([!1, !1]), m = I({
|
|
121
|
-
get: () =>
|
|
121
|
+
get: () => t.data,
|
|
122
122
|
set: (e) => y("update:data", e)
|
|
123
123
|
}), Y = (e) => {
|
|
124
|
-
const
|
|
124
|
+
const a = {};
|
|
125
125
|
return Array.isArray(e) && e.forEach((l) => {
|
|
126
126
|
const s = { data: l };
|
|
127
|
-
|
|
128
|
-
}),
|
|
129
|
-
}, Z = () => Y(m.value), _ = (e,
|
|
130
|
-
|
|
127
|
+
a[l.id] = s, Array.isArray(l[g.value.children]) && Object.assign(a, Y(l[g.value.children]));
|
|
128
|
+
}), a;
|
|
129
|
+
}, Z = () => Y(m.value), _ = (e, a, l) => {
|
|
130
|
+
t.allCheckboxDisabled[l] || (e > 0 && a > 0 ? (h.value[l] = !1, o.value[l] = !0) : e == 0 && a >= 0 ? (h.value[l] = !1, o.value[l] = !1) : (h.value[l] = !0, o.value[l] = !1));
|
|
131
131
|
}, ie = (e) => {
|
|
132
|
-
const
|
|
132
|
+
const a = g.value.children;
|
|
133
133
|
let l = [];
|
|
134
|
-
l =
|
|
134
|
+
l = ae(m.value, a);
|
|
135
135
|
for (let s = 0; s < D.value; s++) {
|
|
136
136
|
let f = 0, C = 0;
|
|
137
137
|
l.forEach((R) => {
|
|
138
|
-
d(R, s) || u(R) || (R[
|
|
138
|
+
d(R, s) || u(R) || (R[t.checkboxLabels[s]] ? f++ : C++);
|
|
139
139
|
}), _(f, C, s);
|
|
140
140
|
}
|
|
141
141
|
}, { linkCheck: oe } = Ce(
|
|
142
|
-
|
|
142
|
+
t,
|
|
143
143
|
y,
|
|
144
144
|
g,
|
|
145
145
|
d,
|
|
146
146
|
u,
|
|
147
147
|
b,
|
|
148
148
|
m
|
|
149
|
-
), { linkCheck: se } = pe(
|
|
150
|
-
|
|
149
|
+
), { linkCheck: se } = pe(t, y, g, d, u, b, m), { linkCheck: de } = we(
|
|
150
|
+
t,
|
|
151
151
|
y,
|
|
152
152
|
g,
|
|
153
153
|
d,
|
|
154
154
|
u,
|
|
155
155
|
b,
|
|
156
156
|
m
|
|
157
|
-
), ne = (e,
|
|
157
|
+
), ne = (e, a, l, s, f) => t.linkageType === "custom" ? void 0 : {
|
|
158
158
|
first: oe,
|
|
159
159
|
two: se,
|
|
160
160
|
three: de
|
|
161
|
-
}[
|
|
162
|
-
y("all-check", e,
|
|
161
|
+
}[t.linkageType](e, a, l, s, f), z = (e, a) => {
|
|
162
|
+
y("all-check", e, a), h.value[a] = e, o.value[a] = !1;
|
|
163
163
|
const l = Z();
|
|
164
164
|
if (l)
|
|
165
165
|
for (let s in l)
|
|
166
|
-
!d(l[s].data,
|
|
167
|
-
if (
|
|
166
|
+
!d(l[s].data, a) && !u(l[s].data) && (l[s].data[t.checkboxLabels[a]] = e, delete l[s].data[t.checkboxLabels[a] + "-targetId"]);
|
|
167
|
+
if (t.twoLinkFirstCheck) {
|
|
168
168
|
if (e) {
|
|
169
|
-
if (
|
|
170
|
-
if (
|
|
171
|
-
z(e,
|
|
169
|
+
if (a === 1) {
|
|
170
|
+
if (t.allCheckboxDisabled[a - 1]) return;
|
|
171
|
+
z(e, a - 1);
|
|
172
172
|
}
|
|
173
|
-
} else if (
|
|
174
|
-
if (
|
|
175
|
-
z(e,
|
|
173
|
+
} else if (a === 0) {
|
|
174
|
+
if (t.allCheckboxDisabled[a + 1]) return;
|
|
175
|
+
z(e, a + 1);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
}, ue = I(() => {
|
|
179
179
|
let e = [];
|
|
180
180
|
if (!m.value || !m.value.length) return e;
|
|
181
|
-
const
|
|
182
|
-
return e =
|
|
181
|
+
const a = g.value.children;
|
|
182
|
+
return e = ae(m.value, a).filter(
|
|
183
183
|
(s) => s[g.value.label].toLowerCase().includes(k.value.toLowerCase())
|
|
184
184
|
), e;
|
|
185
185
|
}), q = I(() => {
|
|
186
|
+
var a;
|
|
186
187
|
let e = !1;
|
|
187
|
-
return m.value.length
|
|
188
|
+
return (!m.value || !m.value.length) && (e = !0), k.value && !((a = ue.value) != null && a.length) && (e = !0), e;
|
|
188
189
|
}), re = () => new Promise((e) => {
|
|
189
|
-
const
|
|
190
|
+
const a = () => {
|
|
190
191
|
var l;
|
|
191
192
|
if ((l = c.value) != null && l.treeRef) return e(!0);
|
|
192
|
-
setTimeout(() =>
|
|
193
|
+
setTimeout(() => a(), 50);
|
|
193
194
|
};
|
|
194
|
-
|
|
195
|
+
a();
|
|
195
196
|
}), P = async () => {
|
|
196
|
-
var e,
|
|
197
|
-
await re(), (
|
|
197
|
+
var e, a;
|
|
198
|
+
await re(), (a = (e = c.value) == null ? void 0 : e.treeRef) == null || a.filter(k.value);
|
|
198
199
|
};
|
|
199
200
|
ee(
|
|
200
201
|
() => m.value,
|
|
@@ -209,10 +210,10 @@ const Ce = (n, B, r, a, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
209
210
|
},
|
|
210
211
|
{ immediate: !0 }
|
|
211
212
|
);
|
|
212
|
-
const O = (e,
|
|
213
|
-
y("item-check", e,
|
|
214
|
-
const s = Z(), f =
|
|
215
|
-
s && (s[t
|
|
213
|
+
const O = (e, a, l) => {
|
|
214
|
+
y("item-check", e, a, l);
|
|
215
|
+
const s = Z(), f = t.checkboxLabels[l];
|
|
216
|
+
s && (s[a[t.nodeKey]].data[f + "-targetId"] = a[t.nodeKey], s[a[t.nodeKey]].data[f] = e), ne(a[t.nodeKey], f, e, s, l), t.twoLinkFirstCheck && (e ? l === 1 && !d(a, l - 1) && !u(a) && O(e, a, l - 1) : l === 0 && !d(a, l + 1) && !u(a) && O(e, a, l + 1));
|
|
216
217
|
};
|
|
217
218
|
return B({
|
|
218
219
|
$treeTableBody: c,
|
|
@@ -224,12 +225,12 @@ const Ce = (n, B, r, a, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
224
225
|
setCheck: O,
|
|
225
226
|
/** 手动联动全选;参数trueNum,falseNum,index */
|
|
226
227
|
linkAllCheck: _
|
|
227
|
-
}), (e,
|
|
228
|
+
}), (e, a) => (w(), V(
|
|
228
229
|
"div",
|
|
229
230
|
{
|
|
230
231
|
ref_key: "dasTreeTableRef",
|
|
231
232
|
ref: E,
|
|
232
|
-
class:
|
|
233
|
+
class: te(["das-ui-tree-table", e.border ? "is-border" : ""]),
|
|
233
234
|
style: j({ height: T.value })
|
|
234
235
|
},
|
|
235
236
|
[
|
|
@@ -314,7 +315,7 @@ const Ce = (n, B, r, a, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
314
315
|
node: s,
|
|
315
316
|
data: l
|
|
316
317
|
}, () => [
|
|
317
|
-
|
|
318
|
+
a[0] || (a[0] = S("icon"))
|
|
318
319
|
], !0) : p("v-if", !0),
|
|
319
320
|
L(e.$slots, "title", {
|
|
320
321
|
node: s,
|
|
@@ -408,7 +409,7 @@ const Ce = (n, B, r, a, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
408
409
|
node: s,
|
|
409
410
|
data: l
|
|
410
411
|
}, () => [
|
|
411
|
-
|
|
412
|
+
a[1] || (a[1] = S("icon"))
|
|
412
413
|
], !0) : p("v-if", !0),
|
|
413
414
|
L(e.$slots, "title", {
|
|
414
415
|
node: s,
|
|
@@ -495,7 +496,7 @@ const Ce = (n, B, r, a, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
495
496
|
size: "small",
|
|
496
497
|
spinning: e.loading
|
|
497
498
|
}, {
|
|
498
|
-
default: F(() =>
|
|
499
|
+
default: F(() => a[2] || (a[2] = [
|
|
499
500
|
$(
|
|
500
501
|
"div",
|
|
501
502
|
{ style: { width: "100%", height: "100%" } },
|
|
@@ -517,10 +518,10 @@ const Ce = (n, B, r, a, y, E, k) => ({ linkCheck: (T, v, g, b, K) => {
|
|
|
517
518
|
}
|
|
518
519
|
}), Oe = (n, B) => {
|
|
519
520
|
const r = n.__vccOpts || n;
|
|
520
|
-
for (const [
|
|
521
|
-
r[
|
|
521
|
+
for (const [t, y] of B)
|
|
522
|
+
r[t] = y;
|
|
522
523
|
return r;
|
|
523
|
-
}, Se = /* @__PURE__ */ Oe(Me, [["__scopeId", "data-v-
|
|
524
|
+
}, Se = /* @__PURE__ */ Oe(Me, [["__scopeId", "data-v-e42f2ada"]]), Ue = {
|
|
524
525
|
"--das-ui-tree-table-highlight-color": "#5582f3",
|
|
525
526
|
"--das-ui-tree-table-header-color": "#212121",
|
|
526
527
|
"--das-ui-tree-table-header-bg-color": "#F2F2F2",
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.das-ui-tree-table[data-v-
|
|
1
|
+
.das-ui-tree-table[data-v-e42f2ada]{display:flex;flex-direction:column}.das-ui-tree-table.is-border[data-v-e42f2ada]{border:1px solid var(--das-ui-tree-table-border-color)}.das-ui-tree-table .table-header[data-v-e42f2ada]{height:32px;display:flex;align-items:center;background:var(--das-ui-tree-table-header-bg-color);border-bottom:1px solid var(--das-ui-tree-table-border-color);box-sizing:border-box}.das-ui-tree-table .table-header .title[data-v-e42f2ada]{flex:1;min-width:0}.das-ui-tree-table .table-header .table-label[data-v-e42f2ada]{font-size:12px;color:var(--das-ui-tree-table-header-color)}.das-ui-tree-table .table-body[data-v-e42f2ada]{flex:1;min-height:0}.das-ui-tree-table .table-body .tree-node[data-v-e42f2ada]{flex:1;min-width:0;display:flex;align-items:center}.das-ui-tree-table .table-body .tree-node .first-column[data-v-e42f2ada]{flex:1;min-width:0}.das-ui-tree-table .table-body .tree-node .first-column .title.is-highlight[data-v-e42f2ada]{color:var(--das-ui-tree-table-highlight-color)}.das-ui-tree-table .das-ui-tree[data-v-e42f2ada] .el-tree-node.is-current:not([aria-disabled=true])>.el-tree-node__content{color:var(--das-ui-tree-node-active-font-color);background-color:var(--das-ui-tree-node-active-bg-color)}.das-ui-tree-table .das-ui-tree[data-v-e42f2ada] .el-tree-node.is-current:not([aria-disabled=true])>.el-tree-node__content .el-tree-node__expand-icon:not(.is-leaf){color:var(--das-ui-tree-node-active-font-color)}.das-ui-tree-table .das-ui-tree[data-v-e42f2ada] .el-tree-node .el-tree-node__content,.das-ui-tree-table .das-ui-tree[data-v-e42f2ada] .el-tree-node .el-tree-node__content .el-tree-node__label{width:100%}
|
|
Binary file
|