Bladeren bron

😉前端页面调优

zuohuaijun 2 jaren geleden
bovenliggende
commit
ef84e84d55

+ 2 - 2
Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj

@@ -24,8 +24,8 @@
     <PackageReference Include="Furion.Pure" Version="4.8.8.24" />
     <PackageReference Include="IPTools.China" Version="1.6.0" />
     <PackageReference Include="Lazy.Captcha.Core" Version="2.0.3" />
-    <PackageReference Include="Magicodes.IE.Excel" Version="2.7.4.4" />
-    <PackageReference Include="Magicodes.IE.Pdf" Version="2.7.4.4" />
+    <PackageReference Include="Magicodes.IE.Excel" Version="2.7.4.5" />
+    <PackageReference Include="Magicodes.IE.Pdf" Version="2.7.4.5" />
     <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.16" />
     <PackageReference Include="NEST" Version="7.17.5" />
     <PackageReference Include="NewLife.Redis" Version="5.4.2023.601" />

+ 1 - 0
Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs

@@ -40,6 +40,7 @@ public class SysRoleService : IDynamicApiController, ITransient
     public async Task<SqlSugarPagedList<SysRole>> Page(PageRoleInput input)
     {
         return await _sysRoleRep.AsQueryable()
+            //.WhereIF(!_userManager.SuperAdmin, u => u.CreateUserId == _userManager.UserId)
             .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name))
             .WhereIF(!string.IsNullOrWhiteSpace(input.Code), u => u.Code.Contains(input.Code))
             .OrderBy(u => u.OrderNo)

+ 1 - 1
Web/src/views/system/config/index.vue

