tackid:099 remark:'commit'
This commit is contained in:
@@ -739,27 +739,27 @@
|
|||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: 'CO2',
|
label: 'CO2',
|
||||||
value: 'CO2',
|
value: '1',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'CO2e',
|
label: 'CO2e',
|
||||||
value: 'CO2e',
|
value: '2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'SF6',
|
label: 'SF6',
|
||||||
value:'SF6',
|
value:'3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'CH4',
|
label: 'CH4',
|
||||||
value: 'CH4',
|
value: '4',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'PFCs',
|
label: 'PFCs',
|
||||||
value: 'PFCs',
|
value: '5',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'HFCs',
|
label: 'HFCs',
|
||||||
value: 'HFCs',
|
value: '6',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@@ -291,10 +291,10 @@
|
|||||||
// };
|
// };
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
::v-deep .ant-table-title{
|
:deep(.ant-table-title){
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
::v-deep .ant-table-container{
|
:deep(.ant-table-container){
|
||||||
padding: 0px 16px;
|
padding: 0px 16px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -177,10 +177,10 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
::v-deep .ant-table-title{
|
:deep(.ant-table-title){
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
::v-deep .ant-table-container{
|
:deep(.ant-table-container){
|
||||||
padding: 0px 16px;
|
padding: 0px 16px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -576,10 +576,10 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
::v-deep .ant-table-title{
|
:deep(.ant-table-title) {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
::v-deep .ant-table-container{
|
:deep(.ant-table-container) {
|
||||||
padding: 0px 16px;
|
padding: 0px 16px;
|
||||||
}
|
}
|
||||||
.buttonGroup{
|
.buttonGroup{
|
||||||
|
@@ -490,7 +490,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
::v-deep .ant-table-container{
|
:deep(.ant-table-container) {
|
||||||
padding: 0px 16px;
|
padding: 0px 16px;
|
||||||
}
|
}
|
||||||
:deep(.ns-table-main) {
|
:deep(.ns-table-main) {
|
||||||
@@ -527,7 +527,7 @@
|
|||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
background-color: #2778FF;
|
background-color: #2778FF;
|
||||||
}
|
}
|
||||||
::v-deep .ant-table-title{
|
:deep(.ant-table-title) {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@@ -1,283 +1,97 @@
|
|||||||
import { ref } from 'vue';
|
// 填报页表头
|
||||||
import { http } from '/nerv-lib/util';
|
export const columns = [
|
||||||
import { origanizemanage } from '/@/api/origanizemanage';
|
|
||||||
import { carbonEmissionFactorLibrary } from '/@/api/carbonEmissionFactorLibrary';
|
|
||||||
export const formConfig = (disabled) => {
|
|
||||||
return ref([
|
|
||||||
{
|
{
|
||||||
field: 'fields',
|
title: '日期',
|
||||||
component: 'NsChildForm',
|
dataIndex: 'name',
|
||||||
componentProps: {
|
key: 'name',
|
||||||
schemas: [
|
width: 100,
|
||||||
{
|
fixed: 'left',
|
||||||
label: '排放源',
|
|
||||||
field: 'emissionSources',
|
|
||||||
component: 'NsInput',
|
|
||||||
componentProps: {
|
|
||||||
placeholder: '请输入排放源',
|
|
||||||
maxLength: 20,
|
|
||||||
},
|
},
|
||||||
rules: [
|
|
||||||
{
|
{
|
||||||
required: true,
|
title: '消耗量',
|
||||||
message: '请输入排放源',
|
children: [
|
||||||
|
{
|
||||||
|
title: '数据来源',
|
||||||
|
dataIndex: 'companyAddress',
|
||||||
|
key: 'companyAddress',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '数值',
|
||||||
|
dataIndex: 'companyName',
|
||||||
|
key: 'companyName',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'emissionType',
|
title: '碳排因子',
|
||||||
label: '排放分类',
|
children: [
|
||||||
component: 'NsCascader',
|
|
||||||
fieldMap: ['emissionType'],
|
|
||||||
componentProps: {
|
|
||||||
placeholder: '请选择排放分类',
|
|
||||||
api: carbonEmissionFactorLibrary.getCarbonFactorTree,
|
|
||||||
fieldNames: { label: 'emissionName', value: 'id' },
|
|
||||||
showSearch: true,
|
|
||||||
},
|
|
||||||
rules: [
|
|
||||||
{
|
{
|
||||||
required: true,
|
title: '数据来源',
|
||||||
message: '请选择排放分类',
|
dataIndex: 'companyAddress',
|
||||||
|
key: 'companyAddress',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '数值',
|
||||||
|
dataIndex: 'companyName',
|
||||||
|
key: 'companyName',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'emissionGas',
|
title: '排放量',
|
||||||
label: '排放气体',
|
dataIndex: 'gender',
|
||||||
component: 'NsSelect',
|
key: 'gender',
|
||||||
componentProps: {
|
width: 80,
|
||||||
allowClear: true,
|
fixed: 'right',
|
||||||
placeholder: '请选择排放气体',
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
label: 'CO2',
|
|
||||||
value: 'CO2',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'CO2e',
|
title: '操作',
|
||||||
value: 'CO2e',
|
dataIndex: 'action',
|
||||||
|
key: 'action',
|
||||||
|
width: 80,
|
||||||
|
fixed: 'right',
|
||||||
},
|
},
|
||||||
|
];
|
||||||
|
// 凭证弹窗表头
|
||||||
|
export const voucherColumns = [
|
||||||
{
|
{
|
||||||
label: 'SF6',
|
title: '序号',
|
||||||
value:'SF6',
|
customRender: (text: any) => {
|
||||||
},
|
return text.index + 1;
|
||||||
{
|
|
||||||
label: 'CH4',
|
|
||||||
value: 'CH4',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'PFCs',
|
|
||||||
value: 'PFCs',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'HFCs',
|
|
||||||
value: 'HFCs',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请选择排放气体',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// field: 'emissionProcess',
|
|
||||||
// label: '排放环节',
|
|
||||||
// component: 'NsSelectApi',
|
|
||||||
// componentProps: {
|
|
||||||
// api: carbonEmissionFactorLibrary.getEmissionProcess,
|
|
||||||
// params: {
|
|
||||||
// emissionType: sessionStorage.getItem('checkedTreeNode'),
|
|
||||||
// },
|
|
||||||
// resultField: 'data',
|
|
||||||
// labelField: 'emissionProcess',
|
|
||||||
// valueField: 'emissionProcess',
|
|
||||||
// immediate: true,
|
|
||||||
// autoSelectFirst: false,
|
|
||||||
// filterOption:false,
|
|
||||||
// showSearch:true,
|
|
||||||
// autoClearSearchValue:false
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
label: '排放环节',
|
|
||||||
field: 'emissionProcess',
|
|
||||||
component: 'NsInput',
|
|
||||||
componentProps: {
|
|
||||||
placeholder: '请输入排放环节',
|
|
||||||
maxLength: 20,
|
|
||||||
},
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入排放环节',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '排放因子',
|
|
||||||
field: 'emissionFactors',
|
|
||||||
component: 'NsInputNumber',
|
|
||||||
componentProps: {
|
|
||||||
placeholder: '请输入排放因子值',
|
|
||||||
maxLength: 20,
|
|
||||||
},
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入排放因子值',
|
|
||||||
trigger: 'change',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'carbonEmissionPrefix',
|
|
||||||
label: '碳排前缀',
|
|
||||||
component: 'NsSelect',
|
|
||||||
componentProps: {
|
|
||||||
disabled: true,
|
|
||||||
allowClear: true,
|
|
||||||
defaultValue: 't',
|
|
||||||
placeholder: '请选择碳排前缀',
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
label: 'g',
|
|
||||||
value: 'g',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'kg',
|
|
||||||
value: 'kg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 't',
|
|
||||||
value: 't',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请选择碳排前缀',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '碳排后缀',
|
|
||||||
field: 'carbonEmissionSuffix',
|
|
||||||
component: 'NsInput',
|
|
||||||
componentProps: {
|
|
||||||
placeholder: '请输入碳排后缀',
|
|
||||||
maxLength: 20,
|
|
||||||
},
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请输入碳排后缀',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '已引用数',
|
|
||||||
field: 'numberOfReferences',
|
|
||||||
component: 'NsInput',
|
|
||||||
componentProps: {
|
|
||||||
defaultValue: 10,
|
|
||||||
disabled: true,
|
|
||||||
maxLength: 20,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '参考文献',
|
title: '日期',
|
||||||
field: 'reference',
|
dataIndex: 'age',
|
||||||
component: 'NsTextarea',
|
key: 'age',
|
||||||
componentProps: {
|
|
||||||
placeholder: '请输入参考文献',
|
|
||||||
maxLength: 20,
|
|
||||||
},
|
},
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
const options = ref([]);
|
|
||||||
|
|
||||||
const getUserPerList = (transform, params = {}) => {
|
|
||||||
return http.post(origanizemanage.queryUserPerList, { ...params }).then((res) => {
|
|
||||||
return res.data?.map((item) => {
|
|
||||||
item = { ...item, ...transform(item) };
|
|
||||||
return item;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
export const formConfig2 = (casData: any) => {
|
|
||||||
return ref([
|
|
||||||
{
|
{
|
||||||
field: 'information',
|
title: '文件名称',
|
||||||
component: 'NsCascader',
|
dataIndex: 'address',
|
||||||
componentProps: {
|
key: 'address 1',
|
||||||
placeholder: '请选择',
|
ellipsis: true,
|
||||||
displayRender: ({ labels, selectedOptions }: any) => {
|
|
||||||
console.log(labels, selectedOptions);
|
|
||||||
|
|
||||||
casData.value = selectedOptions.map(({ label, value }) => {
|
|
||||||
return { label, value };
|
|
||||||
});
|
|
||||||
return labels.join('/');
|
|
||||||
},
|
},
|
||||||
loadData: (selectedOptions, options) => {
|
];
|
||||||
console.log(selectedOptions, options, 'selectedOptions, options');
|
// 编辑页中表头
|
||||||
|
export const drawerColumns = [
|
||||||
const targetOption = selectedOptions[selectedOptions.length - 1];
|
{
|
||||||
let transForm, params;
|
title: '名称',
|
||||||
// load options lazily
|
dataIndex: 'emissionSources',
|
||||||
if (!selectedOptions.length) {
|
|
||||||
transForm = (data) => {
|
|
||||||
data['label'] = data.orgName;
|
|
||||||
data['value'] = data.orgId;
|
|
||||||
data['isLeaf'] = false;
|
|
||||||
data['level'] = 1;
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
getUserPerList(transForm).then((res) => {
|
|
||||||
options.value = [...res];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
const id = targetOption?.value;
|
|
||||||
const level = targetOption?.level;
|
|
||||||
if (targetOption) {
|
|
||||||
targetOption.loading = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (level === 1) {
|
|
||||||
transForm = (data) => {
|
|
||||||
data['label'] = data.deptName;
|
|
||||||
data['value'] = data.deptId;
|
|
||||||
data['isLeaf'] = false;
|
|
||||||
data['level'] = 2;
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
params = { orgId: id };
|
|
||||||
} else if (level === 2) {
|
|
||||||
transForm = (data) => {
|
|
||||||
data['label'] = data.roleName;
|
|
||||||
data['value'] = data.roleId;
|
|
||||||
data['level'] = 3;
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
params = { deptId: id };
|
|
||||||
}
|
|
||||||
if (targetOption) {
|
|
||||||
getUserPerList(transForm, { ...params }).then((res) => {
|
|
||||||
targetOption.loading = false;
|
|
||||||
targetOption.children = [...res];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '因子值',
|
||||||
|
dataIndex: 'emissionFactors',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '排放环节',
|
||||||
|
className: 'emissionProcess',
|
||||||
|
dataIndex: 'emissionProcess',
|
||||||
},
|
},
|
||||||
]);
|
{
|
||||||
};
|
title: '数据来源',
|
||||||
|
className: 'dataSources',
|
||||||
|
dataIndex: 'dataSources',
|
||||||
|
},
|
||||||
|
];
|
File diff suppressed because it is too large
Load Diff
@@ -61,8 +61,8 @@
|
|||||||
return http.post(api, params);
|
return http.post(api, params);
|
||||||
};
|
};
|
||||||
// 判断展示哪个页面
|
// 判断展示哪个页面
|
||||||
const isMainPage = ref(true);
|
const isMainPage = ref(false);
|
||||||
const fillInPage = ref(false);
|
const fillInPage = ref(true);
|
||||||
// 新增相关数据
|
// 新增相关数据
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const formState = ref({})
|
const formState = ref({})
|
||||||
|
Reference in New Issue
Block a user