Compare commits
No commits in common. "a19040aa60c871d9ffbec711095bc0da10985a18" and "bcbe71c7ad93abf8fd40d63983bb5f1f1621ca15" have entirely different histories.
a19040aa60
...
bcbe71c7ad
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -23,8 +23,7 @@ const _sfc_main$1 = defineComponent({
|
|||||||
selectedKey: null,
|
selectedKey: null,
|
||||||
checkStrictly: { type: [Boolean, String] },
|
checkStrictly: { type: [Boolean, String] },
|
||||||
collapseTransition: { type: Boolean },
|
collapseTransition: { type: Boolean },
|
||||||
onlyIconControl: { type: Boolean },
|
onlyIconControl: { type: Boolean }
|
||||||
hideicon: { type: Boolean }
|
|
||||||
},
|
},
|
||||||
emits: ["node-click"],
|
emits: ["node-click"],
|
||||||
setup(__props, { emit }) {
|
setup(__props, { emit }) {
|
||||||
@ -43,9 +42,6 @@ const _sfc_main$1 = defineComponent({
|
|||||||
if (node.children.length !== 0) {
|
if (node.children.length !== 0) {
|
||||||
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
|
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
|
||||||
}
|
}
|
||||||
if (props.hideicon) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
return "layui-icon-file";
|
return "layui-icon-file";
|
||||||
};
|
};
|
||||||
function recursiveNodeClick(node) {
|
function recursiveNodeClick(node) {
|
||||||
@ -165,7 +161,6 @@ const _sfc_main$1 = defineComponent({
|
|||||||
"collapse-transition": __props.collapseTransition,
|
"collapse-transition": __props.collapseTransition,
|
||||||
checkStrictly: __props.checkStrictly,
|
checkStrictly: __props.checkStrictly,
|
||||||
"only-icon-control": __props.onlyIconControl,
|
"only-icon-control": __props.onlyIconControl,
|
||||||
hideicon: props.hideicon,
|
|
||||||
onNodeClick: recursiveNodeClick
|
onNodeClick: recursiveNodeClick
|
||||||
}, createSlots({ _: 2 }, [
|
}, createSlots({ _: 2 }, [
|
||||||
_ctx.$slots.title ? {
|
_ctx.$slots.title ? {
|
||||||
@ -177,7 +172,7 @@ const _sfc_main$1 = defineComponent({
|
|||||||
]),
|
]),
|
||||||
key: "0"
|
key: "0"
|
||||||
} : void 0
|
} : void 0
|
||||||
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selected-key", "collapse-transition", "checkStrictly", "only-icon-control", "hideicon"])
|
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selected-key", "collapse-transition", "checkStrictly", "only-icon-control"])
|
||||||
])) : createCommentVNode("", true)
|
])) : createCommentVNode("", true)
|
||||||
]),
|
]),
|
||||||
_: 2
|
_: 2
|
||||||
@ -382,8 +377,7 @@ const _sfc_main = defineComponent({
|
|||||||
children: "children",
|
children: "children",
|
||||||
title: "title"
|
title: "title"
|
||||||
};
|
};
|
||||||
} },
|
} }
|
||||||
hideicon: { type: Boolean }
|
|
||||||
},
|
},
|
||||||
emits: ["update:checkedKeys", "update:expandKeys", "node-click"],
|
emits: ["update:checkedKeys", "update:expandKeys", "node-click"],
|
||||||
setup(__props, { emit }) {
|
setup(__props, { emit }) {
|
||||||
@ -445,8 +439,7 @@ const _sfc_main = defineComponent({
|
|||||||
"check-strictly": __props.checkStrictly,
|
"check-strictly": __props.checkStrictly,
|
||||||
"collapse-transition": __props.collapseTransition,
|
"collapse-transition": __props.collapseTransition,
|
||||||
"only-icon-control": __props.onlyIconControl,
|
"only-icon-control": __props.onlyIconControl,
|
||||||
onNodeClick: handleClick,
|
onNodeClick: handleClick
|
||||||
hideicon: props.hideicon
|
|
||||||
}, createSlots({ _: 2 }, [
|
}, createSlots({ _: 2 }, [
|
||||||
_ctx.$slots.title ? {
|
_ctx.$slots.title ? {
|
||||||
name: "title",
|
name: "title",
|
||||||
@ -455,7 +448,7 @@ const _sfc_main = defineComponent({
|
|||||||
]),
|
]),
|
||||||
key: "0"
|
key: "0"
|
||||||
} : void 0
|
} : void 0
|
||||||
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selectedKey", "check-strictly", "collapse-transition", "only-icon-control", "hideicon"])
|
]), 1032, ["tree", "node-list", "show-checkbox", "show-line", "selectedKey", "check-strictly", "collapse-transition", "only-icon-control"])
|
||||||
], 2);
|
], 2);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -52,7 +52,6 @@ export interface TableProps {
|
|||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
getCheckboxProps?: Function;
|
getCheckboxProps?: Function;
|
||||||
getRadioProps?: Function;
|
getRadioProps?: Function;
|
||||||
download?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<TableProps>(), {
|
const props = withDefaults(defineProps<TableProps>(), {
|
||||||
@ -77,7 +76,6 @@ const props = withDefaults(defineProps<TableProps>(), {
|
|||||||
loading: false,
|
loading: false,
|
||||||
getCheckboxProps: () => {},
|
getCheckboxProps: () => {},
|
||||||
getRadioProps: () => {},
|
getRadioProps: () => {},
|
||||||
download: "",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
@ -288,7 +286,7 @@ watch(
|
|||||||
|
|
||||||
const changeAll = (isChecked: boolean) => {
|
const changeAll = (isChecked: boolean) => {
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
const datasources = datalist.value.filter((item: any, index: number) => {
|
const datasources = props.dataSource.filter((item: any, index: number) => {
|
||||||
return !props.getCheckboxProps(item, index)?.disabled;
|
return !props.getCheckboxProps(item, index)?.disabled;
|
||||||
});
|
});
|
||||||
const ids = datasources.map((item) => {
|
const ids = datasources.map((item) => {
|
||||||
@ -389,7 +387,7 @@ const exportData = () => {
|
|||||||
}
|
}
|
||||||
tableStr += "</tr>";
|
tableStr += "</tr>";
|
||||||
}
|
}
|
||||||
datalist.value.forEach((item, rowIndex) => {
|
tableDataSource.value.forEach((item, rowIndex) => {
|
||||||
tableStr += "<tr>";
|
tableStr += "<tr>";
|
||||||
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
|
tableBodyColumns.value.forEach((tableColumn, columnIndex) => {
|
||||||
Object.keys(item).forEach((name) => {
|
Object.keys(item).forEach((name) => {
|
||||||
@ -423,11 +421,7 @@ const exportData = () => {
|
|||||||
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
|
<table syle="table-layout: fixed;word-wrap: break-word; word-break: break-all;">${tableStr}</table>
|
||||||
</body>
|
</body>
|
||||||
</html>`;
|
</html>`;
|
||||||
let a = document.createElement("a");
|
window.location.href = uri + base64(exportTemplate);
|
||||||
a.href = uri + base64(exportTemplate);
|
|
||||||
a.download = (props.download || "下载文件") + ".xls";
|
|
||||||
a.click();
|
|
||||||
// window.location.href =
|
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1139,11 +1133,9 @@ window.addEventListener("click", heddin);
|
|||||||
:top="soultop"
|
:top="soultop"
|
||||||
:left="soulleft"
|
:left="soulleft"
|
||||||
v-show="soulkey == column.key"
|
v-show="soulkey == column.key"
|
||||||
:show="soulkey == column.key"
|
|
||||||
@asc="asc"
|
@asc="asc"
|
||||||
@desc="desc"
|
@desc="desc"
|
||||||
@daochu="exportData"
|
:list="props.dataSource"
|
||||||
:list="datalist"
|
|
||||||
:soulkey="column.key"
|
:soulkey="column.key"
|
||||||
@sx="sx"
|
@sx="sx"
|
||||||
></soultable>
|
></soultable>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 2147483647;
|
z-index: 2147483647;
|
||||||
min-width: 160px;
|
min-width: 160px;
|
||||||
max-width: 320px;
|
max-width: 300px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
border: 1px solid #e6e6e6;
|
border: 1px solid #e6e6e6;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
:style="`top: ${props.top}px;left:${props.left}px`"
|
:style="`top: ${props.top}px;left:${props.left}px`"
|
||||||
@click.stop=""
|
@click.stop=""
|
||||||
>
|
>
|
||||||
<ul @mouseover="shubiao">
|
<ul>
|
||||||
<li @click="asc" class="soul-sort" data-value="asc" style="">
|
<li @click="asc" class="soul-sort" data-value="asc" style="">
|
||||||
<i class="soul-icon soul-icon-asc"></i> 升序排列
|
<i class="soul-icon soul-icon-asc"></i> 升序排列
|
||||||
</li>
|
</li>
|
||||||
@ -18,21 +18,9 @@
|
|||||||
</li>
|
</li>
|
||||||
<!-- <li class="soul-column" style=""><i class="layui-icon layui-icon-table"></i> 表格列 <i
|
<!-- <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> -->
|
class="layui-icon layui-icon-right" style="float: right"></i></li> -->
|
||||||
<li class="soul-dropList" style="" show="select">
|
<li class="soul-dropList" style="" @mouseover="selshow = true">
|
||||||
<i class="soul-icon soul-icon-drop-list" show="select"></i> 筛选数据
|
<i class="soul-icon soul-icon-drop-list"></i> 筛选数据
|
||||||
<i
|
<i class="layui-icon layui-icon-right" style="float: right"></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>
|
||||||
<!-- <li class="soul-condition" style=""><i class="soul-icon soul-icon-query"></i> 筛选条件 <i
|
<!-- <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>
|
class="layui-icon layui-icon-right" style="float: right"></i></li>
|
||||||
@ -47,7 +35,7 @@
|
|||||||
placeholder="关键字搜索"
|
placeholder="关键字搜索"
|
||||||
>
|
>
|
||||||
</lay-input>
|
</lay-input>
|
||||||
<div class="check" style="min-width: 190px">
|
<div class="check" style="min-width: 180px">
|
||||||
<div class="multiOption" data-type="all" @click="select(1)">
|
<div class="multiOption" data-type="all" @click="select(1)">
|
||||||
<i class="soul-icon"></i> 全选
|
<i class="soul-icon"></i> 全选
|
||||||
</div>
|
</div>
|
||||||
@ -58,7 +46,7 @@
|
|||||||
<i class="soul-icon"></i>反选
|
<i class="soul-icon"></i>反选
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul style="max-height: 300px; overflow: auto">
|
<ul>
|
||||||
<LayCheckboxGroup v-model="sel">
|
<LayCheckboxGroup v-model="sel">
|
||||||
<li v-for="(i, j) in list">
|
<li v-for="(i, j) in list">
|
||||||
<LayCheckbox skin="primary" :value="i"></LayCheckbox>{{ i }}
|
<LayCheckbox skin="primary" :value="i"></LayCheckbox>{{ i }}
|
||||||
@ -80,40 +68,34 @@ export interface SoulTableProps {
|
|||||||
top: number;
|
top: number;
|
||||||
list: any;
|
list: any;
|
||||||
soulkey: string;
|
soulkey: string;
|
||||||
show: boolean;
|
|
||||||
}
|
}
|
||||||
const props = withDefaults(defineProps<SoulTableProps>(), {
|
const props = withDefaults(defineProps<SoulTableProps>(), {
|
||||||
top: 10,
|
top: 10,
|
||||||
left: 10,
|
left: 10,
|
||||||
list: [],
|
list: [],
|
||||||
soulkey: "",
|
soulkey: "",
|
||||||
show: false,
|
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["asc", "desc", "sx", "daochu"]);
|
const emit = defineEmits(["asc", "desc", "sx"]);
|
||||||
function asc(event: any) {
|
function asc(event: any) {
|
||||||
emit("asc", event);
|
emit("asc", event);
|
||||||
}
|
}
|
||||||
function desc(event: any) {
|
function desc(event: any) {
|
||||||
emit("desc", event);
|
emit("desc", event);
|
||||||
}
|
}
|
||||||
function daochu() {
|
|
||||||
emit("daochu");
|
|
||||||
}
|
|
||||||
const sel: any = ref([]);
|
const sel: any = ref([]);
|
||||||
const list: any = ref([]);
|
const list: any = ref([]);
|
||||||
const alllist: any = ref([]);
|
const alllist: any = ref([]);
|
||||||
watch(
|
watch(
|
||||||
() => [props.show],
|
() => [props.list, props.soulkey],
|
||||||
() => {
|
() => {
|
||||||
let set = new Set();
|
let set = new Set();
|
||||||
for (let i of props.list) {
|
for (let i of props.list) {
|
||||||
set.add(i[props.soulkey]);
|
set.add(i[props.soulkey]);
|
||||||
// console.log(i, i[props.soulkey]);
|
console.log(i, i[props.soulkey]);
|
||||||
}
|
}
|
||||||
alllist.value = Array.from(set);
|
alllist.value = Array.from(set);
|
||||||
list.value = alllist.value;
|
list.value = alllist.value;
|
||||||
selshow.value = false;
|
console.log(list.value);
|
||||||
// console.log(list.value);
|
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
@ -161,12 +143,4 @@ function select(type: number) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const selshow = ref(false);
|
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>
|
</script>
|
||||||
|
@ -35,7 +35,6 @@ export interface TreeNodeProps {
|
|||||||
checkStrictly: boolean | string;
|
checkStrictly: boolean | string;
|
||||||
collapseTransition: boolean;
|
collapseTransition: boolean;
|
||||||
onlyIconControl: boolean;
|
onlyIconControl: boolean;
|
||||||
hideicon?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TreeNodeEmits {
|
interface TreeNodeEmits {
|
||||||
@ -70,9 +69,6 @@ const nodeIconType = (node: TreeData): string => {
|
|||||||
if (node.children.length !== 0) {
|
if (node.children.length !== 0) {
|
||||||
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
|
return !node.isLeaf ? "layui-icon-addition" : "layui-icon-subtraction";
|
||||||
}
|
}
|
||||||
if (props.hideicon) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
return "layui-icon-file";
|
return "layui-icon-file";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -197,7 +193,6 @@ const isChildAllSelected = computed(() => {
|
|||||||
:collapse-transition="collapseTransition"
|
:collapse-transition="collapseTransition"
|
||||||
:checkStrictly="checkStrictly"
|
:checkStrictly="checkStrictly"
|
||||||
:only-icon-control="onlyIconControl"
|
:only-icon-control="onlyIconControl"
|
||||||
:hideicon="props.hideicon"
|
|
||||||
@node-click="recursiveNodeClick"
|
@node-click="recursiveNodeClick"
|
||||||
>
|
>
|
||||||
<template v-if="$slots.title" v-slot:title="slotProp: { data: any }">
|
<template v-if="$slots.title" v-slot:title="slotProp: { data: any }">
|
||||||
|
@ -38,7 +38,6 @@ export interface TreeProps {
|
|||||||
showLine?: boolean;
|
showLine?: boolean;
|
||||||
showCheckbox?: boolean;
|
showCheckbox?: boolean;
|
||||||
replaceFields?: ReplaceFieldsOptions;
|
replaceFields?: ReplaceFieldsOptions;
|
||||||
hideicon?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TreeEmits {
|
interface TreeEmits {
|
||||||
@ -145,7 +144,6 @@ function handleClick(node: TreeData) {
|
|||||||
:collapse-transition="collapseTransition"
|
:collapse-transition="collapseTransition"
|
||||||
:only-icon-control="onlyIconControl"
|
:only-icon-control="onlyIconControl"
|
||||||
@node-click="handleClick"
|
@node-click="handleClick"
|
||||||
:hideicon="props.hideicon"
|
|
||||||
>
|
>
|
||||||
<template v-if="$slots.title" v-slot:title="{ data }">
|
<template v-if="$slots.title" v-slot:title="{ data }">
|
||||||
<slot name="title" :data="data"></slot>
|
<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…
x
Reference in New Issue
Block a user