ow
This commit is contained in:
1 parent
4b92ee5fab
commit
a2a03f5475
35 files changed
+337
-165
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(); });
|
builder.Entity<SecurityUserActorViewEntity>(eb => { eb.HasNoKey(); });
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ACTOR_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ACTOR_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ACTOR_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ACTOR_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
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);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FUNCTION_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FUNCTION_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FUNCTION_NAME_PARENT ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FUNCTION_NAME_PARENT ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
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);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GENERATOR_ID ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GENERATOR_ID ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
+1
-1
@@ -174,7 +174,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
+1
-1
@@ -165,7 +165,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
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);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_GROUP_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
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);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
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);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ENTITY_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ENTITY_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_MASTER_CATEGORY ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_MASTER_CATEGORY ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_PERMISSION_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_PERMISSION_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_PERMISSION_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_PERMISSION_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
+1
-1
@@ -149,7 +149,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_PERMISSION_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_PERMISSION_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
+1
-1
@@ -130,7 +130,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
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);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
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);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_DESCRIPTION_ID ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_DESCRIPTION_ID ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USER_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USER_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
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);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
+1
-1
@@ -164,7 +164,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USER_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USER_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USER_NAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USER_NAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_LOGIN_LOG_ID ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_LOGIN_LOG_ID ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USERNAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USERNAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
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);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_SESSION_ID ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_SESSION_ID ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
+1
-1
@@ -164,7 +164,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USERNAME ;
|
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_USERNAME ;
|
||||||
int offset = limit * (start - 1);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
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);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ namespace CloudBuilder.Security.Entity
|
|||||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
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);
|
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)
|
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||||
|
|||||||
@@ -1,64 +1,130 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="searchRef" style="margin-left: 4px;padding-top: 4px; margin-right: 12px">
|
<div
|
||||||
<searchCriteria @submit="onSubmit" @reset="onReset" @handle-change-bind-value="handleChangeBindValue">
|
ref="searchRef"
|
||||||
|
style="margin-left: 4px; padding-top: 4px; margin-right: 12px"
|
||||||
|
>
|
||||||
|
<searchCriteria
|
||||||
|
@submit="onSubmit"
|
||||||
|
@reset="onReset"
|
||||||
|
@handle-change-bind-value="handleChangeBindValue"
|
||||||
|
>
|
||||||
<template #control>
|
<template #control>
|
||||||
<slot name="control"></slot>
|
<slot name="control"></slot>
|
||||||
</template>
|
</template>
|
||||||
</searchCriteria>
|
</searchCriteria>
|
||||||
<hr />
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!isModal && !isSM" class="setting">
|
<div ref="settingRef" v-if="!isModal && !isSM" class="setting">
|
||||||
<a-row :wrap="false">
|
<a-row :wrap="false">
|
||||||
<a-col :lg="4"></a-col>
|
<a-col :lg="4"></a-col>
|
||||||
<a-col style="display: flex; justify-content: flex-end" :lg="20" :sm="24">
|
<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;
|
width: 80px;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-top-left-radius: 5pt 5pt;
|
border-top-left-radius: 5pt 5pt;
|
||||||
border-bottom-left-radius: 5pt 5pt;
|
border-bottom-left-radius: 5pt 5pt;
|
||||||
background-color: rgb(250, 250, 250);
|
background-color: rgb(250, 250, 250);
|
||||||
pointer-events: none;
|
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">{{
|
<a-select
|
||||||
o.DisplayName }}</a-select-option>
|
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-select>
|
||||||
<a-button type="dashed" :icon="h(SettingTwoTone)" @click.prevent="onViewResult"></a-button>
|
<a-button
|
||||||
<a-button type="dashed" :icon="h(PrinterTwoTone)" @click.prevent="onPrint"></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-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<columnModal :show-modal="showColumnModal" @on-change-columns="onChangeColumns" @handle-close="onHandleClose"
|
<columnModal
|
||||||
@on-change-view-option="onChangeViewOption" />
|
:show-modal="showColumnModal"
|
||||||
|
@on-change-columns="onChangeColumns"
|
||||||
|
@handle-close="onHandleClose"
|
||||||
|
@on-change-view-option="onChangeViewOption"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<a-table style="margin-left: 2px;margin-right: 6px" :row-key="(index: any) => { return index }" :columns="columns" :data-source="datas"
|
<a-table
|
||||||
:row-selection="rowSelection" :pagination="pagination" @change="handleTableChange"
|
style="margin-left: 2px; margin-right: 6px"
|
||||||
:scroll="{ x: scrollx, y: resultH }" :custom-row="customRow" size="small" bordered>
|
: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
|
headerCell
|
||||||
<template #headerCell="datas">
|
<template #headerCell="datas">
|
||||||
<slot name="headerCell" v-bind="datas"> </slot>
|
<slot name="headerCell" v-bind="datas"> </slot>
|
||||||
</template>
|
</template>
|
||||||
<template #bodyCell="datas">
|
<template #bodyCell="datas">
|
||||||
<template v-if="datas.column.dataIndex === 'index'">
|
<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>
|
</template>
|
||||||
<slot name="bodyCell" v-bind="datas"> </slot>
|
<slot name="bodyCell" v-bind="datas"> </slot>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
<slot name="footer" style="padding-left: 4px;"></slot>
|
<slot name="footer" style="padding-left: 4px"></slot>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, useSlots, watch, inject, computed, onMounted, defineComponent, h, ref, unref, provide } from "vue";
|
import {
|
||||||
import { usePagination, type PaginationQueryResult } from 'vue-request'
|
reactive,
|
||||||
import type { TablePaginationConfig, TableProps } from 'ant-design-vue'
|
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 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 { SearchCriteriaResultData } from "@/data/auto/searchCriteriaResultData";
|
||||||
import { BindOption } from "@/data/custom/bindOption";
|
import { BindOption } from "@/data/custom/bindOption";
|
||||||
import { SelectOption } from "@/data/auto/selectOption";
|
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 columnModal from "./ColumnModal.vue";
|
||||||
import { useWindowSize } from '@vueuse/core'
|
import { useWindowSize } from "@vueuse/core";
|
||||||
import { bsInfo } from "@/utils/browser"
|
import { bsInfo } from "@/utils/browser";
|
||||||
import { on } from "events";
|
import { on } from "events";
|
||||||
import { enquiryMethodKey } from "@/injections";
|
import { enquiryMethodKey } from "@/injections";
|
||||||
|
|
||||||
@@ -86,215 +152,292 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
rowSelectionType: {
|
rowSelectionType: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'radio',
|
default: "radio",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const isModal = ref(props['isModal']);
|
const isModal = ref(props["isModal"]);
|
||||||
|
|
||||||
const paginationJ = ref(props['pagination']);
|
|
||||||
const rowSelectionType = ref(props['rowSelectionType']);
|
|
||||||
const tableY = ref(props['scrolly']);
|
|
||||||
|
|
||||||
|
const paginationJ = ref(props["pagination"]);
|
||||||
|
const rowSelectionType = ref(props["rowSelectionType"]);
|
||||||
|
const tableY = ref(props["scrolly"]);
|
||||||
|
|
||||||
const enquiry = inject(enquiryMethodKey);
|
const enquiry = inject(enquiryMethodKey);
|
||||||
|
|
||||||
const datas = enquiry?.getDatas()!;
|
const datas = enquiry?.getDatas()!;
|
||||||
|
|
||||||
const viewOption = ref(
|
const viewOption = ref(
|
||||||
enquiry ? enquiry.getViewOption() : {
|
enquiry
|
||||||
|
? enquiry.getViewOption()
|
||||||
|
: {
|
||||||
Value: "default",
|
Value: "default",
|
||||||
SelectOptions: [{ BindValue: "default", DisplayName: "默认" }],
|
SelectOptions: [{ BindValue: "default", DisplayName: "默认" }],
|
||||||
Columns: [{ BindValue: "default", BindColumn: [] }],
|
Columns: [{ BindValue: "default", BindColumn: [] }],
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
//================inject================
|
//================inject================
|
||||||
const isSM = ref<boolean>(false);
|
const isSM = ref<boolean>(false);
|
||||||
const { width, height } = useWindowSize()
|
const { width, height } = useWindowSize();
|
||||||
if (bsInfo.size.sm) {
|
if (bsInfo.size.sm) {
|
||||||
isSM.value = true;
|
isSM.value = true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
isSM.value = false;
|
isSM.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const resultH = ref('');
|
const resultH = ref("");
|
||||||
const showColumnModal = ref<boolean>(false);
|
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;
|
showColumnModal.value = true;
|
||||||
emit('onViewResult');
|
emit("onViewResult");
|
||||||
});
|
};
|
||||||
|
|
||||||
const onHandleClose = (() => {
|
const onHandleClose = () => {
|
||||||
showColumnModal.value = false;
|
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 = (() => {
|
// 仅弹窗模式保留固定偏移(弹窗无法通过DOM测量)
|
||||||
emit('onPrint', viewOption.value);
|
|
||||||
});
|
|
||||||
|
|
||||||
const searchRef = ref<HTMLElement | null>()
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
computResultTableHeight()
|
|
||||||
})
|
|
||||||
|
|
||||||
watch(isModal, () => {
|
|
||||||
computResultTableHeight();
|
|
||||||
});
|
|
||||||
|
|
||||||
const HEIGHT_OFFSETS = {
|
const HEIGHT_OFFSETS = {
|
||||||
modal: 560,
|
modal: 560,
|
||||||
normalDesktop: 330,
|
minTableHeight: 120, // 表格最小高度,防止calc结果负数
|
||||||
normalMobileFallback: 420,
|
|
||||||
};
|
};
|
||||||
|
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 = () => {
|
const computResultTableHeight = () => {
|
||||||
// 安全获取搜索区域高度,默认0
|
const viewportH = window.innerHeight; // JS直接取视口像素,替代css 100vh
|
||||||
const searchHeight = searchRef.value?.offsetHeight ?? 0;
|
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) {
|
if (isModal.value) {
|
||||||
resultH.value = `${base} - ${HEIGHT_OFFSETS.modal}px)`;
|
// 弹窗依旧保留固定偏移(弹窗内部window.innerHeight仍是浏览器窗口,这是局限)
|
||||||
return;
|
finalY = viewportH - searchHeight - HEIGHT_OFFSETS.modal - headerH;
|
||||||
}
|
|
||||||
|
|
||||||
// 桌面端非弹窗
|
|
||||||
if (width.value > 640) {
|
|
||||||
resultH.value = `${base} - ${HEIGHT_OFFSETS.normalDesktop}px)`;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 移动端非弹窗
|
|
||||||
if (tableY.value > 0) {
|
|
||||||
resultH.value = `${base} - ${tableY.value}px)`;
|
|
||||||
} else {
|
} 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({
|
defineOptions({
|
||||||
name: "search",
|
name: "search",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const columns = ref(
|
||||||
const columns = ref(viewOption.value.Columns[0].BindColumn?.filter((x: any) => x.hidden != 'Y'));
|
viewOption.value.Columns[0].BindColumn?.filter((x: any) => x.hidden != "Y"),
|
||||||
|
);
|
||||||
|
|
||||||
//接收拖动变化
|
//接收拖动变化
|
||||||
const onChangeColumns = ((cls: Column[]) => {
|
const onChangeColumns = (cls: Column[]) => {
|
||||||
columns.value = cls?.filter(x => x.hidden != 'Y');
|
columns.value = cls?.filter((x) => x.hidden != "Y");
|
||||||
});
|
};
|
||||||
|
|
||||||
const onChangeViewOption = ((vop: ViewOption) => {
|
const onChangeViewOption = (vop: ViewOption) => {
|
||||||
viewOption.value = vop;
|
viewOption.value = vop;
|
||||||
});
|
};
|
||||||
|
|
||||||
const onSelectColumn = (() => {
|
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[];
|
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[]) => {
|
const onSubmit = async (filters: SearchFilter[]) => {
|
||||||
emit('onSubmit', filters);
|
emit("onSubmit", filters);
|
||||||
});
|
};
|
||||||
|
|
||||||
const handleChangeBindValue = ((bindValue: string, value: string) => {
|
const handleChangeBindValue = (bindValue: string, value: string) => {
|
||||||
emit('handleChangeBindValue', bindValue, value)
|
emit("handleChangeBindValue", bindValue, value);
|
||||||
});
|
};
|
||||||
|
|
||||||
const onReset = (async () => {
|
const onReset = async () => {
|
||||||
datas.value = [];
|
datas.value = [];
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
emit('onReset');
|
emit("onReset");
|
||||||
});
|
};
|
||||||
|
|
||||||
const customRow = (record: any) => {
|
const customRow = (record: any) => {
|
||||||
return {
|
return {
|
||||||
onDblclick: (event: any) => {
|
onDblclick: (event: any) => {
|
||||||
if (selected.value.includes(record)) {
|
if (selected.value.includes(record)) {
|
||||||
selected.value = selected.value.filter(item => item !== record);
|
selected.value = selected.value.filter((item) => item !== record);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
selected.value.push(record);
|
selected.value.push(record);
|
||||||
}
|
}
|
||||||
emit('onRowDblclick', event, record);
|
emit("onRowDblclick", event, record);
|
||||||
emit('onSelectChange', selected.value);
|
emit("onSelectChange", selected.value);
|
||||||
},
|
},
|
||||||
onclick: (event: any) => {
|
onclick: (event: any) => {
|
||||||
if (unref(rowSelectionType) == 'radio') {
|
if (unref(rowSelectionType) == "radio") {
|
||||||
selected.value = [record];
|
selected.value = [record];
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (selected.value.includes(record)) {
|
if (selected.value.includes(record)) {
|
||||||
selected.value = selected.value.filter(item => item !== record);
|
selected.value = selected.value.filter((item) => item !== record);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
selected.value.push(record);
|
selected.value.push(record);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit('onclick', event, [record]);
|
emit("onclick", event, [record]);
|
||||||
emit('onSelectChange', selected.value);
|
emit("onSelectChange", selected.value);
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
const onSelectChange = (changableRowKeys: any[]) => {
|
const onSelectChange = (changableRowKeys: any[]) => {
|
||||||
selected.value = changableRowKeys;
|
selected.value = changableRowKeys;
|
||||||
emit('onSelectChange', selected.value);
|
emit("onSelectChange", selected.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const rowSelection = computed(() => {
|
const rowSelection = computed(() => {
|
||||||
return {
|
return {
|
||||||
columnWidth: '4%',
|
columnWidth: "4%",
|
||||||
type: rowSelectionType.value,
|
type: rowSelectionType.value,
|
||||||
selectedRowKeys: unref(selected),
|
selectedRowKeys: unref(selected),
|
||||||
onChange: onSelectChange,
|
onChange: onSelectChange,
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const pagination = computed(() => ({
|
const pagination = computed(() => ({
|
||||||
total: paginationJ.value.Total,
|
total: paginationJ.value.Total,
|
||||||
current: paginationJ.value.Page,
|
current: paginationJ.value.Page,
|
||||||
pageSize: paginationJ.value.Limit
|
pageSize: paginationJ.value.Limit,
|
||||||
}))
|
}));
|
||||||
|
|
||||||
const handleTableChange: TableProps['onChange'] = (
|
const handleTableChange: TableProps["onChange"] = (
|
||||||
pag: TablePaginationConfig,
|
pag: TablePaginationConfig,
|
||||||
filters: any,
|
filters: any,
|
||||||
sorter: any
|
sorter: any,
|
||||||
) => {
|
) => {
|
||||||
run({
|
run({
|
||||||
pageSize: pag.pageSize,
|
pageSize: pag.pageSize,
|
||||||
page: pag.current,
|
page: pag.current,
|
||||||
sortField: sorter.field,
|
sortField: sorter.field,
|
||||||
sortOrder: sorter.order,
|
sortOrder: sorter.order,
|
||||||
...filters
|
...filters,
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
const queryData = async (params: PagingParams): Promise<any> => {
|
const queryData = async (params: PagingParams): Promise<any> => {
|
||||||
try {
|
try {
|
||||||
emit('usePagination', params);
|
emit("usePagination", params);
|
||||||
} catch (err) {
|
} catch (err) {}
|
||||||
}
|
|
||||||
|
|
||||||
return datas.value;
|
return datas.value;
|
||||||
}
|
};
|
||||||
|
|
||||||
const { run, current, pageSize } = usePagination(queryData, {
|
const { run, current, pageSize } = usePagination(queryData, {
|
||||||
pagination: {
|
pagination: {
|
||||||
currentKey: 'page',
|
currentKey: "page",
|
||||||
pageSizeKey: 'pageSize',
|
pageSizeKey: "pageSize",
|
||||||
totalKey: 'totalCount'
|
totalKey: "totalCount",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
@@ -344,6 +487,4 @@ const { run, current, pageSize } = usePagination(queryData, {
|
|||||||
bottom: 8px;
|
bottom: 8px;
|
||||||
border-top: 1px solid silver;
|
border-top: 1px solid silver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user