diff --git a/server/config.yaml b/server/config.yaml index 94576752d9f2ef3db1baa462650bb0a0483fd54b..658bce95d72532f36253dc52e1073bf159ebde02 100644 --- a/server/config.yaml +++ b/server/config.yaml @@ -75,9 +75,9 @@ autoCode: web: '/web/src' web-api: '/api' - web-form: '/view/file1' - web-table: '/view/file1' - web-flow: '/view/file1' + web-form: '/view' + web-table: '/view' + web-flow: '/view' # local configuration local: diff --git a/server/service/sys_auto_code.go b/server/service/sys_auto_code.go index f34e80641be311c3db68cb36d38e505d027b174f..caf5b434fbff8096bb1ba923fa4a1a6fcd8f3f87 100644 --- a/server/service/sys_auto_code.go +++ b/server/service/sys_auto_code.go @@ -239,13 +239,13 @@ func addAutoMoveFile(data *tplData) { global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WApi, base) } else if strings.Contains(fileSlice[n-2], "workflowForm") { data.autoMoveFilePath = filepath.Join(global.GVA_CONFIG.AutoCode.Root, - global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WFlow, strings.TrimSuffix(base, filepath.Ext(base))+"WorkflowForm.vue") + global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WFlow, filepath.Base(filepath.Dir(filepath.Dir(data.autoCodePath))), strings.TrimSuffix(base, filepath.Ext(base))+"WorkflowForm.vue") } else if strings.Contains(fileSlice[n-2], "form") { data.autoMoveFilePath = filepath.Join(global.GVA_CONFIG.AutoCode.Root, - global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WForm, strings.TrimSuffix(base, filepath.Ext(base))+"Form.vue") + global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WForm, filepath.Base(filepath.Dir(filepath.Dir(data.autoCodePath))), strings.TrimSuffix(base, filepath.Ext(base))+"Form.vue") } else if strings.Contains(fileSlice[n-2], "table") { data.autoMoveFilePath = filepath.Join(global.GVA_CONFIG.AutoCode.Root, - global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WTable, base) + global.GVA_CONFIG.AutoCode.Web, global.GVA_CONFIG.AutoCode.WTable, filepath.Base(filepath.Dir(filepath.Dir(data.autoCodePath))), base) } } }