taskid:067 remark:commit
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
import { ref } from 'vue';
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { origanizemanage } from '/@/api/origanizemanage';
|
||||
import { carbonEmissionFactorLibrary } from '/@/api/carbonEmissionFactorLibrary';
|
||||
export const formConfig = (disabled) => {
|
||||
return ref([
|
||||
{
|
||||
field: 'field111',
|
||||
field: 'fields',
|
||||
component: 'NsChildForm',
|
||||
componentProps: {
|
||||
schemas: [
|
||||
{
|
||||
label: '排放源',
|
||||
field: 'accountNo',
|
||||
field: 'emissionSources',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
placeholder: '请输入排放源',
|
||||
maxLength: 20,
|
||||
disabled,
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
@@ -25,7 +25,25 @@ export const formConfig = (disabled) => {
|
||||
],
|
||||
},
|
||||
{
|
||||
field: 'userStatus',
|
||||
field: 'emissionType',
|
||||
label: '排放分类',
|
||||
component: 'NsCascader',
|
||||
fieldMap: ['emissionType'],
|
||||
componentProps: {
|
||||
placeholder: '请选择排放分类',
|
||||
api: carbonEmissionFactorLibrary.getCarbonFactorTree,
|
||||
fieldNames: { label: 'emissionName', value: 'id' },
|
||||
showSearch: true,
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择排放分类',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
field: 'emissionGas',
|
||||
label: '排放气体',
|
||||
component: 'NsSelect',
|
||||
componentProps: {
|
||||
@@ -33,12 +51,28 @@ export const formConfig = (disabled) => {
|
||||
placeholder: '请选择排放气体',
|
||||
options: [
|
||||
{
|
||||
label: '正常',
|
||||
value: 0,
|
||||
label: 'CO2',
|
||||
value: 'CO2',
|
||||
},
|
||||
{
|
||||
label: '冻结',
|
||||
value: 1,
|
||||
label: 'CO2e',
|
||||
value: 'CO2e',
|
||||
},
|
||||
{
|
||||
label: 'SF6',
|
||||
value:'SF6',
|
||||
},
|
||||
{
|
||||
label: 'CH4',
|
||||
value: 'CH4',
|
||||
},
|
||||
{
|
||||
label: 'PFCs',
|
||||
value: 'PFCs',
|
||||
},
|
||||
{
|
||||
label: 'HFCs',
|
||||
value: 'HFCs',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -50,55 +84,61 @@ export const formConfig = (disabled) => {
|
||||
],
|
||||
},
|
||||
{
|
||||
field: 'userStatus',
|
||||
field: 'emissionProcess',
|
||||
label: '排放环节',
|
||||
component: 'NsSelect',
|
||||
component: 'NsSelectApi',
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
placeholder: '请选择排放环节',
|
||||
options: [
|
||||
{
|
||||
label: '正常',
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: '冻结',
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
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: 'accountNo',
|
||||
component: 'NsInput',
|
||||
field: 'emissionFactors',
|
||||
component: 'NsInputNumber',
|
||||
componentProps: {
|
||||
placeholder: '请输入排放因子值',
|
||||
maxLength: 20,
|
||||
disabled,
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入排放因子值',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
field: 'userStatus',
|
||||
field: 'carbonEmissionPrefix',
|
||||
label: '碳排前缀',
|
||||
component: 'NsSelect',
|
||||
componentProps: {
|
||||
disabled: true,
|
||||
allowClear: true,
|
||||
defaultValue: 't',
|
||||
placeholder: '请选择碳排前缀',
|
||||
options: [
|
||||
{
|
||||
label: '正常',
|
||||
value: 0,
|
||||
label: 'g',
|
||||
value: 'g',
|
||||
},
|
||||
{
|
||||
label: '冻结',
|
||||
value: 1,
|
||||
label: 'kg',
|
||||
value: 'kg',
|
||||
},
|
||||
{
|
||||
label: 't',
|
||||
value: 't',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -111,12 +151,11 @@ export const formConfig = (disabled) => {
|
||||
},
|
||||
{
|
||||
label: '碳排后缀',
|
||||
field: 'accountNo',
|
||||
field: 'carbonEmissionSuffix',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
placeholder: '请输入碳排后缀',
|
||||
maxLength: 20,
|
||||
disabled,
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
@@ -127,21 +166,21 @@ export const formConfig = (disabled) => {
|
||||
},
|
||||
{
|
||||
label: '已引用数',
|
||||
field: 'accountNo',
|
||||
field: 'numberOfReferences',
|
||||
component: 'NsInput',
|
||||
componentProps: {
|
||||
defaultValue: 10,
|
||||
disabled: true,
|
||||
maxLength: 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '参考文献',
|
||||
field: 'accountNo',
|
||||
field: 'reference',
|
||||
component: 'NsTextarea',
|
||||
componentProps: {
|
||||
placeholder: '请输入参考文献',
|
||||
maxLength: 20,
|
||||
disabled,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
Reference in New Issue
Block a user