diff --git a/modules/core/src/main/resources/templates/modules/gen/config.xml b/modules/core/src/main/resources/templates/modules/gen/config.xml index 04d37b26..7cdf648f 100644 --- a/modules/core/src/main/resources/templates/modules/gen/config.xml +++ b/modules/core/src/main/resources/templates/modules/gen/config.xml @@ -197,6 +197,7 @@ + diff --git a/modules/core/src/main/resources/templates/modules/gen/crud/vueForm.xml b/modules/core/src/main/resources/templates/modules/gen/crud/vueForm.xml index cc751e7d..f44c3441 100644 --- a/modules/core/src/main/resources/templates/modules/gen/crud/vueForm.xml +++ b/modules/core/src/main/resources/templates/modules/gen/crud/vueForm.xml @@ -78,6 +78,7 @@ <% var userselectExists = false; var officeselectExists = false; +var companyselectExists = false; var areaselectExists = false; for(c in table.columnList){ if(c.isQuery == "1" && !c.isTreeEntityColumn){ @@ -85,6 +86,8 @@ for(c in table.columnList){ userselectExists = true; }else if(c.showType == 'officeselect'){ officeselectExists = true; + }else if(c.showType == 'companyselect'){ + companyselectExists = true; }else if(c.showType == 'areaselect'){ areaselectExists = true; } @@ -94,6 +97,9 @@ for(c in table.columnList){ <% if(userselectExists || officeselectExists) { %> import { officeTreeData } from '/@/api/sys/office'; <% } %> +<% if(companyselectExists) { %> + import { companyTreeData } from '/@/api/sys/company'; +<% } %> <% if(areaselectExists) { %> import { areaTreeData } from '/@/api/sys/area'; <% } %> @@ -206,6 +212,16 @@ for (c in table.columnList){ canSelectParent: false, allowClear: true, }, + <% }else if(c.showType == 'companyselect'){ + if (isNotBlank(c.attrName2)){ %> + fieldLabel: '${c.attrName2}', + <% } %> + component: 'TreeSelect', + componentProps: { + api: companyTreeData, + canSelectParent: false, + allowClear: true, + }, <% }else if(c.showType == 'areaselect'){ if (isNotBlank(c.attrName2)){ %> fieldLabel: '${c.attrName2}', @@ -532,6 +548,16 @@ for (c in table.columnList){ canSelectParent: false, allowClear: true, }, + <% }else if(c.showType == 'companyselect'){ + if (isNotBlank(c.attrName2)){ %> + dataLabel: '${c.attrName2}', + <% } %> + editComponent: 'TreeSelect', + editComponentProps: { + api: companyTreeData, + canSelectParent: false, + allowClear: true, + }, <% }else if(c.showType == 'areaselect'){ if (isNotBlank(c.attrName2)){ %> dataLabel: '${c.attrName2}', diff --git a/modules/core/src/main/resources/templates/modules/gen/crud/vueList.xml b/modules/core/src/main/resources/templates/modules/gen/crud/vueList.xml index a1720547..3350a24e 100644 --- a/modules/core/src/main/resources/templates/modules/gen/crud/vueList.xml +++ b/modules/core/src/main/resources/templates/modules/gen/crud/vueList.xml @@ -115,6 +115,7 @@ if(table.isTreeEntity){ <% var userselectExists = false; var officeselectExists = false; +var companyselectExists = false; var areaselectExists = false; for(c in table.columnList){ if(c.isQuery == "1" && !c.isTreeEntityColumn){ @@ -122,6 +123,8 @@ for(c in table.columnList){ userselectExists = true; }else if(c.showType == 'officeselect'){ officeselectExists = true; + }else if(c.showType == 'companyselect'){ + companyselectExists = true; }else if(c.showType == 'areaselect'){ areaselectExists = true; } @@ -131,6 +134,9 @@ for(c in table.columnList){ <% if(userselectExists || officeselectExists) { %> import { officeTreeData } from '/@/api/sys/office'; <% } %> +<% if(companyselectExists) { %> + import { companyTreeData } from '/@/api/sys/company'; +<% } %> <% if(areaselectExists) { %> import { areaTreeData } from '/@/api/sys/area'; <% } %> @@ -239,6 +245,12 @@ for(c in table.columnList){ api: officeTreeData, allowClear: true, }, + <% }else if(c.showType == 'companyselect'){ %> + component: 'TreeSelect', + componentProps: { + api: companyTreeData, + allowClear: true, + }, <% }else if(c.showType == 'areaselect'){ %> component: 'TreeSelect', componentProps: { @@ -287,7 +299,7 @@ for(c in table.columnList){ %> { title: t('${c.columnLabel}'), - <% if(c.showType == "userselect" || c.showType == "officeselect" || c.showType == "areaselect"){ %> + <% if(c.showType == "userselect" || c.showType == "officeselect" || c.showType == "companyselect" || c.showType == "areaselect"){ %> dataIndex: '${c.attrName2}', <% }else{ %> dataIndex: '${c.attrName}', diff --git a/modules/core/src/main/resources/templates/modules/gen/crud/vueSelect.xml b/modules/core/src/main/resources/templates/modules/gen/crud/vueSelect.xml index a74f36c7..d71c5d5a 100644 --- a/modules/core/src/main/resources/templates/modules/gen/crud/vueSelect.xml +++ b/modules/core/src/main/resources/templates/modules/gen/crud/vueSelect.xml @@ -12,6 +12,7 @@ import { ${className}ListData } from '/@/api/${moduleName}${isNotEmpty(subModule <% var userselectExists = false; var officeselectExists = false; +var companyselectExists = false; var areaselectExists = false; for(c in table.columnList){ if(c.isQuery == "1" && !c.isTreeEntityColumn){ @@ -19,6 +20,8 @@ for(c in table.columnList){ userselectExists = true; }else if(c.showType == 'officeselect'){ officeselectExists = true; + }else if(c.showType == 'companyselect'){ + companyselectExists = true; }else if(c.showType == 'areaselect'){ areaselectExists = true; } @@ -28,6 +31,9 @@ for(c in table.columnList){ <% if(userselectExists || officeselectExists) { %> import { officeTreeData } from '/@/api/sys/office'; <% } %> +<% if(companyselectExists) { %> +import { companyTreeData } from '/@/api/sys/company'; +<% } %> <% if(areaselectExists) { %> import { areaTreeData } from '/@/api/sys/area'; <% } %> @@ -103,6 +109,12 @@ const searchForm: FormProps = { api: officeTreeData, allowClear: true, }, + <% }else if(c.showType == 'companyselect'){ %> + component: 'TreeSelect', + componentProps: { + api: companyTreeData, + allowClear: true, + }, <% }else if(c.showType == 'areaselect'){ %> component: 'TreeSelect', componentProps: { @@ -151,7 +163,7 @@ for(c in table.columnList){ %> { title: t('${c.columnLabel}'), - <% if(c.showType == "userselect" || c.showType == "officeselect" || c.showType == "areaselect"){ %> + <% if(c.showType == "userselect" || c.showType == "officeselect" || c.showType == "companyselect" || c.showType == "areaselect"){ %> dataIndex: '${c.attrName2}', <% }else{ %> dataIndex: '${c.attrName}', diff --git a/modules/core/src/main/resources/templates/modules/gen/include/dataGridScript.html b/modules/core/src/main/resources/templates/modules/gen/include/dataGridScript.html index 251446fe..ac566ad4 100644 --- a/modules/core/src/main/resources/templates/modules/gen/include/dataGridScript.html +++ b/modules/core/src/main/resources/templates/modules/gen/include/dataGridScript.html @@ -1,7 +1,7 @@