fix : 修复所属公司选择框
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<div class="tree">
|
||||
<el-tree :data="dataList" ref="tree" :props="defaultProps" empty-text="" node-key="value"
|
||||
default-expand-all :show-checkbox="showCheckbox" highlight-current :default-checked-keys="defaultChecked"
|
||||
:check-strictly="multiple===false" @node-click="(node,check)=>handle(node,check)"
|
||||
:check-strictly="true" @node-click="(node,check)=>handle(node,check)"
|
||||
@check-change="handleChange" :filter-node-method="filterNode">
|
||||
<template #default="{ node, data }">
|
||||
<div class="tree-node">
|
||||
@@ -147,8 +147,9 @@ const show = () => {
|
||||
getList()
|
||||
};
|
||||
const handleChange = (data, checked) => {
|
||||
console.log('data, checked',data, checked)
|
||||
// 左侧有选择框
|
||||
if (props.showCheckbox) {
|
||||
// if (props.showCheckbox) {
|
||||
// 左侧有选择框 + 多选
|
||||
if (props.multiple) {
|
||||
//不添加重复的数据到右边
|
||||
@@ -159,9 +160,9 @@ const handleChange = (data, checked) => {
|
||||
}
|
||||
}
|
||||
if (checked) {
|
||||
if (data.children === undefined) {
|
||||
// if (data.children === undefined) {
|
||||
selectList.value.push(data);
|
||||
}
|
||||
// }
|
||||
} else if (data === "1") {
|
||||
tree.value.setCheckedKeys([]);
|
||||
selectList.value = [];
|
||||
@@ -183,7 +184,7 @@ const handleChange = (data, checked) => {
|
||||
tree.value.setCheckedKeys([]);
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
};
|
||||
const handle = (node, check) => {
|
||||
if (check.isLeaf !== false) {
|
||||
|
||||
@@ -31,6 +31,8 @@ const searchConfig = reactive([
|
||||
props: {
|
||||
placeholder: '请选择分摊月份',
|
||||
clearable: true,
|
||||
type:'month',
|
||||
valueFormat:"YYYY-MM-DD HH:mm:ss"
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
|
||||
@@ -53,6 +53,15 @@ const searchConfig = ref([
|
||||
clearable: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '用户昵称',
|
||||
prop: 'nickName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入',
|
||||
clearable: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'state',
|
||||
|
||||
Reference in New Issue
Block a user