This commit is contained in:
zhangyc
2022-12-14 07:27:04 +08:00
parent d9608d69e3
commit 7c8ae62f70
11 changed files with 287 additions and 43 deletions

View File

@@ -117,8 +117,8 @@
:loading="tableDataTotal === -1 ? true : false"
:pagination="false"
/>
<div class="tableBox">
<div class="pa" style="display:flex;justify-content:center;padding:20px;">
<div class="tableBox" style="margin-top: 85px;">
<div class="pa" style="display:flex;justify-content:center;">
<a-pagination
v-if="tableDataTotal > 10"
:showSizeChanger="false"
@@ -167,8 +167,8 @@ const columns1 = [
{
title: "内容分类",
width: "15%",
dataIndex: "content",
key: "content",
dataIndex: "category",
key: "category",
align: "center",
},
{
@@ -216,6 +216,129 @@ export default {
},
setup(props, ctx) {
const state = reactive({
options2222: [
{
title: "领导力",
value: "100",
selectable: false,
children: [
{
title: "领导业务",
value: "1001",
},
{
title: "领导团队",
value: "1002",
},
{
title: "领导自我",
value: "1003",
},
],
},
{
title: "专业力",
value: "200",
selectable: false,
children: [
{
title: "研发",
value: "2001",
},
{
title: "产品和解决方案",
value: "2002",
},
{
title: "生产技术与制造",
value: "2003",
},
{
title: "供应链",
value: "2004",
},
{
title: "营销",
value: "2005",
},
{
title: "品质",
value: "2006",
},
{
title: "战略与企划",
value: "2007",
},
{
title: "流程管理",
value: "2008",
},
{
title: "业绩管理",
value: "2009",
},
{
title: "项目管理",
value: "20010",
},
{
title: "信息技术",
value: "20011",
},
{
title: "环境与安全",
value: "20012",
},
{
title: "人力资源",
value: "20013",
},
{
title: "企业文化",
value: "20014",
},
{
title: "品牌",
value: "20015",
},
{
title: "财务",
value: "20016",
},
{
title: "法务",
value: "20017",
},
{
title: "行政",
value: "20018",
},
{
title: "医工",
value: "20019",
},
],
},
{
title: "通用力",
value: "300",
selectable: false,
children: [
{
title: "职业操守与道德",
value: "3001",
},
{
title: "职业素养与技能",
value: "3002",
},
{
title: "规章制度",
value: "3003",
},
],
},
],
classTableData: [
// {
// key: "1",
@@ -310,6 +433,7 @@ export default {
const getClassData = (tabledata) => {
let data = tabledata;
let tData =[];
let array = [];
data.map((value) => {
let obj = {
@@ -320,11 +444,44 @@ export default {
creator: value.createName || "-",
time: value.publishTime,
categoryId: value.categoryId,
category:"",
//需要判断content
};
let options = state.options2222;
for (let i = 0; i < options.value.length; i++) {
for (let j = 0; j < options.value[i].children.length; j++) {
if (
String(options.value[i].children[j].value) ===
String(value.categoryId)
) {
console.log();
value.category = options.value[i].children[j].title;
return false;
}
}
}
array.push(obj);
});
state.classTableData = array;
array.forEach((itm) => {
let options = state.options2222;
for (let i = 0; i < options.value.length; i++) {
for (let j = 0; j < options.value[i].children.length; j++) {
if (
String(options.value[i].children[j].value) ===
String(itm.categoryId)
) {
console.log("找到了",i);
itm.category = options.value[i].children[j].title;
tData.push(itm);
return false;
}
}
}
});
console.log("结果",tData);
state.classTableData = tData;
};
/**
const options1 = ref([
@@ -369,6 +526,7 @@ export default {
afterVisibleChange,
closeDrawer,
columns1,
getClassData,
handleChange,