Przeglądaj źródła

Fix 优化代码,修复部分问题

YueYunyun 2 lat temu
rodzic
commit
cce227574a
28 zmienionych plików z 85 dodań i 86 usunięć
  1. 1 1
      SERVER/VberAdmin/_scripts/Cmd/Project.run.xml
  2. 2 0
      SERVER/VberAdmin/_scripts/run
  3. 2 1
      SERVER/VberAdmin/app/other/apis/tools/db_tables.go
  4. 8 8
      SERVER/VberAdmin/app/other/models/tools/db_tables.go
  5. 7 7
      SERVER/VberAdmin/app/system/service/dto/sys_role.go
  6. 4 4
      SERVER/VberAdmin/app/system/service/dto/sys_user.go
  7. 1 1
      SERVER/VberAdmin/config/settings.yml
  8. 9 9
      SERVER/VberAdmin/config/sql/db.sql
  9. 1 1
      SERVER/VberAdmin/core/sdk/pkg/jwt-auth/jwtauth.go
  10. 1 1
      SERVER/VberAdmin/template/v4/vue-view.go.template
  11. 1 1
      UI/VAG.VUE/package.json
  12. 3 2
      UI/VAG.VUE/src/components/table/VbDataTable.vue
  13. 14 1
      UI/VAG.VUE/src/components/tree/OrgTree.vue
  14. 1 1
      UI/VAG.VUE/src/views/dev-tools/gen/_ImportTable.vue
  15. 1 1
      UI/VAG.VUE/src/views/dev-tools/gen/index.vue
  16. 1 1
      UI/VAG.VUE/src/views/schedule/job/index.vue
  17. 1 1
      UI/VAG.VUE/src/views/system/api/index.vue
  18. 1 1
      UI/VAG.VUE/src/views/system/config/index.vue
  19. 1 1
      UI/VAG.VUE/src/views/system/dict/_data.vue
  20. 1 1
      UI/VAG.VUE/src/views/system/dict/index.vue
  21. 1 1
      UI/VAG.VUE/src/views/system/log/login.vue
  22. 2 2
      UI/VAG.VUE/src/views/system/log/oper.vue
  23. 1 1
      UI/VAG.VUE/src/views/system/menu/index.vue
  24. 1 1
      UI/VAG.VUE/src/views/system/notice/index.vue
  25. 1 1
      UI/VAG.VUE/src/views/system/org/index.vue
  26. 2 24
      UI/VAG.VUE/src/views/system/post/index.vue
  27. 3 3
      UI/VAG.VUE/src/views/system/role/index.vue
  28. 13 9
      UI/VAG.VUE/src/views/system/user/index.vue

+ 1 - 1
SERVER/VberAdmin/_scripts/Cmd/Project.run.xml

@@ -3,7 +3,7 @@
     <module name="VberAdmin" />
     <working_directory value="$PROJECT_DIR$" />
     <go_parameters value="-tags=project" />
-    <parameters value="-f=D:\Project_GO\TEST -t=测试项目系统平台 -p=YueY -e=yue" />
+    <parameters value="-f=D:\01Work\1010_VbDsm\VBEMP -t=能源管理系统平台 -p=VbEmp -e=vbemp" />
     <kind value="PACKAGE" />
     <package value="VberAdmin" />
     <directory value="$PROJECT_DIR$" />

+ 2 - 0
SERVER/VberAdmin/_scripts/run

@@ -27,3 +27,5 @@
 
  生成新项目 -f={项目路径} -t={项目名称} -p={包名} -e={vber}
  go run -tags=project  main.go -f=D:\Project_GO\TEST -t=测试项目系统平台 -p=YueY -e=yue
+
+ go run -tags=project  main.go -f=D:\01Work\1010_VbDsm\VBDSM_V2 -t=能源管理系统平台 -p=Vbdsm -e=vbdsm

+ 2 - 1
SERVER/VberAdmin/app/other/apis/tools/db_tables.go

