Bladeren bron

测试bug处理

@dongkboy 1 jaar geleden
bovenliggende
commit
e409e6e0d0

+ 6 - 4
src/api/modules/tenant.ts

@@ -1,8 +1,8 @@
 import { ApiInstance } from '../type'
 
 interface sysList {
-  pageNum: number;
-  pageSize: number;
+  pageNum?: number;
+  pageSize?: number;
   [key: string]: any
 }
 interface sysUpAndDown {
@@ -10,8 +10,10 @@ interface sysUpAndDown {
   opType: number,
 }
 const tenantApi = (axiosInstance: ApiInstance) => ({
-  // 租户列表
-  sysList: (data: sysList) => axiosInstance.post('system/sysList', data,),
+  // 租户分页列表
+  sysList: (data: sysList) => axiosInstance.post('system/sysList', data),
+    // 租户全部列表
+    sysListAll: (data: sysList) => axiosInstance.post('system/sysListAll', data),
   // 添加
   sysAdd: (data: any) => axiosInstance.post('system/sysAdd', data,),
   // 租户修改

+ 4 - 3
src/components/TableTree/index.vue

@@ -4,10 +4,10 @@
       <div class="table-title-btn">
         <slot name="table-title-btn"></slot>
       </div>
-      <el-table ref="TableTreeRef" class="custom-table"
+      <el-table ref="TableTreeRef" class="custom-table" v-loading="props.loading"
         :header-cell-style="{ 'background-color': '#EEF1F6', 'border-bottom': '1px solid #EEF1F6', 'font-size': '15px', 'color': '#333', 'padding': '10px 0' }"
-        :data="props.tableData" :height="tableHeight" table-layout="fixed" row-key="id" default-expand-all
-        row-class-name="cellClass" style="width: 100%;">
+        :data="props.tableData" :height="tableHeight" row-key="id" border
+         style="width: 100%;">
         <!-- 空内容自定义 -->
         <template #empty>
           <div class="flex f-c a-c ">
@@ -64,6 +64,7 @@ const emit = defineEmits([]);
 const props = defineProps<{
   tableData: Array<TableRow>;
   columnheight: number,
+  loading?:boolean,
   columns: {
     prop: string;
     label: string;

+ 1 - 0
src/types/components.d.ts

@@ -40,6 +40,7 @@ declare module 'vue' {
     SystemInfo: typeof import('./../components/SystemInfo/index.vue')['default']
     Table: typeof import('./../components/Table/index.vue')['default']
     TableTree: typeof import('./../components/TableTree/index.vue')['default']
+    Tablev2: typeof import('./../components/tablev2/index.vue')['default']
     Trend: typeof import('./../components/Trend/index.vue')['default']
   }
 }

+ 1 - 1
src/utils/composables/routeUtils.ts

@@ -111,7 +111,7 @@ const parseAuthToChildren = (authList: string[]): TreeNode[] => {
 
     return {
       id: generateId(),
-      title: `${title} (${auth})`, // 显示英文名称和原始权限
+      title: `${title}`, // 显示英文名称和原始权限
       auth: auth, // 保留原始权限路径
       type: '2',
     };

+ 1 - 2
src/views/organizationManagement/organization/organizationAdd.vue

@@ -30,7 +30,7 @@
               <el-input style="display: none;" type="password" />
               <el-input v-model="sysform.userAccount" placeholder="请输入登录账号" maxlength="11" show-word-limit type="text" name="formerEmployer"
                 autocomplete="new-password" @blur="userAccountblur" />
-              <span style="font-size: 0.7rem;color: #999;">管理员手机号手机号将作为登录账号使用</span>
+              <span style="font-size: 0.7rem;color: #999;">管理员手机号将作为登录账号使用</span>
             </el-form-item>
           </ElCol>
           <ElCol :md="24" :lg="12" v-if="!id">
@@ -355,7 +355,6 @@ const sysIconupload = (file: any) => {
       uploadDisabled.value = true;
     }
   })
-
 }
 const submitForm = async (formEl: FormInstance | undefined) => {
   if (!formEl) return

+ 0 - 1
src/views/organizationManagement/organization/subOrganizatioAdd.vue

@@ -236,7 +236,6 @@ const dictType = (type: string) => {
 }
 //省市区回调
 const provinceChange = (value: any) => {
-  console.log(value)
   if (value && value[0] != null && value[1] != null && value[2] != null) {
     deptform.value.province = value[0];
     deptform.value.city = value[1];

+ 2 - 2
src/views/organizationManagement/tenantPermissions.vue

@@ -166,9 +166,9 @@ async function roleitemClick(item: { sysCode: string }) {
   });
 }
 const findpage = () => {
-  api.tenantApi.sysList({ pageNum: PageNum.value, pageSize: PageSize.value, searchValue: searchValue.value }).then((res: any) => {
+  api.tenantApi.sysListAll({  searchValue: searchValue.value }).then((res: any) => {
     if (res.code == 200) {
-      tenantList.value = res.data.records;
+      tenantList.value = res.data;
     }
   })
 }

+ 8 - 2
src/views/personnel/memberManagement.vue

@@ -79,7 +79,7 @@
       </Table>
     </PageMain>
 
-    <el-dialog v-model="UpdatedialogVisible" :title="dialogTitle" width="40%">
+    <el-dialog v-model="UpdatedialogVisible" :title="dialogTitle" width="40%" @close="close">
       <ElRow :gutter="20">
         <el-form :model="memberform" :inline="true" label-width="120px" :rules="memberformRules" label-position="top"
           ref="memberFormRef" style="width: 100%;" :size="fromSize">
@@ -216,7 +216,7 @@ const memberAdd = () => {
         UpdatedialogVisible.value = false;
       } else {
         ElMessage({
-          type: 'success',
+          type: 'error',
           message: res.msg,
           plain: true,
         })
@@ -482,6 +482,12 @@ const userAdd = () => {
   memberform.id = "";
   UpdatedialogVisible.value = true;
 }
+const close = () => {
+  memberform.username = '';
+  memberform.mobile = '';
+  memberform.roleIdList = [];
+  memberform.id = '';
+}
 </script>
 
 <style lang="scss" scoped>

+ 10 - 8
src/views/personnel/roleManagement.vue

@@ -9,7 +9,7 @@
                 <template #prefix>
                   <SvgIcon name="i-ri:user-3-fill" />
                 </template>
-                <template #append >
+                <template #append>
                   <el-button :icon="Search" class="ElInputSearch" @click="rolequery" v-auth="'role.view'" />
                 </template>
               </ElInput>
@@ -64,7 +64,7 @@
                 @check="handleCheckChange" />
             </div>
           </div>
-          <el-empty v-else  image="../../../src/assets/images/empty.png" />
+          <el-empty v-else image="../../../src/assets/images/empty.png" />
         </ElCol>
       </ElRow>
 
@@ -194,7 +194,7 @@ function roleDelClick() {
           cancelButtonText: '取消',
           type: 'error',
           draggable: true,
-          center:true,
+          center: true,
         }
       )
         .then(async () => {
@@ -218,7 +218,10 @@ function roleDelClick() {
 
 }
 async function roleitemClick(item: { id: string }) {
-    await api.roleApi.roleGet({ roleId: item.id }).then((res: any) => {
+  if (treeRef.value) {
+    treeRef.value.setCheckedKeys([]);
+  }
+  await api.roleApi.roleGet({ roleId: item.id }).then((res: any) => {
     if (res.code === 200) {
       checkedKeys.value = res.data.perms.map((val: Perm) => val.id);
       roleInfo.permsId = res.data.perms.map((val: Perm) => val.id);
@@ -229,10 +232,9 @@ async function roleitemClick(item: { id: string }) {
       roleId.value = res.data.id;
     }
   })
-
 }
 async function rolequery() {
-  await api.roleApi.roleList({  name: roleName.value }).then((res: any) => {
+  await api.roleApi.roleList({ name: roleName.value }).then((res: any) => {
     roleList.value = res.data;
   })
 }
@@ -244,9 +246,9 @@ function resetForm() {
   roleInfo.permsId = [];
   roleInfo.perms = [];
   roleInfo.id = '';
-  roleId.value='';
+  roleId.value = '';
   if (treeRef.value) {
-    treeRef.value.setCheckedKeys([]);
+    treeRef.value.setCheckedKeys([]);//清空菜单勾选回显
   }
 }