|
|
@ -40,40 +40,11 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<!-- <a-table |
|
|
|
:columns="columns" |
|
|
|
:data-source="tableData" |
|
|
|
bordered |
|
|
|
:pagination="false"> |
|
|
|
<template #bodyCell="{ column, text, record }"> |
|
|
|
<template v-if="column.key === 'action'"> |
|
|
|
<span> |
|
|
|
<a @click="editData(record)">编辑</a> |
|
|
|
<a-divider type="vertical" /> |
|
|
|
<a @click="delData(record)">删除</a> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #title> |
|
|
|
<div class="ns-table-title"><span>排放因子库</span></div> |
|
|
|
<div class="buttonGroup"> |
|
|
|
<a-button type="primary" @click="addNewData">新增</a-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</a-table> --> |
|
|
|
<ns-view-list-table |
|
|
|
v-bind="tableConfig" |
|
|
|
:model="tableData" |
|
|
|
ref="mainRef" |
|
|
|
:scroll="{ x: 1000 }" /> |
|
|
|
<!-- <a-pagination |
|
|
|
:current="queryParams.pageNum" |
|
|
|
:total="total" |
|
|
|
:page-size="queryParams.pageSize" |
|
|
|
style="display: flex; justify-content: center; margin-top: 16px" |
|
|
|
:show-size-changer="true" |
|
|
|
:show-quick-jumper="true" |
|
|
|
@change="onChange" /> --> |
|
|
|
<!-- 新增/编辑 --> |
|
|
|
<a-drawer |
|
|
|
:width="500" |
|
|
@ -93,20 +64,20 @@ |
|
|
|
:wrapper-col="wrapperCol"> |
|
|
|
<a-row> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-form-item ref="name" label="日期范围" name="dateRange"> |
|
|
|
<a-form-item ref="name" label="适用日期" name="dateRange"> |
|
|
|
<a-range-picker |
|
|
|
v-model:value="formState.dateRange" |
|
|
|
picker="month" |
|
|
|
valueFormat="YYYY-MM" /> |
|
|
|
</a-form-item> |
|
|
|
</a-col> |
|
|
|
<a-col :span="24"> |
|
|
|
<!-- <a-col :span="24"> |
|
|
|
<a-form-item ref="name" label="排放因子" name="emissionFactors"> |
|
|
|
<ns-input v-model:value="formState.emissionFactors" disabled /> |
|
|
|
</a-form-item> |
|
|
|
</a-col> |
|
|
|
</a-col> --> |
|
|
|
</a-row> |
|
|
|
<span |
|
|
|
<!-- <span |
|
|
|
key="" |
|
|
|
style="font-size: 16px; font-weight: 700; color: rgba(51, 51, 51, 1); text-align: left"> |
|
|
|
因子列表 |
|
|
@ -117,8 +88,11 @@ |
|
|
|
<ns-input style="margin-top: 5px" v-model:value="selectData" @change="keyChange" /> |
|
|
|
</a-form-item> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
</a-row> --> |
|
|
|
</a-form> |
|
|
|
<a-button type="primary" style="margin-bottom: 10px" @click="selectFactor" |
|
|
|
>选择因子</a-button |
|
|
|
> |
|
|
|
<a-table |
|
|
|
:columns="drawerColumns" |
|
|
|
:data-source="newTableData" |
|
|
@ -142,6 +116,15 @@ |
|
|
|
</template> |
|
|
|
</a-drawer> |
|
|
|
</div> |
|
|
|
<!-- 选择因子 --> |
|
|
|
<a-modal |
|
|
|
v-model:visible="openVisible" |
|
|
|
width="60%" |
|
|
|
title="选择因子" |
|
|
|
@ok="onSubmit" |
|
|
|
@cancel="onClose"> |
|
|
|
<ns-view-list-table v-bind="config" ref="setFactorRef" style="height: 500px" /> |
|
|
|
</a-modal> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -156,6 +139,7 @@ |
|
|
|
carbonEmissionFactorLibrary, |
|
|
|
} from '/@/api/carbonEmissionFactorLibrary'; |
|
|
|
import { or } from '@vueuse/core'; |
|
|
|
import { setFactorConfig } from '../config'; |
|
|
|
defineOptions({ |
|
|
|
energyType: 'quickCalculation', // 与页面路由name一致缓存才可生效 |
|
|
|
components: { |
|
|
@ -499,6 +483,11 @@ |
|
|
|
}, |
|
|
|
}); |
|
|
|
}; |
|
|
|
const openVisible = ref(false); |
|
|
|
const config = setFactorConfig(orgId.value); |
|
|
|
const selectFactor = () => { |
|
|
|
openVisible.value = true; |
|
|
|
}; |
|
|
|
// 关闭新增抽屉 |
|
|
|
const onClose = () => { |
|
|
|
visible.value = false; |
|
|
@ -611,6 +600,12 @@ |
|
|
|
:deep(.ant-table-container) { |
|
|
|
padding: unset; |
|
|
|
} |
|
|
|
:deep(.ant-modal-header) { |
|
|
|
border-bottom: 10px solid #f0f0f0 !important; |
|
|
|
} |
|
|
|
:deep(.ant-modal-footer) { |
|
|
|
border-top: 10px solid #f0f0f0 !important; |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style scoped> |
|
|
|
th.column-money, |
|
|
|