3h1-ui 1.0.21 → 1.0.24
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/es/index.d.ts +3 -3
- package/es/index.js +439 -376
- package/es/lib/index.d.ts +1 -3
- package/es/lib/src/ShyPage/IndexView.vue.d.ts +2 -2
- package/es/src/ShyPage/IndexView.vue.d.ts +85 -85
- package/es/src/ShyTable/ButtonGroup.vue.d.ts +2 -2
- package/es/src/ShyTable/IndexView.vue.d.ts +127 -1
- package/es/style.css +74 -45
- package/index.ts +24 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.js +438 -375
- package/lib/lib/index.d.ts +1 -3
- package/lib/lib/src/ShyPage/IndexView.vue.d.ts +2 -2
- package/lib/src/ShyPage/IndexView.vue.d.ts +85 -85
- package/lib/src/ShyTable/ButtonGroup.vue.d.ts +2 -2
- package/lib/src/ShyTable/IndexView.vue.d.ts +127 -1
- package/package.json +25 -26
- package/es/lib/lib/index.d.ts +0 -10
- package/es/lib/lib/src/ShyPage/IndexView.vue.d.ts +0 -701
- package/es/lib/lib/src/ShyTable/ButtonGroup.vue.d.ts +0 -25
- package/es/lib/lib/src/ShyTable/IndexView.vue.d.ts +0 -2
- package/lib/lib/lib/index.d.ts +0 -10
- package/lib/lib/lib/src/ShyPage/IndexView.vue.d.ts +0 -701
- package/lib/lib/lib/src/ShyTable/ButtonGroup.vue.d.ts +0 -25
- package/lib/lib/lib/src/ShyTable/IndexView.vue.d.ts +0 -2
package/es/index.js
CHANGED
|
@@ -1,86 +1,10 @@
|
|
|
1
|
-
import { defineComponent,
|
|
2
|
-
import { Form, Row, Col, Select, Input, ConfigProvider, Pagination } from "ant-design-vue";
|
|
1
|
+
import { h, nextTick, createVNode, defineComponent, ref, watchEffect, resolveComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, withCtx, normalizeStyle, toDisplayString, createBlock, unref, createCommentVNode, withModifiers, createTextVNode, pushScopeId, popScopeId, createSlots, renderSlot, normalizeProps, guardReactiveProps, watch, computed } from "vue";
|
|
3
2
|
import "xe-utils";
|
|
4
3
|
import { VxeTable, VxeColumn } from "vxe-table";
|
|
5
4
|
import zhCN from "ant-design-vue/es/locale/zh_CN";
|
|
5
|
+
import { ConfigProvider, Pagination, Modal, Button, Tag, Tabs, TabPane, Input, Tree } from "ant-design-vue";
|
|
6
6
|
import "ant-design-vue/dist/antd.css";
|
|
7
|
-
const
|
|
8
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
9
|
-
__name: "IndexView",
|
|
10
|
-
props: {
|
|
11
|
-
column: { default: () => [] },
|
|
12
|
-
form: { default: {} }
|
|
13
|
-
},
|
|
14
|
-
emits: ["update:form"],
|
|
15
|
-
setup(__props, { expose, emit }) {
|
|
16
|
-
const props = __props;
|
|
17
|
-
const form = reactive({});
|
|
18
|
-
watch(
|
|
19
|
-
() => props.form,
|
|
20
|
-
(value) => {
|
|
21
|
-
Object.keys(value).forEach((key) => {
|
|
22
|
-
form[key] = value[key];
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
{ immediate: true }
|
|
26
|
-
);
|
|
27
|
-
const changeEvent = () => {
|
|
28
|
-
emit("update:form", { ...form });
|
|
29
|
-
};
|
|
30
|
-
const rules = reactive({});
|
|
31
|
-
const { resetFields, validate, validateInfos } = Form.useForm(form, rules, {});
|
|
32
|
-
expose({ resetFields });
|
|
33
|
-
return (_ctx, _cache) => {
|
|
34
|
-
const _component_a_form_item = resolveComponent("a-form-item");
|
|
35
|
-
const _component_a_form = resolveComponent("a-form");
|
|
36
|
-
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
37
|
-
createVNode(_component_a_form, {
|
|
38
|
-
"label-col": { span: 6 },
|
|
39
|
-
"wrapper-col": { span: 18 }
|
|
40
|
-
}, {
|
|
41
|
-
default: withCtx(() => [
|
|
42
|
-
createVNode(unref(Row), null, {
|
|
43
|
-
default: withCtx(() => [
|
|
44
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(props.column || [], (item, index2) => {
|
|
45
|
-
return openBlock(), createBlock(unref(Col), {
|
|
46
|
-
key: index2,
|
|
47
|
-
span: (item == null ? void 0 : item.span) || 12
|
|
48
|
-
}, {
|
|
49
|
-
default: withCtx(() => [
|
|
50
|
-
createVNode(_component_a_form_item, {
|
|
51
|
-
label: item.label
|
|
52
|
-
}, {
|
|
53
|
-
default: withCtx(() => [
|
|
54
|
-
(item == null ? void 0 : item.type) === "select" ? (openBlock(), createBlock(unref(Select), {
|
|
55
|
-
key: 0,
|
|
56
|
-
onChange: changeEvent,
|
|
57
|
-
value: form[item.prop],
|
|
58
|
-
"onUpdate:value": ($event) => form[item.prop] = $event,
|
|
59
|
-
options: item.dicData
|
|
60
|
-
}, null, 8, ["value", "onUpdate:value", "options"])) : (openBlock(), createBlock(unref(Input), {
|
|
61
|
-
key: 1,
|
|
62
|
-
onChange: changeEvent,
|
|
63
|
-
value: form[item.prop],
|
|
64
|
-
"onUpdate:value": ($event) => form[item.prop] = $event,
|
|
65
|
-
size: "middle"
|
|
66
|
-
}, null, 8, ["value", "onUpdate:value"]))
|
|
67
|
-
]),
|
|
68
|
-
_: 2
|
|
69
|
-
}, 1032, ["label"])
|
|
70
|
-
]),
|
|
71
|
-
_: 2
|
|
72
|
-
}, 1032, ["span"]);
|
|
73
|
-
}), 128))
|
|
74
|
-
]),
|
|
75
|
-
_: 1
|
|
76
|
-
})
|
|
77
|
-
]),
|
|
78
|
-
_: 1
|
|
79
|
-
})
|
|
80
|
-
]);
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
});
|
|
7
|
+
const style = "";
|
|
84
8
|
function bound01(n, max) {
|
|
85
9
|
if (isOnePointZero(n)) {
|
|
86
10
|
n = "100%";
|
|
@@ -725,7 +649,7 @@ function insertCss(css, options) {
|
|
|
725
649
|
}
|
|
726
650
|
return styleElement;
|
|
727
651
|
}
|
|
728
|
-
function _objectSpread$
|
|
652
|
+
function _objectSpread$4(target) {
|
|
729
653
|
for (var i = 1; i < arguments.length; i++) {
|
|
730
654
|
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
731
655
|
var ownKeys = Object.keys(source);
|
|
@@ -735,12 +659,12 @@ function _objectSpread$7(target) {
|
|
|
735
659
|
}));
|
|
736
660
|
}
|
|
737
661
|
ownKeys.forEach(function(key) {
|
|
738
|
-
_defineProperty$
|
|
662
|
+
_defineProperty$4(target, key, source[key]);
|
|
739
663
|
});
|
|
740
664
|
}
|
|
741
665
|
return target;
|
|
742
666
|
}
|
|
743
|
-
function _defineProperty$
|
|
667
|
+
function _defineProperty$4(obj, key, value) {
|
|
744
668
|
if (key in obj) {
|
|
745
669
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
746
670
|
} else {
|
|
@@ -761,13 +685,13 @@ function isIconDefinition(target) {
|
|
|
761
685
|
}
|
|
762
686
|
function generate(node, key, rootProps) {
|
|
763
687
|
if (!rootProps) {
|
|
764
|
-
return h(node.tag, _objectSpread$
|
|
688
|
+
return h(node.tag, _objectSpread$4({
|
|
765
689
|
key
|
|
766
690
|
}, node.attrs), (node.children || []).map(function(child, index2) {
|
|
767
691
|
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index2));
|
|
768
692
|
}));
|
|
769
693
|
}
|
|
770
|
-
return h(node.tag, _objectSpread$
|
|
694
|
+
return h(node.tag, _objectSpread$4({
|
|
771
695
|
key
|
|
772
696
|
}, rootProps, node.attrs), (node.children || []).map(function(child, index2) {
|
|
773
697
|
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index2));
|
|
@@ -830,7 +754,7 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
|
830
754
|
}
|
|
831
755
|
return target;
|
|
832
756
|
}
|
|
833
|
-
function _objectSpread$
|
|
757
|
+
function _objectSpread$3(target) {
|
|
834
758
|
for (var i = 1; i < arguments.length; i++) {
|
|
835
759
|
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
836
760
|
var ownKeys = Object.keys(source);
|
|
@@ -840,12 +764,12 @@ function _objectSpread$6(target) {
|
|
|
840
764
|
}));
|
|
841
765
|
}
|
|
842
766
|
ownKeys.forEach(function(key) {
|
|
843
|
-
_defineProperty$
|
|
767
|
+
_defineProperty$3(target, key, source[key]);
|
|
844
768
|
});
|
|
845
769
|
}
|
|
846
770
|
return target;
|
|
847
771
|
}
|
|
848
|
-
function _defineProperty$
|
|
772
|
+
function _defineProperty$3(obj, key, value) {
|
|
849
773
|
if (key in obj) {
|
|
850
774
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
851
775
|
} else {
|
|
@@ -865,10 +789,10 @@ function setTwoToneColors(_ref) {
|
|
|
865
789
|
twoToneColorPalette.calculated = !!secondaryColor;
|
|
866
790
|
}
|
|
867
791
|
function getTwoToneColors() {
|
|
868
|
-
return _objectSpread$
|
|
792
|
+
return _objectSpread$3({}, twoToneColorPalette);
|
|
869
793
|
}
|
|
870
794
|
var IconBase = function IconBase2(props, context) {
|
|
871
|
-
var _props$context$attrs = _objectSpread$
|
|
795
|
+
var _props$context$attrs = _objectSpread$3({}, props, context.attrs), icon = _props$context$attrs.icon, primaryColor = _props$context$attrs.primaryColor, secondaryColor = _props$context$attrs.secondaryColor, restProps = _objectWithoutProperties$1(_props$context$attrs, _excluded$1);
|
|
872
796
|
var colors = twoToneColorPalette;
|
|
873
797
|
if (primaryColor) {
|
|
874
798
|
colors = {
|
|
@@ -883,11 +807,11 @@ var IconBase = function IconBase2(props, context) {
|
|
|
883
807
|
}
|
|
884
808
|
var target = icon;
|
|
885
809
|
if (target && typeof target.icon === "function") {
|
|
886
|
-
target = _objectSpread$
|
|
810
|
+
target = _objectSpread$3({}, target, {
|
|
887
811
|
icon: target.icon(colors.primaryColor, colors.secondaryColor)
|
|
888
812
|
});
|
|
889
813
|
}
|
|
890
|
-
return generate(target.icon, "svg-".concat(target.name), _objectSpread$
|
|
814
|
+
return generate(target.icon, "svg-".concat(target.name), _objectSpread$3({}, restProps, {
|
|
891
815
|
"data-icon": target.name,
|
|
892
816
|
width: "1em",
|
|
893
817
|
height: "1em",
|
|
@@ -1039,7 +963,7 @@ function _arrayWithHoles(arr) {
|
|
|
1039
963
|
if (Array.isArray(arr))
|
|
1040
964
|
return arr;
|
|
1041
965
|
}
|
|
1042
|
-
function _objectSpread$
|
|
966
|
+
function _objectSpread$2(target) {
|
|
1043
967
|
for (var i = 1; i < arguments.length; i++) {
|
|
1044
968
|
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
1045
969
|
var ownKeys = Object.keys(source);
|
|
@@ -1049,12 +973,12 @@ function _objectSpread$5(target) {
|
|
|
1049
973
|
}));
|
|
1050
974
|
}
|
|
1051
975
|
ownKeys.forEach(function(key) {
|
|
1052
|
-
_defineProperty$
|
|
976
|
+
_defineProperty$2(target, key, source[key]);
|
|
1053
977
|
});
|
|
1054
978
|
}
|
|
1055
979
|
return target;
|
|
1056
980
|
}
|
|
1057
|
-
function _defineProperty$
|
|
981
|
+
function _defineProperty$2(obj, key, value) {
|
|
1058
982
|
if (key in obj) {
|
|
1059
983
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
1060
984
|
} else {
|
|
@@ -1097,10 +1021,10 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1097
1021
|
setTwoToneColor("#1890ff");
|
|
1098
1022
|
var Icon = function Icon2(props, context) {
|
|
1099
1023
|
var _classObj;
|
|
1100
|
-
var _props$context$attrs = _objectSpread$
|
|
1024
|
+
var _props$context$attrs = _objectSpread$2({}, props, context.attrs), cls = _props$context$attrs["class"], icon = _props$context$attrs.icon, spin = _props$context$attrs.spin, rotate = _props$context$attrs.rotate, tabindex = _props$context$attrs.tabindex, twoToneColor = _props$context$attrs.twoToneColor, onClick = _props$context$attrs.onClick, restProps = _objectWithoutProperties(_props$context$attrs, _excluded);
|
|
1101
1025
|
var classObj = (_classObj = {
|
|
1102
1026
|
anticon: true
|
|
1103
|
-
}, _defineProperty$
|
|
1027
|
+
}, _defineProperty$2(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty$2(_classObj, cls, cls), _classObj);
|
|
1104
1028
|
var svgClassString = spin === "" || !!spin || icon.name === "loading" ? "anticon-spin" : "";
|
|
1105
1029
|
var iconTabIndex = tabindex;
|
|
1106
1030
|
if (iconTabIndex === void 0 && onClick) {
|
|
@@ -1112,7 +1036,7 @@ var Icon = function Icon2(props, context) {
|
|
|
1112
1036
|
transform: "rotate(".concat(rotate, "deg)")
|
|
1113
1037
|
} : void 0;
|
|
1114
1038
|
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
|
|
1115
|
-
return createVNode("span", _objectSpread$
|
|
1039
|
+
return createVNode("span", _objectSpread$2({
|
|
1116
1040
|
"role": "img",
|
|
1117
1041
|
"aria-label": icon.name
|
|
1118
1042
|
}, restProps, {
|
|
@@ -1137,43 +1061,9 @@ Icon.inheritAttrs = false;
|
|
|
1137
1061
|
Icon.getTwoToneColor = getTwoToneColor;
|
|
1138
1062
|
Icon.setTwoToneColor = setTwoToneColor;
|
|
1139
1063
|
const AntdIcon = Icon;
|
|
1140
|
-
var ClearOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z" } }] }, "name": "clear", "theme": "outlined" };
|
|
1141
|
-
const ClearOutlinedSvg = ClearOutlined$2;
|
|
1142
|
-
function _objectSpread$4(target) {
|
|
1143
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1144
|
-
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
1145
|
-
var ownKeys = Object.keys(source);
|
|
1146
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1147
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1148
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1149
|
-
}));
|
|
1150
|
-
}
|
|
1151
|
-
ownKeys.forEach(function(key) {
|
|
1152
|
-
_defineProperty$4(target, key, source[key]);
|
|
1153
|
-
});
|
|
1154
|
-
}
|
|
1155
|
-
return target;
|
|
1156
|
-
}
|
|
1157
|
-
function _defineProperty$4(obj, key, value) {
|
|
1158
|
-
if (key in obj) {
|
|
1159
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
1160
|
-
} else {
|
|
1161
|
-
obj[key] = value;
|
|
1162
|
-
}
|
|
1163
|
-
return obj;
|
|
1164
|
-
}
|
|
1165
|
-
var ClearOutlined = function ClearOutlined2(props, context) {
|
|
1166
|
-
var p = _objectSpread$4({}, props, context.attrs);
|
|
1167
|
-
return createVNode(AntdIcon, _objectSpread$4({}, p, {
|
|
1168
|
-
"icon": ClearOutlinedSvg
|
|
1169
|
-
}), null);
|
|
1170
|
-
};
|
|
1171
|
-
ClearOutlined.displayName = "ClearOutlined";
|
|
1172
|
-
ClearOutlined.inheritAttrs = false;
|
|
1173
|
-
const ClearOutlined$1 = ClearOutlined;
|
|
1174
1064
|
var DownOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
|
|
1175
1065
|
const DownOutlinedSvg = DownOutlined$2;
|
|
1176
|
-
function _objectSpread$
|
|
1066
|
+
function _objectSpread$1(target) {
|
|
1177
1067
|
for (var i = 1; i < arguments.length; i++) {
|
|
1178
1068
|
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
1179
1069
|
var ownKeys = Object.keys(source);
|
|
@@ -1183,12 +1073,12 @@ function _objectSpread$3(target) {
|
|
|
1183
1073
|
}));
|
|
1184
1074
|
}
|
|
1185
1075
|
ownKeys.forEach(function(key) {
|
|
1186
|
-
_defineProperty$
|
|
1076
|
+
_defineProperty$1(target, key, source[key]);
|
|
1187
1077
|
});
|
|
1188
1078
|
}
|
|
1189
1079
|
return target;
|
|
1190
1080
|
}
|
|
1191
|
-
function _defineProperty$
|
|
1081
|
+
function _defineProperty$1(obj, key, value) {
|
|
1192
1082
|
if (key in obj) {
|
|
1193
1083
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
1194
1084
|
} else {
|
|
@@ -1197,8 +1087,8 @@ function _defineProperty$3(obj, key, value) {
|
|
|
1197
1087
|
return obj;
|
|
1198
1088
|
}
|
|
1199
1089
|
var DownOutlined = function DownOutlined2(props, context) {
|
|
1200
|
-
var p = _objectSpread$
|
|
1201
|
-
return createVNode(AntdIcon, _objectSpread$
|
|
1090
|
+
var p = _objectSpread$1({}, props, context.attrs);
|
|
1091
|
+
return createVNode(AntdIcon, _objectSpread$1({}, p, {
|
|
1202
1092
|
"icon": DownOutlinedSvg
|
|
1203
1093
|
}), null);
|
|
1204
1094
|
};
|
|
@@ -1207,74 +1097,6 @@ DownOutlined.inheritAttrs = false;
|
|
|
1207
1097
|
const DownOutlined$1 = DownOutlined;
|
|
1208
1098
|
var MinusOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "minus", "theme": "outlined" };
|
|
1209
1099
|
const MinusOutlinedSvg = MinusOutlined$2;
|
|
1210
|
-
function _objectSpread$2(target) {
|
|
1211
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1212
|
-
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
1213
|
-
var ownKeys = Object.keys(source);
|
|
1214
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1215
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1216
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1217
|
-
}));
|
|
1218
|
-
}
|
|
1219
|
-
ownKeys.forEach(function(key) {
|
|
1220
|
-
_defineProperty$2(target, key, source[key]);
|
|
1221
|
-
});
|
|
1222
|
-
}
|
|
1223
|
-
return target;
|
|
1224
|
-
}
|
|
1225
|
-
function _defineProperty$2(obj, key, value) {
|
|
1226
|
-
if (key in obj) {
|
|
1227
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
1228
|
-
} else {
|
|
1229
|
-
obj[key] = value;
|
|
1230
|
-
}
|
|
1231
|
-
return obj;
|
|
1232
|
-
}
|
|
1233
|
-
var MinusOutlined = function MinusOutlined2(props, context) {
|
|
1234
|
-
var p = _objectSpread$2({}, props, context.attrs);
|
|
1235
|
-
return createVNode(AntdIcon, _objectSpread$2({}, p, {
|
|
1236
|
-
"icon": MinusOutlinedSvg
|
|
1237
|
-
}), null);
|
|
1238
|
-
};
|
|
1239
|
-
MinusOutlined.displayName = "MinusOutlined";
|
|
1240
|
-
MinusOutlined.inheritAttrs = false;
|
|
1241
|
-
const MinusOutlined$1 = MinusOutlined;
|
|
1242
|
-
var SearchOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
|
|
1243
|
-
const SearchOutlinedSvg = SearchOutlined$2;
|
|
1244
|
-
function _objectSpread$1(target) {
|
|
1245
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1246
|
-
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
1247
|
-
var ownKeys = Object.keys(source);
|
|
1248
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1249
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1250
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1251
|
-
}));
|
|
1252
|
-
}
|
|
1253
|
-
ownKeys.forEach(function(key) {
|
|
1254
|
-
_defineProperty$1(target, key, source[key]);
|
|
1255
|
-
});
|
|
1256
|
-
}
|
|
1257
|
-
return target;
|
|
1258
|
-
}
|
|
1259
|
-
function _defineProperty$1(obj, key, value) {
|
|
1260
|
-
if (key in obj) {
|
|
1261
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
1262
|
-
} else {
|
|
1263
|
-
obj[key] = value;
|
|
1264
|
-
}
|
|
1265
|
-
return obj;
|
|
1266
|
-
}
|
|
1267
|
-
var SearchOutlined = function SearchOutlined2(props, context) {
|
|
1268
|
-
var p = _objectSpread$1({}, props, context.attrs);
|
|
1269
|
-
return createVNode(AntdIcon, _objectSpread$1({}, p, {
|
|
1270
|
-
"icon": SearchOutlinedSvg
|
|
1271
|
-
}), null);
|
|
1272
|
-
};
|
|
1273
|
-
SearchOutlined.displayName = "SearchOutlined";
|
|
1274
|
-
SearchOutlined.inheritAttrs = false;
|
|
1275
|
-
const SearchOutlined$1 = SearchOutlined;
|
|
1276
|
-
var UpOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, "name": "up", "theme": "outlined" };
|
|
1277
|
-
const UpOutlinedSvg = UpOutlined$2;
|
|
1278
1100
|
function _objectSpread(target) {
|
|
1279
1101
|
for (var i = 1; i < arguments.length; i++) {
|
|
1280
1102
|
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
@@ -1298,152 +1120,23 @@ function _defineProperty(obj, key, value) {
|
|
|
1298
1120
|
}
|
|
1299
1121
|
return obj;
|
|
1300
1122
|
}
|
|
1301
|
-
var
|
|
1123
|
+
var MinusOutlined = function MinusOutlined2(props, context) {
|
|
1302
1124
|
var p = _objectSpread({}, props, context.attrs);
|
|
1303
1125
|
return createVNode(AntdIcon, _objectSpread({}, p, {
|
|
1304
|
-
"icon":
|
|
1126
|
+
"icon": MinusOutlinedSvg
|
|
1305
1127
|
}), null);
|
|
1306
1128
|
};
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
const
|
|
1310
|
-
const _hoisted_1$1 = { class: "shy-search" };
|
|
1311
|
-
const _hoisted_2$1 = { class: "button-wrapper" };
|
|
1312
|
-
const _hoisted_3$1 = { class: "expand-line" };
|
|
1313
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1314
|
-
__name: "IndexView",
|
|
1315
|
-
props: {
|
|
1316
|
-
column: { default: () => [] }
|
|
1317
|
-
},
|
|
1318
|
-
emits: ["search-change"],
|
|
1319
|
-
setup(__props, { expose, emit }) {
|
|
1320
|
-
const props = __props;
|
|
1321
|
-
const form = ref({});
|
|
1322
|
-
const searchColumn = computed(() => {
|
|
1323
|
-
return props.column.map((item) => {
|
|
1324
|
-
item.span = 8;
|
|
1325
|
-
return item;
|
|
1326
|
-
});
|
|
1327
|
-
});
|
|
1328
|
-
const baseColumn = computed(() => {
|
|
1329
|
-
return searchColumn.value.length >= 3 ? searchColumn.value.slice(0, 3) : searchColumn.value;
|
|
1330
|
-
});
|
|
1331
|
-
const currentColumn = ref();
|
|
1332
|
-
const isExpanded = ref(false);
|
|
1333
|
-
const expandEvent = () => {
|
|
1334
|
-
isExpanded.value = !isExpanded.value;
|
|
1335
|
-
};
|
|
1336
|
-
watchEffect(() => {
|
|
1337
|
-
if (isExpanded.value) {
|
|
1338
|
-
currentColumn.value = searchColumn.value;
|
|
1339
|
-
} else {
|
|
1340
|
-
currentColumn.value = baseColumn.value;
|
|
1341
|
-
}
|
|
1342
|
-
});
|
|
1343
|
-
const isExpandFlag = computed(() => {
|
|
1344
|
-
return searchColumn.value.length >= 3 ? true : false;
|
|
1345
|
-
});
|
|
1346
|
-
const iconStyle = {
|
|
1347
|
-
fontSize: "7px",
|
|
1348
|
-
color: "#919191"
|
|
1349
|
-
};
|
|
1350
|
-
const getForm = () => {
|
|
1351
|
-
return form.value;
|
|
1352
|
-
};
|
|
1353
|
-
const searchChangeEvent = () => {
|
|
1354
|
-
emit("search-change", form.value);
|
|
1355
|
-
};
|
|
1356
|
-
const searchResetEvent = () => {
|
|
1357
|
-
form.value = {};
|
|
1358
|
-
emit("search-change", {});
|
|
1359
|
-
};
|
|
1360
|
-
expose({ getForm });
|
|
1361
|
-
return (_ctx, _cache) => {
|
|
1362
|
-
const _component_a_col = resolveComponent("a-col");
|
|
1363
|
-
const _component_a_button = resolveComponent("a-button");
|
|
1364
|
-
const _component_a_row = resolveComponent("a-row");
|
|
1365
|
-
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
1366
|
-
createVNode(_component_a_row, null, {
|
|
1367
|
-
default: withCtx(() => [
|
|
1368
|
-
createVNode(_component_a_col, { span: 18 }, {
|
|
1369
|
-
default: withCtx(() => [
|
|
1370
|
-
createVNode(_sfc_main$4, {
|
|
1371
|
-
form: form.value,
|
|
1372
|
-
"onUpdate:form": _cache[0] || (_cache[0] = ($event) => form.value = $event),
|
|
1373
|
-
column: currentColumn.value
|
|
1374
|
-
}, null, 8, ["form", "column"])
|
|
1375
|
-
]),
|
|
1376
|
-
_: 1
|
|
1377
|
-
}),
|
|
1378
|
-
createVNode(_component_a_col, { span: 6 }, {
|
|
1379
|
-
default: withCtx(() => [
|
|
1380
|
-
createElementVNode("div", _hoisted_2$1, [
|
|
1381
|
-
createVNode(_component_a_button, {
|
|
1382
|
-
class: "button-search",
|
|
1383
|
-
type: "primary",
|
|
1384
|
-
onClick: searchChangeEvent
|
|
1385
|
-
}, {
|
|
1386
|
-
icon: withCtx(() => [
|
|
1387
|
-
createVNode(unref(SearchOutlined$1))
|
|
1388
|
-
]),
|
|
1389
|
-
default: withCtx(() => [
|
|
1390
|
-
createTextVNode(" \u67E5\u8BE2 ")
|
|
1391
|
-
]),
|
|
1392
|
-
_: 1
|
|
1393
|
-
}),
|
|
1394
|
-
createVNode(_component_a_button, { onClick: searchResetEvent }, {
|
|
1395
|
-
icon: withCtx(() => [
|
|
1396
|
-
createVNode(unref(ClearOutlined$1))
|
|
1397
|
-
]),
|
|
1398
|
-
default: withCtx(() => [
|
|
1399
|
-
createTextVNode(" \u91CD\u7F6E ")
|
|
1400
|
-
]),
|
|
1401
|
-
_: 1
|
|
1402
|
-
})
|
|
1403
|
-
])
|
|
1404
|
-
]),
|
|
1405
|
-
_: 1
|
|
1406
|
-
})
|
|
1407
|
-
]),
|
|
1408
|
-
_: 1
|
|
1409
|
-
}),
|
|
1410
|
-
createElementVNode("div", _hoisted_3$1, [
|
|
1411
|
-
unref(isExpandFlag) ? (openBlock(), createElementBlock("div", {
|
|
1412
|
-
key: 0,
|
|
1413
|
-
class: "expand-flag",
|
|
1414
|
-
onClick: expandEvent
|
|
1415
|
-
}, [
|
|
1416
|
-
isExpanded.value ? (openBlock(), createBlock(unref(UpOutlined$1), {
|
|
1417
|
-
key: 0,
|
|
1418
|
-
style: iconStyle
|
|
1419
|
-
})) : (openBlock(), createBlock(unref(DownOutlined$1), {
|
|
1420
|
-
key: 1,
|
|
1421
|
-
style: iconStyle
|
|
1422
|
-
}))
|
|
1423
|
-
])) : createCommentVNode("", true)
|
|
1424
|
-
])
|
|
1425
|
-
]);
|
|
1426
|
-
};
|
|
1427
|
-
}
|
|
1428
|
-
});
|
|
1429
|
-
const IndexView_vue_vue_type_style_index_0_scoped_4bb16c80_lang = "";
|
|
1430
|
-
const _export_sfc = (sfc, props) => {
|
|
1431
|
-
const target = sfc.__vccOpts || sfc;
|
|
1432
|
-
for (const [key, val] of props) {
|
|
1433
|
-
target[key] = val;
|
|
1434
|
-
}
|
|
1435
|
-
return target;
|
|
1436
|
-
};
|
|
1437
|
-
const ShySearch = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4bb16c80"]]);
|
|
1438
|
-
const style = "";
|
|
1129
|
+
MinusOutlined.displayName = "MinusOutlined";
|
|
1130
|
+
MinusOutlined.inheritAttrs = false;
|
|
1131
|
+
const MinusOutlined$1 = MinusOutlined;
|
|
1439
1132
|
const _withScopeId = (n) => (pushScopeId("data-v-68169e62"), n = n(), popScopeId(), n);
|
|
1440
|
-
const _hoisted_1 = { class: "button-group" };
|
|
1441
|
-
const _hoisted_2 = { class: "flex-button" };
|
|
1442
|
-
const _hoisted_3 = ["onClick"];
|
|
1443
|
-
const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("a", { href: "javascript:;" }, "1st menu item", -1));
|
|
1444
|
-
const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("a", { href: "javascript:;" }, "2nd menu item", -1));
|
|
1445
|
-
const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("a", { href: "javascript:;" }, "3rd menu item", -1));
|
|
1446
|
-
const _sfc_main$
|
|
1133
|
+
const _hoisted_1$2 = { class: "button-group" };
|
|
1134
|
+
const _hoisted_2$1 = { class: "flex-button" };
|
|
1135
|
+
const _hoisted_3$1 = ["onClick"];
|
|
1136
|
+
const _hoisted_4$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("a", { href: "javascript:;" }, "1st menu item", -1));
|
|
1137
|
+
const _hoisted_5$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("a", { href: "javascript:;" }, "2nd menu item", -1));
|
|
1138
|
+
const _hoisted_6$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("a", { href: "javascript:;" }, "3rd menu item", -1));
|
|
1139
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1447
1140
|
__name: "ButtonGroup",
|
|
1448
1141
|
props: {
|
|
1449
1142
|
data: null
|
|
@@ -1472,8 +1165,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1472
1165
|
const _component_a_menu_item = resolveComponent("a-menu-item");
|
|
1473
1166
|
const _component_a_menu = resolveComponent("a-menu");
|
|
1474
1167
|
const _component_a_dropdown = resolveComponent("a-dropdown");
|
|
1475
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1476
|
-
createElementVNode("div", _hoisted_2, [
|
|
1168
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
1169
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
1477
1170
|
(openBlock(true), createElementBlock(Fragment, null, renderList(baseButtonList.value, (button, index2) => {
|
|
1478
1171
|
return openBlock(), createElementBlock(Fragment, { key: index2 }, [
|
|
1479
1172
|
createVNode(_component_a_popconfirm, {
|
|
@@ -1489,7 +1182,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1489
1182
|
createElementVNode("span", {
|
|
1490
1183
|
style: normalizeStyle(setStyle(button.dataIndex))
|
|
1491
1184
|
}, toDisplayString(button.title), 5)
|
|
1492
|
-
], 8, _hoisted_3)
|
|
1185
|
+
], 8, _hoisted_3$1)
|
|
1493
1186
|
]),
|
|
1494
1187
|
_: 2
|
|
1495
1188
|
}, 1024),
|
|
@@ -1505,19 +1198,19 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1505
1198
|
default: withCtx(() => [
|
|
1506
1199
|
createVNode(_component_a_menu_item, null, {
|
|
1507
1200
|
default: withCtx(() => [
|
|
1508
|
-
_hoisted_4
|
|
1201
|
+
_hoisted_4$1
|
|
1509
1202
|
]),
|
|
1510
1203
|
_: 1
|
|
1511
1204
|
}),
|
|
1512
1205
|
createVNode(_component_a_menu_item, null, {
|
|
1513
1206
|
default: withCtx(() => [
|
|
1514
|
-
_hoisted_5
|
|
1207
|
+
_hoisted_5$1
|
|
1515
1208
|
]),
|
|
1516
1209
|
_: 1
|
|
1517
1210
|
}),
|
|
1518
1211
|
createVNode(_component_a_menu_item, null, {
|
|
1519
1212
|
default: withCtx(() => [
|
|
1520
|
-
_hoisted_6
|
|
1213
|
+
_hoisted_6$1
|
|
1521
1214
|
]),
|
|
1522
1215
|
_: 1
|
|
1523
1216
|
})
|
|
@@ -1543,18 +1236,24 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1543
1236
|
}
|
|
1544
1237
|
});
|
|
1545
1238
|
const ButtonGroup_vue_vue_type_style_index_0_scoped_68169e62_lang = "";
|
|
1546
|
-
const
|
|
1547
|
-
const
|
|
1239
|
+
const _export_sfc = (sfc, props) => {
|
|
1240
|
+
const target = sfc.__vccOpts || sfc;
|
|
1241
|
+
for (const [key, val] of props) {
|
|
1242
|
+
target[key] = val;
|
|
1243
|
+
}
|
|
1244
|
+
return target;
|
|
1245
|
+
};
|
|
1246
|
+
const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-68169e62"]]);
|
|
1247
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1548
1248
|
__name: "IndexView",
|
|
1549
1249
|
props: {
|
|
1550
1250
|
isCheckbox: { type: Boolean, default: true },
|
|
1551
|
-
isIndex: { type: Boolean, default: true },
|
|
1552
|
-
isMenu: { type: Boolean, default: true },
|
|
1553
1251
|
column: null,
|
|
1554
1252
|
data: { default: () => [] },
|
|
1555
1253
|
rowHeight: { default: 40 },
|
|
1556
1254
|
height: { default: void 0 },
|
|
1557
|
-
menuWidth: { default: 160 }
|
|
1255
|
+
menuWidth: { default: 160 },
|
|
1256
|
+
isMenu: { type: Boolean, default: false }
|
|
1558
1257
|
},
|
|
1559
1258
|
emits: [
|
|
1560
1259
|
"page-change",
|
|
@@ -1610,23 +1309,22 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1610
1309
|
size: "small"
|
|
1611
1310
|
}, {
|
|
1612
1311
|
default: withCtx(() => [
|
|
1613
|
-
|
|
1312
|
+
__props.isCheckbox ? (openBlock(), createBlock(unref(VxeColumn), {
|
|
1614
1313
|
key: 0,
|
|
1615
1314
|
type: "checkbox",
|
|
1616
1315
|
width: "60"
|
|
1617
1316
|
})) : createCommentVNode("", true),
|
|
1618
|
-
|
|
1619
|
-
key: 1,
|
|
1317
|
+
createVNode(unref(VxeColumn), {
|
|
1620
1318
|
type: "seq",
|
|
1621
1319
|
width: "60",
|
|
1622
1320
|
title: "\u5E8F\u53F7",
|
|
1623
1321
|
align: "center"
|
|
1624
|
-
})
|
|
1322
|
+
}),
|
|
1625
1323
|
(openBlock(true), createElementBlock(Fragment, null, renderList(props.column, (column, index2) => {
|
|
1626
1324
|
return openBlock(), createBlock(unref(VxeColumn), {
|
|
1627
1325
|
key: index2,
|
|
1628
|
-
field: column.
|
|
1629
|
-
title: column.
|
|
1326
|
+
field: column.dataIndex,
|
|
1327
|
+
title: column.title,
|
|
1630
1328
|
width: (column == null ? void 0 : column.width) || void 0,
|
|
1631
1329
|
align: "center"
|
|
1632
1330
|
}, createSlots({ _: 2 }, [
|
|
@@ -1642,7 +1340,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1642
1340
|
]), 1032, ["field", "title", "width"]);
|
|
1643
1341
|
}), 128)),
|
|
1644
1342
|
props.isMenu ? (openBlock(), createBlock(unref(VxeColumn), {
|
|
1645
|
-
key:
|
|
1343
|
+
key: 1,
|
|
1646
1344
|
align: "center",
|
|
1647
1345
|
title: "\u64CD\u4F5C",
|
|
1648
1346
|
width: props.menuWidth
|
|
@@ -1661,16 +1359,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1661
1359
|
};
|
|
1662
1360
|
}
|
|
1663
1361
|
});
|
|
1664
|
-
const
|
|
1665
|
-
const ShyTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1666
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1362
|
+
const IndexView_vue_vue_type_style_index_0_scoped_9dac58ff_lang = "";
|
|
1363
|
+
const ShyTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-9dac58ff"]]);
|
|
1364
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1667
1365
|
__name: "IndexView",
|
|
1668
1366
|
props: {
|
|
1669
1367
|
page: { default: () => {
|
|
1670
1368
|
return {
|
|
1671
1369
|
current: 1,
|
|
1672
1370
|
pageSize: 10,
|
|
1673
|
-
total:
|
|
1371
|
+
total: 50
|
|
1674
1372
|
};
|
|
1675
1373
|
} }
|
|
1676
1374
|
},
|
|
@@ -1700,7 +1398,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1700
1398
|
return openBlock(), createBlock(unref(ConfigProvider), { locale: unref(zhCN) }, {
|
|
1701
1399
|
default: withCtx(() => [
|
|
1702
1400
|
createVNode(unref(Pagination), {
|
|
1703
|
-
class: "shy-page",
|
|
1704
1401
|
current: current.value,
|
|
1705
1402
|
"onUpdate:current": _cache[0] || (_cache[0] = ($event) => current.value = $event),
|
|
1706
1403
|
pageSize: pageSize.value,
|
|
@@ -1717,20 +1414,386 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1717
1414
|
};
|
|
1718
1415
|
}
|
|
1719
1416
|
});
|
|
1720
|
-
const
|
|
1721
|
-
const
|
|
1417
|
+
const _hoisted_1$1 = { class: "dialog-footer" };
|
|
1418
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1419
|
+
__name: "indexView",
|
|
1420
|
+
props: {
|
|
1421
|
+
isButton: { type: Boolean, default: true }
|
|
1422
|
+
},
|
|
1423
|
+
setup(__props, { expose }) {
|
|
1424
|
+
const visible = ref(true);
|
|
1425
|
+
const confirmEvent = () => {
|
|
1426
|
+
};
|
|
1427
|
+
const cancelEvent = () => {
|
|
1428
|
+
};
|
|
1429
|
+
const open = () => {
|
|
1430
|
+
visible.value = true;
|
|
1431
|
+
};
|
|
1432
|
+
expose({ open });
|
|
1433
|
+
return (_ctx, _cache) => {
|
|
1434
|
+
return openBlock(), createBlock(unref(Modal), {
|
|
1435
|
+
visible: visible.value,
|
|
1436
|
+
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible.value = $event)
|
|
1437
|
+
}, {
|
|
1438
|
+
footer: withCtx(() => [
|
|
1439
|
+
createElementVNode("div", _hoisted_1$1, [
|
|
1440
|
+
createVNode(unref(Button), {
|
|
1441
|
+
key: "back",
|
|
1442
|
+
type: "primary",
|
|
1443
|
+
onClick: confirmEvent
|
|
1444
|
+
}, {
|
|
1445
|
+
default: withCtx(() => [
|
|
1446
|
+
createTextVNode("\u786E\u5B9A")
|
|
1447
|
+
]),
|
|
1448
|
+
_: 1
|
|
1449
|
+
}),
|
|
1450
|
+
createVNode(unref(Button), {
|
|
1451
|
+
key: "submit",
|
|
1452
|
+
onClick: cancelEvent
|
|
1453
|
+
}, {
|
|
1454
|
+
default: withCtx(() => [
|
|
1455
|
+
createTextVNode("\u53D6\u6D88")
|
|
1456
|
+
]),
|
|
1457
|
+
_: 1
|
|
1458
|
+
})
|
|
1459
|
+
]),
|
|
1460
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1461
|
+
]),
|
|
1462
|
+
default: withCtx(() => [
|
|
1463
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1464
|
+
]),
|
|
1465
|
+
_: 3
|
|
1466
|
+
}, 8, ["visible"]);
|
|
1467
|
+
};
|
|
1468
|
+
}
|
|
1469
|
+
});
|
|
1470
|
+
const indexView_vue_vue_type_style_index_0_scoped_c7d885ad_lang = "";
|
|
1471
|
+
const ShyDialog = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-c7d885ad"]]);
|
|
1472
|
+
const _hoisted_1 = { class: "user-select" };
|
|
1473
|
+
const _hoisted_2 = { class: "tags-selected" };
|
|
1474
|
+
const _hoisted_3 = { class: "user-body" };
|
|
1475
|
+
const _hoisted_4 = { class: "tab-wrapper" };
|
|
1476
|
+
const _hoisted_5 = { class: "user-wrapper" };
|
|
1477
|
+
const _hoisted_6 = {
|
|
1478
|
+
key: 0,
|
|
1479
|
+
class: "tree-select"
|
|
1480
|
+
};
|
|
1481
|
+
const _hoisted_7 = { class: "tree-item" };
|
|
1482
|
+
const _hoisted_8 = {
|
|
1483
|
+
key: 1,
|
|
1484
|
+
class: "all-user"
|
|
1485
|
+
};
|
|
1486
|
+
const _hoisted_9 = {
|
|
1487
|
+
key: 2,
|
|
1488
|
+
class: "all-organization"
|
|
1489
|
+
};
|
|
1490
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1491
|
+
__name: "IndexView",
|
|
1492
|
+
props: {
|
|
1493
|
+
userFun: { default: () => {
|
|
1494
|
+
return [
|
|
1495
|
+
{
|
|
1496
|
+
name: "\u5305\u78CA",
|
|
1497
|
+
id: 1
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
name: "\u674E\u91D1\u7389",
|
|
1501
|
+
id: 2
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
name: "\u9A6C\u5A77\u5A77",
|
|
1505
|
+
id: 3
|
|
1506
|
+
}
|
|
1507
|
+
];
|
|
1508
|
+
} },
|
|
1509
|
+
deptFun: { default: () => {
|
|
1510
|
+
return [
|
|
1511
|
+
{
|
|
1512
|
+
title: "\u56FD\u8425\u673A\u68B0\u5382",
|
|
1513
|
+
key: "0-0",
|
|
1514
|
+
id: "0-0",
|
|
1515
|
+
children: [
|
|
1516
|
+
{
|
|
1517
|
+
title: "\u6570\u7BA1\u4E2D\u5FC3",
|
|
1518
|
+
key: "0-0-0",
|
|
1519
|
+
id: "0-0-0",
|
|
1520
|
+
children: [
|
|
1521
|
+
{
|
|
1522
|
+
title: "leaf",
|
|
1523
|
+
key: "0-0-0-0",
|
|
1524
|
+
id: "0-0-0-0"
|
|
1525
|
+
},
|
|
1526
|
+
{ title: "leaf", key: "0-0-0-1", id: "0-0-0-1" }
|
|
1527
|
+
]
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
title: "\u63A7\u5236\u4E2D\u5FC3",
|
|
1531
|
+
key: "0-0-1",
|
|
1532
|
+
id: "0-0-1",
|
|
1533
|
+
children: [{ key: "0-0-1-0", id: "0-0-1-0", title: "sss" }]
|
|
1534
|
+
}
|
|
1535
|
+
]
|
|
1536
|
+
}
|
|
1537
|
+
];
|
|
1538
|
+
} }
|
|
1539
|
+
},
|
|
1540
|
+
emits: ["confirm"],
|
|
1541
|
+
setup(__props, { emit }) {
|
|
1542
|
+
const props = __props;
|
|
1543
|
+
const activeKey = ref("1");
|
|
1544
|
+
const format = (list) => {
|
|
1545
|
+
let array;
|
|
1546
|
+
array = list.map((item) => {
|
|
1547
|
+
const obj = {};
|
|
1548
|
+
obj.title = item.deptName;
|
|
1549
|
+
obj.key = item.id;
|
|
1550
|
+
if (item.children) {
|
|
1551
|
+
obj.children = format(item.children);
|
|
1552
|
+
}
|
|
1553
|
+
return obj;
|
|
1554
|
+
});
|
|
1555
|
+
return array;
|
|
1556
|
+
};
|
|
1557
|
+
const loadKv = async () => {
|
|
1558
|
+
try {
|
|
1559
|
+
const res = await props.deptFun();
|
|
1560
|
+
organization.value = format(res);
|
|
1561
|
+
const res2 = await props.userFun();
|
|
1562
|
+
userList.value = res2;
|
|
1563
|
+
allUserList.value = res2;
|
|
1564
|
+
} catch (err) {
|
|
1565
|
+
console.log("err", err);
|
|
1566
|
+
}
|
|
1567
|
+
};
|
|
1568
|
+
loadKv();
|
|
1569
|
+
const getOrganizationName = (list) => {
|
|
1570
|
+
let obj = {};
|
|
1571
|
+
list.forEach((item) => {
|
|
1572
|
+
obj[item.key] = item.title;
|
|
1573
|
+
if (item.children) {
|
|
1574
|
+
let childrenObj = getOrganizationName(item.children);
|
|
1575
|
+
obj = { ...obj, ...childrenObj };
|
|
1576
|
+
}
|
|
1577
|
+
});
|
|
1578
|
+
return obj;
|
|
1579
|
+
};
|
|
1580
|
+
const titleMap = computed(() => {
|
|
1581
|
+
const obj = {};
|
|
1582
|
+
userList.value.forEach((item) => {
|
|
1583
|
+
obj[item.id] = item.name;
|
|
1584
|
+
});
|
|
1585
|
+
const organizationObj = getOrganizationName(organization.value);
|
|
1586
|
+
return { ...obj, ...organizationObj };
|
|
1587
|
+
});
|
|
1588
|
+
const activeChangeEvent = (value) => {
|
|
1589
|
+
console.log("value", value);
|
|
1590
|
+
};
|
|
1591
|
+
const selectedKeys = ref([]);
|
|
1592
|
+
const userSelected = ref([]);
|
|
1593
|
+
const userList = ref([[]]);
|
|
1594
|
+
const organization = ref([]);
|
|
1595
|
+
const loadUser = async (deptId) => {
|
|
1596
|
+
try {
|
|
1597
|
+
const res = await props.userFun(deptId);
|
|
1598
|
+
userList.value = res;
|
|
1599
|
+
} catch (err) {
|
|
1600
|
+
console.log("err", err);
|
|
1601
|
+
}
|
|
1602
|
+
};
|
|
1603
|
+
const selectChangeEvent = (value) => {
|
|
1604
|
+
const deptId = value[0];
|
|
1605
|
+
loadUser(deptId);
|
|
1606
|
+
};
|
|
1607
|
+
const allUserList = ref([]);
|
|
1608
|
+
const allUserSelected = ref([]);
|
|
1609
|
+
const organizationChecked = ref([]);
|
|
1610
|
+
const tagList = ref([]);
|
|
1611
|
+
const closeEvent = (id, type) => {
|
|
1612
|
+
if (type === 1) {
|
|
1613
|
+
const index2 = userSelected.value.findIndex((item) => {
|
|
1614
|
+
return item === id;
|
|
1615
|
+
});
|
|
1616
|
+
userSelected.value.splice(index2, 1);
|
|
1617
|
+
} else if (type === 2) {
|
|
1618
|
+
const index2 = allUserSelected.value.findIndex((item) => {
|
|
1619
|
+
return item === id;
|
|
1620
|
+
});
|
|
1621
|
+
allUserSelected.value.splice(index2, 1);
|
|
1622
|
+
} else if (type === 3) {
|
|
1623
|
+
const index2 = organizationChecked.value.findIndex((item) => {
|
|
1624
|
+
return item === id;
|
|
1625
|
+
});
|
|
1626
|
+
organizationChecked.value.splice(index2, 1);
|
|
1627
|
+
}
|
|
1628
|
+
};
|
|
1629
|
+
watchEffect(() => {
|
|
1630
|
+
tagList.value = [];
|
|
1631
|
+
userSelected.value.forEach((item) => {
|
|
1632
|
+
tagList.value.push({
|
|
1633
|
+
id: item,
|
|
1634
|
+
color: "#108ee9",
|
|
1635
|
+
type: 1,
|
|
1636
|
+
name: titleMap.value[item]
|
|
1637
|
+
});
|
|
1638
|
+
});
|
|
1639
|
+
allUserSelected.value.forEach((item) => {
|
|
1640
|
+
tagList.value.push({
|
|
1641
|
+
id: item,
|
|
1642
|
+
color: "#108ee9",
|
|
1643
|
+
type: 2,
|
|
1644
|
+
name: titleMap.value[item]
|
|
1645
|
+
});
|
|
1646
|
+
});
|
|
1647
|
+
organizationChecked.value.forEach((item) => {
|
|
1648
|
+
tagList.value.push({
|
|
1649
|
+
id: item,
|
|
1650
|
+
color: "#87d068",
|
|
1651
|
+
type: 3,
|
|
1652
|
+
name: titleMap.value[item]
|
|
1653
|
+
});
|
|
1654
|
+
});
|
|
1655
|
+
});
|
|
1656
|
+
const confirmEvent = () => {
|
|
1657
|
+
emit("confirm", tagList.value);
|
|
1658
|
+
};
|
|
1659
|
+
return (_ctx, _cache) => {
|
|
1660
|
+
const _component_a_checkbox = resolveComponent("a-checkbox");
|
|
1661
|
+
const _component_a_checkbox_group = resolveComponent("a-checkbox-group");
|
|
1662
|
+
return openBlock(), createBlock(ShyDialog, {
|
|
1663
|
+
width: "50vw",
|
|
1664
|
+
title: "\u4EFB\u52A1\u9009\u62E9\u5668",
|
|
1665
|
+
onConfirm: confirmEvent
|
|
1666
|
+
}, {
|
|
1667
|
+
default: withCtx(() => [
|
|
1668
|
+
createElementVNode("div", _hoisted_1, [
|
|
1669
|
+
createElementVNode("div", _hoisted_2, [
|
|
1670
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(tagList.value, (item, index2) => {
|
|
1671
|
+
return openBlock(), createBlock(unref(Tag), {
|
|
1672
|
+
key: index2,
|
|
1673
|
+
closable: "",
|
|
1674
|
+
onClose: withModifiers(($event) => closeEvent(item.id, item.type), ["prevent"]),
|
|
1675
|
+
color: item.color
|
|
1676
|
+
}, {
|
|
1677
|
+
default: withCtx(() => [
|
|
1678
|
+
createTextVNode(toDisplayString(item.name), 1)
|
|
1679
|
+
]),
|
|
1680
|
+
_: 2
|
|
1681
|
+
}, 1032, ["onClose", "color"]);
|
|
1682
|
+
}), 128))
|
|
1683
|
+
]),
|
|
1684
|
+
createElementVNode("div", _hoisted_3, [
|
|
1685
|
+
createElementVNode("div", _hoisted_4, [
|
|
1686
|
+
createVNode(unref(Tabs), {
|
|
1687
|
+
class: "flex-tab",
|
|
1688
|
+
activeKey: activeKey.value,
|
|
1689
|
+
"onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => activeKey.value = $event),
|
|
1690
|
+
onChange: activeChangeEvent
|
|
1691
|
+
}, {
|
|
1692
|
+
default: withCtx(() => [
|
|
1693
|
+
createVNode(unref(TabPane), {
|
|
1694
|
+
key: "1",
|
|
1695
|
+
tab: "\u7EC4\u7EC7\u67B6\u6784"
|
|
1696
|
+
}),
|
|
1697
|
+
createVNode(unref(TabPane), {
|
|
1698
|
+
key: "2",
|
|
1699
|
+
tab: "\u6210\u5458"
|
|
1700
|
+
}),
|
|
1701
|
+
createVNode(unref(TabPane), {
|
|
1702
|
+
key: "3",
|
|
1703
|
+
tab: "\u7EC4\u7EC7"
|
|
1704
|
+
})
|
|
1705
|
+
]),
|
|
1706
|
+
_: 1
|
|
1707
|
+
}, 8, ["activeKey"]),
|
|
1708
|
+
createVNode(unref(Input), {
|
|
1709
|
+
class: "flex-input",
|
|
1710
|
+
placeholder: "\u641C\u7D22"
|
|
1711
|
+
})
|
|
1712
|
+
]),
|
|
1713
|
+
createElementVNode("div", _hoisted_5, [
|
|
1714
|
+
activeKey.value === "1" ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
1715
|
+
createElementVNode("div", _hoisted_7, [
|
|
1716
|
+
createVNode(unref(Tree), {
|
|
1717
|
+
autoExpandParent: true,
|
|
1718
|
+
"tree-data": organization.value,
|
|
1719
|
+
selectedKeys: selectedKeys.value,
|
|
1720
|
+
"onUpdate:selectedKeys": _cache[1] || (_cache[1] = ($event) => selectedKeys.value = $event),
|
|
1721
|
+
onSelect: selectChangeEvent
|
|
1722
|
+
}, null, 8, ["tree-data", "selectedKeys"])
|
|
1723
|
+
]),
|
|
1724
|
+
createVNode(_component_a_checkbox_group, {
|
|
1725
|
+
class: "tree-item",
|
|
1726
|
+
value: userSelected.value,
|
|
1727
|
+
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => userSelected.value = $event)
|
|
1728
|
+
}, {
|
|
1729
|
+
default: withCtx(() => [
|
|
1730
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(userList.value, (item, index2) => {
|
|
1731
|
+
return openBlock(), createElementBlock("div", {
|
|
1732
|
+
key: index2,
|
|
1733
|
+
class: "tree-row"
|
|
1734
|
+
}, [
|
|
1735
|
+
createElementVNode("div", null, toDisplayString(item.name), 1),
|
|
1736
|
+
createVNode(_component_a_checkbox, {
|
|
1737
|
+
value: item.id
|
|
1738
|
+
}, null, 8, ["value"])
|
|
1739
|
+
]);
|
|
1740
|
+
}), 128))
|
|
1741
|
+
]),
|
|
1742
|
+
_: 1
|
|
1743
|
+
}, 8, ["value"])
|
|
1744
|
+
])) : activeKey.value === "2" ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
1745
|
+
createVNode(_component_a_checkbox_group, {
|
|
1746
|
+
value: allUserSelected.value,
|
|
1747
|
+
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => allUserSelected.value = $event)
|
|
1748
|
+
}, {
|
|
1749
|
+
default: withCtx(() => [
|
|
1750
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(allUserList.value, (item, index2) => {
|
|
1751
|
+
return openBlock(), createElementBlock("div", {
|
|
1752
|
+
key: index2,
|
|
1753
|
+
class: "tree-row"
|
|
1754
|
+
}, [
|
|
1755
|
+
createElementVNode("div", null, toDisplayString(item.name), 1),
|
|
1756
|
+
createVNode(_component_a_checkbox, {
|
|
1757
|
+
value: item.id
|
|
1758
|
+
}, null, 8, ["value"])
|
|
1759
|
+
]);
|
|
1760
|
+
}), 128))
|
|
1761
|
+
]),
|
|
1762
|
+
_: 1
|
|
1763
|
+
}, 8, ["value"])
|
|
1764
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
1765
|
+
createVNode(unref(Tree), {
|
|
1766
|
+
selectable: false,
|
|
1767
|
+
autoExpandParent: true,
|
|
1768
|
+
checkable: "",
|
|
1769
|
+
"tree-data": organization.value,
|
|
1770
|
+
checkedKeys: organizationChecked.value,
|
|
1771
|
+
"onUpdate:checkedKeys": _cache[4] || (_cache[4] = ($event) => organizationChecked.value = $event)
|
|
1772
|
+
}, null, 8, ["tree-data", "checkedKeys"])
|
|
1773
|
+
]))
|
|
1774
|
+
])
|
|
1775
|
+
])
|
|
1776
|
+
])
|
|
1777
|
+
]),
|
|
1778
|
+
_: 1
|
|
1779
|
+
});
|
|
1780
|
+
};
|
|
1781
|
+
}
|
|
1782
|
+
});
|
|
1783
|
+
const IndexView_vue_vue_type_style_index_0_scoped_4f4e2ba2_lang = "";
|
|
1784
|
+
const UserSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4f4e2ba2"]]);
|
|
1722
1785
|
const index = {
|
|
1723
1786
|
install(app) {
|
|
1724
|
-
app.component("s-search", ShySearch);
|
|
1725
|
-
app.component("s-form", _sfc_main$4);
|
|
1726
1787
|
app.component("s-table", ShyTable);
|
|
1727
|
-
app.component("s-page",
|
|
1788
|
+
app.component("s-page", _sfc_main$2);
|
|
1789
|
+
app.component("s-dialog", ShyDialog);
|
|
1790
|
+
app.component("user-select", UserSelect);
|
|
1728
1791
|
}
|
|
1729
1792
|
};
|
|
1730
1793
|
export {
|
|
1731
|
-
|
|
1732
|
-
ShyPage,
|
|
1733
|
-
ShySearch,
|
|
1794
|
+
ShyDialog,
|
|
1795
|
+
_sfc_main$2 as ShyPage,
|
|
1734
1796
|
ShyTable,
|
|
1797
|
+
UserSelect,
|
|
1735
1798
|
index as default
|
|
1736
1799
|
};
|