优化:优化全局样式
This commit is contained in:
parent
86c4350de4
commit
3add8302c9
@ -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,51 +1,51 @@
|
|||||||
<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
|
||||||
v-model="queryParams.deptName"
|
v-model="queryParams.deptName"
|
||||||
placeholder="输入部门名称搜索"
|
placeholder="输入部门名称搜索"
|
||||||
allow-clear
|
allow-clear
|
||||||
style="width: 150px"
|
style="width: 150px"
|
||||||
@press-enter="handleQuery"
|
@press-enter="handleQuery"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item field="status" hide-label>
|
<a-form-item field="status" hide-label>
|
||||||
<a-select
|
<a-select
|
||||||
v-model="queryParams.status"
|
v-model="queryParams.status"
|
||||||
:options="statusOptions"
|
:options="statusOptions"
|
||||||
placeholder="状态搜索"
|
placeholder="状态搜索"
|
||||||
allow-clear
|
allow-clear
|
||||||
style="width: 150px"
|
style="width: 150px"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item hide-label>
|
<a-form-item hide-label>
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button type="primary" @click="handleQuery">
|
<a-button type="primary" @click="handleQuery">
|
||||||
<template #icon><icon-search /></template>查询
|
<template #icon><icon-search /></template>查询
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button @click="resetQuery">
|
<a-button @click="resetQuery">
|
||||||
<template #icon><icon-refresh /></template>重置
|
<template #icon><icon-refresh /></template>重置
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 操作栏 -->
|
||||||
<!-- 操作栏 -->
|
<div class="header-operation">
|
||||||
<a-row style="margin-bottom: 16px">
|
<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,183 +56,183 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 列表区域 -->
|
<!-- 列表区域 -->
|
||||||
<a-table
|
<a-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
:data="deptList"
|
:data="deptList"
|
||||||
:row-selection="{
|
:row-selection="{
|
||||||
type: 'checkbox',
|
type: 'checkbox',
|
||||||
showCheckedAll: true,
|
showCheckedAll: true,
|
||||||
onlyCurrent: false,
|
onlyCurrent: false,
|
||||||
}"
|
}"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:default-expand-all-rows="true"
|
:default-expand-all-rows="true"
|
||||||
:hide-expand-button-on-empty="true"
|
:hide-expand-button-on-empty="true"
|
||||||
row-key="deptId"
|
row-key="deptId"
|
||||||
:bordered="false"
|
:bordered="false"
|
||||||
:stripe="true"
|
:stripe="true"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="large"
|
size="large"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<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>
|
|
||||||
</a-table-column>
|
|
||||||
<a-table-column title="部门排序" align="center" data-index="deptSort" />
|
|
||||||
<a-table-column title="状态" align="center" data-index="status">
|
|
||||||
<template #cell="{ record }">
|
|
||||||
<a-switch
|
|
||||||
v-model="record.status"
|
|
||||||
:checked-value="1"
|
|
||||||
:unchecked-value="2"
|
|
||||||
@change="handleChangeStatus(record)"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</a-table-column>
|
|
||||||
<a-table-column title="描述" data-index="description" />
|
|
||||||
<a-table-column title="创建人" data-index="createUserString" />
|
|
||||||
<a-table-column title="创建时间" data-index="createTime" />
|
|
||||||
<a-table-column title="操作" align="center">
|
|
||||||
<template #cell="{ record }">
|
|
||||||
<a-button v-permission="['admin']" type="text" size="small" @click="toUpdate(record.deptId)">
|
|
||||||
<template #icon><icon-edit /></template>修改
|
|
||||||
</a-button>
|
|
||||||
<a-popconfirm content="确定要删除当前选中的数据吗?如果存在下级部门则一并删除,此操作不能撤销!" type="warning" @ok="handleDelete([record.deptId])">
|
|
||||||
<a-button v-permission="['admin']" type="text" size="small">
|
|
||||||
<template #icon><icon-delete /></template>删除
|
|
||||||
</a-button>
|
|
||||||
</a-popconfirm>
|
|
||||||
</template>
|
|
||||||
</a-table-column>
|
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table-column>
|
||||||
|
<a-table-column title="部门排序" align="center" data-index="deptSort" />
|
||||||
|
<a-table-column title="状态" align="center" data-index="status">
|
||||||
|
<template #cell="{ record }">
|
||||||
|
<a-switch
|
||||||
|
v-model="record.status"
|
||||||
|
:checked-value="1"
|
||||||
|
:unchecked-value="2"
|
||||||
|
@change="handleChangeStatus(record)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</a-table-column>
|
||||||
|
<a-table-column title="描述" data-index="description" />
|
||||||
|
<a-table-column title="创建人" data-index="createUserString" />
|
||||||
|
<a-table-column title="创建时间" data-index="createTime" />
|
||||||
|
<a-table-column title="操作" align="center">
|
||||||
|
<template #cell="{ record }">
|
||||||
|
<a-button v-permission="['admin']" type="text" size="small" title="修改" @click="toUpdate(record.deptId)">
|
||||||
|
<template #icon><icon-edit /></template>修改
|
||||||
|
</a-button>
|
||||||
|
<a-popconfirm content="确定要删除当前选中的数据吗?如果存在下级部门则一并删除,此操作不能撤销!" type="warning" @ok="handleDelete([record.deptId])">
|
||||||
|
<a-button v-permission="['admin']" type="text" size="small" title="删除">
|
||||||
|
<template #icon><icon-delete /></template>删除
|
||||||
|
</a-button>
|
||||||
|
</a-popconfirm>
|
||||||
|
</template>
|
||||||
|
</a-table-column>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
|
||||||
<!-- 对话框区域 -->
|
<!-- 表单区域 -->
|
||||||
<a-modal
|
<a-modal
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:width="570"
|
:width="570"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
unmount-on-close
|
unmount-on-close
|
||||||
render-to-body
|
render-to-body
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
>
|
>
|
||||||
<a-form ref="formRef" :model="form" :rules="rules">
|
<a-form ref="formRef" :model="form" :rules="rules">
|
||||||
<a-form-item label="上级部门" field="parentId">
|
<a-form-item label="上级部门" field="parentId">
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
v-model="form.parentId"
|
v-model="form.parentId"
|
||||||
:data="treeData"
|
:data="treeData"
|
||||||
placeholder="请选择上级部门"
|
placeholder="请选择上级部门"
|
||||||
allow-clear
|
allow-clear
|
||||||
allow-search
|
allow-search
|
||||||
:filter-tree-node="filterDeptTree"
|
:filter-tree-node="filterDeptTree"
|
||||||
:fallback-option="false"
|
:fallback-option="false"
|
||||||
size="large"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item label="部门名称" field="deptName">
|
|
||||||
<a-input v-model="form.deptName" placeholder="请输入部门名称" size="large" />
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item label="部门排序" field="deptSort">
|
|
||||||
<a-input-number
|
|
||||||
v-model="form.deptSort"
|
|
||||||
:min="1"
|
|
||||||
placeholder="请输入部门排序"
|
|
||||||
mode="button"
|
|
||||||
size="large"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item label="描述" field="description">
|
|
||||||
<a-textarea
|
|
||||||
v-model="form.description"
|
|
||||||
:max-length="200"
|
|
||||||
placeholder="请输入描述"
|
|
||||||
:auto-size="{
|
|
||||||
minRows:3,
|
|
||||||
}"
|
|
||||||
show-word-limit
|
|
||||||
size="large"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</a-form>
|
|
||||||
</a-modal>
|
|
||||||
|
|
||||||
<!-- 抽屉区域 -->
|
|
||||||
<a-drawer
|
|
||||||
title="部门详情"
|
|
||||||
:visible="detailVisible"
|
|
||||||
:width="570"
|
|
||||||
:footer="false"
|
|
||||||
unmount-on-close
|
|
||||||
render-to-body
|
|
||||||
@cancel="handleDetailCancel"
|
|
||||||
>
|
|
||||||
<a-descriptions
|
|
||||||
title="基础信息"
|
|
||||||
:column="2"
|
|
||||||
bordered
|
|
||||||
size="large"
|
size="large"
|
||||||
>
|
/>
|
||||||
<a-descriptions-item label="部门名称">
|
</a-form-item>
|
||||||
<a-skeleton v-if="detailLoading" :animation="true">
|
<a-form-item label="部门名称" field="deptName">
|
||||||
<a-skeleton-line :rows="1" />
|
<a-input v-model="form.deptName" placeholder="请输入部门名称" size="large" />
|
||||||
</a-skeleton>
|
</a-form-item>
|
||||||
<span v-else>{{ dept.deptName }}</span>
|
<a-form-item label="部门排序" field="deptSort">
|
||||||
</a-descriptions-item>
|
<a-input-number
|
||||||
<a-descriptions-item label="状态">
|
v-model="form.deptSort"
|
||||||
<a-skeleton v-if="detailLoading" :animation="true">
|
placeholder="请输入部门排序"
|
||||||
<a-skeleton-line :rows="1" />
|
:min="1"
|
||||||
</a-skeleton>
|
mode="button"
|
||||||
<span v-else>
|
size="large"
|
||||||
<a-tag v-if="dept.status === 1" color="green"><span class="circle pass"></span>启用</a-tag>
|
/>
|
||||||
<a-tag v-else color="red"><span class="circle fail"></span>禁用</a-tag>
|
</a-form-item>
|
||||||
</span>
|
<a-form-item label="描述" field="description">
|
||||||
</a-descriptions-item>
|
<a-textarea
|
||||||
<a-descriptions-item label="创建人">
|
v-model="form.description"
|
||||||
<a-skeleton v-if="detailLoading" :animation="true">
|
:max-length="200"
|
||||||
<a-skeleton-line :rows="1" />
|
placeholder="请输入描述"
|
||||||
</a-skeleton>
|
:auto-size="{
|
||||||
<span v-else>{{ dept.createUserString }}</span>
|
minRows:3,
|
||||||
</a-descriptions-item>
|
}"
|
||||||
<a-descriptions-item label="创建时间">
|
show-word-limit
|
||||||
<a-skeleton v-if="detailLoading" :animation="true">
|
size="large"
|
||||||
<a-skeleton-line :rows="1" />
|
/>
|
||||||
</a-skeleton>
|
</a-form-item>
|
||||||
<span v-else>{{ dept.createTime }}</span>
|
</a-form>
|
||||||
</a-descriptions-item>
|
</a-modal>
|
||||||
<a-descriptions-item label="修改人">
|
|
||||||
<a-skeleton v-if="detailLoading" :animation="true">
|
<!-- 详情区域 -->
|
||||||
<a-skeleton-line :rows="1" />
|
<a-drawer
|
||||||
</a-skeleton>
|
title="部门详情"
|
||||||
<span v-else>{{ dept.updateUserString }}</span>
|
:visible="detailVisible"
|
||||||
</a-descriptions-item>
|
:width="570"
|
||||||
<a-descriptions-item label="修改时间">
|
:footer="false"
|
||||||
<a-skeleton v-if="detailLoading" :animation="true">
|
unmount-on-close
|
||||||
<a-skeleton-line :rows="1" />
|
render-to-body
|
||||||
</a-skeleton>
|
@cancel="handleDetailCancel"
|
||||||
<span v-else>{{ dept.updateTime }}</span>
|
>
|
||||||
</a-descriptions-item>
|
<a-descriptions
|
||||||
<a-descriptions-item label="描述">
|
title="基础信息"
|
||||||
<a-skeleton v-if="detailLoading" :animation="true">
|
:column="2"
|
||||||
<a-skeleton-line :rows="1" />
|
bordered
|
||||||
</a-skeleton>
|
size="large"
|
||||||
<span v-else>{{ dept.description }}</span>
|
>
|
||||||
</a-descriptions-item>
|
<a-descriptions-item label="部门名称">
|
||||||
</a-descriptions>
|
<a-skeleton v-if="detailLoading" :animation="true">
|
||||||
</a-drawer>
|
<a-skeleton-line :rows="1" />
|
||||||
</a-col>
|
</a-skeleton>
|
||||||
</a-row>
|
<span v-else>{{ dept.deptName }}</span>
|
||||||
|
</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="状态">
|
||||||
|
<a-skeleton v-if="detailLoading" :animation="true">
|
||||||
|
<a-skeleton-line :rows="1" />
|
||||||
|
</a-skeleton>
|
||||||
|
<span v-else>
|
||||||
|
<a-tag v-if="dept.status === 1" color="green"><span class="circle pass"></span>启用</a-tag>
|
||||||
|
<a-tag v-else color="red"><span class="circle fail"></span>禁用</a-tag>
|
||||||
|
</span>
|
||||||
|
</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="创建人">
|
||||||
|
<a-skeleton v-if="detailLoading" :animation="true">
|
||||||
|
<a-skeleton-line :rows="1" />
|
||||||
|
</a-skeleton>
|
||||||
|
<span v-else>{{ dept.createUserString }}</span>
|
||||||
|
</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="创建时间">
|
||||||
|
<a-skeleton v-if="detailLoading" :animation="true">
|
||||||
|
<a-skeleton-line :rows="1" />
|
||||||
|
</a-skeleton>
|
||||||
|
<span v-else>{{ dept.createTime }}</span>
|
||||||
|
</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="修改人">
|
||||||
|
<a-skeleton v-if="detailLoading" :animation="true">
|
||||||
|
<a-skeleton-line :rows="1" />
|
||||||
|
</a-skeleton>
|
||||||
|
<span v-else>{{ dept.updateUserString }}</span>
|
||||||
|
</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="修改时间">
|
||||||
|
<a-skeleton v-if="detailLoading" :animation="true">
|
||||||
|
<a-skeleton-line :rows="1" />
|
||||||
|
</a-skeleton>
|
||||||
|
<span v-else>{{ dept.updateTime }}</span>
|
||||||
|
</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="描述">
|
||||||
|
<a-skeleton v-if="detailLoading" :animation="true">
|
||||||
|
<a-skeleton-line :rows="1" />
|
||||||
|
</a-skeleton>
|
||||||
|
<span v-else>{{ dept.description }}</span>
|
||||||
|
</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
</a-drawer>
|
||||||
</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,53 +296,38 @@
|
|||||||
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();
|
||||||
* 修改状态
|
getList();
|
||||||
*
|
proxy.$message.success(res.msg);
|
||||||
* @param record 记录信息
|
});
|
||||||
*/
|
} else {
|
||||||
const handleChangeStatus = (record: DeptRecord) => {
|
createDept(form.value).then((res) => {
|
||||||
const tip = record.status === 1 ? '启用' : '禁用';
|
handleCancel();
|
||||||
updateDept(record).then((res) => {
|
getList();
|
||||||
proxy.$message.success(`${tip}成功`);
|
proxy.$message.success(res.msg);
|
||||||
}).catch(() => {
|
});
|
||||||
record.status = (record.status === 1) ? 2 : 1;
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询
|
|
||||||
*/
|
|
||||||
const handleQuery = () => {
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 重置
|
|
||||||
*/
|
|
||||||
const resetQuery = () => {
|
|
||||||
proxy.$refs.queryRef.resetFields();
|
|
||||||
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));
|
||||||
|
Loading…
Reference in New Issue
Block a user