From cf964e55f13b831b56570044f3c83ede4ce6a11d Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Tue, 25 Apr 2023 18:15:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E6=88=90?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/pages/system/codeGeneration/index.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/template/admin/src/pages/system/codeGeneration/index.vue b/template/admin/src/pages/system/codeGeneration/index.vue index 1aeee11d7..bf0aaa70a 100644 --- a/template/admin/src/pages/system/codeGeneration/index.vue +++ b/template/admin/src/pages/system/codeGeneration/index.vue @@ -193,7 +193,14 @@ export default { }, }) }else{ - this.saveCodeCrud(data); + this.$Modal.confirm({ + title: '生成提醒', + content: '生成后本地开发调试会直接加载生成的vue页面;如果是上线后进行生成,可以进行浏览,代码生成列表中的修改文件将不生效。需要重新打包上线!', + loading: true, + onOk:() => { + this.saveCodeCrud(data,true); + }, + }) } } else { if (this.currentTab < 3) this.currentTab++; From 584f3c2fca1864e086cb6cee730ec206010994ff Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Tue, 25 Apr 2023 18:24:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adminapi/controller/v1/setting/SystemCrud.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php b/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php index e458c5897..83f04e891 100644 --- a/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php +++ b/crmeb/app/adminapi/controller/v1/setting/SystemCrud.php @@ -247,11 +247,22 @@ class SystemCrud extends AuthController $item['name'] = $item['path']; try { $item['content'] = file_get_contents($path, LOCK_EX); - $data[] = $item; + $data[$key] = $item; } catch (\Throwable $e) { } } + + //调整排序 + $makeData = []; + $names = ['model', 'dao', 'service', 'controller', 'validate', 'router', 'api', 'pages']; + foreach ($names as $name) { + if (isset($data[$name])) { + $makeData[] = $data[$name]; + } + } + $data = $makeData; + $info = $info->toArray(); //记录没有修改之前的数据 foreach ((array)$info['field']['tableField'] as $key => $item) {