Przeglądaj źródła

修复生成数据受过滤器影响问题
更新vue3初始化数据

zhontai 2 lat temu
rodzic
commit
8d55446182

+ 30 - 0
src/hosts/ZhonTai.Host/InitData/Admin/ad_api.json

@@ -581,6 +581,16 @@
         "description": "",
         "enabled": true,
         "childs": []
+      },
+      {
+        "id": 361090412425285,
+        "parentId": 161227167719496,
+        "label": "设置数据权限",
+        "path": "/api/admin/role/set-data-scope",
+        "httpMethods": "post",
+        "description": "",
+        "enabled": true,
+        "childs": []
       }
     ]
   },
@@ -740,6 +750,26 @@
         "description": "",
         "enabled": true,
         "childs": []
+      },
+      {
+        "id": 361090412441669,
+        "parentId": 161227167719497,
+        "label": "新增会员",
+        "path": "/api/admin/user/add-member",
+        "httpMethods": "post",
+        "description": "",
+        "enabled": true,
+        "childs": []
+      },
+      {
+        "id": 361090412441670,
+        "parentId": 161227167719497,
+        "label": "修改会员",
+        "path": "/api/admin/user/update-member",
+        "httpMethods": "put",
+        "description": "",
+        "enabled": true,
+        "childs": []
       }
     ]
   },

+ 3 - 2
src/hosts/ZhonTai.Host/InitData/Admin/ad_org.json

@@ -4,7 +4,8 @@
     "name": "中台",
     "code": "",
     "value": "",
-    "description": "",
-    "enabled": true
+    "enabled": true,
+    "sort": 1,
+    "description": ""
   }
 ]

+ 3 - 2
src/hosts/ZhonTai.Host/InitData/Admin/ad_org.tenant.json

@@ -5,7 +5,8 @@
     "name": "中台",
     "code": "",
     "value": "",
-    "description": "",
-    "enabled": true
+    "enabled": true,
+    "sort": 1,
+    "description": ""
   }
 ]

Plik diff jest za duży
+ 202 - 281
src/hosts/ZhonTai.Host/InitData/Admin/ad_permission.json


+ 43 - 99
src/hosts/ZhonTai.Host/InitData/Admin/ad_permission_api.json

@@ -1,24 +1,4 @@
 [
-  {
-    "id": 171046015770694,
-    "permissionId": 161227168628805,
-    "apiId": 161227168182342
-  },
-  {
-    "id": 171045671936071,
-    "permissionId": 161227168628806,
-    "apiId": 161227168182342
-  },
-  {
-    "id": 171045671936072,
-    "permissionId": 161227168628806,
-    "apiId": 161227168194630
-  },
-  {
-    "id": 171045702873158,
-    "permissionId": 161227168632901,
-    "apiId": 161227168194629
-  },
   {
     "id": 342275178242117,
     "permissionId": 161227168641093,
@@ -220,7 +200,7 @@
     "apiId": 161227168153669
   },
   {
-    "id": 171040981246021,
+    "id": 360709844901957,
     "permissionId": 161227168706630,
     "apiId": 161227168153670
   },
@@ -250,55 +230,20 @@
     "apiId": 161227168161862
   },
   {
-    "id": 171040863215686,
+    "id": 360709952303173,
     "permissionId": 161227168727110,
     "apiId": 161227168165959
   },
   {
-    "id": 171040714301511,
+    "id": 360709600628805,
     "permissionId": 161227168731205,
     "apiId": 161227168165958
   },
   {
-    "id": 171040714301512,
+    "id": 360709600628806,
     "permissionId": 161227168731205,
     "apiId": 161227168170053
   },
