add soultable 下载名称 自动隐藏
This commit is contained in:
parent
cb5a696c09
commit
1686971f8c
File diff suppressed because one or more lines are too long
@ -39,7 +39,7 @@ const _hoisted_8$2 = {
|
||||
class: "layui-table-cell-expand-icon-spaced"
|
||||
};
|
||||
const _hoisted_9$2 = ["colspan", "rowspan", "onClick"];
|
||||
const _hoisted_10$1 = {
|
||||
const _hoisted_10$2 = {
|
||||
key: 1,
|
||||
class: "layui-table-cell-expand-icon-spaced"
|
||||
};
|
||||
@ -464,7 +464,7 @@ const _sfc_main$3 = defineComponent({
|
||||
key: 0,
|
||||
style: normalizeStyle({ "margin-right": __props.currentIndentSize + "px" })
|
||||
}, null, 4)) : createCommentVNode("", true),
|
||||
__props.expandSpace && !__props.data[__props.childrenColumnName] && !unref(slot).expand && columnIndex === __props.expandIndex ? (openBlock(), createElementBlock("span", _hoisted_10$1)) : createCommentVNode("", true),
|
||||
__props.expandSpace && !__props.data[__props.childrenColumnName] && !unref(slot).expand && columnIndex === __props.expandIndex ? (openBlock(), createElementBlock("span", _hoisted_10$2)) : createCommentVNode("", true),
|
||||
(unref(slot).expand || __props.data[__props.childrenColumnName]) && columnIndex === __props.expandIndex ? (openBlock(), createBlock(unref(_sfc_main$2E), {
|
||||
key: 2,
|
||||
class: "layui-table-cell-expand-icon",
|
||||
@ -637,34 +637,48 @@ const _sfc_main$2 = defineComponent({
|
||||
};
|
||||
}
|
||||
});
|
||||
var soultable = /* @__PURE__ */ (() => ".soulbox{background-color:#333;color:#fff;display:inline-block;position:absolute;z-index:2147483647;min-width:160px;max-width:300px;overflow-y:auto;border:1px solid #e6e6e6;border-radius:5px;box-shadow:2px 2px 4px -2px #0003}\n")();
|
||||
var soultable = /* @__PURE__ */ (() => ".soulbox{background-color:#333;color:#fff;display:inline-block;position:absolute;z-index:2147483647;min-width:160px;max-width:320px;overflow-y:auto;border:1px solid #e6e6e6;border-radius:5px;box-shadow:2px 2px 4px -2px #0003}\n")();
|
||||
const _hoisted_1$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-asc" }, null, -1);
|
||||
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-desc" }, null, -1);
|
||||
const _hoisted_3$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-drop-list" }, null, -1);
|
||||
const _hoisted_4$1 = /* @__PURE__ */ createElementVNode("i", {
|
||||
class: "layui-icon layui-icon-right",
|
||||
style: { "float": "right" }
|
||||
}, null, -1);
|
||||
const _hoisted_3$1 = /* @__PURE__ */ createElementVNode("li", {
|
||||
class: "soul-dropList",
|
||||
style: {},
|
||||
show: "select"
|
||||
}, [
|
||||
/* @__PURE__ */ createElementVNode("i", {
|
||||
class: "soul-icon soul-icon-drop-list",
|
||||
show: "select"
|
||||
}),
|
||||
/* @__PURE__ */ createTextVNode(" \u7B5B\u9009\u6570\u636E "),
|
||||
/* @__PURE__ */ createElementVNode("i", {
|
||||
class: "layui-icon layui-icon-right",
|
||||
style: { "float": "right" },
|
||||
show: "select"
|
||||
})
|
||||
], -1);
|
||||
const _hoisted_4$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-download" }, null, -1);
|
||||
const _hoisted_5$1 = {
|
||||
class: "soulbox",
|
||||
style: { "left": "100%", "top": "65px" }
|
||||
};
|
||||
const _hoisted_6$1 = {
|
||||
class: "check",
|
||||
style: { "min-width": "180px" }
|
||||
style: { "min-width": "190px" }
|
||||
};
|
||||
const _hoisted_7$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE623", -1);
|
||||
const _hoisted_8$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE63E", -1);
|
||||
const _hoisted_9$1 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE614", -1);
|
||||
const _hoisted_10$1 = { style: { "max-height": "300px", "overflow": "auto" } };
|
||||
const _sfc_main$1 = defineComponent({
|
||||
__name: "soultable",
|
||||
props: {
|
||||
left: { default: 10 },
|
||||
top: { default: 10 },
|
||||
list: { default: [] },
|
||||
soulkey: { default: "" }
|
||||
soulkey: { default: "" },
|
||||
show: { type: Boolean, default: false }
|
||||
},
|
||||
emits: ["asc", "desc", "sx"],
|
||||
emits: ["asc", "desc", "sx", "daochu"],
|
||||
setup(__props, { emit }) {
|
||||
const props = __props;
|
||||
function asc(event) {
|
||||
@ -673,18 +687,20 @@ const _sfc_main$1 = defineComponent({
|
||||
function desc(event) {
|
||||
emit("desc", event);
|
||||
}
|
||||
function daochu() {
|
||||
emit("daochu");
|
||||
}
|
||||
const sel = ref([]);
|
||||
const list = ref([]);
|
||||
const alllist = ref([]);
|
||||
watch(() => [props.list, props.soulkey], () => {
|
||||
watch(() => [props.show], () => {
|
||||
let set = /* @__PURE__ */ new Set();
|
||||
for (let i of props.list) {
|
||||
set.add(i[props.soulkey]);
|
||||
console.log(i, i[props.soulkey]);
|
||||
}
|
||||
alllist.value = Array.from(set);
|
||||
list.value = alllist.value;
|
||||
console.log(list.value);
|
||||
selshow.value = false;
|
||||
}, { deep: true });
|
||||
const seltext = ref("");
|
||||
watch(seltext, () => {
|
||||
@ -724,14 +740,22 @@ const _sfc_main$1 = defineComponent({
|
||||
}
|
||||
}
|
||||
const selshow = ref(false);
|
||||
function shubiao(event) {
|
||||
console.log(event, 160);
|
||||
if (event.target.getAttribute("show") == "select") {
|
||||
selshow.value = true;
|
||||
} else {
|
||||
selshow.value = false;
|
||||
}
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
class: "soulbox",
|
||||
style: normalizeStyle(`top: ${props.top}px;left:${props.left}px`),
|
||||
onClick: _cache[6] || (_cache[6] = withModifiers(() => {
|
||||
onClick: _cache[5] || (_cache[5] = withModifiers(() => {
|
||||
}, ["stop"]))
|
||||
}, [
|
||||
createElementVNode("ul", null, [
|
||||
createElementVNode("ul", { onMouseover: shubiao }, [
|
||||
createElementVNode("li", {
|
||||
onClick: asc,
|
||||
class: "soul-sort",
|
||||
@ -750,21 +774,22 @@ const _sfc_main$1 = defineComponent({
|
||||
_hoisted_2$1,
|
||||
createTextVNode(" \u964D\u5E8F\u6392\u5217 ")
|
||||
]),
|
||||
_hoisted_3$1,
|
||||
createElementVNode("li", {
|
||||
class: "soul-dropList",
|
||||
style: {},
|
||||
onMouseover: _cache[0] || (_cache[0] = ($event) => selshow.value = true)
|
||||
onClick: daochu,
|
||||
class: "soul-sort",
|
||||
"data-value": "desc",
|
||||
style: { "border-bottom": "1px solid rgb(230, 230, 230)" }
|
||||
}, [
|
||||
_hoisted_3$1,
|
||||
createTextVNode(" \u7B5B\u9009\u6570\u636E "),
|
||||
_hoisted_4$1
|
||||
], 32)
|
||||
]),
|
||||
_hoisted_4$1,
|
||||
createTextVNode(" \u5BFC\u51FAexcel ")
|
||||
])
|
||||
], 32),
|
||||
withDirectives(createElementVNode("div", _hoisted_5$1, [
|
||||
createVNode(_sfc_main$8, {
|
||||
"prefix-icon": "layui-icon-search",
|
||||
modelValue: seltext.value,
|
||||
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => seltext.value = $event),
|
||||
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seltext.value = $event),
|
||||
size: "sm",
|
||||
placeholder: "\u5173\u952E\u5B57\u641C\u7D22"
|
||||
}, null, 8, ["modelValue"]),
|
||||
@ -772,7 +797,7 @@ const _sfc_main$1 = defineComponent({
|
||||
createElementVNode("div", {
|
||||
class: "multiOption",
|
||||
"data-type": "all",
|
||||
onClick: _cache[2] || (_cache[2] = ($event) => select(1))
|
||||
onClick: _cache[1] || (_cache[1] = ($event) => select(1))
|
||||
}, [
|
||||
_hoisted_7$1,
|
||||
createTextVNode(" \u5168\u9009 ")
|
||||
@ -780,7 +805,7 @@ const _sfc_main$1 = defineComponent({
|
||||
createElementVNode("div", {
|
||||
class: "multiOption",
|
||||
"data-type": "none",
|
||||
onClick: _cache[3] || (_cache[3] = ($event) => select(2))
|
||||
onClick: _cache[2] || (_cache[2] = ($event) => select(2))
|
||||
}, [
|
||||
_hoisted_8$1,
|
||||
createTextVNode(" \u6E05\u7A7A ")
|
||||
@ -788,16 +813,16 @@ const _sfc_main$1 = defineComponent({
|
||||
createElementVNode("div", {
|
||||
class: "multiOption",
|
||||
"data-type": "reverse",
|
||||
onClick: _cache[4] || (_cache[4] = ($event) => select(3))
|
||||
onClick: _cache[3] || (_cache[3] = ($event) => select(3))
|
||||
}, [
|
||||
_hoisted_9$1,
|
||||
createTextVNode("\u53CD\u9009 ")
|
||||
])
|
||||
]),
|
||||
createElementVNode("ul", null, [
|
||||
createElementVNode("ul", _hoisted_10$1, [
|
||||
createVNode(_sfc_main$9, {
|
||||
modelValue: sel.value,
|
||||
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => sel.value = $event)
|
||||
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => sel.value = $event)
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
(openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (i, j) => {
|
||||
@ -925,7 +950,8 @@ const _sfc_main = defineComponent({
|
||||
getCheckboxProps: { type: Function, default: () => {
|
||||
} },
|
||||
getRadioProps: { type: Function, default: () => {
|
||||
} }
|
||||
} },
|
||||
download: { default: "" }
|
||||
},
|
||||
emits: [
|
||||
"change",
|
||||
@ -1129,7 +1155,7 @@ const _sfc_main = defineComponent({
|
||||
}
|
||||
tableStr += "</tr>";
|
||||
}
|
||||
tableDataSource.value.forEach((item, rowIndex) => {
|
||||
datalist.value.forEach((item, rowIndex) => {
|
||||
tableStr += "<tr>";
|
||||
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
|
||||
Object.keys(item).forEach((name) => {
|
||||
@ -1158,7 +1184,10 @@ const _sfc_main = defineComponent({
|
||||
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
|
||||
</body>
|
||||
</html>`;
|
||||
window.location.href = uri + base64(exportTemplate);
|
||||
let a = document.createElement("a");
|
||||
a.href = uri + base64(exportTemplate);
|
||||
a.download = (props.download || "\u4E0B\u8F7D\u6587\u4EF6") + ".xls";
|
||||
a.click();
|
||||
return;
|
||||
};
|
||||
function base64(s2) {
|
||||
@ -1760,12 +1789,14 @@ const _sfc_main = defineComponent({
|
||||
withDirectives(createVNode(_sfc_main$1, {
|
||||
top: soultop.value,
|
||||
left: soulleft.value,
|
||||
show: soulkey.value == column.key,
|
||||
onAsc: asc,
|
||||
onDesc: desc,
|
||||
list: props.dataSource,
|
||||
onDaochu: exportData,
|
||||
list: datalist.value,
|
||||
soulkey: column.key,
|
||||
onSx: sx
|
||||
}, null, 8, ["top", "left", "list", "soulkey"]), [
|
||||
}, null, 8, ["top", "left", "show", "list", "soulkey"]), [
|
||||
[vShow, soulkey.value == column.key]
|
||||
])
|
||||
]);
|
||||
|
@ -23,7 +23,8 @@ const _sfc_main$1 = defineComponent({
|
||||
selectedKey: null,
|
||||
checkStrictly: { type: [Boolean, String] },
|
||||
collapseTransition: { type: Boolean },
|
||||
onlyIconControl: { type: Boolean }
|
||||
onlyIconControl: { type: Boolean },
|
||||
hideicon: { type: Boolean }
|
||||
},
|
||||
emits: ["node-click"],
|
||||
setup(__props, { emit }) {
|
||||
@ -42,6 +43,9 @@ const _sfc_main$1 = defineComponent({
|
||||
if (node.children.length !== 0) {
|
||||
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
|
||||
}
|
||||
if (props.hideicon) {
|
||||
return "";
|
||||
}
|
||||
return "layui-icon-file";
|
||||
};
|
||||
function recursiveNodeClick(node) {
|
||||
@ -161,6 +165,7 @@ const _sfc_main$1 = defineComponent({
|
||||
"collapse-transition": __props.collapseTransition,
|
||||
checkStrictly: __props.checkStrictly,
|
||||
"only-icon-control": __props.onlyIconControl,
|
||||
hideicon: props.hideicon,
|
||||
onNodeClick: recursiveNodeClick
|
||||
}, createSlots({ _: 2 }, [
|
||||
_ctx.$slots.title ? {
|
||||
@ -172,7 +177,7 @@ const _sfc_main$1 = defineComponent({
|
||||
]),
|
||||
key: "0"
|
||||
} : void 0
|
||||
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selected-key", "collapse-transition", "checkStrictly", "only-icon-control"])
|
||||
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selected-key", "collapse-transition", "checkStrictly", "only-icon-control", "hideicon"])
|
||||
])) : createCommentVNode("", true)
|
||||
]),
|
||||
_: 2
|
||||
@ -377,7 +382,8 @@ const _sfc_main = defineComponent({
|
||||
children: "children",
|
||||
title: "title"
|
||||
};
|
||||
} }
|
||||
} },
|
||||
hideicon: { type: Boolean }
|
||||
},
|
||||
emits: ["update:checkedKeys", "update:expandKeys", "node-click"],
|
||||
setup(__props, { emit }) {
|
||||
@ -439,7 +445,8 @@ const _sfc_main = defineComponent({
|
||||
"check-strictly": __props.checkStrictly,
|
||||
"collapse-transition": __props.collapseTransition,
|
||||
"only-icon-control": __props.onlyIconControl,
|
||||
onNodeClick: handleClick
|
||||
onNodeClick: handleClick,
|
||||
hideicon: props.hideicon
|
||||
}, createSlots({ _: 2 }, [
|
||||
_ctx.$slots.title ? {
|
||||
name: "title",
|
||||
@ -448,7 +455,7 @@ const _sfc_main = defineComponent({
|
||||
]),
|
||||
key: "0"
|
||||
} : void 0
|
||||
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selectedKey", "check-strictly", "collapse-transition", "only-icon-control"])
|
||||
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selectedKey", "check-strictly", "collapse-transition", "only-icon-control", "hideicon"])
|
||||
], 2);
|
||||
};
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -798,7 +798,7 @@ var _hoisted_8$e = {
|
||||
var _hoisted_9$b = {
|
||||
key: 0
|
||||
};
|
||||
var _hoisted_10$a = {
|
||||
var _hoisted_10$b = {
|
||||
key: 1
|
||||
};
|
||||
var __default__$2$2 = {
|
||||
@ -881,7 +881,7 @@ var _sfc_main$2$1 = defineComponent(_objectSpread$3(_objectSpread$3({}, __defaul
|
||||
style: normalizeStyle({
|
||||
left: "calc(calc( calc(100% - ".concat(100 * __props.imgList.length, "px) / 2) + ").concat(index2.value * 100, "px)")
|
||||
})
|
||||
}, null, 4)])) : (openBlock(), createElementBlock("span", _hoisted_8$e, [__props.imgList[index2.value].alt ? (openBlock(), createElementBlock("span", _hoisted_9$b, toDisplayString$1(__props.imgList[index2.value].alt), 1)) : createCommentVNode("", true), __props.imgList.length > 1 ? (openBlock(), createElementBlock("em", _hoisted_10$a, toDisplayString$1(index2.value + 1) + " / " + toDisplayString$1(__props.imgList.length), 1)) : createCommentVNode("", true)]))], 4)) : createCommentVNode("", true)])) : createCommentVNode("", true)]);
|
||||
}, null, 4)])) : (openBlock(), createElementBlock("span", _hoisted_8$e, [__props.imgList[index2.value].alt ? (openBlock(), createElementBlock("span", _hoisted_9$b, toDisplayString$1(__props.imgList[index2.value].alt), 1)) : createCommentVNode("", true), __props.imgList.length > 1 ? (openBlock(), createElementBlock("em", _hoisted_10$b, toDisplayString$1(index2.value + 1) + " / " + toDisplayString$1(__props.imgList.length), 1)) : createCommentVNode("", true)]))], 4)) : createCommentVNode("", true)])) : createCommentVNode("", true)]);
|
||||
};
|
||||
}
|
||||
}));
|
||||
@ -11579,7 +11579,7 @@ const _hoisted_6$j = /* @__PURE__ */ createElementVNode("i", { class: "layui-ico
|
||||
const _hoisted_7$g = { class: "layui-iconpicker-list" };
|
||||
const _hoisted_8$c = ["onClick"];
|
||||
const _hoisted_9$a = { class: "layui-elip" };
|
||||
const _hoisted_10$9 = {
|
||||
const _hoisted_10$a = {
|
||||
key: 1,
|
||||
class: "layui-iconpicker-page"
|
||||
};
|
||||
@ -11779,7 +11779,7 @@ const _sfc_main$1u = defineComponent({
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
__props.page ? (openBlock(), createElementBlock("div", _hoisted_10$9, [
|
||||
__props.page ? (openBlock(), createElementBlock("div", _hoisted_10$a, [
|
||||
createElementVNode("div", _hoisted_11$9, [
|
||||
createElementVNode("span", _hoisted_12$7, "\u5171 " + toDisplayString$1(total.value) + " \u4E2A", 1),
|
||||
createElementVNode("a", {
|
||||
@ -17620,7 +17620,8 @@ const _sfc_main$K = defineComponent({
|
||||
selectedKey: null,
|
||||
checkStrictly: { type: [Boolean, String] },
|
||||
collapseTransition: { type: Boolean },
|
||||
onlyIconControl: { type: Boolean }
|
||||
onlyIconControl: { type: Boolean },
|
||||
hideicon: { type: Boolean }
|
||||
},
|
||||
emits: ["node-click"],
|
||||
setup(__props, { emit }) {
|
||||
@ -17639,6 +17640,9 @@ const _sfc_main$K = defineComponent({
|
||||
if (node.children.length !== 0) {
|
||||
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
|
||||
}
|
||||
if (props.hideicon) {
|
||||
return "";
|
||||
}
|
||||
return "layui-icon-file";
|
||||
};
|
||||
function recursiveNodeClick(node) {
|
||||
@ -17758,6 +17762,7 @@ const _sfc_main$K = defineComponent({
|
||||
"collapse-transition": __props.collapseTransition,
|
||||
checkStrictly: __props.checkStrictly,
|
||||
"only-icon-control": __props.onlyIconControl,
|
||||
hideicon: props.hideicon,
|
||||
onNodeClick: recursiveNodeClick
|
||||
}, createSlots({ _: 2 }, [
|
||||
_ctx.$slots.title ? {
|
||||
@ -17769,7 +17774,7 @@ const _sfc_main$K = defineComponent({
|
||||
]),
|
||||
key: "0"
|
||||
} : void 0
|
||||
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selected-key", "collapse-transition", "checkStrictly", "only-icon-control"])
|
||||
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selected-key", "collapse-transition", "checkStrictly", "only-icon-control", "hideicon"])
|
||||
])) : createCommentVNode("", true)
|
||||
]),
|
||||
_: 2
|
||||
@ -17974,7 +17979,8 @@ const _sfc_main$J = defineComponent({
|
||||
children: "children",
|
||||
title: "title"
|
||||
};
|
||||
} }
|
||||
} },
|
||||
hideicon: { type: Boolean }
|
||||
},
|
||||
emits: ["update:checkedKeys", "update:expandKeys", "node-click"],
|
||||
setup(__props, { emit }) {
|
||||
@ -18036,7 +18042,8 @@ const _sfc_main$J = defineComponent({
|
||||
"check-strictly": __props.checkStrictly,
|
||||
"collapse-transition": __props.collapseTransition,
|
||||
"only-icon-control": __props.onlyIconControl,
|
||||
onNodeClick: handleClick
|
||||
onNodeClick: handleClick,
|
||||
hideicon: props.hideicon
|
||||
}, createSlots({ _: 2 }, [
|
||||
_ctx.$slots.title ? {
|
||||
name: "title",
|
||||
@ -18045,7 +18052,7 @@ const _sfc_main$J = defineComponent({
|
||||
]),
|
||||
key: "0"
|
||||
} : void 0
|
||||
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selectedKey", "check-strictly", "collapse-transition", "only-icon-control"])
|
||||
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selectedKey", "check-strictly", "collapse-transition", "only-icon-control", "hideicon"])
|
||||
], 2);
|
||||
};
|
||||
}
|
||||
@ -18249,7 +18256,7 @@ const _hoisted_8$b = {
|
||||
class: "layui-table-cell-expand-icon-spaced"
|
||||
};
|
||||
const _hoisted_9$9 = ["colspan", "rowspan", "onClick"];
|
||||
const _hoisted_10$8 = {
|
||||
const _hoisted_10$9 = {
|
||||
key: 1,
|
||||
class: "layui-table-cell-expand-icon-spaced"
|
||||
};
|
||||
@ -18674,7 +18681,7 @@ const _sfc_main$H = defineComponent({
|
||||
key: 0,
|
||||
style: normalizeStyle({ "margin-right": __props.currentIndentSize + "px" })
|
||||
}, null, 4)) : createCommentVNode("", true),
|
||||
__props.expandSpace && !__props.data[__props.childrenColumnName] && !unref(slot).expand && columnIndex === __props.expandIndex ? (openBlock(), createElementBlock("span", _hoisted_10$8)) : createCommentVNode("", true),
|
||||
__props.expandSpace && !__props.data[__props.childrenColumnName] && !unref(slot).expand && columnIndex === __props.expandIndex ? (openBlock(), createElementBlock("span", _hoisted_10$9)) : createCommentVNode("", true),
|
||||
(unref(slot).expand || __props.data[__props.childrenColumnName]) && columnIndex === __props.expandIndex ? (openBlock(), createBlock(unref(_sfc_main$2E), {
|
||||
key: 2,
|
||||
class: "layui-table-cell-expand-icon",
|
||||
@ -18801,7 +18808,7 @@ const _hoisted_9$8 = {
|
||||
key: 4,
|
||||
class: "layui-laypage-skip"
|
||||
};
|
||||
const _hoisted_10$7 = ["disabled"];
|
||||
const _hoisted_10$8 = ["disabled"];
|
||||
const _hoisted_11$7 = { key: 5 };
|
||||
const __default__$D = {
|
||||
name: "LayPage"
|
||||
@ -18977,7 +18984,7 @@ const _sfc_main$G = defineComponent({
|
||||
class: "layui-laypage-btn",
|
||||
onClick: _cache[5] || (_cache[5] = ($event) => jumpPage()),
|
||||
disabled: currentPageShow.value > maxPage.value || currentPageShow.value == currentPage.value
|
||||
}, toDisplayString$1(unref(t)("page.confirm")), 9, _hoisted_10$7)
|
||||
}, toDisplayString$1(unref(t)("page.confirm")), 9, _hoisted_10$8)
|
||||
])) : createCommentVNode("", true),
|
||||
__props.count ? (openBlock(), createElementBlock("span", _hoisted_11$7, "\u5171" + toDisplayString$1(__props.count) + "\u6761", 1)) : createCommentVNode("", true)
|
||||
]);
|
||||
@ -19054,34 +19061,48 @@ const _sfc_main$F = defineComponent({
|
||||
};
|
||||
}
|
||||
});
|
||||
var soultable = /* @__PURE__ */ (() => ".soulbox{background-color:#333;color:#fff;display:inline-block;position:absolute;z-index:2147483647;min-width:160px;max-width:300px;overflow-y:auto;border:1px solid #e6e6e6;border-radius:5px;box-shadow:2px 2px 4px -2px #0003}\n")();
|
||||
var soultable = /* @__PURE__ */ (() => ".soulbox{background-color:#333;color:#fff;display:inline-block;position:absolute;z-index:2147483647;min-width:160px;max-width:320px;overflow-y:auto;border:1px solid #e6e6e6;border-radius:5px;box-shadow:2px 2px 4px -2px #0003}\n")();
|
||||
const _hoisted_1$v = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-asc" }, null, -1);
|
||||
const _hoisted_2$s = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-desc" }, null, -1);
|
||||
const _hoisted_3$p = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-drop-list" }, null, -1);
|
||||
const _hoisted_4$k = /* @__PURE__ */ createElementVNode("i", {
|
||||
class: "layui-icon layui-icon-right",
|
||||
style: { "float": "right" }
|
||||
}, null, -1);
|
||||
const _hoisted_3$p = /* @__PURE__ */ createElementVNode("li", {
|
||||
class: "soul-dropList",
|
||||
style: {},
|
||||
show: "select"
|
||||
}, [
|
||||
/* @__PURE__ */ createElementVNode("i", {
|
||||
class: "soul-icon soul-icon-drop-list",
|
||||
show: "select"
|
||||
}),
|
||||
/* @__PURE__ */ createTextVNode(" \u7B5B\u9009\u6570\u636E "),
|
||||
/* @__PURE__ */ createElementVNode("i", {
|
||||
class: "layui-icon layui-icon-right",
|
||||
style: { "float": "right" },
|
||||
show: "select"
|
||||
})
|
||||
], -1);
|
||||
const _hoisted_4$k = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon soul-icon-download" }, null, -1);
|
||||
const _hoisted_5$g = {
|
||||
class: "soulbox",
|
||||
style: { "left": "100%", "top": "65px" }
|
||||
};
|
||||
const _hoisted_6$d = {
|
||||
class: "check",
|
||||
style: { "min-width": "180px" }
|
||||
style: { "min-width": "190px" }
|
||||
};
|
||||
const _hoisted_7$c = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE623", -1);
|
||||
const _hoisted_8$9 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE63E", -1);
|
||||
const _hoisted_9$7 = /* @__PURE__ */ createElementVNode("i", { class: "soul-icon" }, "\uE614", -1);
|
||||
const _hoisted_10$7 = { style: { "max-height": "300px", "overflow": "auto" } };
|
||||
const _sfc_main$E = defineComponent({
|
||||
__name: "soultable",
|
||||
props: {
|
||||
left: { default: 10 },
|
||||
top: { default: 10 },
|
||||
list: { default: [] },
|
||||
soulkey: { default: "" }
|
||||
soulkey: { default: "" },
|
||||
show: { type: Boolean, default: false }
|
||||
},
|
||||
emits: ["asc", "desc", "sx"],
|
||||
emits: ["asc", "desc", "sx", "daochu"],
|
||||
setup(__props, { emit }) {
|
||||
const props = __props;
|
||||
function asc(event) {
|
||||
@ -19090,18 +19111,20 @@ const _sfc_main$E = defineComponent({
|
||||
function desc(event) {
|
||||
emit("desc", event);
|
||||
}
|
||||
function daochu() {
|
||||
emit("daochu");
|
||||
}
|
||||
const sel = ref([]);
|
||||
const list = ref([]);
|
||||
const alllist = ref([]);
|
||||
watch(() => [props.list, props.soulkey], () => {
|
||||
watch(() => [props.show], () => {
|
||||
let set = /* @__PURE__ */ new Set();
|
||||
for (let i of props.list) {
|
||||
set.add(i[props.soulkey]);
|
||||
console.log(i, i[props.soulkey]);
|
||||
}
|
||||
alllist.value = Array.from(set);
|
||||
list.value = alllist.value;
|
||||
console.log(list.value);
|
||||
selshow.value = false;
|
||||
}, { deep: true });
|
||||
const seltext = ref("");
|
||||
watch(seltext, () => {
|
||||
@ -19141,14 +19164,22 @@ const _sfc_main$E = defineComponent({
|
||||
}
|
||||
}
|
||||
const selshow = ref(false);
|
||||
function shubiao(event) {
|
||||
console.log(event, 160);
|
||||
if (event.target.getAttribute("show") == "select") {
|
||||
selshow.value = true;
|
||||
} else {
|
||||
selshow.value = false;
|
||||
}
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
class: "soulbox",
|
||||
style: normalizeStyle(`top: ${props.top}px;left:${props.left}px`),
|
||||
onClick: _cache[6] || (_cache[6] = withModifiers(() => {
|
||||
onClick: _cache[5] || (_cache[5] = withModifiers(() => {
|
||||
}, ["stop"]))
|
||||
}, [
|
||||
createElementVNode("ul", null, [
|
||||
createElementVNode("ul", { onMouseover: shubiao }, [
|
||||
createElementVNode("li", {
|
||||
onClick: asc,
|
||||
class: "soul-sort",
|
||||
@ -19167,21 +19198,22 @@ const _sfc_main$E = defineComponent({
|
||||
_hoisted_2$s,
|
||||
createTextVNode(" \u964D\u5E8F\u6392\u5217 ")
|
||||
]),
|
||||
_hoisted_3$p,
|
||||
createElementVNode("li", {
|
||||
class: "soul-dropList",
|
||||
style: {},
|
||||
onMouseover: _cache[0] || (_cache[0] = ($event) => selshow.value = true)
|
||||
onClick: daochu,
|
||||
class: "soul-sort",
|
||||
"data-value": "desc",
|
||||
style: { "border-bottom": "1px solid rgb(230, 230, 230)" }
|
||||
}, [
|
||||
_hoisted_3$p,
|
||||
createTextVNode(" \u7B5B\u9009\u6570\u636E "),
|
||||
_hoisted_4$k
|
||||
], 32)
|
||||
]),
|
||||
_hoisted_4$k,
|
||||
createTextVNode(" \u5BFC\u51FAexcel ")
|
||||
])
|
||||
], 32),
|
||||
withDirectives(createElementVNode("div", _hoisted_5$g, [
|
||||
createVNode(_sfc_main$1w, {
|
||||
"prefix-icon": "layui-icon-search",
|
||||
modelValue: seltext.value,
|
||||
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => seltext.value = $event),
|
||||
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seltext.value = $event),
|
||||
size: "sm",
|
||||
placeholder: "\u5173\u952E\u5B57\u641C\u7D22"
|
||||
}, null, 8, ["modelValue"]),
|
||||
@ -19189,7 +19221,7 @@ const _sfc_main$E = defineComponent({
|
||||
createElementVNode("div", {
|
||||
class: "multiOption",
|
||||
"data-type": "all",
|
||||
onClick: _cache[2] || (_cache[2] = ($event) => select(1))
|
||||
onClick: _cache[1] || (_cache[1] = ($event) => select(1))
|
||||
}, [
|
||||
_hoisted_7$c,
|
||||
createTextVNode(" \u5168\u9009 ")
|
||||
@ -19197,7 +19229,7 @@ const _sfc_main$E = defineComponent({
|
||||
createElementVNode("div", {
|
||||
class: "multiOption",
|
||||
"data-type": "none",
|
||||
onClick: _cache[3] || (_cache[3] = ($event) => select(2))
|
||||
onClick: _cache[2] || (_cache[2] = ($event) => select(2))
|
||||
}, [
|
||||
_hoisted_8$9,
|
||||
createTextVNode(" \u6E05\u7A7A ")
|
||||
@ -19205,16 +19237,16 @@ const _sfc_main$E = defineComponent({
|
||||
createElementVNode("div", {
|
||||
class: "multiOption",
|
||||
"data-type": "reverse",
|
||||
onClick: _cache[4] || (_cache[4] = ($event) => select(3))
|
||||
onClick: _cache[3] || (_cache[3] = ($event) => select(3))
|
||||
}, [
|
||||
_hoisted_9$7,
|
||||
createTextVNode("\u53CD\u9009 ")
|
||||
])
|
||||
]),
|
||||
createElementVNode("ul", null, [
|
||||
createElementVNode("ul", _hoisted_10$7, [
|
||||
createVNode(_sfc_main$$, {
|
||||
modelValue: sel.value,
|
||||
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => sel.value = $event)
|
||||
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => sel.value = $event)
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
(openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (i, j) => {
|
||||
@ -19342,7 +19374,8 @@ const _sfc_main$D = defineComponent({
|
||||
getCheckboxProps: { type: Function, default: () => {
|
||||
} },
|
||||
getRadioProps: { type: Function, default: () => {
|
||||
} }
|
||||
} },
|
||||
download: { default: "" }
|
||||
},
|
||||
emits: [
|
||||
"change",
|
||||
@ -19546,7 +19579,7 @@ const _sfc_main$D = defineComponent({
|
||||
}
|
||||
tableStr += "</tr>";
|
||||
}
|
||||
tableDataSource.value.forEach((item, rowIndex) => {
|
||||
datalist.value.forEach((item, rowIndex) => {
|
||||
tableStr += "<tr>";
|
||||
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
|
||||
Object.keys(item).forEach((name) => {
|
||||
@ -19575,7 +19608,10 @@ const _sfc_main$D = defineComponent({
|
||||
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
|
||||
</body>
|
||||
</html>`;
|
||||
window.location.href = uri + base64(exportTemplate);
|
||||
let a = document.createElement("a");
|
||||
a.href = uri + base64(exportTemplate);
|
||||
a.download = (props.download || "\u4E0B\u8F7D\u6587\u4EF6") + ".xls";
|
||||
a.click();
|
||||
return;
|
||||
};
|
||||
function base64(s2) {
|
||||
@ -20177,12 +20213,14 @@ const _sfc_main$D = defineComponent({
|
||||
withDirectives(createVNode(_sfc_main$E, {
|
||||
top: soultop.value,
|
||||
left: soulleft.value,
|
||||
show: soulkey.value == column.key,
|
||||
onAsc: asc,
|
||||
onDesc: desc,
|
||||
list: props.dataSource,
|
||||
onDaochu: exportData,
|
||||
list: datalist.value,
|
||||
soulkey: column.key,
|
||||
onSx: sx
|
||||
}, null, 8, ["top", "left", "list", "soulkey"]), [
|
||||
}, null, 8, ["top", "left", "show", "list", "soulkey"]), [
|
||||
[vShow, soulkey.value == column.key]
|
||||
])
|
||||
]);
|
||||
|
@ -52,6 +52,7 @@ export interface TableProps {
|
||||
loading?: boolean;
|
||||
getCheckboxProps?: Function;
|
||||
getRadioProps?: Function;
|
||||
download?:string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<TableProps>(), {
|
||||
@ -76,6 +77,7 @@ const props = withDefaults(defineProps<TableProps>(), {
|
||||
loading: false,
|
||||
getCheckboxProps: () => {},
|
||||
getRadioProps: () => {},
|
||||
download:""
|
||||
});
|
||||
|
||||
const emit = defineEmits([
|
||||
@ -387,7 +389,7 @@ const exportData = () => {
|
||||
}
|
||||
tableStr += "</tr>";
|
||||
}
|
||||
tableDataSource.value.forEach((item, rowIndex) => {
|
||||
datalist.value.forEach((item, rowIndex) => {
|
||||
tableStr += "<tr>";
|
||||
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
|
||||
Object.keys(item).forEach((name) => {
|
||||
@ -421,7 +423,11 @@ const exportData = () => {
|
||||
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
|
||||
</body>
|
||||
</html>`;
|
||||
window.location.href = uri + base64(exportTemplate);
|
||||
let a = document.createElement("a")
|
||||
a.href = uri + base64(exportTemplate);
|
||||
a.download= (props.download || "下载文件") + ".xls";
|
||||
a.click();
|
||||
// window.location.href =
|
||||
return;
|
||||
};
|
||||
|
||||
@ -1133,9 +1139,11 @@ window.addEventListener("click", heddin);
|
||||
:top="soultop"
|
||||
:left="soulleft"
|
||||
v-show="soulkey == column.key"
|
||||
:show="soulkey == column.key"
|
||||
@asc="asc"
|
||||
@desc="desc"
|
||||
:list="props.dataSource"
|
||||
@daochu="exportData"
|
||||
:list="datalist"
|
||||
:soulkey="column.key"
|
||||
@sx="sx"
|
||||
></soultable>
|
||||
|
@ -6,7 +6,7 @@
|
||||
position: absolute;
|
||||
z-index: 2147483647;
|
||||
min-width: 160px;
|
||||
max-width: 300px;
|
||||
max-width: 320px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid #e6e6e6;
|
||||
border-radius: 5px;
|
||||
|
@ -4,7 +4,7 @@
|
||||
:style="`top: ${props.top}px;left:${props.left}px`"
|
||||
@click.stop=""
|
||||
>
|
||||
<ul>
|
||||
<ul @mouseover="shubiao">
|
||||
<li @click="asc" class="soul-sort" data-value="asc" style="">
|
||||
<i class="soul-icon soul-icon-asc"></i> 升序排列
|
||||
</li>
|
||||
@ -18,9 +18,17 @@
|
||||
</li>
|
||||
<!-- <li class="soul-column" style=""><i class="layui-icon layui-icon-table"></i> 表格列 <i
|
||||
class="layui-icon layui-icon-right" style="float: right"></i></li> -->
|
||||
<li class="soul-dropList" style="" @mouseover="selshow = true">
|
||||
<i class="soul-icon soul-icon-drop-list"></i> 筛选数据
|
||||
<i class="layui-icon layui-icon-right" style="float: right"></i>
|
||||
<li class="soul-dropList" style="" show="select">
|
||||
<i class="soul-icon soul-icon-drop-list" show="select"></i> 筛选数据
|
||||
<i class="layui-icon layui-icon-right" style="float: right" show="select"></i>
|
||||
</li>
|
||||
<li
|
||||
@click="daochu"
|
||||
class="soul-sort"
|
||||
data-value="desc"
|
||||
style="border-bottom: 1px solid rgb(230, 230, 230)"
|
||||
>
|
||||
<i class="soul-icon soul-icon-download"></i> 导出excel
|
||||
</li>
|
||||
<!-- <li class="soul-condition" style=""><i class="soul-icon soul-icon-query"></i> 筛选条件 <i
|
||||
class="layui-icon layui-icon-right" style="float: right"></i></li>
|
||||
@ -35,7 +43,7 @@
|
||||
placeholder="关键字搜索"
|
||||
>
|
||||
</lay-input>
|
||||
<div class="check" style="min-width: 180px">
|
||||
<div class="check" style="min-width: 190px">
|
||||
<div class="multiOption" data-type="all" @click="select(1)">
|
||||
<i class="soul-icon"></i> 全选
|
||||
</div>
|
||||
@ -46,7 +54,7 @@
|
||||
<i class="soul-icon"></i>反选
|
||||
</div>
|
||||
</div>
|
||||
<ul>
|
||||
<ul style="max-height: 300px;overflow: auto;">
|
||||
<LayCheckboxGroup v-model="sel">
|
||||
<li v-for="(i, j) in list">
|
||||
<LayCheckbox skin="primary" :value="i"></LayCheckbox>{{ i }}
|
||||
@ -68,34 +76,40 @@ export interface SoulTableProps {
|
||||
top: number;
|
||||
list: any;
|
||||
soulkey: string;
|
||||
show:boolean;
|
||||
}
|
||||
const props = withDefaults(defineProps<SoulTableProps>(), {
|
||||
top: 10,
|
||||
left: 10,
|
||||
list: [],
|
||||
soulkey: "",
|
||||
show:false
|
||||
});
|
||||
const emit = defineEmits(["asc", "desc", "sx"]);
|
||||
const emit = defineEmits(["asc", "desc", "sx",'daochu']);
|
||||
function asc(event: any) {
|
||||
emit("asc", event);
|
||||
}
|
||||
function desc(event: any) {
|
||||
emit("desc", event);
|
||||
}
|
||||
function daochu(){
|
||||
emit("daochu")
|
||||
}
|
||||
const sel: any = ref([]);
|
||||
const list: any = ref([]);
|
||||
const alllist: any = ref([]);
|
||||
watch(
|
||||
() => [props.list, props.soulkey],
|
||||
() => [props.show],
|
||||
() => {
|
||||
let set = new Set();
|
||||
for (let i of props.list) {
|
||||
set.add(i[props.soulkey]);
|
||||
console.log(i, i[props.soulkey]);
|
||||
// console.log(i, i[props.soulkey]);
|
||||
}
|
||||
alllist.value = Array.from(set);
|
||||
list.value = alllist.value;
|
||||
console.log(list.value);
|
||||
selshow.value = false
|
||||
// console.log(list.value);
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
@ -143,4 +157,14 @@ function select(type: number) {
|
||||
}
|
||||
}
|
||||
const selshow = ref(false);
|
||||
function shubiao(event:any){
|
||||
console.log(event,160)
|
||||
if(event.target.getAttribute("show") == "select"){
|
||||
selshow.value = true
|
||||
}else{
|
||||
selshow.value = false
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
@ -35,6 +35,7 @@ export interface TreeNodeProps {
|
||||
checkStrictly: boolean | string;
|
||||
collapseTransition: boolean;
|
||||
onlyIconControl: boolean;
|
||||
hideicon?: boolean;
|
||||
}
|
||||
|
||||
interface TreeNodeEmits {
|
||||
@ -69,6 +70,9 @@ const nodeIconType = (node: TreeData): string => {
|
||||
if (node.children.length !== 0) {
|
||||
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
|
||||
}
|
||||
if(props.hideicon){
|
||||
return ""
|
||||
}
|
||||
return "layui-icon-file";
|
||||
};
|
||||
|
||||
@ -193,6 +197,7 @@ const isChildAllSelected = computed(() => {
|
||||
:collapse-transition="collapseTransition"
|
||||
:checkStrictly="checkStrictly"
|
||||
:only-icon-control="onlyIconControl"
|
||||
:hideicon="props.hideicon"
|
||||
@node-click="recursiveNodeClick"
|
||||
>
|
||||
<template v-if="$slots.title" v-slot:title="slotProp: { data: any }">
|
||||
|
@ -38,6 +38,7 @@ export interface TreeProps {
|
||||
showLine?: boolean;
|
||||
showCheckbox?: boolean;
|
||||
replaceFields?: ReplaceFieldsOptions;
|
||||
hideicon?:boolean;
|
||||
}
|
||||
|
||||
interface TreeEmits {
|
||||
@ -144,6 +145,7 @@ function handleClick(node: TreeData) {
|
||||
:collapse-transition="collapseTransition"
|
||||
:only-icon-control="onlyIconControl"
|
||||
@node-click="handleClick"
|
||||
:hideicon="props.hideicon"
|
||||
>
|
||||
<template v-if="$slots.title" v-slot:title="{ data }">
|
||||
<slot name="title" :data="data"></slot>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user