mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 00:57:13 +08:00 
			
		
		
		
	优化:优化全局样式
This commit is contained in:
		| @@ -62,6 +62,16 @@ body { | |||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .app-container { | ||||||
|  |   padding: 0 20px 20px 20px; | ||||||
|  |   .header { | ||||||
|  |     margin-bottom: 16px; | ||||||
|  |     &-query { | ||||||
|  |       margin-bottom: 8px; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
| .general-card { | .general-card { | ||||||
|   border-radius: 4px; |   border-radius: 4px; | ||||||
|   border: none; |   border: none; | ||||||
| @@ -79,6 +89,14 @@ body { | |||||||
|   border-color: rgb(var(--gray-2)); |   border-color: rgb(var(--gray-2)); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | :deep(.arco-table-th) { | ||||||
|  |   &:last-child { | ||||||
|  |     .arco-table-th-item-title { | ||||||
|  |       margin-left: 16px; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
| .arco-table-cell { | .arco-table-cell { | ||||||
|   .circle { |   .circle { | ||||||
|     display: inline-block; |     display: inline-block; | ||||||
|   | |||||||
| @@ -7,8 +7,8 @@ const Monitor: AppRouteRecordRaw = { | |||||||
|   component: DEFAULT_LAYOUT, |   component: DEFAULT_LAYOUT, | ||||||
|   meta: { |   meta: { | ||||||
|     locale: 'menu.monitor', |     locale: 'menu.monitor', | ||||||
|     requiresAuth: true, |  | ||||||
|     icon: 'icon-computer', |     icon: 'icon-computer', | ||||||
|  |     requiresAuth: true, | ||||||
|     order: 3, |     order: 3, | ||||||
|   }, |   }, | ||||||
|   children: [ |   children: [ | ||||||
|   | |||||||
| @@ -7,8 +7,8 @@ const System: AppRouteRecordRaw = { | |||||||
|   component: DEFAULT_LAYOUT, |   component: DEFAULT_LAYOUT, | ||||||
|   meta: { |   meta: { | ||||||
|     locale: 'menu.system', |     locale: 'menu.system', | ||||||
|     requiresAuth: true, |  | ||||||
|     icon: 'icon-settings', |     icon: 'icon-settings', | ||||||
|  |     requiresAuth: true, | ||||||
|     order: 2, |     order: 2, | ||||||
|   }, |   }, | ||||||
|   children: [ |   children: [ | ||||||
|   | |||||||
| @@ -83,8 +83,8 @@ | |||||||
|     rememberMe: true, |     rememberMe: true, | ||||||
|     username: 'admin', // 演示默认值 |     username: 'admin', // 演示默认值 | ||||||
|     password: 'admin123', // 演示默认值 |     password: 'admin123', // 演示默认值 | ||||||
|     // username: !debug ? '' : 'admin', // 演示默认值 |     // username: debug ? 'admin' : '', // 演示默认值 | ||||||
|     // password: !debug ? '' : 'admin123', // 演示默认值 |     // password: debug ? 'admin123' : '', // 演示默认值 | ||||||
|   }); |   }); | ||||||
|  |  | ||||||
|   const data = reactive({ |   const data = reactive({ | ||||||
| @@ -168,36 +168,30 @@ | |||||||
| <style lang="less" scoped> | <style lang="less" scoped> | ||||||
|   .login-form { |   .login-form { | ||||||
|     margin-top: 32px; |     margin-top: 32px; | ||||||
|  |  | ||||||
|     &-wrapper { |     &-wrapper { | ||||||
|       width: 320px; |       width: 320px; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     &-title { |     &-title { | ||||||
|       color: var(--color-text-1); |       color: var(--color-text-1); | ||||||
|       font-weight: 500; |       font-weight: 500; | ||||||
|       font-size: 24px; |       font-size: 24px; | ||||||
|       line-height: 32px; |       line-height: 32px; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     &-sub-title { |     &-sub-title { | ||||||
|       color: var(--color-text-3); |       color: var(--color-text-3); | ||||||
|       font-size: 16px; |       font-size: 16px; | ||||||
|       line-height: 24px; |       line-height: 24px; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     &-captcha img { |     &-captcha img { | ||||||
|       width: 111px; |       width: 111px; | ||||||
|       height: 36px; |       height: 36px; | ||||||
|       margin: 0 0 0 10px; |       margin: 0 0 0 10px; | ||||||
|       cursor: pointer; |       cursor: pointer; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     &-remember-me { |     &-remember-me { | ||||||
|       display: flex; |       display: flex; | ||||||
|       justify-content: space-between; |       justify-content: space-between; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     &-register-btn { |     &-register-btn { | ||||||
|       color: var(--color-text-3) !important; |       color: var(--color-text-3) !important; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -26,12 +26,10 @@ | |||||||
|   .container { |   .container { | ||||||
|     display: flex; |     display: flex; | ||||||
|     height: 100vh; |     height: 100vh; | ||||||
|  |  | ||||||
|     .banner { |     .banner { | ||||||
|       width: 550px; |       width: 550px; | ||||||
|       background: linear-gradient(163.85deg, #1d2129 0%, #00308f 100%); |       background: linear-gradient(163.85deg, #1d2129 0%, #00308f 100%); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     .content { |     .content { | ||||||
|       position: relative; |       position: relative; | ||||||
|       display: flex; |       display: flex; | ||||||
| @@ -40,7 +38,6 @@ | |||||||
|       justify-content: center; |       justify-content: center; | ||||||
|       padding-bottom: 40px; |       padding-bottom: 40px; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     .footer { |     .footer { | ||||||
|       position: absolute; |       position: absolute; | ||||||
|       right: 0; |       right: 0; | ||||||
|   | |||||||
| @@ -1,11 +1,11 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="container"> |   <div class="app-container"> | ||||||
|     <Breadcrumb :items="['menu.monitor', 'menu.log.login.list']" /> |     <Breadcrumb :items="['menu.monitor', 'menu.log.login.list']" /> | ||||||
|     <a-card class="general-card" :title="$t('menu.log.login.list')"> |     <a-card class="general-card" :title="$t('menu.log.login.list')"> | ||||||
|       <!-- 头部区域 --> |       <!-- 头部区域 --> | ||||||
|       <div class="head-container"> |       <div class="header"> | ||||||
|         <!-- 搜索栏 --> |         <!-- 搜索栏 --> | ||||||
|         <div class="query-container"> |         <div class="header-query"> | ||||||
|           <a-form ref="queryRef" :model="queryParams" layout="inline"> |           <a-form ref="queryRef" :model="queryParams" layout="inline"> | ||||||
|             <a-form-item field="status" hide-label> |             <a-form-item field="status" hide-label> | ||||||
|               <a-select |               <a-select | ||||||
| @@ -120,6 +120,7 @@ | |||||||
|     listLoginLog(params).then((res) => { |     listLoginLog(params).then((res) => { | ||||||
|       loginLogList.value = res.data.list; |       loginLogList.value = res.data.list; | ||||||
|       total.value = res.data.total; |       total.value = res.data.total; | ||||||
|  |     }).finally(() => { | ||||||
|       loading.value = false; |       loading.value = false; | ||||||
|     }); |     }); | ||||||
|   }; |   }; | ||||||
| @@ -167,18 +168,4 @@ | |||||||
|   }; |   }; | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
| <style scoped lang="less"> | <style scoped lang="less"></style> | ||||||
|   .container { |  | ||||||
|     padding: 0 20px 20px 20px; |  | ||||||
|     .head-container { |  | ||||||
|       margin-bottom: 16px |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|   :deep(.arco-table-th) { |  | ||||||
|     &:last-child { |  | ||||||
|       .arco-table-th-item-title { |  | ||||||
|         margin-left: 16px; |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| </style> |  | ||||||
|   | |||||||
| @@ -1,11 +1,11 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="container"> |   <div class="app-container"> | ||||||
|     <Breadcrumb :items="['menu.monitor', 'menu.log.operation.list']" /> |     <Breadcrumb :items="['menu.monitor', 'menu.log.operation.list']" /> | ||||||
|     <a-card class="general-card" :title="$t('menu.log.operation.list')"> |     <a-card class="general-card" :title="$t('menu.log.operation.list')"> | ||||||
|       <!-- 头部区域 --> |       <!-- 头部区域 --> | ||||||
|       <div class="head-container"> |       <div class="header"> | ||||||
|         <!-- 搜索栏 --> |         <!-- 搜索栏 --> | ||||||
|         <div class="query-container"> |         <div class="header-query"> | ||||||
|           <a-form ref="queryRef" :model="queryParams" layout="inline"> |           <a-form ref="queryRef" :model="queryParams" layout="inline"> | ||||||
|             <a-form-item field="description" hide-label> |             <a-form-item field="description" hide-label> | ||||||
|               <a-input |               <a-input | ||||||
| @@ -131,6 +131,7 @@ | |||||||
|     listOperationLog(params).then((res) => { |     listOperationLog(params).then((res) => { | ||||||
|       operationLogList.value = res.data.list; |       operationLogList.value = res.data.list; | ||||||
|       total.value = res.data.total; |       total.value = res.data.total; | ||||||
|  |     }).finally(() => { | ||||||
|       loading.value = false; |       loading.value = false; | ||||||
|     }); |     }); | ||||||
|   }; |   }; | ||||||
| @@ -178,18 +179,4 @@ | |||||||
|   }; |   }; | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
| <style scoped lang="less"> | <style scoped lang="less"></style> | ||||||
|   .container { |  | ||||||
|     padding: 0 20px 20px 20px; |  | ||||||
|     .head-container { |  | ||||||
|       margin-bottom: 16px |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|   :deep(.arco-table-th) { |  | ||||||
|     &:last-child { |  | ||||||
|       .arco-table-th-item-title { |  | ||||||
|         margin-left: 16px; |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| </style> |  | ||||||
|   | |||||||
| @@ -1,11 +1,11 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="container"> |   <div class="app-container"> | ||||||
|     <Breadcrumb :items="['menu.monitor', 'menu.log.system.list']" /> |     <Breadcrumb :items="['menu.monitor', 'menu.log.system.list']" /> | ||||||
|     <a-card class="general-card" :title="$t('menu.log.system.list')"> |     <a-card class="general-card" :title="$t('menu.log.system.list')"> | ||||||
|       <!-- 头部区域 --> |       <!-- 头部区域 --> | ||||||
|       <div class="head-container"> |       <div class="header"> | ||||||
|         <!-- 搜索栏 --> |         <!-- 搜索栏 --> | ||||||
|         <div class="query-container"> |         <div class="header-query"> | ||||||
|           <a-form ref="queryRef" :model="queryParams" layout="inline"> |           <a-form ref="queryRef" :model="queryParams" layout="inline"> | ||||||
|             <a-form-item field="createTime" hide-label> |             <a-form-item field="createTime" hide-label> | ||||||
|               <date-range-picker v-model="queryParams.createTime" /> |               <date-range-picker v-model="queryParams.createTime" /> | ||||||
| @@ -288,6 +288,7 @@ | |||||||
|     listSystemLog(params).then((res) => { |     listSystemLog(params).then((res) => { | ||||||
|       systemLogList.value = res.data.list; |       systemLogList.value = res.data.list; | ||||||
|       total.value = res.data.total; |       total.value = res.data.total; | ||||||
|  |     }).finally(() => { | ||||||
|       loading.value = false; |       loading.value = false; | ||||||
|     }); |     }); | ||||||
|   }; |   }; | ||||||
| @@ -303,6 +304,7 @@ | |||||||
|     loading.value = true; |     loading.value = true; | ||||||
|     getSystemLog(id).then((res) => { |     getSystemLog(id).then((res) => { | ||||||
|       systemLog.value = res.data; |       systemLog.value = res.data; | ||||||
|  |     }).finally(() => { | ||||||
|       loading.value = false; |       loading.value = false; | ||||||
|     }); |     }); | ||||||
|   }; |   }; | ||||||
| @@ -374,18 +376,4 @@ | |||||||
|   }; |   }; | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
| <style scoped lang="less"> | <style scoped lang="less"></style> | ||||||
|   .container { |  | ||||||
|     padding: 0 20px 20px 20px; |  | ||||||
|     .head-container { |  | ||||||
|       margin-bottom: 16px |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|   :deep(.arco-table-th) { |  | ||||||
|     &:last-child { |  | ||||||
|       .arco-table-th-item-title { |  | ||||||
|         margin-left: 16px; |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| </style> |  | ||||||
|   | |||||||
| @@ -1,11 +1,11 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="container"> |   <div class="app-container"> | ||||||
|     <Breadcrumb :items="['menu.monitor', 'menu.online.user.list']" /> |     <Breadcrumb :items="['menu.monitor', 'menu.online.user.list']" /> | ||||||
|     <a-card class="general-card" :title="$t('menu.online.user.list')"> |     <a-card class="general-card" :title="$t('menu.online.user.list')"> | ||||||
|       <!-- 头部区域 --> |       <!-- 头部区域 --> | ||||||
|       <div class="head-container"> |       <div class="header"> | ||||||
|         <!-- 搜索栏 --> |         <!-- 搜索栏 --> | ||||||
|         <div class="query-container"> |         <div class="header-query"> | ||||||
|           <a-form ref="queryRef" :model="queryParams" layout="inline"> |           <a-form ref="queryRef" :model="queryParams" layout="inline"> | ||||||
|             <a-form-item field="nickname" hide-label> |             <a-form-item field="nickname" hide-label> | ||||||
|               <a-input |               <a-input | ||||||
| @@ -126,6 +126,7 @@ | |||||||
|     listOnlineUser(params).then((res) => { |     listOnlineUser(params).then((res) => { | ||||||
|       onlineUserList.value = res.data.list; |       onlineUserList.value = res.data.list; | ||||||
|       total.value = res.data.total; |       total.value = res.data.total; | ||||||
|  |     }).finally(() => { | ||||||
|       loading.value = false; |       loading.value = false; | ||||||
|     }); |     }); | ||||||
|   }; |   }; | ||||||
| @@ -185,18 +186,4 @@ | |||||||
|   }; |   }; | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
| <style scoped lang="less"> | <style scoped lang="less"></style> | ||||||
|   .container { |  | ||||||
|     padding: 0 20px 20px 20px; |  | ||||||
|     .head-container { |  | ||||||
|       margin-bottom: 16px |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|   :deep(.arco-table-th) { |  | ||||||
|     &:last-child { |  | ||||||
|       .arco-table-th-item-title { |  | ||||||
|         margin-left: 16px; |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| </style> |  | ||||||
|   | |||||||
| @@ -1,11 +1,11 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="container"> |   <div class="app-container"> | ||||||
|     <Breadcrumb :items="['menu.system', 'menu.system.dept.list']" /> |     <Breadcrumb :items="['menu.system', 'menu.system.dept.list']" /> | ||||||
|     <a-card class="general-card" :title="$t('menu.system.dept.list')"> |     <a-card class="general-card" :title="$t('menu.system.dept.list')"> | ||||||
|       <a-row :gutter="20"> |       <!-- 头部区域 --> | ||||||
|         <a-col> |       <div class="header"> | ||||||
|         <!-- 搜索栏 --> |         <!-- 搜索栏 --> | ||||||
|           <div class="query-container"> |         <div class="header-query"> | ||||||
|           <a-form ref="queryRef" :model="queryParams" layout="inline"> |           <a-form ref="queryRef" :model="queryParams" layout="inline"> | ||||||
|             <a-form-item field="deptName" hide-label> |             <a-form-item field="deptName" hide-label> | ||||||
|               <a-input |               <a-input | ||||||
| @@ -37,15 +37,15 @@ | |||||||
|             </a-form-item> |             </a-form-item> | ||||||
|           </a-form> |           </a-form> | ||||||
|         </div> |         </div> | ||||||
|  |  | ||||||
|         <!-- 操作栏 --> |         <!-- 操作栏 --> | ||||||
|           <a-row style="margin-bottom: 16px"> |         <div class="header-operation"> | ||||||
|  |           <a-row> | ||||||
|             <a-col :span="12"> |             <a-col :span="12"> | ||||||
|               <a-space> |               <a-space> | ||||||
|                 <a-button type="primary" @click="toCreate"> |                 <a-button type="primary" @click="toCreate"> | ||||||
|                   <template #icon><icon-plus /></template>新增 |                   <template #icon><icon-plus /></template>新增 | ||||||
|                 </a-button> |                 </a-button> | ||||||
|                 <a-button type="primary" status="danger" :disabled="multiple" @click="handleBatchDelete"> |                 <a-button type="primary" status="danger" :disabled="multiple" :title="multiple ? '请选择要删除的数据' : ''" @click="handleBatchDelete"> | ||||||
|                   <template #icon><icon-delete /></template>删除 |                   <template #icon><icon-delete /></template>删除 | ||||||
|                 </a-button> |                 </a-button> | ||||||
|               </a-space> |               </a-space> | ||||||
| @@ -56,6 +56,8 @@ | |||||||
|               </a-button> |               </a-button> | ||||||
|             </a-col> |             </a-col> | ||||||
|           </a-row> |           </a-row> | ||||||
|  |         </div> | ||||||
|  |       </div> | ||||||
|  |  | ||||||
|       <!-- 列表区域 --> |       <!-- 列表区域 --> | ||||||
|       <a-table |       <a-table | ||||||
| @@ -79,7 +81,7 @@ | |||||||
|         <template #columns> |         <template #columns> | ||||||
|           <a-table-column title="部门名称" data-index="deptName"> |           <a-table-column title="部门名称" data-index="deptName"> | ||||||
|             <template #cell="{ record }"> |             <template #cell="{ record }"> | ||||||
|                   <a-button type="text" size="small" @click="toDetail(record.deptId)">{{ record.deptName }}</a-button> |               <a-link @click="toDetail(record.deptId)">{{ record.deptName }}</a-link> | ||||||
|             </template> |             </template> | ||||||
|           </a-table-column> |           </a-table-column> | ||||||
|           <a-table-column title="部门排序" align="center" data-index="deptSort" /> |           <a-table-column title="部门排序" align="center" data-index="deptSort" /> | ||||||
| @@ -98,11 +100,11 @@ | |||||||
|           <a-table-column title="创建时间" data-index="createTime" /> |           <a-table-column title="创建时间" data-index="createTime" /> | ||||||
|           <a-table-column title="操作" align="center"> |           <a-table-column title="操作" align="center"> | ||||||
|             <template #cell="{ record }"> |             <template #cell="{ record }"> | ||||||
|                   <a-button v-permission="['admin']" type="text" size="small" @click="toUpdate(record.deptId)"> |               <a-button v-permission="['admin']" type="text" size="small" title="修改" @click="toUpdate(record.deptId)"> | ||||||
|                 <template #icon><icon-edit /></template>修改 |                 <template #icon><icon-edit /></template>修改 | ||||||
|               </a-button> |               </a-button> | ||||||
|               <a-popconfirm content="确定要删除当前选中的数据吗?如果存在下级部门则一并删除,此操作不能撤销!" type="warning" @ok="handleDelete([record.deptId])"> |               <a-popconfirm content="确定要删除当前选中的数据吗?如果存在下级部门则一并删除,此操作不能撤销!" type="warning" @ok="handleDelete([record.deptId])"> | ||||||
|                     <a-button v-permission="['admin']" type="text" size="small"> |                 <a-button v-permission="['admin']" type="text" size="small" title="删除"> | ||||||
|                   <template #icon><icon-delete /></template>删除 |                   <template #icon><icon-delete /></template>删除 | ||||||
|                 </a-button> |                 </a-button> | ||||||
|               </a-popconfirm> |               </a-popconfirm> | ||||||
| @@ -111,7 +113,7 @@ | |||||||
|         </template> |         </template> | ||||||
|       </a-table> |       </a-table> | ||||||
|  |  | ||||||
|           <!-- 对话框区域 --> |       <!-- 表单区域 --> | ||||||
|       <a-modal |       <a-modal | ||||||
|         :title="title" |         :title="title" | ||||||
|         :visible="visible" |         :visible="visible" | ||||||
| @@ -141,8 +143,8 @@ | |||||||
|           <a-form-item label="部门排序" field="deptSort"> |           <a-form-item label="部门排序" field="deptSort"> | ||||||
|             <a-input-number |             <a-input-number | ||||||
|               v-model="form.deptSort" |               v-model="form.deptSort" | ||||||
|                   :min="1" |  | ||||||
|               placeholder="请输入部门排序" |               placeholder="请输入部门排序" | ||||||
|  |               :min="1" | ||||||
|               mode="button" |               mode="button" | ||||||
|               size="large" |               size="large" | ||||||
|             /> |             /> | ||||||
| @@ -162,7 +164,7 @@ | |||||||
|         </a-form> |         </a-form> | ||||||
|       </a-modal> |       </a-modal> | ||||||
|  |  | ||||||
|           <!-- 抽屉区域 --> |       <!-- 详情区域 --> | ||||||
|       <a-drawer |       <a-drawer | ||||||
|         title="部门详情" |         title="部门详情" | ||||||
|         :visible="detailVisible" |         :visible="detailVisible" | ||||||
| @@ -225,14 +227,12 @@ | |||||||
|           </a-descriptions-item> |           </a-descriptions-item> | ||||||
|         </a-descriptions> |         </a-descriptions> | ||||||
|       </a-drawer> |       </a-drawer> | ||||||
|         </a-col> |  | ||||||
|       </a-row> |  | ||||||
|     </a-card> |     </a-card> | ||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script lang="ts" setup> | <script lang="ts" setup> | ||||||
|   import { getCurrentInstance, ref, toRefs, reactive, computed, nextTick, watch } from 'vue'; |   import { getCurrentInstance, ref, toRefs, reactive } from 'vue'; | ||||||
|   import { SelectOptionData, TreeNodeData } from '@arco-design/web-vue'; |   import { SelectOptionData, TreeNodeData } from '@arco-design/web-vue'; | ||||||
|   import { |   import { | ||||||
|     DeptRecord, |     DeptRecord, | ||||||
| @@ -296,51 +296,36 @@ | |||||||
|     loading.value = true; |     loading.value = true; | ||||||
|     listDept(params).then((res) => { |     listDept(params).then((res) => { | ||||||
|       deptList.value = res.data; |       deptList.value = res.data; | ||||||
|       loading.value = false; |  | ||||||
|       setTimeout(() => { |       setTimeout(() => { | ||||||
|         proxy.$refs.tableRef.expandAll(); |         proxy.$refs.tableRef.expandAll(); | ||||||
|       }, 0); |       }, 0); | ||||||
|  |     }).finally(() => { | ||||||
|  |       loading.value = false; | ||||||
|     }); |     }); | ||||||
|   }; |   }; | ||||||
|   getList(); |   getList(); | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 多选 |    * 确定 | ||||||
|    * |  | ||||||
|    * @param rowKeys ID 列表 |  | ||||||
|    */ |    */ | ||||||
|   const handleSelectionChange = (rowKeys: Array<any>) => { |   const handleOk = () => { | ||||||
|     ids.value = rowKeys; |     proxy.$refs.formRef.validate((valid: any) => { | ||||||
|     multiple.value = !rowKeys.length; |       if (!valid) { | ||||||
|   }; |         if (form.value.deptId !== undefined) { | ||||||
|  |           updateDept(form.value).then((res) => { | ||||||
|   /** |             handleCancel(); | ||||||
|    * 修改状态 |  | ||||||
|    * |  | ||||||
|    * @param record 记录信息 |  | ||||||
|    */ |  | ||||||
|   const handleChangeStatus = (record: DeptRecord) => { |  | ||||||
|     const tip = record.status === 1 ? '启用' : '禁用'; |  | ||||||
|     updateDept(record).then((res) => { |  | ||||||
|       proxy.$message.success(`${tip}成功`); |  | ||||||
|     }).catch(() => { |  | ||||||
|       record.status = (record.status === 1) ? 2 : 1; |  | ||||||
|     }); |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   /** |  | ||||||
|    * 查询 |  | ||||||
|    */ |  | ||||||
|   const handleQuery = () => { |  | ||||||
|             getList(); |             getList(); | ||||||
|   }; |             proxy.$message.success(res.msg); | ||||||
|  |           }); | ||||||
|   /** |         } else { | ||||||
|    * 重置 |           createDept(form.value).then((res) => { | ||||||
|    */ |             handleCancel(); | ||||||
|   const resetQuery = () => { |             getList(); | ||||||
|     proxy.$refs.queryRef.resetFields(); |             proxy.$message.success(res.msg); | ||||||
|     handleQuery(); |           }); | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
| @@ -372,20 +357,6 @@ | |||||||
|     }); |     }); | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   /** |  | ||||||
|    * 查看详情 |  | ||||||
|    * |  | ||||||
|    * @param id ID |  | ||||||
|    */ |  | ||||||
|   const toDetail = async (id: number) => { |  | ||||||
|     detailLoading.value = true; |  | ||||||
|     detailVisible.value = true; |  | ||||||
|     getDept(id).then((res) => { |  | ||||||
|       dept.value = res.data; |  | ||||||
|       detailLoading.value = false; |  | ||||||
|     }); |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 重置表单 |    * 重置表单 | ||||||
|    */ |    */ | ||||||
| @@ -400,42 +371,6 @@ | |||||||
|     proxy.$refs.formRef?.resetFields(); |     proxy.$refs.formRef?.resetFields(); | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   /** |  | ||||||
|    * 过滤部门树 |  | ||||||
|    * |  | ||||||
|    * @param searchValue 搜索值 |  | ||||||
|    * @param nodeData 节点值 |  | ||||||
|    */ |  | ||||||
|   const filterDeptTree = (searchValue: string, nodeData: TreeNodeData) => { |  | ||||||
|     if (nodeData.title) { |  | ||||||
|       return nodeData.title.toLowerCase().indexOf(searchValue.toLowerCase()) > -1; |  | ||||||
|     } |  | ||||||
|     return false; |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   /** |  | ||||||
|    * 确定 |  | ||||||
|    */ |  | ||||||
|   const handleOk = () => { |  | ||||||
|     proxy.$refs.formRef.validate((valid: any) => { |  | ||||||
|       if (!valid) { |  | ||||||
|         if (form.value.deptId !== undefined) { |  | ||||||
|           updateDept(form.value).then((res) => { |  | ||||||
|             handleCancel(); |  | ||||||
|             getList(); |  | ||||||
|             proxy.$message.success(res.msg); |  | ||||||
|           }); |  | ||||||
|         } else { |  | ||||||
|           createDept(form.value).then((res) => { |  | ||||||
|             handleCancel(); |  | ||||||
|             getList(); |  | ||||||
|             proxy.$message.success(res.msg); |  | ||||||
|           }); |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }); |  | ||||||
|   }; |  | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 取消 |    * 取消 | ||||||
|    */ |    */ | ||||||
| @@ -444,6 +379,21 @@ | |||||||
|     proxy.$refs.formRef.resetFields(); |     proxy.$refs.formRef.resetFields(); | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 查看详情 | ||||||
|  |    * | ||||||
|  |    * @param id ID | ||||||
|  |    */ | ||||||
|  |   const toDetail = async (id: number) => { | ||||||
|  |     detailLoading.value = true; | ||||||
|  |     detailVisible.value = true; | ||||||
|  |     getDept(id).then((res) => { | ||||||
|  |       dept.value = res.data; | ||||||
|  |     }).finally(() => { | ||||||
|  |       detailLoading.value = false; | ||||||
|  |     }); | ||||||
|  |   }; | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 关闭详情 |    * 关闭详情 | ||||||
|    */ |    */ | ||||||
| @@ -451,12 +401,26 @@ | |||||||
|     detailVisible.value = false; |     detailVisible.value = false; | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 修改状态 | ||||||
|  |    * | ||||||
|  |    * @param record 记录信息 | ||||||
|  |    */ | ||||||
|  |   const handleChangeStatus = (record: DeptRecord) => { | ||||||
|  |     const tip = record.status === 1 ? '启用' : '禁用'; | ||||||
|  |     updateDept(record).then((res) => { | ||||||
|  |       proxy.$message.success(`${tip}成功`); | ||||||
|  |     }).catch(() => { | ||||||
|  |       record.status = (record.status === 1) ? 2 : 1; | ||||||
|  |     }); | ||||||
|  |   }; | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 批量删除 |    * 批量删除 | ||||||
|    */ |    */ | ||||||
|   const handleBatchDelete = () => { |   const handleBatchDelete = () => { | ||||||
|     if (ids.value.length === 0) { |     if (ids.value.length === 0) { | ||||||
|       proxy.$message.info('请选择要删除的数据!'); |       proxy.$message.info('请选择要删除的数据'); | ||||||
|     } else { |     } else { | ||||||
|       proxy.$modal.warning({ |       proxy.$modal.warning({ | ||||||
|         title: '警告', |         title: '警告', | ||||||
| @@ -481,6 +445,44 @@ | |||||||
|       getList(); |       getList(); | ||||||
|     }); |     }); | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 多选 | ||||||
|  |    * | ||||||
|  |    * @param rowKeys ID 列表 | ||||||
|  |    */ | ||||||
|  |   const handleSelectionChange = (rowKeys: Array<any>) => { | ||||||
|  |     ids.value = rowKeys; | ||||||
|  |     multiple.value = !rowKeys.length; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 过滤部门树 | ||||||
|  |    * | ||||||
|  |    * @param searchValue 搜索值 | ||||||
|  |    * @param nodeData 节点值 | ||||||
|  |    */ | ||||||
|  |   const filterDeptTree = (searchValue: string, nodeData: TreeNodeData) => { | ||||||
|  |     if (nodeData.title) { | ||||||
|  |       return nodeData.title.toLowerCase().indexOf(searchValue.toLowerCase()) > -1; | ||||||
|  |     } | ||||||
|  |     return false; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 查询 | ||||||
|  |    */ | ||||||
|  |   const handleQuery = () => { | ||||||
|  |     getList(); | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 重置 | ||||||
|  |    */ | ||||||
|  |   const resetQuery = () => { | ||||||
|  |     proxy.$refs.queryRef.resetFields(); | ||||||
|  |     handleQuery(); | ||||||
|  |   }; | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
| <script lang="ts"> | <script lang="ts"> | ||||||
| @@ -489,38 +491,4 @@ | |||||||
|   }; |   }; | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
| <style scoped lang="less"> | <style scoped lang="less"></style> | ||||||
|   .container { |  | ||||||
|     padding: 0 20px 20px 20px; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   .query-container { |  | ||||||
|     margin-bottom: 12px; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   :deep(.arco-table-th) { |  | ||||||
|     &:last-child { |  | ||||||
|       .arco-table-th-item-title { |  | ||||||
|         margin-left: 16px; |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   .action-icon { |  | ||||||
|     margin-left: 12px; |  | ||||||
|     cursor: pointer; |  | ||||||
|   } |  | ||||||
|   .active { |  | ||||||
|     color: #0960bd; |  | ||||||
|     background-color: #e3f4fc; |  | ||||||
|   } |  | ||||||
|   .setting { |  | ||||||
|     display: flex; |  | ||||||
|     align-items: center; |  | ||||||
|     width: 200px; |  | ||||||
|     .title { |  | ||||||
|       margin-left: 12px; |  | ||||||
|       cursor: pointer; |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| </style> |  | ||||||
|   | |||||||
| @@ -21,15 +21,12 @@ | |||||||
| <style scoped lang="less"> | <style scoped lang="less"> | ||||||
|   :deep(.arco-list-item) { |   :deep(.arco-list-item) { | ||||||
|     border-bottom: none !important; |     border-bottom: none !important; | ||||||
|  |  | ||||||
|     .arco-typography { |     .arco-typography { | ||||||
|       margin-bottom: 20px; |       margin-bottom: 20px; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     .arco-list-item-meta-avatar { |     .arco-list-item-meta-avatar { | ||||||
|       margin-bottom: 1px; |       margin-bottom: 1px; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     .arco-list-item-meta { |     .arco-list-item-meta { | ||||||
|       padding: 0; |       padding: 0; | ||||||
|     } |     } | ||||||
| @@ -38,16 +35,13 @@ | |||||||
|   :deep(.arco-list-item-meta-content) { |   :deep(.arco-list-item-meta-content) { | ||||||
|     flex: 1; |     flex: 1; | ||||||
|     border-bottom: 1px solid var(--color-neutral-3); |     border-bottom: 1px solid var(--color-neutral-3); | ||||||
|  |  | ||||||
|     .arco-list-item-meta-description { |     .arco-list-item-meta-description { | ||||||
|       display: flex; |       display: flex; | ||||||
|       flex-flow: row; |       flex-flow: row; | ||||||
|       justify-content: space-between; |       justify-content: space-between; | ||||||
|  |  | ||||||
|       .tip { |       .tip { | ||||||
|         color: rgb(var(--gray-6)); |         color: rgb(var(--gray-6)); | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       .operation { |       .operation { | ||||||
|         margin-right: 6px; |         margin-right: 6px; | ||||||
|       } |       } | ||||||
|   | |||||||
| @@ -124,7 +124,6 @@ | |||||||
|     height: 32px; |     height: 32px; | ||||||
|     line-height: 32px; |     line-height: 32px; | ||||||
|     background-color: #e8f3ff; |     background-color: #e8f3ff; | ||||||
|  |  | ||||||
|     .arco-icon-camera { |     .arco-icon-camera { | ||||||
|       margin-top: 8px; |       margin-top: 8px; | ||||||
|       color: rgb(var(--arcoblue-6)); |       color: rgb(var(--arcoblue-6)); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user