优化
This commit is contained in:
@@ -178,7 +178,7 @@ export const setFactorConfig = (orgId, treeId, tableId) => {
|
||||
},
|
||||
rowSelection: {
|
||||
type: 'radio',
|
||||
selectedRowKeys: tableId,
|
||||
selectedRowKeys: tableId ? tableId : [''],
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
|
@@ -47,3 +47,23 @@
|
||||
}
|
||||
};
|
||||
</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)
|
||||
}}
|
||||
</span> -->
|
||||
<span v-if="data.code">{{ truncatedName(data.energyType + data.code) }}</span>
|
||||
<span v-else>{{ truncatedName(data.energyType) }}</span>
|
||||
<span v-if="data.code" :title="data.energyType + data.code">
|
||||
{{ truncatedName(data.energyType + data.code) }}
|
||||
</span>
|
||||
<span v-else :title="data.energyType">{{ truncatedName(data.energyType) }}</span>
|
||||
</template>
|
||||
</a-tree>
|
||||
</div>
|
||||
@@ -228,8 +230,10 @@
|
||||
autoExpandParent.value = false;
|
||||
};
|
||||
const truncatedName = (name) => {
|
||||
if (name.length > 8) {
|
||||
return name.substring(0, 8) + '...';
|
||||
if (name) {
|
||||
if (name.length > 8) {
|
||||
return name.substring(0, 8) + '...';
|
||||
}
|
||||
}
|
||||
return name;
|
||||
};
|
||||
@@ -511,12 +515,14 @@
|
||||
const config = setFactorConfig(orgId.value, treeId.value, tableId.value);
|
||||
const selectFactor = () => {
|
||||
openVisible.value = true;
|
||||
nextTick(() => {
|
||||
setFactorRef.value.nsTableRef.params.emissionList = treeId.value;
|
||||
setFactorRef.value.nsTableRef.treeElRef.selectedKeys = treeId.value;
|
||||
setFactorRef.value.nsTableRef.rowSelection.selectedRowKeys = tableId.value;
|
||||
setFactorRef.value.nsTableRef.reload();
|
||||
});
|
||||
if (treeId.value.length > 0) {
|
||||
nextTick(() => {
|
||||
setFactorRef.value.nsTableRef.params.emissionList = treeId.value;
|
||||
setFactorRef.value.nsTableRef.treeElRef.selectedKeys = treeId.value;
|
||||
setFactorRef.value.nsTableRef.rowSelection.selectedRowKeys = tableId.value;
|
||||
setFactorRef.value.nsTableRef.reload();
|
||||
});
|
||||
}
|
||||
};
|
||||
const btnClick = () => {
|
||||
let selectRowKeys = setFactorRef.value?.nsTableRef.tableState.selectedRowKeys;
|
||||
@@ -585,6 +591,7 @@
|
||||
box-shadow: 0px 2px 20px rgb(69 123 234 / 20%);
|
||||
:deep(.ns-table-main) {
|
||||
border-radius: 8px !important;
|
||||
margin-top: unset !important;
|
||||
}
|
||||
}
|
||||
:deep(.ant-table-container) {
|
||||
|
@@ -128,6 +128,16 @@
|
||||
</a-button>
|
||||
</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">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
@@ -1794,7 +1804,6 @@
|
||||
}
|
||||
.mainLeft {
|
||||
width: 19%;
|
||||
margin-right: 1%;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
border: 1px solid #f2f2f2;
|
||||
@@ -1823,8 +1832,7 @@
|
||||
}
|
||||
}
|
||||
.mainRight {
|
||||
width: 80%;
|
||||
border-left: 1px solid #f2f2f2;
|
||||
width: 79%;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- 首页 -->
|
||||
<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 v-if="fillInPage" style="height: 100%">
|
||||
@@ -191,37 +191,45 @@
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
width: 50,
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '企业名称',
|
||||
width: 130,
|
||||
dataIndex: 'enterpriseName',
|
||||
},
|
||||
{
|
||||
title: '报告名称',
|
||||
width: 100,
|
||||
dataIndex: 'reportName',
|
||||
},
|
||||
{
|
||||
title: '报告年度',
|
||||
width: 70,
|
||||
dataIndex: 'reportYear',
|
||||
},
|
||||
{
|
||||
title: '适用标准',
|
||||
width: 100,
|
||||
dataIndex: 'genericStandard',
|
||||
},
|
||||
{
|
||||
title: '更新人',
|
||||
width: 100,
|
||||
dataIndex: 'updateUser',
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
width: 100,
|
||||
dataIndex: 'updateTime',
|
||||
},
|
||||
],
|
||||
columnActions: {
|
||||
title: '操作',
|
||||
width: 100,
|
||||
actions: [
|
||||
{
|
||||
label: '编辑',
|
||||
|
Reference in New Issue
Block a user