This commit is contained in:
owenchen committed 2026-08-27 15:58:44 +08:00
1 parent 4b92ee5fab
commit a2a03f5475
35 files changed
+373 -201

No files matched your search

@@ -149,6 +149,37 @@ builder.Entity<SecurityPermissionViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SecurityUserActorViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SecurityUserViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SysTablePkeyViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SysTableSchemaViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SecurityActorGroupViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SecurityFunctionMapViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SecurityGroupPermissionDependentViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SecurityGroupPermissionViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SecurityInitializerTickViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SecurityPermissionFunctionMapViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SecurityPermissionViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<SecurityUserActorViewEntity>(eb => { eb.HasNoKey(); });
@@ -56,7 +56,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_VALUE = "value";
public const string DB_ORDER_BY = "order_by";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static LocaleEntity GetInstance(string providerName)
{
@@ -164,7 +164,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_LOCALE} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_LOCALE} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -49,7 +49,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_ACTOR_LOCAL_NAME = "actor_local_name";
public const string DB_ACTOR_ENG_NAME = "actor_eng_name";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityActorEntity GetInstance(string providerName)
{
@@ -155,7 +155,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ACTOR_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_ACTOR} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_ACTOR} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -44,7 +44,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_ACTOR_NAME = "actor_name";
public const string DB_GROUP_NAME = "group_name";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityActorGroupEntity GetInstance(string providerName)
{
@@ -149,7 +149,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ACTOR_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_ACTOR_GROUP} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_ACTOR_GROUP} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -36,7 +36,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_GROUP_NAME = "group_name";
public const string DB_GROUP_LOCAL_NAME = "group_local_name";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityActorGroupViewEntity GetInstance(string providerName)
{
@@ -135,7 +135,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ACTOR_NAME ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_ACTOR_GROUP_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_ACTOR_GROUP_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -69,7 +69,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_ICON = "icon";
public const string DB_PAGE_NAME = "page_name";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityFunctionEntity GetInstance(string providerName)
{
@@ -180,7 +180,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FUNCTION_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_FUNCTION} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_FUNCTION} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -48,7 +48,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_FUNCTION_NAME_SON = "function_name_son";
public const string DB_ORDERBY = "orderby";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityFunctionMapEntity GetInstance(string providerName)
{
@@ -154,7 +154,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FUNCTION_NAME_PARENT ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_FUNCTION_MAP} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_FUNCTION_MAP} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -44,7 +44,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_SON_FUNCTION_LOCAL_NAME = "son_function_local_name";
public const string DB_SON_PAGE_NAME = "son_page_name";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityFunctionMapViewEntity GetInstance(string providerName)
{
@@ -145,7 +145,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ORDERBY ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_FUNCTION_MAP_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_FUNCTION_MAP_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -70,7 +70,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_LAST_GENERATOR_DATE = "last_generator_date";
public const string DB_NEXT_ID = "next_id";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityGeneratorNumberEntity GetInstance(string providerName)
{
@@ -181,7 +181,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GENERATOR_ID ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GENERATOR_NUMBER} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GENERATOR_NUMBER} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -49,7 +49,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_GROUP_LOCAL_NAME = "group_local_name";
public const string DB_GROUP_ENG_NAME = "group_eng_name";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityGroupEntity GetInstance(string providerName)
{
@@ -155,7 +155,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GROUP} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GROUP} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -64,7 +64,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_AMEND_INDC = "amend_indc";
public const string DB_DELETE_INDC = "delete_indc";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityGroupPermissionDependentEntity GetInstance(string providerName)
{
@@ -174,7 +174,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GROUP_PERMISSION_DEPENDENT} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GROUP_PERMISSION_DEPENDENT} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -60,7 +60,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_DEPENDENT_DETAIL_DESCRIPTION = "dependent_detail_description";
public const string DB_DEPENDENT = "dependent";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityGroupPermissionDependentViewEntity GetInstance(string providerName)
{
@@ -165,7 +165,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GROUP_PERMISSION_DEPENDENT_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GROUP_PERMISSION_DEPENDENT_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -64,7 +64,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_DELETE_INDC = "delete_indc";
public const string DB_DEPENDENT = "dependent";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityGroupPermissionEntity GetInstance(string providerName)
{
@@ -174,7 +174,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GROUP_PERMISSION} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GROUP_PERMISSION} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -52,7 +52,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_DEPENDENT = "dependent";
public const string DB_PERMISSION_DESCRIPTION = "permission_description";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityGroupPermissionViewEntity GetInstance(string providerName)
{
@@ -155,7 +155,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GROUP_PERMISSION_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_GROUP_PERMISSION_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -68,7 +68,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_SECURITY_USER_UPD = "security_user_upd";
public const string DB_SECURITY_USER_ACTOR_UPD = "security_user_actor_upd";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityInitializerTickViewEntity GetInstance(string providerName)
{
@@ -175,7 +175,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_SECURITY_ACTOR_UPD ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_INITIALIZER_TICK_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_INITIALIZER_TICK_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -48,7 +48,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_PKEY_ID = "pkey_id";
public const string DB_LOCKED_BY_ACTOR = "locked_by_actor";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityLockEntity GetInstance(string providerName)
{
@@ -154,7 +154,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ENTITY_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_LOCK} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_LOCK} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -72,7 +72,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_VALID_INDC = "valid_indc";
public const string DB_REMARK = "remark";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityMasterEntity GetInstance(string providerName)
{
@@ -184,7 +184,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_MASTER_CATEGORY ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_MASTER} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_MASTER} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -52,7 +52,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_DEPENDENT_DETAIL_NAME = "dependent_detail_name";
public const string DB_DEPENDENT_DETAIL_DESCRIPTION = "dependent_detail_description";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityPermissionDependentEntity GetInstance(string providerName)
{
@@ -159,7 +159,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_PERMISSION_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_PERMISSION_DEPENDENT} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_PERMISSION_DEPENDENT} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -53,7 +53,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_DESCRIPTION = "description";
public const string DB_DELEGATE_INDC = "delegate_indc";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityPermissionEntity GetInstance(string providerName)
{
@@ -160,7 +160,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_PERMISSION_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_PERMISSION} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_PERMISSION} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -44,7 +44,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_PERMISSION_NAME = "permission_name";
public const string DB_FUNCTION_NAME = "function_name";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityPermissionFunctionMapEntity GetInstance(string providerName)
{
@@ -149,7 +149,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_PERMISSION_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_PERMISSION_FUNCTION_MAP} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_PERMISSION_FUNCTION_MAP} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -32,7 +32,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_FUNCTION_NAME = "function_name";
public const string DB_PAGE_NAME = "page_name";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityPermissionFunctionMapViewEntity GetInstance(string providerName)
{
@@ -130,7 +130,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_PERMISSION_NAME ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_PERMISSION_FUNCTION_MAP_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_PERMISSION_FUNCTION_MAP_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -40,7 +40,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_CREATED_DATETIME = "created_datetime";
public const string DB_DEPENDENT = "dependent";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityPermissionViewEntity GetInstance(string providerName)
{
@@ -141,7 +141,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_PERMISSION_NAME ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_PERMISSION_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_PERMISSION_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -54,7 +54,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_FIELD_NAME = "field_name";
public const string DB_DESCRIPTION = "description";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityTableDescriptionEntity GetInstance(string providerName)
{
@@ -161,7 +161,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_DESCRIPTION_ID ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_TABLE_DESCRIPTION} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_TABLE_DESCRIPTION} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -44,7 +44,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_USER_NAME = "user_name";
public const string DB_ACTOR_NAME = "actor_name";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityUserActorEntity GetInstance(string providerName)
{
@@ -149,7 +149,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USER_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_ACTOR} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_ACTOR} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -40,7 +40,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_ACTOR_NAME = "actor_name";
public const string DB_ACTOR_LOCAL_NAME = "actor_local_name";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityUserActorViewEntity GetInstance(string providerName)
{
@@ -140,7 +140,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USER_NAME ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_ACTOR_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_ACTOR_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -56,7 +56,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_START_DATETIME = "start_datetime";
public const string DB_END_DATETIME = "end_datetime";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityUserDelegatedPermissionEntity GetInstance(string providerName)
{
@@ -164,7 +164,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USER_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_DELEGATED_PERMISSION} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_DELEGATED_PERMISSION} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -173,7 +173,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_BIOMETRIC_ENROLLED_AT = "biometric_enrolled_at";
public const string DB_BIOMETRIC_LAST_USED_AT = "biometric_last_used_at";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityUserEntity GetInstance(string providerName)
{
@@ -310,7 +310,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USER_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -54,7 +54,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_AGENT_USER_NAME = "agent_user_name";
public const string DB_IP_ADDRESS = "ip_address";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityUserLoginLogEntity GetInstance(string providerName)
{
@@ -161,7 +161,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_LOGIN_LOG_ID ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_LOGIN_LOG} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_LOGIN_LOG} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -48,7 +48,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_PREFERENCE_KEY = "preference_key";
public const string DB_PREFERENCE = "preference";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityUserPreferenceEntity GetInstance(string providerName)
{
@@ -154,7 +154,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USERNAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_PREFERENCE} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_PREFERENCE} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -44,7 +44,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_ACTOR_NAME = "actor_name";
public const string DB_ACTOR_LOCAL_NAME = "actor_local_name";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityUserViewEntity GetInstance(string providerName)
{
@@ -145,7 +145,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USER_NAME ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -52,7 +52,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_REFRESH_TOKEN = "refresh_token";
public const string DB_REFRESH_TOKEN_REFRESHED_TIME = "refresh_token_refreshed_time";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityUserWebLoginEntity GetInstance(string providerName)
{
@@ -155,7 +155,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_SESSION_ID ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_WEB_LOGIN} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_WEB_LOGIN} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -56,7 +56,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_PREFERENCE = "preference";
public const string DB_DEFAULT_INDC = "default_indc";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityUserWebPagePreferenceEntity GetInstance(string providerName)
{
@@ -164,7 +164,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USERNAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_WEB_PAGE_PREFERENCE} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_USER_WEB_PAGE_PREFERENCE} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -44,7 +44,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_PK_NAME = "pk_name";
public const string DB_PK = "pk";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SysTablePkeyViewEntity GetInstance(string providerName)
{
@@ -145,7 +145,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_TABLE_QUALIFIER ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SYS_TABLE_PKEY_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SYS_TABLE_PKEY_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
@@ -80,7 +80,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_IS_IDENTITY = "is_identity";
public const string DB_COLID = "colid";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SysTableSchemaViewEntity GetInstance(string providerName)
{
@@ -190,7 +190,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_TABLE_NAME ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SYS_TABLE_SCHEMA_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SYS_TABLE_SCHEMA_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
+276 -135
View File
@@ -1,64 +1,130 @@
<template>
<div ref="searchRef" style="margin-left: 4px;padding-top: 4px; margin-right: 12px">
<searchCriteria @submit="onSubmit" @reset="onReset" @handle-change-bind-value="handleChangeBindValue">
<div
ref="searchRef"
style="margin-left: 4px; padding-top: 4px; margin-right: 12px"
>
<searchCriteria
@submit="onSubmit"
@reset="onReset"
@handle-change-bind-value="handleChangeBindValue"
>
<template #control>
<slot name="control"></slot>
</template>
</searchCriteria>
<hr />
</div>
<div v-if="!isModal && !isSM" class="setting">
<div ref="settingRef" v-if="!isModal && !isSM" class="setting">
<a-row :wrap="false">
<a-col :lg="4"></a-col>
<a-col style="display: flex; justify-content: flex-end" :lg="20" :sm="24">
<a-input flex="none" readonly value="视图" class="site-input-split" style="
<a-input
flex="none"
readonly
value="视图"
class="site-input-split"
style="
width: 80px;
border-radius: 0;
border-top-left-radius: 5pt 5pt;
border-bottom-left-radius: 5pt 5pt;
background-color: rgb(250, 250, 250);
pointer-events: none;
" />
<a-select style="min-width: 200px" v-model:value="viewOption.Value" @select="onSelectColumn">
<a-select-option v-for="o in viewOption.SelectOptions" :key="o.DisplayName" :value="o.BindValue">{{
o.DisplayName }}</a-select-option>
"
/>
<a-select
style="min-width: 200px"
v-model:value="viewOption.Value"
@select="onSelectColumn"
>
<a-select-option
v-for="o in viewOption.SelectOptions"
:key="o.DisplayName"
:value="o.BindValue"
>{{ o.DisplayName }}</a-select-option
>
</a-select>
<a-button type="dashed" :icon="h(SettingTwoTone)" @click.prevent="onViewResult"></a-button>
<a-button type="dashed" :icon="h(PrinterTwoTone)" @click.prevent="onPrint"></a-button>
<a-button
type="dashed"
:icon="h(SettingTwoTone)"
@click.prevent="onViewResult"
></a-button>
<a-button
type="dashed"
:icon="h(PrinterTwoTone)"
@click.prevent="onPrint"
></a-button>
</a-col>
</a-row>
<columnModal :show-modal="showColumnModal" @on-change-columns="onChangeColumns" @handle-close="onHandleClose"
@on-change-view-option="onChangeViewOption" />
<columnModal
:show-modal="showColumnModal"
@on-change-columns="onChangeColumns"
@handle-close="onHandleClose"
@on-change-view-option="onChangeViewOption"
/>
</div>
<a-table style="margin-left: 2px;margin-right: 6px" :row-key="(index: any) => { return index }" :columns="columns" :data-source="datas"
:row-selection="rowSelection" :pagination="pagination" @change="handleTableChange"
:scroll="{ x: scrollx, y: resultH }" :custom-row="customRow" size="small" bordered>
<a-table
style="margin-left: 2px; margin-right: 6px"
:row-key="
(index: any) => {
return index;
}
"
:columns="columns"
:data-source="datas"
:row-selection="rowSelection"
:pagination="pagination"
@change="handleTableChange"
:scroll="{ x: scrollx, y: resultH }"
:custom-row="customRow"
size="small"
bordered
>
headerCell
<template #headerCell="datas">
<slot name="headerCell" v-bind="datas"> </slot>
</template>
<template #bodyCell="datas">
<template v-if="datas.column.dataIndex === 'index'">
<span>{{ ((pagination.current as number - 1) * pagination.pageSize) + datas.index + 1 }}</span>
<span>{{
((pagination.current as number) - 1) * pagination.pageSize +
datas.index +
1
}}</span>
</template>
<slot name="bodyCell" v-bind="datas"> </slot>
</template>
</a-table>
<slot name="footer" style="padding-left: 4px;"></slot>
<slot name="footer" style="padding-left: 4px"></slot>
</template>
<script setup lang="ts">
import { reactive, useSlots, watch, inject, computed, onMounted, defineComponent, h, ref, unref, provide } from "vue";
import { usePagination, type PaginationQueryResult } from 'vue-request'
import type { TablePaginationConfig, TableProps } from 'ant-design-vue'
import {
reactive,
useSlots,
watch,
inject,
computed,
onMounted,
defineComponent,
h,
ref,
unref,
provide,
onUnmounted,
nextTick,
} from "vue";
import { usePagination, type PaginationQueryResult } from "vue-request";
import type { TablePaginationConfig, TableProps } from "ant-design-vue";
import type { ATable } from "ant-design-vue";
import searchCriteria from "@/components/basic/SearchCriteria.vue";
import { SearchFilter } from "@/data/auto/searchFilter"
import { SearchFilter } from "@/data/auto/searchFilter";
import { SearchCriteriaResultData } from "@/data/auto/searchCriteriaResultData";
import { BindOption } from "@/data/custom/bindOption";
import { SelectOption } from "@/data/auto/selectOption";
import { SettingTwoTone, PrinterTwoTone } from '@ant-design/icons-vue';
import { SettingTwoTone, PrinterTwoTone } from "@ant-design/icons-vue";
import columnModal from "./ColumnModal.vue";
import { useWindowSize } from '@vueuse/core'
import { bsInfo } from "@/utils/browser"
import { useWindowSize } from "@vueuse/core";
import { bsInfo } from "@/utils/browser";
import { on } from "events";
import { enquiryMethodKey } from "@/injections";
@@ -86,215 +152,292 @@ const props = defineProps({
},
rowSelectionType: {
type: String,
default: 'radio',
default: "radio",
},
});
const isModal = ref(props['isModal']);
const paginationJ = ref(props['pagination']);
const rowSelectionType = ref(props['rowSelectionType']);
const tableY = ref(props['scrolly']);
const isModal = ref(props["isModal"]);
const paginationJ = ref(props["pagination"]);
const rowSelectionType = ref(props["rowSelectionType"]);
const tableY = ref(props["scrolly"]);
const enquiry = inject(enquiryMethodKey);
const datas = enquiry?.getDatas()!;
const viewOption = ref(
enquiry ? enquiry.getViewOption() : {
Value: "default",
SelectOptions: [{ BindValue: "default", DisplayName: "默认" }],
Columns: [{ BindValue: "default", BindColumn: [] }],
}
enquiry
? enquiry.getViewOption()
: {
Value: "default",
SelectOptions: [{ BindValue: "default", DisplayName: "默认" }],
Columns: [{ BindValue: "default", BindColumn: [] }],
},
);
//================inject================
const isSM = ref<boolean>(false);
const { width, height } = useWindowSize()
const { width, height } = useWindowSize();
if (bsInfo.size.sm) {
isSM.value = true;
}
else {
} else {
isSM.value = false;
}
const resultH = ref('');
const resultH = ref("");
const showColumnModal = ref<boolean>(false);
const selected = ref<any[]>([])
const selected = ref<any[]>([]);
const emit = defineEmits([
"onReset",
"onSubmit",
"handleChangeBindValue",
"usePagination",
"onRowDblclick",
"onclick",
"onSelectChange",
"onViewResult",
"onPrint",
"updateColumns",
]);
const emit = defineEmits(['onReset', 'onSubmit', 'handleChangeBindValue', 'usePagination', 'onRowDblclick', 'onclick', 'onSelectChange', 'onViewResult', 'onPrint', 'updateColumns']);
const onViewResult = (() => {
const onViewResult = () => {
showColumnModal.value = true;
emit('onViewResult');
});
emit("onViewResult");
};
const onHandleClose = (() => {
const onHandleClose = () => {
showColumnModal.value = false;
};
const onPrint = () => {
emit("onPrint", viewOption.value);
};
const searchRef = ref<HTMLElement | null>();
const settingRef = ref<HTMLElement | null>();
const tableRef = ref<InstanceType<typeof ATable> | null>(null); // 表格组件ref
// 增加监听窗口宽高变化,窗口缩放自动重算
watch([width, height, isModal, tableY], () => {
void computResultTableHeight();
});
const onPrint = (() => {
emit('onPrint', viewOption.value);
});
const searchRef = ref<HTMLElement | null>()
onMounted(() => {
computResultTableHeight()
})
watch(isModal, () => {
computResultTableHeight();
});
// 仅弹窗模式保留固定偏移(弹窗无法通过DOM测量)
const HEIGHT_OFFSETS = {
modal: 560,
normalDesktop: 330,
normalMobileFallback: 420,
minTableHeight: 120, // 表格最小高度,防止calc结果负数
};
let resizeObserver: ResizeObserver | null = null;
/** 获取真实表头高度,包含headerCell渲染后的高度 */
const getTableHeaderHeight = (): number => {
const defaultHeight = 44;
if (!tableRef.value?.$el) return defaultHeight;
const root = tableRef.value.$el as HTMLElement;
const headerDom = root.querySelector(
".ant-table-header",
) as HTMLElement | null;
if (!headerDom) return defaultHeight;
if (!headerDom.offsetParent) return defaultHeight;
return headerDom.offsetHeight ?? defaultHeight;
};
const computResultTableHeight = () => {
// 安全获取搜索区域高度,默认0
const viewportH = window.innerHeight; // JS直接取视口像素,替代css 100vh
const searchHeight = searchRef.value?.offsetHeight ?? 0;
const base = `calc(100vh - ${searchHeight}px`;
let settingHeight = 0;
let HeaderAndfooterHeight = 242;
if (!isModal.value && !isSM.value && settingRef.value) {
settingHeight = settingRef.value.offsetHeight;
}
const headerH = getTableHeaderHeight();
// console.log({
// viewportH,
// searchHeight,
// settingHeight,
// HeaderAndfooterHeight,
// headerH,
// });
let finalY: number;
// 合并重复的 isModal 分支
if (isModal.value) {
resultH.value = `${base} - ${HEIGHT_OFFSETS.modal}px)`;
return;
}
// 桌面端非弹窗
if (width.value > 640) {
resultH.value = `${base} - ${HEIGHT_OFFSETS.normalDesktop}px)`;
return;
}
// 移动端非弹窗
if (tableY.value > 0) {
resultH.value = `${base} - ${tableY.value}px)`;
// 弹窗依旧保留固定偏移(弹窗内部window.innerHeight仍是浏览器窗口,这是局限)
finalY = viewportH - searchHeight - HEIGHT_OFFSETS.modal - headerH;
} else {
resultH.value = `${base} - ${HEIGHT_OFFSETS.normalMobileFallback}px)`;
if (tableY.value > 0) {
finalY =
viewportH -
searchHeight -
tableY.value -
HeaderAndfooterHeight -
headerH;
} else {
finalY =
viewportH -
searchHeight -
settingHeight -
HeaderAndfooterHeight -
headerH;
}
}
// 最小高度兜底,不能小于minTableHeight
finalY = Math.max(finalY, HEIGHT_OFFSETS.minTableHeight);
resultH.value = `${finalY}px`; // 直接输出px,不再calc
};
// 重新绑定observer,处理v‑if动态创建的setting DOM
const rebindObserver = () => {
if (!resizeObserver) return;
// 先全部取消
resizeObserver.disconnect();
if (searchRef.value) resizeObserver.observe(searchRef.value);
if (settingRef.value) resizeObserver.observe(settingRef.value);
computResultTableHeight();
};
onMounted(() => {
resizeObserver = new ResizeObserver(() => {
computResultTableHeight();
});
rebindObserver();
});
onUnmounted(() => {
if (resizeObserver) {
resizeObserver.disconnect();
resizeObserver = null;
}
});
// ✅监听v‑if条件变化,条件一变,重新绑定观测器
watch([isModal, isSM], () => {
rebindObserver();
});
watch([width, height, tableY], () => {
computResultTableHeight();
});
defineOptions({
name: "search",
});
const columns = ref(viewOption.value.Columns[0].BindColumn?.filter((x: any) => x.hidden != 'Y'));
const columns = ref(
viewOption.value.Columns[0].BindColumn?.filter((x: any) => x.hidden != "Y"),
);
//接收拖动变化
const onChangeColumns = ((cls: Column[]) => {
columns.value = cls?.filter(x => x.hidden != 'Y');
});
const onChangeColumns = (cls: Column[]) => {
columns.value = cls?.filter((x) => x.hidden != "Y");
};
const onChangeViewOption = ((vop: ViewOption) => {
const onChangeViewOption = (vop: ViewOption) => {
viewOption.value = vop;
});
};
const onSelectColumn = (() => {
columns.value = viewOption.value.Columns.filter((x: any) => x.BindValue == viewOption.value.Value)[0].BindColumn?.filter((x: any) => x.hidden != 'Y') as Column[];
});
const onSelectColumn = () => {
columns.value = viewOption.value.Columns.filter(
(x: any) => x.BindValue == viewOption.value.Value,
)[0].BindColumn?.filter((x: any) => x.hidden != "Y") as Column[];
};
const onSubmit = (async (filters: SearchFilter[]) => {
emit('onSubmit', filters);
});
const onSubmit = async (filters: SearchFilter[]) => {
emit("onSubmit", filters);
};
const handleChangeBindValue = ((bindValue: string, value: string) => {
emit('handleChangeBindValue', bindValue, value)
});
const handleChangeBindValue = (bindValue: string, value: string) => {
emit("handleChangeBindValue", bindValue, value);
};
const onReset = (async () => {
const onReset = async () => {
datas.value = [];
selected.value = [];
emit('onReset');
});
emit("onReset");
};
const customRow = (record: any) => {
return {
onDblclick: (event: any) => {
if (selected.value.includes(record)) {
selected.value = selected.value.filter(item => item !== record);
}
else {
selected.value = selected.value.filter((item) => item !== record);
} else {
selected.value.push(record);
}
emit('onRowDblclick', event, record);
emit('onSelectChange', selected.value);
emit("onRowDblclick", event, record);
emit("onSelectChange", selected.value);
},
onclick: (event: any) => {
if (unref(rowSelectionType) == 'radio') {
if (unref(rowSelectionType) == "radio") {
selected.value = [record];
}
else {
} else {
if (selected.value.includes(record)) {
selected.value = selected.value.filter(item => item !== record);
}
else {
selected.value = selected.value.filter((item) => item !== record);
} else {
selected.value.push(record);
}
}
emit('onclick', event, [record]);
emit('onSelectChange', selected.value);
}
}
}
emit("onclick", event, [record]);
emit("onSelectChange", selected.value);
},
};
};
const onSelectChange = (changableRowKeys: any[]) => {
selected.value = changableRowKeys;
emit('onSelectChange', selected.value);
emit("onSelectChange", selected.value);
};
const rowSelection = computed(() => {
return {
columnWidth: '4%',
columnWidth: "4%",
type: rowSelectionType.value,
selectedRowKeys: unref(selected),
onChange: onSelectChange,
}
};
});
const pagination = computed(() => ({
total: paginationJ.value.Total,
current: paginationJ.value.Page,
pageSize: paginationJ.value.Limit
}))
pageSize: paginationJ.value.Limit,
}));
const handleTableChange: TableProps['onChange'] = (
const handleTableChange: TableProps["onChange"] = (
pag: TablePaginationConfig,
filters: any,
sorter: any
sorter: any,
) => {
run({
pageSize: pag.pageSize,
page: pag.current,
sortField: sorter.field,
sortOrder: sorter.order,
...filters
})
}
...filters,
});
};
const queryData = async (params: PagingParams): Promise<any> => {
try {
emit('usePagination', params);
} catch (err) {
}
emit("usePagination", params);
} catch (err) {}
return datas.value;
}
};
const { run, current, pageSize } = usePagination(queryData, {
pagination: {
currentKey: 'page',
pageSizeKey: 'pageSize',
totalKey: 'totalCount'
}
})
currentKey: "page",
pageSizeKey: "pageSize",
totalKey: "totalCount",
},
});
</script>
<style lang="less">
@@ -344,6 +487,4 @@ const { run, current, pageSize } = usePagination(queryData, {
bottom: 8px;
border-top: 1px solid silver;
}
</style>