-  {
-    "id": 171044150452296,
-    "permissionId": 161227168735301,
-    "apiId": 161227168149574
-  },
-  {
-    "id": 171044150452297,
-    "permissionId": 161227168735301,
-    "apiId": 161227168149575
-  },
-  {
-    "id": 171044150452298,
-    "permissionId": 161227168735301,
-    "apiId": 161227168170055
-  },
-  {
-    "id": 171043491364937,
-    "permissionId": 161227168739398,
-    "apiId": 161227168149574
-  },
-  {
-    "id": 171043491364938,
-    "permissionId": 161227168739398,
-    "apiId": 161227168149575
-  },
-  {
-    "id": 171043491364939,
-    "permissionId": 161227168739398,
-    "apiId": 161227168165957
-  },
-  {
-    "id": 171043491364940,
-    "permissionId": 161227168739398,
-    "apiId": 161227168170055
-  },
   {
     "id": 171044112568390,
     "permissionId": 161227168747589,
@@ -355,37 +300,37 @@
     "apiId": 161227168215110
   },
   {
-    "id": 171046614102086,
+    "id": 360710797463621,
     "permissionId": 161227168800838,
     "apiId": 161227168223302
   },
   {
-    "id": 171046647849030,
+    "id": 360710817820741,
     "permissionId": 161227168804933,
     "apiId": 161227168227397
   },
   {
-    "id": 171046740811847,
+    "id": 360710880665669,
     "permissionId": 161227168809029,
     "apiId": 161227168219205
   },
   {
-    "id": 171046740811848,
+    "id": 360710880665670,
     "permissionId": 161227168809029,
     "apiId": 161227168227398
   },
   {
-    "id": 171046827180103,
+    "id": 360710901760069,
     "permissionId": 161227168813125,
     "apiId": 161227168219206
   },
   {
-    "id": 171046827180104,
+    "id": 360710901760070,
     "permissionId": 161227168813125,
     "apiId": 161227168231493
   },
   {
-    "id": 171046899044422,
+    "id": 360711172304965,
     "permissionId": 161227168813126,
     "apiId": 161227168231494
   },
@@ -400,27 +345,27 @@
     "apiId": 161227168235589
   },
   {
-    "id": 171047159746631,
+    "id": 360711132024901,
     "permissionId": 161227168825414,
     "apiId": 161227168235589
   },
   {
-    "id": 171047159746632,
+    "id": 360711132024902,
     "permissionId": 161227168825414,
     "apiId": 161227168235590
   },
   {
-    "id": 171046199644230,
+    "id": 360711084900421,
     "permissionId": 161227168829509,
     "apiId": 161227168235591
   },
   {
-    "id": 171046300762182,
+    "id": 360710689267781,
     "permissionId": 161227168833605,
     "apiId": 161227168239685
   },
   {
-    "id": 171046127857734,
+    "id": 360711246549061,
     "permissionId": 161227168833606,
     "apiId": 161227168239686
   },
@@ -435,7 +380,7 @@
     "apiId": 170317848662085
   },
   {
-    "id": 171044440813638,
+    "id": 360710071803973,
     "permissionId": 163579955331141,
     "apiId": 163579785756741
   },
@@ -450,7 +395,7 @@
     "apiId": 174219034734662
   },
   {
-    "id": 187385577730117,
+    "id": 360709378084933,
     "permissionId": 187385577599045,
     "apiId": 187384805367877
   },
@@ -505,27 +450,27 @@
     "apiId": 174219034734663
   },
   {
-    "id": 188054258307141,
+    "id": 360709189963845,
     "permissionId": 188054258278469,
     "apiId": 188049296683077
   },
   {
-    "id": 188054341591109,
+    "id": 360709215817797,
     "permissionId": 188054341582917,
     "apiId": 174219034734674
   },
   {
-    "id": 188054416900167,
+    "id": 360709237321797,
     "permissionId": 188054416891973,
     "apiId": 174219034734672
   },
   {
-    "id": 188054416900168,
+    "id": 360709237325893,
     "permissionId": 188054416891973,
     "apiId": 174219034738757
   },
   {
-    "id": 188054509035590,
+    "id": 360709258948677,
     "permissionId": 188054509027397,
     "apiId": 174219034738758
   },