@@ -152,7 +152,7 @@ const updateData = () => {
 // 打开新增页面
 const openAddConfig = () => {
 	state.editConfigTitle = '添加配置';
-	editConfigRef.value?.openDialog({ sysFlag: 2 });
+	editConfigRef.value?.openDialog({ sysFlag: 2, orderNo: 100 });
 };
 
 // 打开编辑页面

+ 1 - 1
Web/src/views/system/dict/component/dictDataDialog.vue

@@ -124,7 +124,7 @@ const resetQuery = () => {
 // 打开新增页面
 const openAddDictData = () => {
 	state.editDictDataTitle = '添加字典值';
-	editDictDataRef.value.openDialog({});
+	editDictDataRef.value.openDialog({ status: 1, orderNo: 100 });
 };
 
 // 打开编辑页面

+ 1 - 1
Web/src/views/system/dict/index.vue

@@ -111,7 +111,7 @@ const resetQuery = () => {
 // 打开新增页面
 const openAddDictType = () => {
 	state.editDictTypeTitle = '添加字典';
-	editDictTypeRef.value?.openDialog({});
+	editDictTypeRef.value?.openDialog({ status: 1, orderNo: 100 });
 };
 
 // 打开编辑页面

+ 1 - 1
Web/src/views/system/job/component/editJobDetail.vue

@@ -9,7 +9,7 @@
 			</template>
 			<el-tabs v-model="state.selectedTabName">
 				<el-tab-pane label="作业信息">
-					<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="100px">
+					<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="100px" style="height: 500px">
 						<el-row :gutter="35">
 							<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
 								<el-form-item label="作业编号" prop="jobId" :rules="[{ required: true, message: '作业编号不能为空', trigger: 'blur' }]">

+ 1 - 1
Web/src/views/system/job/component/editJobTrigger.vue

@@ -24,7 +24,7 @@
 					</el-col>
 					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20" v-if="state.ruleForm.triggerType == 'Furion.Schedule.PeriodTrigger'">
 						<el-form-item label="间隔时间(ms)">
-							<el-input-number v-model="periodValue" placeholder="间隔" :min="100" :step="100" class="w100" />
+							<el-input-number v-model="periodValue" placeholder="间隔" :min="1000" :step="1000" class="w100" />
 						</el-form-item>
 					</el-col>
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-else>

+ 8 - 1
Web/src/views/system/job/index.vue

@@ -295,7 +295,14 @@ const delJobDetail = (row: JobOutput) => {
 // 打开新增触发器页面
 const openAddJobTrigger = (row: JobOutput) => {
 	state.editJobTriggerTitle = '添加触发器';
-	editJobTriggerRef.value?.openDialog({ jobId: row.jobDetail?.jobId, retryTimeout: 1000, startNow: true, runOnStart: true, resetOnlyOnce: true, triggerType: 'Furion.Schedule.PeriodTrigger' });
+	editJobTriggerRef.value?.openDialog({
+		jobId: row.jobDetail?.jobId,
+		retryTimeout: 1000,
+		startNow: true,
+		runOnStart: true,
+		resetOnlyOnce: true,
+		triggerType: 'Furion.Schedule.PeriodTrigger',
+	});
 };
 
 // 打开编辑触发器页面

+ 1 - 1
Web/src/views/system/notice/index.vue

@@ -121,7 +121,7 @@ const resetQuery = () => {
 // 打开新增页面
 const openAddNotice = () => {
 	state.editNoticeTitle = '添加通知公告';
-	editNoticeRef.value?.openDialog({});
+	editNoticeRef.value?.openDialog({ type: 1 });
 };
 
 // 打开编辑页面

+ 1 - 1
Web/src/views/system/org/index.vue

@@ -116,7 +116,7 @@ const resetQuery = () => {
 // 打开新增页面
 const openAddOrg = () => {
 	state.editOrgTitle = '添加机构';
-	editOrgRef.value?.openDialog({ status: 1 });
+	editOrgRef.value?.openDialog({ status: 1, orderNo: 100 });
 };
 
 // 打开编辑页面

+ 1 - 1
Web/src/views/system/plugin/component/editPlugin.vue

@@ -9,7 +9,7 @@
 			</template>
 			<el-tabs v-model="state.selectedTabName">
 				<el-tab-pane label="插件信息">
-					<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="75px" style="height: 500px">
+					<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="85px" style="height: 500px">
 						<el-row :gutter="35">
 							<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
 								<el-form-item label="功能名称" prop="name" :rules="[{ required: true, message: '功能名称不能为空', trigger: 'blur' }]">

+ 1 - 1
Web/src/views/system/pos/index.vue

@@ -89,7 +89,7 @@ const resetQuery = () => {
 // 打开新增页面
 const openAddPos = () => {
 	state.editPosTitle = '添加职位';
-	editPosRef.value?.openDialog({ status: 1 });
+	editPosRef.value?.openDialog({ status: 1, orderNo: 100 });
 };
 
 // 打开编辑页面

+ 1 - 1
Web/src/views/system/region/component/editRegion.vue

@@ -41,7 +41,7 @@
 							<el-input v-model="state.ruleForm.cityCode" placeholder="区号" clearable />
 						</el-form-item>
 					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
 						<el-form-item label="排序">
 							<el-input-number v-model="state.ruleForm.orderNo" placeholder="排序" class="w100" />
 						</el-form-item>

+ 1 - 1
Web/src/views/system/region/index.vue

@@ -115,7 +115,7 @@ const resetQuery = () => {
 // 打开新增页面
 const openAddRegion = () => {
 	state.editRegionTitle = '添加行政区域';
-	editRegionRef.value?.openDialog({});
+	editRegionRef.value?.openDialog({ orderNo: 100 });
 };
 
 // 打开编辑页面

+ 1 - 1
Web/src/views/system/role/component/editRole.vue

@@ -95,7 +95,7 @@ onMounted(async () => {
 const openDialog = async (row: any) => {
 	treeRef.value?.setCheckedKeys([]); // 清空选中值
 	state.ruleForm = JSON.parse(JSON.stringify(row));
-	if (JSON.stringify(row) !== '{}') {
+	if (row.id != undefined) {
 		var res = await getAPI(SysRoleApi).apiSysRoleOwnMenuListGet(row.id);
 		setTimeout(() => {
 			treeRef.value?.setCheckedKeys(res.data.result ?? []);

+ 1 - 1
Web/src/views/system/role/index.vue

@@ -128,7 +128,7 @@ const resetQuery = () => {
 // 打开新增页面
 const openAddRole = () => {
 	state.editRoleTitle = '添加角色';
-	editRoleRef.value?.openDialog({});
+	editRoleRef.value?.openDialog({ id: undefined, status: 1, orderNo: 100 });
 };
 
 // 打开编辑页面

+ 1 - 1
Web/src/views/system/tenant/index.vue

@@ -150,7 +150,7 @@ const resetQuery = () => {
 // 打开新增页面
 const openAddTenant = () => {
 	state.editTenantTitle = '添加租户';
-	editTenantRef.value?.openDialog({ tenantType: 0 });
+	editTenantRef.value?.openDialog({ tenantType: 0, orderNo: 100 });
 };
 
 // 打开编辑页面

+ 1 - 1
Web/src/views/system/user/component/editUser.vue

@@ -270,7 +270,7 @@ onMounted(async () => {
 const openDialog = async (row: any) => {
 	state.selectedTabName = '0'; // 重置为第一个 tab 页
 	state.ruleForm = JSON.parse(JSON.stringify(row));
-	if (JSON.stringify(row) !== '{}') {
+	if (row.id != undefined) {
 		var resRole = await getAPI(SysUserApi).apiSysUserOwnRoleListUserIdGet(row.id);
 		state.ruleForm.roleIdList = resRole.data.result;
 		var resExtOrg = await getAPI(SysUserApi).apiSysUserOwnExtOrgListUserIdGet(row.id);

+ 1 - 1
Web/src/views/system/user/index.vue

@@ -161,7 +161,7 @@ const resetQuery = () => {
 // 打开新增页面
 const openAddUser = () => {
 	state.editUserTitle = '添加账号';
-	editUserRef.value?.openDialog({});
+	editUserRef.value?.openDialog({ id: undefined, birthday: '2000-01-01', sex: 1, orderNo: 100, cardType: 0, cultureLevel: 5 });
 };
 
 // 打开编辑页面