20251128修改前端界面

This commit is contained in:
wxlong
2025-11-28 12:58:45 +08:00
parent caf243f14e
commit d3e0678ef0
17 changed files with 3065 additions and 568 deletions

View File

@@ -1,24 +1,23 @@
<template>
<div>
<div id="buttomContain">
<div class="search-container">
<div class="task-manage-page">
<div class="toolbar-container">
<div class="search-box">
<el-input
v-model="searchKeyword"
placeholder="请输入关键词进行搜索"
prefix-icon="el-icon-search"
clearable
size="small"
style="width: 450px; margin-right: 15px;"
@input="handleSearch"
></el-input>
</div>
<div class="button-container">
<el-button id="buttonStyle" size="small" @click="openBatchDownloadDialog">
批量数据下载
<div class="toolbar-actions">
<el-button class="forest-btn" size="medium" icon="el-icon-download" @click="openBatchDownloadDialog">
批量数据下载
</el-button>
<el-button class="forest-btn ghost" size="medium" icon="el-icon-copy-document" @click="ExchangeData()">
任务数据复制
</el-button>
<el-button id="buttonStyle" size="small" @click="ExchangeData()"
>任务数据复制</el-button
>
</div>
</div>
<el-table
@@ -1558,36 +1557,136 @@ export default {
};
</script>
<style lang="scss" scoped>
>>> .el-pagination button {
background-color: #fff !important;
.task-manage-page {
padding: 24px 28px 40px;
background: linear-gradient(135deg, #edf7ef 0%, #fdfefe 100%);
min-height: calc(100vh - 120px);
box-sizing: border-box;
border-radius: 20px;
box-shadow: 0 14px 32px rgba(76, 175, 80, 0.12);
border: 1px solid rgba(129, 199, 132, 0.25);
}
>>> .el-pager li {
background: #fff !important;
}
#buttomContain {
right: 25px;
position: absolute;
.toolbar-container {
display: flex;
align-items: center;
justify-content: space-between;
width: calc(100% - 50px);
align-items: center;
margin-bottom: 20px;
}
.search-container {
/* 搜索容器靠左 */
.search-box {
flex: 0 0 auto;
width: 450px;
}
.button-container {
/* 按钮容器靠右 */
:deep(.search-box .el-input) {
width: 100%;
}
.toolbar-actions {
display: flex;
gap: 16px;
flex: 0 0 auto;
}
.forest-btn {
background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
border: none;
color: #fff;
border-radius: 12px;
padding: 0 26px;
min-height: 38px;
font-weight: 600;
letter-spacing: 0.5px;
font-size: 15px;
box-shadow: 0 8px 18px rgba(76, 175, 80, 0.35);
}
.forest-btn.ghost {
background: rgba(255, 255, 255, 0.95);
color: #2e7d32;
border: 1px solid #66bb6a;
box-shadow: 0 5px 14px rgba(76, 175, 80, 0.2);
}
.forest-btn:hover {
filter: brightness(1.05);
}
#tableStyle {
top: 40px;
margin-bottom: 30px;
background: rgba(255, 255, 255, 0.92);
border-radius: 16px;
overflow: hidden;
border: 1px solid rgba(129, 199, 132, 0.3);
box-shadow: 0 14px 28px rgba(76, 175, 80, 0.12);
}
:deep(#tableStyle .el-table__header-wrapper th) {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
font-size: 14px !important;
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif !important;
}
:deep(#tableStyle .el-table__body-wrapper td) {
color: #2e4b31;
border-bottom: 1px solid rgba(76, 175, 80, 0.08);
}
:deep(#tableStyle .el-table__body tr:hover > td) {
background: rgba(129, 199, 132, 0.15) !important;
color: #1b5e20;
}
:deep(#tableStyle .el-table__row--striped td) {
background: rgba(233, 247, 235, 0.65);
}
:deep(#tableStyle .el-table__row.current-row > td) {
background: rgba(76, 175, 80, 0.18) !important;
color: #1b5e20;
}
:deep(#tableStyle .el-table__body tr) {
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
:deep(#tableStyle .el-table__body tr:hover) {
transform: translateY(-1px);
box-shadow: inset 0 2px 0 rgba(76, 175, 80, 0.15);
}
:deep(#tableStyle .el-button--text) {
color: #2e7d32;
font-weight: 500;
padding: 6px 12px;
border-radius: 8px;
transition: all 0.3s ease;
}
:deep(#tableStyle .el-button--text:hover) {
color: #1b5e20;
background: rgba(129, 199, 132, 0.2);
transform: translateY(-1px);
}
>>> .el-pagination button {
background-color: #E8F5E9 !important;
color: #2E7D32 !important;
}
>>> .el-pager li {
background: #E8F5E9 !important;
color: #2E7D32 !important;
}
.text {
font-size: 17px;
text-align: left;
color: #2e7d32;
}
.clearfix:before,
@@ -1607,5 +1706,176 @@ export default {
right: 0;
left: 0;
z-index: 999;
border-radius: 16px;
border: 1px solid rgba(129, 199, 132, 0.3);
box-shadow: 0 12px 28px rgba(76, 175, 80, 0.15);
}
:deep(.box-card .el-card__header) {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3);
color: #1b5e20;
border-bottom: 1px solid rgba(129, 199, 132, 0.25);
border-radius: 16px 16px 0 0;
}
.taskDialog :deep(.el-dialog) {
border-radius: 18px;
border: 1px solid rgba(129, 199, 132, 0.35);
box-shadow: 0 12px 30px rgba(76, 175, 80, 0.18);
}
.taskDialog :deep(.el-dialog__header) {
background: linear-gradient(135deg, #4caf50, #2e7d32);
color: #fff;
border-radius: 18px 18px 0 0;
}
.taskDialog :deep(.el-form-item__label) {
color: #1b5e20;
font-weight: 600;
}
.taskDialog :deep(.el-button--primary) {
background-color: #4caf50 !important;
border-color: #4caf50 !important;
}
.taskDialog :deep(.el-button--primary:hover) {
background-color: #66bb6a !important;
border-color: #66bb6a !important;
}
</style>
<style>
/* 全局表格样式覆盖 - 确保主题样式生效 */
#tableStyle.el-table {
border: 1px solid rgba(129, 199, 132, 0.3) !important;
border-radius: 16px !important;
overflow: hidden !important;
}
#tableStyle.el-table.el-table--border {
border: 1px solid rgba(129, 199, 132, 0.3) !important;
}
#tableStyle.el-table.el-table--border::after,
#tableStyle.el-table.el-table--border::before {
background-color: rgba(129, 199, 132, 0.3) !important;
}
#tableStyle.el-table.el-table--border th {
border-right: 1px solid rgba(129, 199, 132, 0.25) !important;
}
#tableStyle.el-table.el-table--border th:last-child {
border-right: none !important;
}
#tableStyle.el-table.el-table--border td {
border-right: 1px solid rgba(76, 175, 80, 0.08) !important;
}
#tableStyle.el-table.el-table--border td:last-child {
border-right: none !important;
}
#tableStyle.el-table.el-table--striped .el-table__body tr.el-table__row--striped td {
background: rgba(233, 247, 235, 0.65) !important;
}
#tableStyle.el-table.el-table--striped .el-table__body tr.el-table__row--striped:hover td {
background: rgba(200, 230, 201, 0.5) !important;
}
/* 表头样式全局覆盖 */
#tableStyle.el-table .el-table__header-wrapper th {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
font-size: 14px !important;
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif !important;
padding: 12px 0 !important;
text-align: center !important;
}
#tableStyle.el-table .el-table__header-wrapper thead th {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
}
#tableStyle.el-table .el-table__header th {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
}
#tableStyle.el-table .el-table__header th .cell {
color: #1b5e20 !important;
font-weight: 600 !important;
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif !important;
}
/* 覆盖自定义表头类名 sinCl */
#tableStyle.el-table .el-table__header th.sinCl {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
font-size: 14px !important;
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif !important;
}
#tableStyle.el-table .el-table__header th.sinCl .cell {
color: #1b5e20 !important;
font-weight: 600 !important;
}
/* 滚动条全局样式 */
#tableStyle.el-table.el-table--scrollable-x .el-table__body-wrapper {
scrollbar-width: thin !important;
scrollbar-color: rgba(76, 175, 80, 0.4) rgba(232, 245, 233, 0.5) !important;
}
#tableStyle.el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar {
height: 8px !important;
}
#tableStyle.el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-track {
background: rgba(232, 245, 233, 0.5) !important;
border-radius: 4px !important;
}
#tableStyle.el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-thumb {
background: linear-gradient(90deg, #81c784, #66bb6a) !important;
border-radius: 4px !important;
}
#tableStyle.el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
background: linear-gradient(90deg, #66bb6a, #4caf50) !important;
}
#tableStyle.el-table.el-table--scrollable-y .el-table__body-wrapper {
scrollbar-width: thin !important;
scrollbar-color: rgba(76, 175, 80, 0.4) rgba(232, 245, 233, 0.5) !important;
}
#tableStyle.el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar {
width: 8px !important;
}
#tableStyle.el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-track {
background: rgba(232, 245, 233, 0.5) !important;
border-radius: 4px !important;
}
#tableStyle.el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #81c784, #66bb6a) !important;
border-radius: 4px !important;
}
#tableStyle.el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, #66bb6a, #4caf50) !important;
}
</style>