@@ -590,97 +535,96 @@
     "apiId": 174219034738764
   },
   {
-    "id": 342277088911429,
+    "id": 360709121323077,
     "permissionId": 340645133123653,
     "apiId": 161227168149574
   },
   {
-    "id": 342277088911430,
+    "id": 360709121327173,
     "permissionId": 340645133123653,
     "apiId": 161227168149575
   },
   {
-    "id": 342277088911431,
+    "id": 360709121327174,
     "permissionId": 340645133123653,
     "apiId": 161227168165957
   },
   {
-    "id": 342277691510854,
-    "permissionId": 340890474405957,
-    "apiId": 174219034734667
+    "id": 360709080879174,
+    "permissionId": 340890474405957
   },
   {
-    "id": 342277691510855,
+    "id": 360709080879175,
     "permissionId": 340890474405957,
     "apiId": 188049296683077
   },
   {
-    "id": 342277691510853,
+    "id": 360709080879173,
     "permissionId": 340890474405957,
     "apiId": 336555241422919
   },
   {
-    "id": 340890633531462,
+    "id": 360709099552837,
     "permissionId": 340890633515077,
     "apiId": 336555241422920
   },
   {
-    "id": 343342945849413,
+    "id": 360710186348613,
     "permissionId": 343342945812549,
     "apiId": 336555241422922
   },
   {
-    "id": 343343121375302,
+    "id": 360710163017797,
     "permissionId": 343343120306245,
     "apiId": 336555241427013
   },
   {
-    "id": 343343209173062,
+    "id": 360710378074181,
     "permissionId": 343343209164869,
     "apiId": 336555241427014
   },
   {
-    "id": 343343795257413,
+    "id": 360710409134149,
     "permissionId": 343343735894085,
     "apiId": 336555241422922
   },
   {
-    "id": 343343795261509,
+    "id": 360710409134150,
     "permissionId": 343343735894085,
     "apiId": 336555241427015
   },
   {
-    "id": 343343926603846,
+    "id": 360710512681029,
     "permissionId": 343343926595653,
     "apiId": 343342310699077
   },
   {
-    "id": 343343989968966,
+    "id": 360710497280069,
     "permissionId": 343343989960773,
     "apiId": 343342310703173
   },
   {
-    "id": 343344066175046,
+    "id": 360710534180933,
     "permissionId": 343344066166853,
     "apiId": 343342310703174
   },
   {
-    "id": 343344158363718,
+    "id": 360710429880389,
     "permissionId": 343344158351429,
     "apiId": 336555241427016
   },
   {
-    "id": 343344474333253,
+    "id": 360710210654277,
     "permissionId": 343344363630661,
     "apiId": 336555241427018
   },
   {
-    "id": 349749511979077,
+    "id": 360709017350213,
     "permissionId": 349749511946309,
     "apiId": 349749396615237
   },
   {
-    "id": 349749778911302,
+    "id": 360708999491653,
     "permissionId": 349749778899013,
     "apiId": 349749396619333
   }

+ 12 - 3
src/hosts/ZhonTai.Host/InitData/Admin/ad_role.json

@@ -4,32 +4,39 @@
     "parentId": 336557474730053,
     "name": "主管理员",
     "code": "main-admin",
+    "type": 2,
     "dataScope": 1,
-    "description": ""
+    "description": "",
+    "sort": 1
   },
   {
     "id": 162605510979653,
     "parentId": 336557578817605,
     "name": "普通员工",
     "code": "emp",
+    "type": 2,
     "dataScope": 1,
-    "description": ""
+    "description": "",
+    "sort": 3
   },
   {
     "id": 336557474730053,
     "name": "系统默认",
+    "type": 1,
     "dataScope": 1,
     "sort": 1
   },
   {
     "id": 336557508276293,
     "name": "职务",
+    "type": 1,
     "dataScope": 1,
     "sort": 2
   },
   {
     "id": 336557578817605,
     "name": "岗位",
+    "type": 1,
     "dataScope": 1,
     "sort": 3
   },
@@ -38,7 +45,9 @@
     "parentId": 336557508276293,
     "name": "IT",
     "code": "it",
+    "type": 2,
     "dataScope": 1,
-    "description": ""
+    "description": "",
+    "sort": 2
   }
 ]

+ 12 - 3
src/hosts/ZhonTai.Host/InitData/Admin/ad_role.tenant.json

@@ -5,8 +5,10 @@
     "parentId": 336557474730053,
     "name": "主管理员",
     "code": "main-admin",
+    "type": 2,
     "dataScope": 1,
-    "description": ""
+    "description": "",
+    "sort": 1
   },
   {
     "id": 162605510979653,
@@ -14,13 +16,16 @@
     "parentId": 336557578817605,
     "name": "普通员工",
     "code": "emp",
+    "type": 2,
     "dataScope": 1,
-    "description": ""
+    "description": "",
+    "sort": 3
   },
   {
     "id": 336557474730053,
     "tenantId": 161223412138053,
     "name": "系统默认",
+    "type": 1,
     "dataScope": 1,
     "sort": 1
   },
@@ -28,6 +33,7 @@
     "id": 336557508276293,
     "tenantId": 161223412138053,
     "name": "职务",
+    "type": 1,
     "dataScope": 1,
     "sort": 2
   },
