修改测试问题及优化项
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { quickCalculation, carbonEmissionFactorLibrary } from '/@/api/carbonEmissionFactorLibrary';
|
||||
import { ref } from 'vue';
|
||||
// 凭证弹窗表头
|
||||
export const voucherColumns = [
|
||||
{
|
||||
@@ -9,8 +11,8 @@ export const voucherColumns = [
|
||||
},
|
||||
{
|
||||
title: '日期',
|
||||
dataIndex: 'updateTime',
|
||||
key: 'updateTime',
|
||||
dataIndex: 'bizName',
|
||||
key: 'bizName',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
@@ -42,3 +44,107 @@ export const drawerColumns = [
|
||||
dataIndex: 'dataSources',
|
||||
},
|
||||
];
|
||||
export const setFactorConfig = (orgId) => {
|
||||
return ref({
|
||||
api: carbonEmissionFactorLibrary.getTableList,
|
||||
params: { orgId, pageNum: 1, pageSize: 9999, emissionList: [0] },
|
||||
treeConfig: {
|
||||
header: {
|
||||
icon: 'deviceType',
|
||||
title: '排放分类',
|
||||
},
|
||||
params: { orgId},
|
||||
dynamicParams: { emissionList: 'id[]' },
|
||||
defaultExpandAll: true,
|
||||
// checkable:true,
|
||||
api: carbonEmissionFactorLibrary.getCarbonFactorTree,
|
||||
fieldNames: { title: 'emissionName', key: 'id' },
|
||||
formConfig: {
|
||||
schemas: [
|
||||
{
|
||||
field: 'deviceType',
|
||||
label: '设备名称',
|
||||
component: 'NsInput',
|
||||
autoSubmit: true,
|
||||
componentProps: {
|
||||
placeholder: '请输入关键字',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
rowSelection: { type: 'radio' },
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
textNumber: 2,
|
||||
dataIndex: 'address',
|
||||
customRender: (text: any) => {
|
||||
return text.index + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'emissionSources',
|
||||
textNumber: 3,
|
||||
},
|
||||
{
|
||||
title: '排放因子',
|
||||
dataIndex: 'emissionFactors',
|
||||
textNumber: 4,
|
||||
textEllipsis: true,
|
||||
},
|
||||
{
|
||||
title: '排放因子单位',
|
||||
dataIndex: 'emissionFactorUnits',
|
||||
width: 100,
|
||||
textEllipsis: true,
|
||||
},
|
||||
{
|
||||
title: '排放环节',
|
||||
dataIndex: 'emissionProcess',
|
||||
textWidth: 88,
|
||||
textEllipsis: true,
|
||||
},
|
||||
{
|
||||
title: '数据来源',
|
||||
dataIndex: 'dataSources',
|
||||
textNumber: 5,
|
||||
textEllipsis: true,
|
||||
},
|
||||
],
|
||||
formConfig: {
|
||||
schemas: [
|
||||
{
|
||||
field: 'emissionSources',
|
||||
label: '排放源',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
placeholder: '请输入排放源',
|
||||
maxLength: 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'emissionProcess',
|
||||
label: '排放环节',
|
||||
component: 'NsSelectApi',
|
||||
componentProps: {
|
||||
placeholder: '请选择排放环节',
|
||||
api: carbonEmissionFactorLibrary.gasAndDatabase,
|
||||
resultField: 'data',
|
||||
params: {
|
||||
orgId: orgId.value,
|
||||
type: 'emissionProcess',
|
||||
},
|
||||
immediate: true,
|
||||
labelField: 'label',
|
||||
valueField: 'value',
|
||||
},
|
||||
},
|
||||
],
|
||||
params: {},
|
||||
},
|
||||
// pagination: { pageSizeOptions: false },
|
||||
rowKey: 'id',
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user