【更新】解决代码生成前端多生成tool工具类导入跟配置时不显示上级目录问题

pull/60/head
小诺 2022-11-19 23:25:35 +08:00 committed by 俞宝山
parent 892ae19176
commit f38c2bc0b8
2 changed files with 37 additions and 31 deletions

View File

@ -192,31 +192,31 @@
tableColumns: []
}
})
if (record) {
const params = {
id: record.id
}
submitLoading.value = true
genBasicApi.basicDetail(params).then((data) => {
formData.value = data
//
selectTableColumnsData(data.dbTable, true)
//
moduleChange(data.module, true)
}).finally(() => {
submitLoading.value = false
})
} else {
formData.value = {
sortCode: 99,
tablePrefix: 'Y',
generateType: 'ZIP',
packageName: 'vip.xiaonuo',
formLayout: 'vertical',
gridWhether: 'N'
}
}
})
if (record) {
const params = {
id: record.id
}
submitLoading.value = true
genBasicApi.basicDetail(params).then((data) => {
formData.value = data
//
selectTableColumnsData(data.dbTable, true)
//
moduleChange(data.module, true)
}).finally(() => {
submitLoading.value = false
})
} else {
formData.value = {
sortCode: 99,
tablePrefix: 'Y',
generateType: 'ZIP',
packageName: 'vip.xiaonuo',
formLayout: 'vertical',
gridWhether: 'N'
}
}
}
//
const formRules = {

View File

@ -132,15 +132,21 @@
<script setup name="${busName}">
import { message } from 'ant-design-vue'
<% if (searchCount > 0) { %>
<% for(var i = 0; i < configList.~size; i++) { %>
<% if(!configList[i].needTableId && configList[i].needPage) { %>
<% if (configList[i].effectType == 'select' || configList[i].effectType == 'radio' || configList[i].effectType == 'checkbox') { %>
<%
var iptTool = 0;
if (searchCount > 0) {
for(var i = 0; i < configList.~size; i++) {
if(!configList[i].needTableId) {
if(configList[i].effectType == 'select' || configList[i].effectType == 'radio' || configList[i].effectType == 'checkbox') {
iptTool++;
}
}
}
}
%>
<% if(iptTool > 0) { %>
import tool from '@/utils/tool'
<% } %>
<% } %>
<% } %>
<% } %>
import Form from './form.vue'
import ${classNameFirstLower}Api from '@/api/${moduleName}/${classNameFirstLower}Api'
<% if (searchCount > 0) { %>