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; color: #6f6f6f;
font-size: 14px; font-size: 14px;
} }
.select {
}
} }
.choo { .choo {
display: none; display: none;

View File

@@ -67,8 +67,8 @@
<!-- 表格 --> <!-- 表格 -->
<div class="tableBox"> <div class="tableBox">
<a-table <a-table
:columns="tableDataFunc()[0]" :columns="columns"
:data-source="tableDataFunc()[1]" :data-source="tableData"
:loading="tableDataTotal === -1 ? true : false" :loading="tableDataTotal === -1 ? true : false"
:scroll="{ x: 700 }" :scroll="{ x: 700 }"
@expand="expandTable" @expand="expandTable"
@@ -459,7 +459,8 @@ export default {
}; };
const getTableDate = () => { const getTableDate = () => {
state.tableData.map((value) => { let data = state.tableData;
data.map((value) => {
if (value.children) { if (value.children) {
//多层项目 //多层项目
console.log("11"); console.log("11");
@@ -577,7 +578,9 @@ export default {
<span class="operation3">复制</span> <span class="operation3">复制</span>
<span class="more">删除</span> <span class="more">删除</span>
</div> </div>
) : null; ) : (
<div></div>
);
value.children.map((item) => { value.children.map((item) => {
if (item.children) { if (item.children) {
@@ -697,7 +700,9 @@ export default {
<span class="operation3">复制</span> <span class="operation3">复制</span>
<span class="more">删除</span> <span class="more">删除</span>
</div> </div>
) : null; ) : (
<div></div>
);
item.children.map((a) => { item.children.map((a) => {
//班级 //班级
@@ -912,7 +917,9 @@ export default {
</a-select> </a-select>
</div> </div>
</div> </div>
) : null; ) : (
<div></div>
);
}); });
} else { } else {
//单层子项目 //单层子项目
@@ -1129,7 +1136,9 @@ export default {
</a-select> </a-select>
</div> </div>
</div> </div>
) : null; ) : (
<div></div>
);
} }
}); });
} else { } else {
@@ -1246,80 +1255,24 @@ export default {
<div>基础信息</div> <div>基础信息</div>
</a-select-option> </a-select-option>
</a-select> </a-select>
) : null} ) : (
<div></div>
)}
</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 { return {
...toRefs(state), ...toRefs(state),
columns, columns,
selectProjectName, selectProjectName,
expandTable, expandTable,
getTableDate, getTableDate,
tableDataFunc,
}; };
}, },
}; };
@@ -1431,10 +1384,6 @@ export default {
padding: 5px 16px; padding: 5px 16px;
background-color: #eff4fc; background-color: #eff4fc;
} }
.ant-table {
// overflow: visible;
// z-index: 99999;
}
} }
.operation { .operation {
font-size: 14px; font-size: 14px;