@@ -1,6 +1,7 @@
 package tools
 
 import (
+	"VberAdmin/core/sdk"
 	"VberAdmin/core/sdk/config"
 	"VberAdmin/core/sdk/pkg"
 	_ "VberAdmin/core/sdk/pkg/response"
@@ -51,7 +52,7 @@ func (e Gen) GetDBTableList(c *gin.Context) {
 	}
 
 	data.TableName = c.Request.FormValue("tableName")
-	result, count, err := data.GetPage(db, pageSize, pageIndex)
+	result, count, err := data.GetPage(db, pageSize, pageIndex, sdk.Runtime.GetKey(c))
 	if err != nil {
 		log.Errorf("GetPage error, %s", err.Error())
 		e.Error(500, err, "")

+ 8 - 8
SERVER/VberAdmin/app/other/models/tools/db_tables.go

@@ -6,7 +6,7 @@ import (
 
 	"gorm.io/gorm"
 
-	config2 "VberAdmin/core/sdk/config"
+	"VberAdmin/core/sdk/config"
 )
 
 type DBTables struct {
@@ -19,18 +19,18 @@ type DBTables struct {
 	TableComment   string `gorm:"column:TABLE_COMMENT" json:"tableComment"`
 }
 
-func (e *DBTables) GetPage(tx *gorm.DB, pageSize int, pageIndex int) ([]DBTables, int, error) {
+func (e *DBTables) GetPage(tx *gorm.DB, pageSize int, pageIndex int, key string) ([]DBTables, int, error) {
 	var doc []DBTables
 	table := new(gorm.DB)
 	var count int64
 
-	if config2.DatabaseConfig.Driver == "mysql" {
+	if config.DatabasesConfig[key].Driver == "mysql" {
 		table = tx.Table("information_schema.tables")
-		table = table.Where("TABLE_NAME not in (select table_name from `" + config2.GenConfig.DBName + "`." + (&SysTables{}).TableName() + " )")
-		table = table.Where("table_schema= ? ", config2.GenConfig.DBName)
+		table = table.Where("TABLE_NAME not in (select table_name from `" + config.GenConfig.DBName + "`." + (&SysTables{}).TableName() + " )")
+		table = table.Where("table_schema= ? ", config.GenConfig.DBName)
 		table = table.Where("table_name NOT LIKE '/_/_%'  ESCAPE '/'")
 		if e.TableName != "" {
-			table = table.Where("TABLE_NAME = ?", e.TableName)
+			table = table.Where("table_name LIKE '%" + e.TableName + "%'")
 		}
 		if err := table.Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Offset(-1).Limit(-1).Count(&count).Error; err != nil {
 			return nil, 0, err
@@ -45,9 +45,9 @@ func (e *DBTables) GetPage(tx *gorm.DB, pageSize int, pageIndex int) ([]DBTables
 
 func (e *DBTables) Get(tx *gorm.DB) (DBTables, error) {
 	var doc DBTables
-	if config2.DatabaseConfig.Driver == "mysql" {
+	if config.DatabaseConfig.Driver == "mysql" {
 		table := tx.Table("information_schema.tables")
-		table = table.Where("table_schema= ? ", config2.GenConfig.DBName)
+		table = table.Where("table_schema= ? ", config.GenConfig.DBName)
 		if e.TableName == "" {
 			return doc, errors.New("table name cannot be empty!")
 		}

+ 7 - 7
SERVER/VberAdmin/app/system/service/dto/sys_role.go

@@ -10,13 +10,13 @@ import (
 type SysRoleGetPageReq struct {
 	dto.Pagination `search:"-"`
 
-	RoleId    int    `form:"roleId" search:"type:exact;column:role_id;table:sys_role" comment:"角色编码"`     // 角色编码
-	RoleName  string `form:"roleName" search:"type:exact;column:role_name;table:sys_role" comment:"角色名称"` // 角色名称
-	Status    string `form:"status" search:"type:exact;column:status;table:sys_role" comment:"状态"`        // 状态
-	RoleKey   string `form:"roleKey" search:"type:exact;column:role_key;table:sys_role" comment:"角色代码"`   // 角色代码
-	RoleSort  int    `form:"roleSort" search:"type:exact;column:role_sort;table:sys_role" comment:"角色排序"` // 角色排序
-	Flag      string `form:"flag" search:"type:exact;column:flag;table:sys_role" comment:"标记"`            // 标记
-	Remark    string `form:"remark" search:"type:exact;column:remark;table:sys_role" comment:"备注"`        // 备注
+	RoleId    int    `form:"roleId" search:"type:exact;column:role_id;table:sys_role" comment:"角色编码"`         // 角色编码
+	RoleName  string `form:"roleName" search:"type:icontains;column:role_name;table:sys_role" comment:"角色名称"` // 角色名称
+	Status    string `form:"status" search:"type:exact;column:status;table:sys_role" comment:"状态"`            // 状态
+	RoleKey   string `form:"roleKey" search:"type:icontains;column:role_key;table:sys_role" comment:"角色代码"`   // 角色代码
+	RoleSort  int    `form:"roleSort" search:"type:exact;column:role_sort;table:sys_role" comment:"角色排序"`     // 角色排序
+	Flag      string `form:"flag" search:"type:exact;column:flag;table:sys_role" comment:"标记"`                // 标记
+	Remark    string `form:"remark" search:"type:exact;column:remark;table:sys_role" comment:"备注"`            // 备注
 	Admin     bool   `form:"admin" search:"type:exact;column:admin;table:sys_role" comment:"是否管理员"`
 	DataScope string `form:"dataScope" search:"type:exact;column:data_scope;table:sys_role" comment:"是否管理员"`
 	BeginTime string `form:"beginTime" search:"type:gte;column:created_at;table:sys_role" comment:"创建时间"`

+ 4 - 4
SERVER/VberAdmin/app/system/service/dto/sys_user.go

@@ -10,12 +10,12 @@ import (
 type SysUserGetPageReq struct {
 	dto.Pagination `search:"-"`
 	UserId         int    `form:"userId" search:"type:exact;column:user_id;table:sys_user" comment:"用户ID"`
-	Username       string `form:"userName" search:"type:contains;column:username;table:sys_user" comment:"用户名"`
-	NickName       string `form:"nickName" search:"type:contains;column:nick_name;table:sys_user" comment:"昵称"`
-	Phone          string `form:"phone" search:"type:contains;column:phone;table:sys_user" comment:"手机号"`
+	Username       string `form:"userName" search:"type:icontains;column:username;table:sys_user" comment:"用户名"`
+	NickName       string `form:"nickName" search:"type:icontains;column:nick_name;table:sys_user" comment:"昵称"`
+	Phone          string `form:"phone" search:"type:icontains;column:phone;table:sys_user" comment:"手机号"`
 	RoleId         string `form:"roleId" search:"type:exact;column:role_id;table:sys_user" comment:"角色ID"`
 	Sex            string `form:"sex" search:"type:exact;column:sex;table:sys_user" comment:"性别"`
-	Email          string `form:"email" search:"type:contains;column:email;table:sys_user" comment:"邮箱"`
+	Email          string `form:"email" search:"type:icontains;column:email;table:sys_user" comment:"邮箱"`
 	PostId         string `form:"postId" search:"type:exact;column:post_id;table:sys_user" comment:"岗位"`
 	Status         string `form:"status" search:"type:exact;column:status;table:sys_user" comment:"状态"`
 	BeginTime      string `form:"beginTime" search:"type:gte;column:created_at;table:sys_user" comment:"创建时间"`

+ 1 - 1
SERVER/VberAdmin/config/settings.yml

@@ -6,7 +6,7 @@ settings:
     host: 0.0.0.0
     # 服务名称
     name: VberAdmin
-    description: "Hello World!"
+    description: "VAG后台管理系统"
     version: 1.0
     # 端口号
     port: 6071

+ 9 - 9
SERVER/VberAdmin/config/sql/db.sql

@@ -93,8 +93,8 @@ INSERT INTO sys_api VALUES  (2,'','退出登录','/api/logout','POST','SYS', 1,
 INSERT INTO sys_api VALUES  (3,'','获取验证码','/api/captcha','GET','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
 INSERT INTO sys_api VALUES  (4,'','上传图片','/api/sys/upload-file','POST','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
 INSERT INTO sys_api VALUES  (5,'','获取系统信息','/api/sys/server-monitor','GET','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
-INSERT INTO sys_api VALUES  (11,'','获取用信息','/api/sys/get-info','GET','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
-INSERT INTO sys_api VALUES  (12,'','获取用个人中心信息','/api/sys/profile','GET','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
+INSERT INTO sys_api VALUES  (11,'','获取用信息','/api/sys/get-info','GET','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
+INSERT INTO sys_api VALUES  (12,'','获取用个人中心信息','/api/sys/profile','GET','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
 INSERT INTO sys_api VALUES  (13,'','修改头像','/api/sys/avatar','PUT','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
 INSERT INTO sys_api VALUES  (14,'','修改密码','/api/sys/pwd','PUT','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
 INSERT INTO sys_api VALUES  (21,'','获取部门树','/api/sys/org-tree/:id','GET','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
@@ -109,14 +109,14 @@ INSERT INTO sys_api VALUES  (36,'','获取配置参数值','/api/sys/config-key/
 INSERT INTO sys_api VALUES  (37,'','获取可配置的配置参数','/api/sys/set-config','GET','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
 INSERT INTO sys_api VALUES  (38,'','修改可配置的配置参数','/api/sys/set-config','PUT','SYS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
 
-INSERT INTO sys_api VALUES  (101,'','查询用列表','/api/sys-user','GET','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
-INSERT INTO sys_api VALUES  (102,'','查询用详情','/api/sys-user/:id','GET','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
-INSERT INTO sys_api VALUES  (103,'','添加用','/api/sys-user','POST','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
-INSERT INTO sys_api VALUES  (104,'','修改用','/api/sys-user','PUT','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
-INSERT INTO sys_api VALUES  (105,'','删除用','/api/sys-user','DELETE','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
+INSERT INTO sys_api VALUES  (101,'','查询用列表','/api/sys-user','GET','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
+INSERT INTO sys_api VALUES  (102,'','查询用详情','/api/sys-user/:id','GET','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
+INSERT INTO sys_api VALUES  (103,'','添加用','/api/sys-user','POST','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
+INSERT INTO sys_api VALUES  (104,'','修改用','/api/sys-user','PUT','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
+INSERT INTO sys_api VALUES  (105,'','删除用','/api/sys-user','DELETE','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
 INSERT INTO sys_api VALUES  (106,'','重置密码','/api/sys-user/reset-pwd','PUT','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
-INSERT INTO sys_api VALUES  (107,'','修改用状态','/api/sys-user/change-status','PUT','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
-INSERT INTO sys_api VALUES  (108,'','查询用角色','/api/sys-user/roles/:id','GET','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
+INSERT INTO sys_api VALUES  (107,'','修改用状态','/api/sys-user/change-status','PUT','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
+INSERT INTO sys_api VALUES  (108,'','查询用角色','/api/sys-user/roles/:id','GET','BUS', 1, 1, '2024-03-14 00:00:00.000', '2024-03-14 00:00:00.000', NULL);
 
 INSERT INTO sys_menu_api VALUES (11, 101);
 INSERT INTO sys_menu_api VALUES (11, 102);

+ 1 - 1
SERVER/VberAdmin/core/sdk/pkg/jwt-auth/jwtauth.go

@@ -196,7 +196,7 @@ var (
 	IdentityKey = "identity"
 	UserIdKey   = "userid"
 
-	// UserNameKey 用
+	// UserNameKey 用
 	UserNameKey  = "username"
 	NiceKey      = "nice"
 	DataScopeKey = "datascope"

+ 1 - 1
SERVER/VberAdmin/template/v4/vue-view.go.template

@@ -391,7 +391,7 @@
                 :modal="modalRef"
                 :reset-form-fun="opts.resetForm"
                 v-model:form-data="form"
-                :query-params="queryParams"
+                v-model:query-params="queryParams"
                 :check-multiple="true"
                 :has-checkbox="true"
                 :reset-search-form-fun="resetQuery"

+ 1 - 1
UI/VAG.VUE/package.json

@@ -6,7 +6,7 @@
 	"scripts": {
 		"dev": "vite",
 		"build": "vite build",
-		"init": "pnmp i",
+		"init": "pnpm i",
 		"preview": "vite preview",
 		"lint": "eslint \"./src/**/*.{ts,js,vue}\"",
 		"fix": "eslint --fix \"./src/**/*.{ts,js,vue}\"",

+ 3 - 2
UI/VAG.VUE/src/components/table/VbDataTable.vue

@@ -166,6 +166,7 @@ const emits = defineEmits<{
 	(e: "update:currentPage", v: number): void
 	(e: "update:pageSize", v: number): void
 	(e: "update:loading", v: boolean): void
+	(e: "update:queryParams", v: any): void
 	(e: "page-change", v: number): void
 	(e: "update:formData", v: any): void
 	(e: "sort", v: Sort[]): void
@@ -763,7 +764,7 @@ const onSelect = (v: { isChecked: boolean; row: any }) => {
 	}
 }
 const onQuery = () => {
-	customSearch()
+	emits("update:queryParams", innerQueryParams.value)
 }
 const onRowClick = (v: any) => {
 	const row = toValue(v)
@@ -776,7 +777,7 @@ const onRowDbClick = (v: any) => {
 const onReset = () => {
 	innerQueryParams.value = JSON.parse(emptyQueryParams)
 	props.resetSearchFormFun && props.resetSearchFormFun(innerQueryParams.value)
-	customSearch()
+	emits("update:queryParams", innerQueryParams.value)
 }
 const onTreeToggle = (v: any) => {
 	const row = toValue(v)

+ 14 - 1
UI/VAG.VUE/src/components/tree/OrgTree.vue

@@ -29,19 +29,32 @@ const filterNode = (value: string, data: any) => {
 	return data.label.indexOf(value) !== -1
 }
 function handleNodeClick(data: any) {
-	console.log(data)
 	emits("update:modelValue", data.id)
 	emits("nodeClick", data)
 }
 function loadTreeData() {
 	if (data?.value) {
 		treeData.value = data.value
+		if (treeData.value.length > 0) {
+			initDefaultKey(treeData.value[0].id)
+		}
 	} else {
 		apis.sysApi.orgTreeSelect(appStore.authStore.user.orgId).then((res) => {
 			treeData.value = res.data
+			if (treeData.value.length > 0) {
+				initDefaultKey(treeData.value[0].id)
+			}
 		})
 	}
 }
+/** 初始化默认选中 */
+function initDefaultKey(id: any) {
+	emits("update:modelValue", id)
+	setTimeout(() => {
+		treeRef.value.setCurrentKey(id)
+	}, 50)
+}
+
 function init() {
 	loadTreeData()
 }

+ 1 - 1
UI/VAG.VUE/src/views/dev-tools/gen/_ImportTable.vue

@@ -105,7 +105,7 @@ defineExpose({
 			:modal="modalRef"
 			:reset-form-fun="opts.resetForm"
 			v-model:form-data="form"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:check-multiple="true"
 			:has-checkbox="true"
 			:auto-search="false"

+ 1 - 1
UI/VAG.VUE/src/views/dev-tools/gen/index.vue

@@ -226,7 +226,7 @@ onMounted(init)
 			:modal="modalRef"
 			:reset-form-fun="opts.resetForm"
 			v-model:form-data="form"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:check-multiple="true"
 			:has-checkbox="true"
 			:reset-search-form-fun="resetQuery"

+ 1 - 1
UI/VAG.VUE/src/views/schedule/job/index.vue

@@ -341,7 +341,7 @@ onMounted(() => setTimeout(init, 100))
 			:modal="modalRef"
 			:reset-form-fun="opts.resetForm"
 			v-model:form-data="form"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:check-multiple="true"
 			:has-checkbox="true"
 			:reset-search-form-fun="resetQuery"

+ 1 - 1
UI/VAG.VUE/src/views/system/api/index.vue

@@ -216,7 +216,7 @@ onMounted(init)
 			:modal="modalRef"
 			:reset-form-fun="opts.resetForm"
 			v-model:form-data="form"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:check-multiple="true"
 			:has-checkbox="true"
 			:reset-search-form-fun="resetQuery"

+ 1 - 1
UI/VAG.VUE/src/views/system/config/index.vue

@@ -161,7 +161,7 @@ function handleRefreshCache() {
 			:modal="modalRef"
 			:reset-form-fun="opts.resetForm"
 			v-model:form-data="form"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:check-multiple="true"
 			:reset-search-form-fun="resetQuery"
 			:custom-search-fun="handleQuery">

+ 1 - 1
UI/VAG.VUE/src/views/system/dict/_data.vue

@@ -177,7 +177,7 @@ defineExpose({ defaultDictType })
 			:modal="modalRef"
 			:reset-form-fun="opts.resetForm"
 			v-model:form-data="form"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:check-multiple="true"
 			:show-right-column-btn="false"
 			:show-right-search-btn="false"

+ 1 - 1
UI/VAG.VUE/src/views/system/dict/index.vue

@@ -167,7 +167,7 @@ function handleView(row: any) {
 			:modal="modalRef"
 			:reset-form-fun="opts.resetForm"
 			v-model:form-data="form"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:check-multiple="true"
 			:reset-search-form-fun="resetQuery"
 			:custom-search-fun="handleQuery">

+ 1 - 1
UI/VAG.VUE/src/views/system/log/login.vue

@@ -181,7 +181,7 @@ function handleUnlock(row: any) {
 			:delete-entity-fun="opts.deleteEntityFun"
 			:export-url="opts.exportUrl"
 			:export-name="opts.exportName"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:check-multiple="true"
 			:reset-search-form-fun="resetQuery"
 			:custom-search-fun="handleQuery">

+ 2 - 2
UI/VAG.VUE/src/views/system/log/oper.vue

@@ -123,7 +123,7 @@ const { queryParams } = toRefs(opts)
 function handleQuery(query?: any) {
 	query = query || tableRef.value?.getQueryParams() || queryParams.value
 	addDateRange(query, query.dateRange)
-	tableRef.value?.query()
+	tableRef.value?.query(query)
 }
 function resetQuery(query?: any) {
 	query = query || tableRef.value?.getQueryParams() || queryParams.value
@@ -174,7 +174,7 @@ function typeFormat(row: any) {
 			:delete-entity-fun="opts.deleteEntityFun"
 			:export-url="opts.exportUrl"
 			:export-name="opts.exportName"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:check-multiple="true"
 			:reset-search-form-fun="resetQuery"
 			:custom-search-fun="handleQuery">

+ 1 - 1
UI/VAG.VUE/src/views/system/menu/index.vue

@@ -317,7 +317,7 @@ onMounted(() => {
 			:columns="opts.columns"
 			:custom-btns="opts.customBtns"
 			:remote-fun="opts.tableListFun"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:init-search="true"
 			:reset-search-form-fun="resetQuery"
 			:custom-search-fun="handleQuery">

+ 1 - 1
UI/VAG.VUE/src/views/system/notice/index.vue

@@ -140,7 +140,7 @@ function submitForm() {
 			:modal="modalRef"
 			:reset-form-fun="opts.resetForm"
 			v-model:form-data="form"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:url="apis.system.noticeApi.tableUrl"
 			:check-multiple="true"
 			:reset-search-form-fun="resetQuery"

+ 1 - 1
UI/VAG.VUE/src/views/system/org/index.vue

@@ -213,7 +213,7 @@ function getTableData(q: any) {
 			:columns="opts.columns"
 			:custom-btns="opts.customBtns"
 			:remote-fun="opts.tableListFun"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:reset-search-form-fun="resetQuery"
 			:custom-search-fun="handleQuery">
 			<template #status="{ row }">

+ 2 - 24
UI/VAG.VUE/src/views/system/post/index.vue

@@ -59,28 +59,6 @@ const opts = reactive<any>({
 				dictType: "sys_normal_disable"
 			}
 		}
-		// {
-		//   field: "dateRange",
-		//   label: "登录时间",
-		//   required: false,
-		//   component: ElDatePicker,
-		//   props: {
-		//     placeholder: "请选登录建时间",
-		//     valueFormat: "YYYY-MM-DD HH:mm:ss",
-		//     type: "daterange",
-		//     rangeSeparator: "-",
-		//     startPlaceholder: "开始日期",
-		//     endPlaceholder: "结束日期",
-		//     defaultTime: [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)],
-		//   },
-		//   listeners: {
-		//     change: (v: any) => {
-		//       //console.log("DATE_RANGE_CHANGE", v)
-		//       //dateRange.value = v
-		//       queryParams.value.dateRange = v
-		//     },
-		//   },
-		// },
 	],
 	permission: permissionNames.SystemPost,
 	handleFuns: {},
@@ -132,7 +110,7 @@ function submitForm() {
 function handleQuery(query?: any) {
 	query = query || tableRef.value?.getQueryParams() || queryParams.value
 	addDateRange(query, query.dateRange)
-	tableRef.value?.query()
+	tableRef.value?.query(query)
 }
 /** 查询重置按钮 */
 function resetQuery(query?: any) {
@@ -206,7 +184,7 @@ const formItems = ref([
 			:modal="modalRef"
 			:reset-form-fun="opts.resetForm"
 			v-model:form-data="form"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:check-multiple="true"
 			:has-checkbox="true"
 			:reset-search-form-fun="resetQuery"

+ 3 - 3
UI/VAG.VUE/src/views/system/role/index.vue

@@ -117,7 +117,7 @@ const opts = reactive({
 					queryParams.value.dateRange = v
 				}
 			},
-			span: 5
+			span: 6
 		}
 	] as any,
 	permission: permissionNames.SystemRole,
@@ -267,7 +267,7 @@ const form = ref<any>(emptyFormData.value)
 function handleQuery(query?: any) {
 	query = query || tableRef.value?.getQueryParams() || queryParams.value
 	addDateRange(query, query.dateRange)
-	tableRef.value?.query()
+	tableRef.value?.query(query)
 }
 
 /** 重置按钮操作 */
@@ -472,7 +472,7 @@ onMounted(init)
 			:modal="modalRef"
 			:reset-form-fun="opts.resetForm"
 			v-model:form-data="form"
-			:query-params="queryParams"
+			v-model:query-params="queryParams"
 			:check-multiple="true"
 			:reset-search-form-fun="resetQuery"
 			:custom-search-fun="handleQuery">

+ 13 - 9
UI/VAG.VUE/src/views/system/user/index.vue

@@ -6,6 +6,7 @@ import AuthRole from "./_authRole.vue"
 import { download } from "@@/services/RequestService"
 import dayjs from "dayjs"
 import appStore from "@s"
+const orgId = ref<any>("")
 const orgTreeRef = ref()
 const orgOptions = ref<any>()
 function loadOrg() {
@@ -31,7 +32,6 @@ const tableOpts = reactive({
 		userName: undefined,
 		phone: undefined,
 		status: undefined,
-		orgId: undefined,
 		dateRange: []
 	},
 	searchFormItems: [
@@ -116,16 +116,20 @@ const { permission, columns, queryParams, searchFormItems, handleFuns } = toRefs
 function handleQuery(query?: any) {
 	query = query || tableRef.value?.getQueryParams() || queryParams.value
 	addDateRange(query, query.dateRange)
-	tableRef.value?.query()
+	tableRef.value?.query(query)
 }
 function resetQuery(query?: any) {
 	query = query || tableRef.value?.getQueryParams() || queryParams.value
 	query.dateRange = []
 	addDateRange(query, query.dateRange)
-	queryParams.value.orgId = undefined
+	query.orgId = undefined
 	orgTreeRef.value?.setCurrentKey("")
 }
-
+function handleChangeOrg(v: any) {
+	const query = tableRef.value?.getQueryParams()
+	query.orgId = v.id
+	queryParams.value = query
+}
 const userPosts = ref([])
 const userRoles = ref([])
 const modalRef = ref()
@@ -142,7 +146,7 @@ const modalOpts = reactive({
 		},
 		{
 			field: "orgId",
-			label: "归属组织机构",
+			label: "组织机构",
 			class: "w-100",
 			required: true,
 			data: () => orgOptions.value,
@@ -171,8 +175,8 @@ const modalOpts = reactive({
 		},
 		{
 			field: "email",
-			label: "邮箱",
-			placeholder: "请输入邮箱",
+			label: "电子邮箱",
+			placeholder: "请输入电子邮箱",
 			required: true,
 			component: "i",
 			rules: [{ type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"] }],
@@ -425,7 +429,7 @@ loadOrg()
 		<el-row :gutter="20">
 			<!--组织机构数据-->
 			<el-col :span="4" :xs="24">
-				<OrgTree v-model="queryParams.orgId" :data="orgOptions" @node-click="handleQuery"></OrgTree>
+				<OrgTree v-model="orgId" :data="orgOptions" @node-click="handleChangeOrg"></OrgTree>
 			</el-col>
 			<!--用户数据-->
 			<el-col :span="20" :xs="24">
@@ -435,7 +439,7 @@ loadOrg()
 					:handle-funs="handleFuns"
 					:search-form-items="searchFormItems"
 					:columns="columns"
-					:query-params="queryParams"
+					v-model:query-params="queryParams"
 					:remote-fun="apis.system.userApi.listUser"
 					:check-multiple="true"
 					:reset-search-form-fun="resetQuery"