View File

@@ -2,10 +2,14 @@
<div id="TPcontainer">
<el-container style="height: 100%">
<el-aside class="MyAside">
<div class="aside-header">
<h2>任务中心</h2>
<p>Task Management Console</p>
</div>
<el-menu
background-color="#F7F8F1"
text-color="rgb(38,70,114)"
active-text-color="#3A87F9"
background-color="#E8F5E9"
text-color="#2E7D32"
active-text-color="#1B5E20"
:default-active="this.$route.path"
router
>
@@ -29,7 +33,7 @@
</el-aside>
<el-container>
<el-main class="tpcontent">
<router-view class="view" style="padding: 20px"></router-view>
<router-view class="view"></router-view>
</el-main>
</el-container>
</el-container>
@@ -46,33 +50,117 @@ export default {
<style scoped>
.MyAside {
width: 255px !important;
opacity: 0.9;
background-color: #f7f8f1;
color: #333;
opacity: 0.95;
background: linear-gradient(180deg, #e8f5e9 0%, #d0ebd4 100%);
color: #1b5e20;
text-align: left;
line-height: 200px;
line-height: normal;
z-index: 10;
bottom: 0;
position: absolute;
top: 0;
border-right: 1px solid rgba(76, 175, 80, 0.25);
box-shadow: 4px 0 18px rgba(52, 133, 78, 0.14);
padding: 24px 12px;
display: flex;
flex-direction: column;
}
.aside-header {
text-align: left;
padding: 0 12px 16px 12px;
border-bottom: 1px solid rgba(76, 175, 80, 0.2);
margin-bottom: 12px;
}
:deep(.MyAside .el-menu) {
background: transparent !important;
border-right: none !important;
flex: 1;
overflow-y: auto;
}
:deep(.MyAside .el-menu::-webkit-scrollbar) {
width: 6px;
}
:deep(.MyAside .el-menu::-webkit-scrollbar-thumb) {
background: rgba(76, 175, 80, 0.3);
border-radius: 3px;
}
:deep(.MyAside .el-menu::-webkit-scrollbar-track) {
background: rgba(232, 245, 233, 0.6);
}
.aside-header h2 {
font-size: 20px;
color: #1b5e20;
margin: 0;
font-weight: 700;
letter-spacing: 1px;
}
.aside-header p {
margin: 6px 0 0 0;
font-size: 12px;
color: #4f7e50;
letter-spacing: 0.5px;
}
.tpcontent {
position: absolute;
left: 255px;
right: 0px;
width: calc(100% - 255px);
padding: 0px;
background: #fff;
padding: 8px;
background: linear-gradient(135deg, #edf7ef 0%, #fdfefe 100%);
}
.tpcontent .view {
background: rgba(255, 255, 255, 0.96);
border-radius: 20px;
box-shadow: 0 12px 28px rgba(76, 175, 80, 0.12);
border: 1px solid rgba(129, 199, 132, 0.25);
min-height: calc(100vh - 120px);
padding: 24px;
box-sizing: border-box;
display: block;
}
.MyAside .usermp {
padding-left: 10px !important;
}
:deep(.MyAside .el-menu) {
background: transparent !important;
border-right: none !important;
}
:deep(.MyAside .el-menu-item),
:deep(.MyAside .el-submenu__title) {
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
font-weight: 600;
color: #2e7d32 !important;
letter-spacing: 0.5px;
padding: 14px 20px !important;
transition: background 0.3s ease, color 0.3s ease;
}
:deep(.MyAside .el-menu-item:hover),
:deep(.MyAside .el-submenu__title:hover) {
background: rgba(129, 199, 132, 0.25) !important;
color: #1b5e20 !important;
}
:deep(.MyAside .el-menu-item.is-active) {
background: linear-gradient(90deg, rgba(76, 175, 80, 0.2), rgba(129, 199, 132, 0.3)) !important;
color: #1b5e20 !important;
border-radius: 12px;
margin: 4px 12px;
}
:deep(.MyAside .el-icon-folder-opened),
:deep(.MyAside .el-icon-user-solid) {
color: #43a047;
}
@media screen and (min-width: 840px) and (max-width: 1401px) {
.tpcontent {
position: absolute;
left: 255px;
width: calc(100% - 255px);
padding: 24px;
}
}
@@ -84,6 +172,7 @@ export default {
position: absolute;
left: 160px;
width: calc(100% - 160px);
padding: 20px;
}
}
@media all and (max-width: 420px) {
@@ -94,6 +183,7 @@ export default {
position: absolute;
left: 120px;
width: calc(100% - 120px);
padding: 16px 12px;
}
}
</style>

View File

@@ -1,24 +1,24 @@
<template>
<div>
<div class="task-manage-page">
<!-- 添加搜索区域 -->
<div class="search-container">
<div class="search-box">
<el-input
v-model="searchKeyword"
placeholder="请输入关键词进行搜索"
prefix-icon="el-icon-search"
clearable
size="small"
style="width: 300px; margin-bottom: 20px;"
@input="handleSearch"
></el-input>
</div>
<!-- <h2 style="text-align: left">任务</h2>
<h5 style="text-align: left">管理任务人员</h5> -->
<el-table
id="tableStyle"
:data="filteredData"
max-height="720px"
style="width: 100%;"
max-height="720"
stripe
border
highlight-current-row
:header-cell-class-name="sinClo"
>
<el-table-column
@@ -85,8 +85,7 @@
>
<el-button
size="small"
type="primary"
plain
class="forest-btn-small"
:disabled="!scope.row.isAllocationOptional"
>上传shp数据</el-button
>
@@ -96,8 +95,7 @@
<el-table-column min-width="120" filterable label="任务人员">
<template slot-scope="scope">
<el-button
type="primary"
plain
class="forest-btn-small ghost"
size="small"
@click.native="selectWorkers(scope.row.id)"
:disabled="!scope.row.isAllocationOptional"
@@ -125,7 +123,7 @@
<el-table-column min-width="100" label="操作">
<template slot-scope="scope">
<el-button
type="primary"
class="forest-btn-small"
size="small"
@click.native="submitUploadShp(scope.row.id)"
:disabled="!scope.row.isAllocationOptional"
@@ -137,8 +135,7 @@
<el-table-column min-width="100" label="手动分配">
<template slot-scope="scope">
<el-button
type="primary"
style="margin-left: 10px !important"
class="forest-btn-small ghost"
size="small"
@click.native="manualAllocate(scope.row.id, false)"
:disabled="!scope.row.isAllocationOptional"
@@ -197,7 +194,7 @@
</el-table-column>
<el-table-column fixed="right" min-width="80">
<template slot="header">
<el-button @click="addWorker()" type="primary" class="allomapBtn"
<el-button @click="addWorker()" class="forest-btn-small"
>添加人员</el-button
>
</template>
@@ -211,7 +208,7 @@
</template>
</el-table-column>
</el-table>
<el-button type="primary" @click="UploadWorkers()" class="allomapBtn"
<el-button class="forest-btn-small" @click="UploadWorkers()"
>确认</el-button
>
</el-dialog>
@@ -612,21 +609,342 @@ export default {
};
</script>
<style lang="scss" scoped>
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
background-color: rgb(89, 103, 120) !important;
border-color: #304156 !important;
.task-manage-page {
padding: 24px 28px 40px;
background: linear-gradient(135deg, #edf7ef 0%, #fdfefe 100%);
min-height: calc(100vh - 120px);
box-sizing: border-box;
border-radius: 20px;
box-shadow: 0 14px 32px rgba(76, 175, 80, 0.12);
border: 1px solid rgba(129, 199, 132, 0.25);
}
.search-box {
flex: 0 0 auto;
width: 450px;
margin-bottom: 20px;
}
:deep(.search-box .el-input) {
width: 100%;
}
.forest-btn-small {
background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
border: none;
color: #fff;
border-radius: 10px;
padding: 8px 20px;
font-weight: 600;
font-size: 14px;
box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
transition: all 0.3s ease;
}
.forest-btn-small.ghost {
background: rgba(255, 255, 255, 0.95);
color: #2e7d32;
border: 1px solid #66bb6a;
box-shadow: 0 3px 10px rgba(76, 175, 80, 0.2);
}
.forest-btn-small:hover:not(:disabled) {
filter: brightness(1.05);
transform: translateY(-1px);
}
.forest-btn-small:disabled {
opacity: 0.5;
cursor: not-allowed;
}
#tableStyle {
margin-bottom: 30px;
background: rgba(255, 255, 255, 0.92);
border-radius: 16px;
overflow: hidden;
border: 1px solid rgba(129, 199, 132, 0.3);
box-shadow: 0 14px 28px rgba(76, 175, 80, 0.12);
}
:deep(#tableStyle .el-table__header-wrapper th) {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
font-size: 14px !important;
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif !important;
}
:deep(#tableStyle .el-table__body-wrapper td) {
color: #2e4b31;
border-bottom: 1px solid rgba(76, 175, 80, 0.08);
}
:deep(#tableStyle .el-table__body tr:hover > td) {
background: rgba(129, 199, 132, 0.15) !important;
color: #1b5e20;
}
:deep(#tableStyle .el-table__row--striped td) {
background: rgba(233, 247, 235, 0.65);
}
:deep(#tableStyle .el-table__row.current-row > td) {
background: rgba(76, 175, 80, 0.18) !important;
color: #1b5e20;
}
:deep(#tableStyle .el-table__body tr) {
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
:deep(#tableStyle .el-table__body tr:hover) {
transform: translateY(-1px);
box-shadow: inset 0 2px 0 rgba(76, 175, 80, 0.15);
}
:deep(#tableStyle .el-button--text) {
color: #2e7d32;
font-weight: 500;
padding: 6px 12px;
border-radius: 8px;
transition: all 0.3s ease;
}
:deep(#tableStyle .el-button--text:hover) {
color: #1b5e20;
background: rgba(129, 199, 132, 0.2);
transform: translateY(-1px);
}
:deep(#tableStyle .el-checkbox__input.is-checked .el-checkbox__inner) {
background-color: #4caf50 !important;
border-color: #4caf50 !important;
}
:deep(#tableStyle .el-checkbox__inner) {
border-color: rgba(129, 199, 132, 0.5) !important;
}
:deep(#tableStyle .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner) {
background-color: rgba(76, 175, 80, 0.5) !important;
border-color: rgba(76, 175, 80, 0.5) !important;
}
.el-dropdown-link {
cursor: pointer;
color: #409EFF;
color: #4caf50;
transition: color 0.3s ease;
}
.el-dropdown-link:hover {
color: #66b1ff;
color: #2e7d32;
}
.search-container {
text-align: left;
.taskDialog :deep(.el-dialog) {
border-radius: 18px;
border: 1px solid rgba(129, 199, 132, 0.35);
box-shadow: 0 12px 30px rgba(76, 175, 80, 0.18);
}
.taskDialog :deep(.el-dialog__header) {
background: linear-gradient(135deg, #4caf50, #2e7d32);
color: #fff;
border-radius: 18px 18px 0 0;
}
.taskDialog :deep(.el-form-item__label) {
color: #1b5e20;
font-weight: 600;
}
.taskDialog :deep(.el-button--primary) {
background-color: #4caf50 !important;
border-color: #4caf50 !important;
}
.taskDialog :deep(.el-button--primary:hover) {
background-color: #66bb6a !important;
border-color: #66bb6a !important;
}
:deep(.tb-edit .el-table__header-wrapper th) {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
}
:deep(.tb-edit .el-table__body-wrapper td) {
color: #2e4b31;
border-bottom: 1px solid rgba(76, 175, 80, 0.08);
}
:deep(.tb-edit .el-table__body tr:hover > td) {
background: rgba(129, 199, 132, 0.15) !important;
}
/* 滚动条样式 */
:deep(#tableStyle .el-table.el-table--scrollable-x .el-table__body-wrapper) {
scrollbar-width: thin !important;
scrollbar-color: rgba(76, 175, 80, 0.4) rgba(232, 245, 233, 0.5) !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar) {
height: 8px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-track) {
background: rgba(232, 245, 233, 0.5) !important;
border-radius: 4px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-thumb) {
background: linear-gradient(90deg, #81c784, #66bb6a) !important;
border-radius: 4px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-thumb:hover) {
background: linear-gradient(90deg, #66bb6a, #4caf50) !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-y .el-table__body-wrapper) {
scrollbar-width: thin !important;
scrollbar-color: rgba(76, 175, 80, 0.4) rgba(232, 245, 233, 0.5) !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar) {
width: 8px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-track) {
background: rgba(232, 245, 233, 0.5) !important;
border-radius: 4px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-thumb) {
background: linear-gradient(180deg, #81c784, #66bb6a) !important;
border-radius: 4px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-thumb:hover) {
background: linear-gradient(180deg, #66bb6a, #4caf50) !important;
}
/* 下拉选择框样式 */
:deep(#tableStyle .el-select .el-input__inner) {
border-color: rgba(129, 199, 132, 0.4) !important;
color: #1b5e20 !important;
}
:deep(#tableStyle .el-select .el-input__inner:focus) {
border-color: #4caf50 !important;
}
:deep(#tableStyle .el-select .el-input__suffix .el-input__suffix-inner .el-select__caret) {
color: #4caf50 !important;
}
:deep(.el-select-dropdown) {
border: 1px solid rgba(129, 199, 132, 0.3) !important;
border-radius: 10px !important;
box-shadow: 0 8px 20px rgba(76, 175, 80, 0.15) !important;
}
:deep(.el-select-dropdown .el-select-dropdown__item) {
color: #2e4b31 !important;
}
:deep(.el-select-dropdown .el-select-dropdown__item:hover) {
background: rgba(129, 199, 132, 0.2) !important;
color: #1b5e20 !important;
}
:deep(.el-select-dropdown .el-select-dropdown__item.selected) {
background: rgba(76, 175, 80, 0.25) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
}
</style>
<style>
/* 全局表格样式覆盖 */
#tableStyle.el-table {
border: 1px solid rgba(129, 199, 132, 0.3) !important;
border-radius: 16px !important;
overflow: hidden !important;
}
#tableStyle.el-table.el-table--border {
border: 1px solid rgba(129, 199, 132, 0.3) !important;
}
#tableStyle.el-table.el-table--border::after,
#tableStyle.el-table.el-table--border::before {
background-color: rgba(129, 199, 132, 0.3) !important;
}
#tableStyle.el-table.el-table--border th {
border-right: 1px solid rgba(129, 199, 132, 0.25) !important;
}
#tableStyle.el-table.el-table--border th:last-child {
border-right: none !important;
}
#tableStyle.el-table.el-table--border td {
border-right: 1px solid rgba(76, 175, 80, 0.08) !important;
}
#tableStyle.el-table.el-table--border td:last-child {
border-right: none !important;
}
#tableStyle.el-table.el-table--striped .el-table__body tr.el-table__row--striped td {
background: rgba(233, 247, 235, 0.65) !important;
}
#tableStyle.el-table.el-table--striped .el-table__body tr.el-table__row--striped:hover td {
background: rgba(200, 230, 201, 0.5) !important;
}
/* 表头样式全局覆盖 */
#tableStyle.el-table .el-table__header-wrapper th {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
font-size: 14px !important;
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif !important;
}
#tableStyle.el-table .el-table__header-wrapper thead th {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
}
#tableStyle.el-table .el-table__header th {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
}
#tableStyle.el-table .el-table__header th .cell {
color: #1b5e20 !important;
font-weight: 600 !important;
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif !important;
}
#tableStyle.el-table .el-table__header th.sinCl {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
}
#tableStyle.el-table .el-table__header th.sinCl .cell {
color: #1b5e20 !important;
font-weight: 600 !important;
}
</style>

