feat:合并

This commit is contained in:
李晓鸽
2022-10-10 18:39:09 +08:00
parent 5fe572423b
commit 22832ccfc9
2 changed files with 21 additions and 74 deletions

View File

@@ -792,8 +792,6 @@ export default {
color: #6f6f6f;
font-size: 14px;
}
.select {
}
}
.choo {
display: none;

View File

@@ -67,8 +67,8 @@
<!-- 表格 -->
<div class="tableBox">
<a-table
:columns="tableDataFunc()[0]"
:data-source="tableDataFunc()[1]"
:columns="columns"
:data-source="tableData"
:loading="tableDataTotal === -1 ? true : false"
:scroll="{ x: 700 }"
@expand="expandTable"
@@ -459,7 +459,8 @@ export default {
};
const getTableDate = () => {
state.tableData.map((value) => {
let data = state.tableData;
data.map((value) => {
if (value.children) {
//多层项目
console.log("11");
@@ -577,7 +578,9 @@ export default {
<span class="operation3">复制</span>
<span class="more">删除</span>
</div>
) : null;
) : (
<div></div>
);
value.children.map((item) => {
if (item.children) {
@@ -697,7 +700,9 @@ export default {
<span class="operation3">复制</span>
<span class="more">删除</span>
</div>
) : null;
) : (
<div></div>
);
item.children.map((a) => {
//班级
@@ -912,7 +917,9 @@ export default {
</a-select>
</div>
</div>
) : null;
) : (
<div></div>
);
});
} else {
//单层子项目
@@ -1129,7 +1136,9 @@ export default {
</a-select>
</div>
</div>
) : null;
) : (
<div></div>
);
}
});
} else {
@@ -1246,80 +1255,24 @@ export default {
<div>基础信息</div>
</a-select-option>
</a-select>
) : null}
) : (
<div></div>
)}
</div>
</div>
);
}
return 0;
});
return state.tableData;
state.tableData = data;
};
getTableDate();
const tableDataFunc = () => {
const columns = [
{
title: "项目名称",
dataIndex: "projectName",
key: "projectName",
width: 180,
// align: "center",
ellipsis: true,
// scopedSlots: { customRender: "action" }, //引入的插槽
// customRender: (text, record) => {
// console.log(text, record);
// return <span>{text.text}</span>;
// },
},
{
title: "项目经理",
dataIndex: "manager",
key: "manager",
width: 100,
align: "center",
},
{
title: "状态",
dataIndex: "state",
// width: "30%",
key: "state",
width: 100,
align: "center",
},
{
title: "创建人",
dataIndex: "creater",
// width: "30%",
key: "creater",
width: 100,
align: "center",
},
{
title: "创建时间",
dataIndex: "time",
key: "time",
width: 180,
align: "center",
},
{
title: "操作",
dataIndex: "operation",
key: "operation",
width: 300,
align: "center",
},
];
const data = getTableDate();
return [columns, data];
};
return {
...toRefs(state),
columns,
selectProjectName,
expandTable,
getTableDate,
tableDataFunc,
};
},
};
@@ -1431,10 +1384,6 @@ export default {
padding: 5px 16px;
background-color: #eff4fc;
}
.ant-table {
// overflow: visible;
// z-index: 99999;
}
}
.operation {
font-size: 14px;