|
@ -40,40 +40,11 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="right"> |
|
|
<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 |
|
|
<ns-view-list-table |
|
|
v-bind="tableConfig" |
|
|
v-bind="tableConfig" |
|
|
:model="tableData" |
|
|
:model="tableData" |
|
|
ref="mainRef" |
|
|
ref="mainRef" |
|
|
:scroll="{ x: 1000 }" /> |
|
|
: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 |
|
|
<a-drawer |
|
|
:width="500" |
|
|
:width="500" |
|
@ -93,20 +64,20 @@ |
|
|
:wrapper-col="wrapperCol"> |
|
|
:wrapper-col="wrapperCol"> |
|
|
<a-row> |
|
|
<a-row> |
|
|
<a-col :span="24"> |
|
|
<a-col :span="24"> |
|
|
<a-form-item ref="name" label="日期范围" name="dateRange"> |
|
|
<a-form-item ref="name" label="适用日期" name="dateRange"> |
|
|
<a-range-picker |
|
|
<a-range-picker |
|
|
v-model:value="formState.dateRange" |
|
|
v-model:value="formState.dateRange" |
|
|
picker="month" |
|
|
picker="month" |
|
|
valueFormat="YYYY-MM" /> |
|
|
valueFormat="YYYY-MM" /> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
</a-col> |
|
|
</a-col> |
|
|
<a-col :span="24"> |
|
|
<!-- <a-col :span="24"> |
|
|
<a-form-item ref="name" label="排放因子" name="emissionFactors"> |
|
|
<a-form-item ref="name" label="排放因子" name="emissionFactors"> |
|
|
<ns-input v-model:value="formState.emissionFactors" disabled /> |
|
|
<ns-input v-model:value="formState.emissionFactors" disabled /> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
</a-col> |
|
|
</a-col> --> |
|
|
</a-row> |
|
|
</a-row> |
|
|
<span |
|
|
<!-- <span |
|
|
key="" |
|
|
key="" |
|
|
style="font-size: 16px; font-weight: 700; color: rgba(51, 51, 51, 1); text-align: left"> |
|
|
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" /> |
|
|
<ns-input style="margin-top: 5px" v-model:value="selectData" @change="keyChange" /> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
</a-col> |
|
|
</a-col> |
|
|
</a-row> |
|
|
</a-row> --> |
|
|
</a-form> |
|
|
</a-form> |
|
|
|
|
|
<a-button type="primary" style="margin-bottom: 10px" @click="selectFactor" |
|
|
|
|
|
>选择因子</a-button |
|
|
|
|
|
> |
|
|
<a-table |
|
|
<a-table |
|
|
:columns="drawerColumns" |
|
|
:columns="drawerColumns" |
|
|
:data-source="newTableData" |
|
|
:data-source="newTableData" |
|
@ -142,6 +116,15 @@ |
|
|
</template> |
|
|
</template> |
|
|
</a-drawer> |
|
|
</a-drawer> |
|
|
</div> |
|
|
</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> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -156,6 +139,7 @@ |
|
|
carbonEmissionFactorLibrary, |
|
|
carbonEmissionFactorLibrary, |
|
|
} from '/@/api/carbonEmissionFactorLibrary'; |
|
|
} from '/@/api/carbonEmissionFactorLibrary'; |
|
|
import { or } from '@vueuse/core'; |
|
|
import { or } from '@vueuse/core'; |
|
|
|
|
|
import { setFactorConfig } from '../config'; |
|
|
defineOptions({ |
|
|
defineOptions({ |
|
|
energyType: 'quickCalculation', // 与页面路由name一致缓存才可生效 |
|
|
energyType: 'quickCalculation', // 与页面路由name一致缓存才可生效 |
|
|
components: { |
|
|
components: { |
|
@ -499,6 +483,11 @@ |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
}; |
|
|
}; |
|
|
|
|
|
const openVisible = ref(false); |
|
|
|
|
|
const config = setFactorConfig(orgId.value); |
|
|
|
|
|
const selectFactor = () => { |
|
|
|
|
|
openVisible.value = true; |
|
|
|
|
|
}; |
|
|
// 关闭新增抽屉 |
|
|
// 关闭新增抽屉 |
|
|
const onClose = () => { |
|
|
const onClose = () => { |
|
|
visible.value = false; |
|
|
visible.value = false; |
|
@ -611,6 +600,12 @@ |
|
|
:deep(.ant-table-container) { |
|
|
:deep(.ant-table-container) { |
|
|
padding: unset; |
|
|
padding: unset; |
|
|
} |
|
|
} |
|
|
|
|
|
:deep(.ant-modal-header) { |
|
|
|
|
|
border-bottom: 10px solid #f0f0f0 !important; |
|
|
|
|
|
} |
|
|
|
|
|
:deep(.ant-modal-footer) { |
|
|
|
|
|
border-top: 10px solid #f0f0f0 !important; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
<style scoped> |
|
|
<style scoped> |
|
|
th.column-money, |
|
|
th.column-money, |
|
|