@@ -35,6 +41,7 @@
     "id": 336557578817605,
     "tenantId": 161223412138053,
     "name": "岗位",
+    "type": 1,
     "dataScope": 1,
     "sort": 3
   },
@@ -44,7 +51,9 @@
     "parentId": 336557508276293,
     "name": "IT",
     "code": "it",
+    "type": 2,
     "dataScope": 1,
-    "description": ""
+    "description": "",
+    "sort": 2
   }
 ]

+ 105 - 74
src/hosts/ZhonTai.Host/InitData/Admin/ad_view.json

@@ -2,25 +2,27 @@
   {
     "id": 161227168313413,
     "label": "平台管理",
+    "sort": 1,
     "enabled": true,
-    "cache": true,
     "childs": [
       {
         "id": 161227168428101,
         "parentId": 161227168313413,
         "name": "Home",
-        "label": "首页",
-        "path": "admin/home",
-        "enabled": true,
+        "label": "工作台",
+        "path": "home/index",
         "cache": true,
+        "sort": 1,
+        "enabled": true,
         "childs": []
       },
       {
         "id": 161227168432197,
         "parentId": 161227168313413,
         "label": "系统配置",
-        "enabled": true,
         "cache": true,
+        "sort": 3,
+        "enabled": true,
         "childs": [
           {
             "id": 187053736300613,
@@ -29,36 +31,31 @@
             "label": "数据字典",
             "path": "admin/dictionary/index",
             "description": "数据字典",
-            "enabled": true,
-            "cache": true
+            "cache": true,
+            "sort": 1,
+            "enabled": true
           }
         ]
       },
       {
-        "id": 161227168432199,
+        "id": 161227168436293,
         "parentId": 161227168313413,
-        "label": "个人管理",
-        "enabled": true,
+        "name": "Personal",
+        "label": "个人中心",
+        "path": "personal/index",
         "cache": true,
-        "childs": [
-          {
-            "id": 161227168436293,
-            "parentId": 161227168432199,
-            "name": "Settins",
-            "label": "个人设置",
-            "path": "account/settings",
-            "enabled": true,
-            "cache": true
-          }
-        ]
+        "sort": 5,
+        "enabled": true,
+        "childs": []
       },
       {
         "id": 161227168436294,
         "parentId": 161227168313413,
         "label": "权限管理",
         "description": "",
-        "enabled": true,
         "cache": true,
+        "sort": 2,
+        "enabled": true,
         "childs": [
           {
             "id": 161227168436295,
@@ -67,8 +64,9 @@
             "label": "用户管理",
             "path": "admin/user/index",
             "description": "",
-            "enabled": true,
-            "cache": true
+            "cache": true,
+            "sort": 1,
+            "enabled": true
           },
           {
             "id": 161227168440389,
@@ -77,72 +75,91 @@
             "label": "角色管理",
             "path": "admin/role/index",
             "description": "",
-            "enabled": true,
-            "cache": true
+            "cache": true,
+            "sort": 2,
+            "enabled": true
           },
           {
             "id": 161227168440390,
             "parentId": 161227168436294,
             "name": "Api",
             "label": "接口管理",
-            "path": "admin/api",
-            "enabled": true,
-            "cache": true
+            "path": "admin/api/index",
+            "cache": true,
+            "sort": 5,
+            "enabled": true
           },
           {
             "id": 161227168444485,
             "parentId": 161227168436294,
             "name": "AdminView",
             "label": "视图管理",
-            "path": "admin/view",
-            "enabled": true,
-            "cache": true
+            "path": "admin/view/index",
+            "cache": true,
+            "sort": 4,
+            "enabled": true
           },
           {
             "id": 161227168444486,
             "parentId": 161227168436294,
             "name": "Permission",
             "label": "权限管理",
-            "path": "admin/permission",
-            "enabled": true,
-            "cache": true
-          },
-          {
-            "id": 161227168448581,
-            "parentId": 161227168436294,
-            "name": "RolePermission",
-            "label": "角色权限",
-            "path": "admin/role-permission",
-            "enabled": true,
-            "cache": true
+            "path": "admin/permission/index",
+            "cache": true,
+            "sort": 6,
+            "enabled": true
           },
           {
             "id": 161227168448582,
             "parentId": 161227168436294,
             "name": "Cache",
             "label": "缓存管理",
-            "path": "admin/cache",
-            "enabled": true,
-            "cache": true
+            "path": "admin/cache/index",
+            "cache": true,
+            "sort": 8,
+            "enabled": true
           },
           {
             "id": 161227168448583,
             "parentId": 161227168436294,
             "name": "Tenant",
             "label": "租户管理",
-            "path": "admin/tenant",
-            "enabled": true,
-            "cache": true
+            "path": "admin/tenant/index",
+            "cache": true,
+            "sort": 7,
+            "enabled": true
+          },
+          {
+            "id": 161227168456774,
+            "parentId": 161227168436294,
+            "name": "Document",
+            "label": "文档管理",
+            "path": "admin/document/index",
+            "cache": true,
+            "sort": 10,
+            "enabled": true
           },
           {
             "id": 174312361087045,
             "parentId": 161227168436294,
             "name": "Org",
             "label": "部门管理",
-            "path": "admin/org",
+            "path": "admin/org/index",
             "description": "",
-            "enabled": true,
-            "cache": true
+            "cache": true,
+            "sort": 3,
+            "enabled": true
+          },
+          {
+            "id": 336556164300869,
+            "parentId": 161227168436294,
+            "name": "Task",
+            "label": "任务管理",
+            "path": "admin/task/index",
+            "description": "",
+            "cache": true,
+            "sort": 9,
+            "enabled": true
           }
         ]
       },
@@ -151,48 +168,62 @@
         "parentId": 161227168313413,
         "label": "日志管理",
         "description": "",
-        "enabled": true,
         "cache": true,
+        "sort": 4,
+        "enabled": true,
         "childs": [
           {
             "id": 161227168452678,
             "parentId": 161227168452677,
             "name": "OprationLog",
             "label": "操作日志",
-            "path": "admin/opration-log",
-            "enabled": true,
-            "cache": true
+            "path": "admin/opration-log/index",
+            "cache": true,
+            "sort": 2,
+            "enabled": true
           },
           {
             "id": 161227168456773,
             "parentId": 161227168452677,
             "name": "LoginLog",
             "label": "登录日志",
-            "path": "admin/login-log",
-            "enabled": true,
-            "cache": true
+            "path": "admin/login-log/index",
+            "cache": true,
+            "sort": 1,
+            "enabled": true
           }
         ]
-      },
+      }
+    ]
+  },
+  {
+    "id": 361047466754117,
+    "name": "",
+    "label": "布局管理",
+    "cache": true,
+    "sort": 1,
+    "enabled": true,
+    "childs": [
       {
-        "id": 161227168456774,
-        "parentId": 161227168313413,
-        "name": "Document",
-        "label": "文档管理",
-        "path": "admin/document",
-        "enabled": true,
+        "id": 361047593013317,
+        "parentId": 361047466754117,
+        "name": "link",
+        "label": "链接",
+        "path": "layout/routerView/link",
         "cache": true,
+        "sort": 1,
+        "enabled": true,
         "childs": []
       },
       {
-        "id": 336556164300869,
-        "parentId": 161227168313413,
-        "name": "Task",
-        "label": "任务管理",
-        "path": "admin/task/index",
-        "description": "",
-        "enabled": true,
+        "id": 361047841796165,
+        "parentId": 361047466754117,
+        "name": "iframe",
+        "label": "内嵌窗口",
+        "path": "layout/routerView/iframes",
         "cache": true,
+        "sort": 2,
+        "enabled": true,
         "childs": []
       }
     ]

+ 6 - 6
src/platform/ZhonTai.Admin/Core/Db/DbHelper.cs

@@ -455,6 +455,12 @@ public class DbHelper
 
             var fsql = freeSqlBuilder.Build();
 
+            //生成数据
+            if (dbConfig.GenerateData && !dbConfig.CreateDb && !dbConfig.SyncData)
+            {
+                GenerateDataAsync(fsql, appConfig, dbConfig).Wait();
+            }
+
             //软删除过滤器
             fsql.GlobalFilter.ApplyOnly<IDelete>(FilterNames.Delete, a => a.IsDeleted == false);
 
@@ -527,12 +533,6 @@ public class DbHelper
 
             #endregion 初始化数据库
 
-            //生成数据
-            if (dbConfig.GenerateData && !dbConfig.CreateDb && !dbConfig.SyncData)
-            {
-                GenerateDataAsync(fsql, appConfig, dbConfig).Wait();
-            }
-
             #region 监听Curd操作
 
             if (dbConfig.Curd)

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików