优化
This commit is contained in:
@@ -178,7 +178,7 @@ export const setFactorConfig = (orgId, treeId, tableId) => {
|
|||||||
},
|
},
|
||||||
rowSelection: {
|
rowSelection: {
|
||||||
type: 'radio',
|
type: 'radio',
|
||||||
selectedRowKeys: tableId,
|
selectedRowKeys: tableId ? tableId : [''],
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
@@ -47,3 +47,23 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped lang="less">
|
||||||
|
:deep(.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn) {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 1.33px;
|
||||||
|
line-height: 21px;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
:deep(.ant-tabs-tab-btn) {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 1.33px;
|
||||||
|
line-height: 21px;
|
||||||
|
color: #666666;
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@@ -35,8 +35,10 @@
|
|||||||
data.energyType.substring(data.energyType.indexOf(searchValue) + searchValue.length)
|
data.energyType.substring(data.energyType.indexOf(searchValue) + searchValue.length)
|
||||||
}}
|
}}
|
||||||
</span> -->
|
</span> -->
|
||||||
<span v-if="data.code">{{ truncatedName(data.energyType + data.code) }}</span>
|
<span v-if="data.code" :title="data.energyType + data.code">
|
||||||
<span v-else>{{ truncatedName(data.energyType) }}</span>
|
{{ truncatedName(data.energyType + data.code) }}
|
||||||
|
</span>
|
||||||
|
<span v-else :title="data.energyType">{{ truncatedName(data.energyType) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</a-tree>
|
</a-tree>
|
||||||
</div>
|
</div>
|
||||||
@@ -228,9 +230,11 @@
|
|||||||
autoExpandParent.value = false;
|
autoExpandParent.value = false;
|
||||||
};
|
};
|
||||||
const truncatedName = (name) => {
|
const truncatedName = (name) => {
|
||||||
|
if (name) {
|
||||||
if (name.length > 8) {
|
if (name.length > 8) {
|
||||||
return name.substring(0, 8) + '...';
|
return name.substring(0, 8) + '...';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return name;
|
return name;
|
||||||
};
|
};
|
||||||
// 被选中的树节点
|
// 被选中的树节点
|
||||||
@@ -511,12 +515,14 @@
|
|||||||
const config = setFactorConfig(orgId.value, treeId.value, tableId.value);
|
const config = setFactorConfig(orgId.value, treeId.value, tableId.value);
|
||||||
const selectFactor = () => {
|
const selectFactor = () => {
|
||||||
openVisible.value = true;
|
openVisible.value = true;
|
||||||
|
if (treeId.value.length > 0) {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
setFactorRef.value.nsTableRef.params.emissionList = treeId.value;
|
setFactorRef.value.nsTableRef.params.emissionList = treeId.value;
|
||||||
setFactorRef.value.nsTableRef.treeElRef.selectedKeys = treeId.value;
|
setFactorRef.value.nsTableRef.treeElRef.selectedKeys = treeId.value;
|
||||||
setFactorRef.value.nsTableRef.rowSelection.selectedRowKeys = tableId.value;
|
setFactorRef.value.nsTableRef.rowSelection.selectedRowKeys = tableId.value;
|
||||||
setFactorRef.value.nsTableRef.reload();
|
setFactorRef.value.nsTableRef.reload();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const btnClick = () => {
|
const btnClick = () => {
|
||||||
let selectRowKeys = setFactorRef.value?.nsTableRef.tableState.selectedRowKeys;
|
let selectRowKeys = setFactorRef.value?.nsTableRef.tableState.selectedRowKeys;
|
||||||
@@ -585,6 +591,7 @@
|
|||||||
box-shadow: 0px 2px 20px rgb(69 123 234 / 20%);
|
box-shadow: 0px 2px 20px rgb(69 123 234 / 20%);
|
||||||
:deep(.ns-table-main) {
|
:deep(.ns-table-main) {
|
||||||
border-radius: 8px !important;
|
border-radius: 8px !important;
|
||||||
|
margin-top: unset !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
:deep(.ant-table-container) {
|
:deep(.ant-table-container) {
|
||||||
|
@@ -128,6 +128,16 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 2%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
">
|
||||||
|
<a-divider style="height: 100%" type="vertical" />
|
||||||
|
</div>
|
||||||
<div class="mainRight">
|
<div class="mainRight">
|
||||||
<a-table
|
<a-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
@@ -1794,7 +1804,6 @@
|
|||||||
}
|
}
|
||||||
.mainLeft {
|
.mainLeft {
|
||||||
width: 19%;
|
width: 19%;
|
||||||
margin-right: 1%;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border: 1px solid #f2f2f2;
|
border: 1px solid #f2f2f2;
|
||||||
@@ -1823,8 +1832,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.mainRight {
|
.mainRight {
|
||||||
width: 80%;
|
width: 79%;
|
||||||
border-left: 1px solid #f2f2f2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 首页 -->
|
<!-- 首页 -->
|
||||||
<div v-if="isMainPage">
|
<div v-if="isMainPage">
|
||||||
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" />
|
<ns-view-list-table v-bind="tableConfig" :scroll="{ x: 750 }" :model="data" ref="mainRef" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 填报页 -->
|
<!-- 填报页 -->
|
||||||
<div v-if="fillInPage" style="height: 100%">
|
<div v-if="fillInPage" style="height: 100%">
|
||||||
@@ -191,37 +191,45 @@
|
|||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
|
width: 50,
|
||||||
customRender: (text: any) => {
|
customRender: (text: any) => {
|
||||||
return text.index + 1;
|
return text.index + 1;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '企业名称',
|
title: '企业名称',
|
||||||
|
width: 130,
|
||||||
dataIndex: 'enterpriseName',
|
dataIndex: 'enterpriseName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '报告名称',
|
title: '报告名称',
|
||||||
|
width: 100,
|
||||||
dataIndex: 'reportName',
|
dataIndex: 'reportName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '报告年度',
|
title: '报告年度',
|
||||||
|
width: 70,
|
||||||
dataIndex: 'reportYear',
|
dataIndex: 'reportYear',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '适用标准',
|
title: '适用标准',
|
||||||
|
width: 100,
|
||||||
dataIndex: 'genericStandard',
|
dataIndex: 'genericStandard',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '更新人',
|
title: '更新人',
|
||||||
|
width: 100,
|
||||||
dataIndex: 'updateUser',
|
dataIndex: 'updateUser',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '更新时间',
|
title: '更新时间',
|
||||||
|
width: 100,
|
||||||
dataIndex: 'updateTime',
|
dataIndex: 'updateTime',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
columnActions: {
|
columnActions: {
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
width: 100,
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
label: '编辑',
|
label: '编辑',
|
||||||
|
Reference in New Issue
Block a user