View File

@@ -1,29 +1,29 @@
<template>
<div style="height: (screenHeight-300)+'px'">
<div id="buttomContain">
<div class="search-container">
<div class="task-manage-page">
<div class="toolbar-container">
<div class="search-box">
<el-input
style="width: 300px; margin-right: 15px;"
placeholder="请输入用户名搜索"
v-model="inputUsername"
prefix-icon="el-icon-search"
clearable
size="small"
@clear="cancelSearch()"
@keyup.enter.native="searchUser()"
>
<i
slot="suffix"
class="el-input__icon el-icon-search"
@click="searchUser()"
></i>
<i
slot="suffix"
class="el-input__icon el-icon-circle-close"
@click="cancelSearch()"
style="cursor: pointer;"
></i>
</el-input>
</div>
<div class="button-container">
<div class="toolbar-actions">
<el-button
id="buttonStyle"
size="small"
style="margin-top: 20px"
class="forest-btn-small"
size="medium"
icon="el-icon-plus"
@click="adduser1()"
>添加用户</el-button
>
@@ -33,7 +33,10 @@
<el-table
id="tableStyle"
:data="usersData"
style="width: 100%"
:max-height="600"
stripe
border
highlight-current-row
header-cell-class-name="sinCl"
>
<el-table-column
@@ -65,25 +68,28 @@
<el-button
type="text"
size="small"
class="action-btn"
@click.native="EditField(scope.$index)"
>确认</el-button
>
<el-button
type="text"
size="small"
class="action-btn"
@click.native="deleteField(scope.$index)"
>删除</el-button
>
<el-button
type="text"
size="small"
class="action-btn"
@click.native="resetPassword(scope.$index)"
>重置密码</el-button
>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 50px">
<div class="pagination-container">
<el-pagination
layout="prev, pager, next"
:page-count="dataPageNum"
@@ -163,9 +169,11 @@
</el-form-item>
</el-form>
</div>
<el-button id="buttonStyle" size="small" @click="addUser()"
<div class="dialog-footer">
<el-button class="forest-btn-small" @click="addUser()"
>确认</el-button
>
</div>
</el-dialog>
</div>
</template>
@@ -506,42 +514,385 @@ export default {
};
</script>
<style scoped lang="scss">
.el-input__inner {
>>> &::placeholder {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #c0c4cc;
}
.task-manage-page {
padding: 24px 28px 40px;
background: linear-gradient(135deg, #edf7ef 0%, #fdfefe 100%);
min-height: calc(100vh - 120px);
box-sizing: border-box;
border-radius: 20px;
box-shadow: 0 14px 32px rgba(76, 175, 80, 0.12);
border: 1px solid rgba(129, 199, 132, 0.25);
}
#buttomContain {
top: 5px;
right: 25px;
position: absolute;
.toolbar-container {
display: flex;
align-items: center;
justify-content: space-between;
width: calc(100% - 50px);
align-items: center;
margin-bottom: 20px;
}
.search-container {
/* 搜索容器靠左 */
.search-box {
flex: 0 0 auto;
width: 450px;
}
.button-container {
/* 按钮容器靠右 */
:deep(.search-box .el-input) {
width: 100%;
}
.toolbar-actions {
display: flex;
gap: 16px;
flex: 0 0 auto;
}
.forest-btn-small {
background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
border: none;
color: #fff;
border-radius: 10px;
padding: 8px 20px;
font-weight: 600;
font-size: 14px;
box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
transition: all 0.3s ease;
}
.forest-btn-small:hover:not(:disabled) {
filter: brightness(1.05);
transform: translateY(-1px);
}
.forest-btn-small:disabled {
opacity: 0.5;
cursor: not-allowed;
}
#tableStyle {
top: 50px;
margin-bottom: 30px;
height: 600px;
}
>>> .el-pager li {
background: #fff !important;
background: rgba(255, 255, 255, 0.92);
border-radius: 16px;
overflow: hidden;
border: 1px solid rgba(129, 199, 132, 0.3);
box-shadow: 0 14px 28px rgba(76, 175, 80, 0.12);
}
>>> .el-pagination button {
background: #fff !important;
:deep(#tableStyle .el-table__header-wrapper th) {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
font-size: 14px !important;
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif !important;
}
:deep(#tableStyle .el-table__body-wrapper td) {
color: #2e4b31;
border-bottom: 1px solid rgba(76, 175, 80, 0.08);
}
:deep(#tableStyle .el-table__body tr:hover > td) {
background: rgba(129, 199, 132, 0.15) !important;
color: #1b5e20;
}
:deep(#tableStyle .el-table__row--striped td) {
background: rgba(233, 247, 235, 0.65);
}
:deep(#tableStyle .el-table__row.current-row > td) {
background: rgba(76, 175, 80, 0.18) !important;
color: #1b5e20;
}
:deep(#tableStyle .el-table__body tr) {
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
:deep(#tableStyle .el-table__body tr:hover) {
transform: translateY(-1px);
box-shadow: inset 0 2px 0 rgba(76, 175, 80, 0.15);
}
:deep(#tableStyle .el-button--text) {
color: #2e7d32;
font-weight: 500;
padding: 6px 12px;
border-radius: 8px;
transition: all 0.3s ease;
}
:deep(#tableStyle .el-button--text:hover) {
color: #1b5e20;
background: rgba(129, 199, 132, 0.2);
transform: translateY(-1px);
}
.action-btn {
color: #2e7d32 !important;
font-weight: 500 !important;
padding: 6px 12px !important;
border-radius: 8px !important;
transition: all 0.3s ease !important;
}
.action-btn:hover {
color: #1b5e20 !important;
background: rgba(129, 199, 132, 0.2) !important;
transform: translateY(-1px) !important;
}
/* 下拉选择框样式 */
:deep(#tableStyle .el-select .el-input__inner) {
border-color: rgba(129, 199, 132, 0.4) !important;
color: #1b5e20 !important;
}
:deep(#tableStyle .el-select .el-input__inner:focus) {
border-color: #4caf50 !important;
}
:deep(#tableStyle .el-select .el-input__suffix .el-input__suffix-inner .el-select__caret) {
color: #4caf50 !important;
}
/* 滚动条样式 */
:deep(#tableStyle .el-table.el-table--scrollable-x .el-table__body-wrapper) {
scrollbar-width: thin !important;
scrollbar-color: rgba(76, 175, 80, 0.4) rgba(232, 245, 233, 0.5) !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar) {
height: 8px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-track) {
background: rgba(232, 245, 233, 0.5) !important;
border-radius: 4px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-thumb) {
background: linear-gradient(90deg, #81c784, #66bb6a) !important;
border-radius: 4px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-x .el-table__body-wrapper::-webkit-scrollbar-thumb:hover) {
background: linear-gradient(90deg, #66bb6a, #4caf50) !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-y .el-table__body-wrapper) {
scrollbar-width: thin !important;
scrollbar-color: rgba(76, 175, 80, 0.4) rgba(232, 245, 233, 0.5) !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar) {
width: 8px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-track) {
background: rgba(232, 245, 233, 0.5) !important;
border-radius: 4px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-thumb) {
background: linear-gradient(180deg, #81c784, #66bb6a) !important;
border-radius: 4px !important;
}
:deep(#tableStyle .el-table.el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-thumb:hover) {
background: linear-gradient(180deg, #66bb6a, #4caf50) !important;
}
.pagination-container {
margin-top: 30px;
display: flex;
justify-content: center;
}
:deep(.pagination-container .el-pagination) {
.el-pager li {
background: rgba(255, 255, 255, 0.9) !important;
color: #2e7d32 !important;
border: 1px solid rgba(129, 199, 132, 0.3) !important;
border-radius: 6px !important;
margin: 0 4px !important;
transition: all 0.3s ease !important;
}
.el-pager li:hover {
background: rgba(129, 199, 132, 0.2) !important;
color: #1b5e20 !important;
transform: translateY(-2px) !important;
}
.el-pager li.active {
background: linear-gradient(135deg, #4caf50, #2e7d32) !important;
color: #fff !important;
border-color: #4caf50 !important;
font-weight: 600 !important;
}
.btn-prev,
.btn-next {
background: rgba(255, 255, 255, 0.9) !important;
color: #2e7d32 !important;
border: 1px solid rgba(129, 199, 132, 0.3) !important;
border-radius: 6px !important;
transition: all 0.3s ease !important;
}
.btn-prev:hover,
.btn-next:hover {
background: rgba(129, 199, 132, 0.2) !important;
color: #1b5e20 !important;
transform: translateY(-2px) !important;
}
.btn-prev:disabled,
.btn-next:disabled {
opacity: 0.5 !important;
cursor: not-allowed !important;
}
}
.taskDialog :deep(.el-dialog) {
border-radius: 18px;
border: 1px solid rgba(129, 199, 132, 0.35);
box-shadow: 0 12px 30px rgba(76, 175, 80, 0.18);
}
.taskDialog :deep(.el-dialog__header) {
background: linear-gradient(135deg, #4caf50, #2e7d32);
color: #fff;
border-radius: 18px 18px 0 0;
}
.taskDialog :deep(.el-form-item__label) {
color: #1b5e20;
font-weight: 600;
}
.taskDialog :deep(.el-input__inner) {
border-color: rgba(129, 199, 132, 0.4) !important;
}
.taskDialog :deep(.el-input__inner:focus) {
border-color: #4caf50 !important;
}
.taskDialog :deep(.el-select .el-input__inner) {
border-color: rgba(129, 199, 132, 0.4) !important;
}
.taskDialog :deep(.el-select .el-input__inner:focus) {
border-color: #4caf50 !important;
}
.dialog-footer {
text-align: right;
margin-top: 20px;
}
:deep(.el-select-dropdown) {
border: 1px solid rgba(129, 199, 132, 0.3) !important;
border-radius: 10px !important;
box-shadow: 0 8px 20px rgba(76, 175, 80, 0.15) !important;
}
:deep(.el-select-dropdown .el-select-dropdown__item) {
color: #2e4b31 !important;
}
:deep(.el-select-dropdown .el-select-dropdown__item:hover) {
background: rgba(129, 199, 132, 0.2) !important;
color: #1b5e20 !important;
}
:deep(.el-select-dropdown .el-select-dropdown__item.selected) {
background: rgba(76, 175, 80, 0.25) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
}
</style>
<style>
/* 全局表格样式覆盖 */
#tableStyle.el-table {
border: 1px solid rgba(129, 199, 132, 0.3) !important;
border-radius: 16px !important;
overflow: hidden !important;
}
#tableStyle.el-table.el-table--border {
border: 1px solid rgba(129, 199, 132, 0.3) !important;
}
#tableStyle.el-table.el-table--border::after,
#tableStyle.el-table.el-table--border::before {
background-color: rgba(129, 199, 132, 0.3) !important;
}
#tableStyle.el-table.el-table--border th {
border-right: 1px solid rgba(129, 199, 132, 0.25) !important;
}
#tableStyle.el-table.el-table--border th:last-child {
border-right: none !important;
}
#tableStyle.el-table.el-table--border td {
border-right: 1px solid rgba(76, 175, 80, 0.08) !important;
}
#tableStyle.el-table.el-table--border td:last-child {
border-right: none !important;
}
#tableStyle.el-table.el-table--striped .el-table__body tr.el-table__row--striped td {
background: rgba(233, 247, 235, 0.65) !important;
}
#tableStyle.el-table.el-table--striped .el-table__body tr.el-table__row--striped:hover td {
background: rgba(200, 230, 201, 0.5) !important;
}
/* 表头样式全局覆盖 */
#tableStyle.el-table .el-table__header-wrapper th {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
font-size: 14px !important;
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif !important;
}
#tableStyle.el-table .el-table__header-wrapper thead th {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
}
#tableStyle.el-table .el-table__header th {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
}
#tableStyle.el-table .el-table__header th .cell {
color: #1b5e20 !important;
font-weight: 600 !important;
font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif !important;
}
#tableStyle.el-table .el-table__header th.sinCl {
background: linear-gradient(90deg, #e0f0e2, #f2fbf3) !important;
color: #1b5e20 !important;
font-weight: 600 !important;
border-bottom: 1px solid rgba(129, 199, 132, 0.35) !important;
}
#tableStyle.el-table .el-table__header th.sinCl .cell {
color: #1b5e20 !important;
font-weight: 600 !important;
}
</style>