更新用户列表 列顺序。
This commit is contained in:
parent
c7f312ba12
commit
d342f1f0c4
@ -39,7 +39,7 @@ RUN mkdir -p /var/cache/nginx/client_temp \
|
|||||||
&& chown -R nginx:nginx /var/cache/nginx
|
&& chown -R nginx:nginx /var/cache/nginx
|
||||||
|
|
||||||
# 复制 nginx 配置
|
# 复制 nginx 配置
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
# 从构建阶段复制构建结果
|
# 从构建阶段复制构建结果
|
||||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
|
|||||||
87
nginx.conf
87
nginx.conf
@ -1,41 +1,64 @@
|
|||||||
server {
|
# 移除 user 指令,因为我们以非 root 用户运行
|
||||||
listen 80;
|
worker_processes auto;
|
||||||
server_name localhost;
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
# 添加 gzip 压缩
|
events {
|
||||||
gzip on;
|
worker_connections 1024;
|
||||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
}
|
||||||
|
|
||||||
# 设置客户端最大body大小
|
http {
|
||||||
client_max_body_size 20M;
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
root /usr/share/nginx/html;
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
index index.html;
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
# 支持 history 路由模式
|
access_log /var/log/nginx/access.log main;
|
||||||
location / {
|
error_log /var/log/nginx/error.log warn;
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
||||||
}
|
|
||||||
|
|
||||||
# 缓存静态资源
|
sendfile on;
|
||||||
location /assets {
|
keepalive_timeout 65;
|
||||||
expires 1y;
|
gzip on;
|
||||||
add_header Cache-Control "public, no-transform";
|
|
||||||
access_log off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 禁止访问 . 文件
|
server {
|
||||||
location ~ /\. {
|
listen 80;
|
||||||
deny all;
|
server_name localhost;
|
||||||
access_log off;
|
|
||||||
log_not_found off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 错误页面配置
|
# 添加 gzip 压缩
|
||||||
error_page 404 /index.html;
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
location = /50x.html {
|
# 设置客户端最大body大小
|
||||||
root /usr/share/nginx/html;
|
client_max_body_size 20M;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
# 支持 history 路由模式
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||||
|
}
|
||||||
|
|
||||||
|
# 缓存静态资源
|
||||||
|
location /assets {
|
||||||
|
expires 1y;
|
||||||
|
add_header Cache-Control "public, no-transform";
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 禁止访问 . 文件
|
||||||
|
location ~ /\. {
|
||||||
|
deny all;
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 错误页面配置
|
||||||
|
error_page 404 /index.html;
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -87,9 +87,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'community_name'">
|
<template v-if="column.key === 'community_name'">
|
||||||
<a-space>
|
<a-space>
|
||||||
<span>{{ record.community_name || '-' }}</span>
|
<template v-if="record.community_name">
|
||||||
<a-button type="link" @click="handleEditCommunity(record)">
|
<a-tag color="green">{{ record.community_name }}</a-tag>
|
||||||
修改
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<a-tag color="default">未设置</a-tag>
|
||||||
|
</template>
|
||||||
|
<a-button type="link" size="small" @click="handleEditCommunity(record)">
|
||||||
|
{{ record.community_name ? '修改' : '设置' }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
@ -147,21 +152,27 @@
|
|||||||
<!-- 添加小区选择模态框 -->
|
<!-- 添加小区选择模态框 -->
|
||||||
<a-modal
|
<a-modal
|
||||||
v-model:visible="communityModalVisible"
|
v-model:visible="communityModalVisible"
|
||||||
title="修改所属小区"
|
:title="selectedCommunityId ? '修改所属小区' : '设置所属小区'"
|
||||||
|
:confirm-loading="communitySaving"
|
||||||
@ok="handleCommunitySave"
|
@ok="handleCommunitySave"
|
||||||
@cancel="handleCommunityCancel"
|
@cancel="handleCommunityCancel"
|
||||||
:confirmLoading="communitySaving"
|
|
||||||
>
|
>
|
||||||
<a-form layout="vertical">
|
<a-form layout="vertical">
|
||||||
<a-form-item label="所属小区">
|
<a-form-item
|
||||||
|
label="选择小区"
|
||||||
|
:validate-status="selectedCommunityId === undefined ? 'error' : ''"
|
||||||
|
:help="selectedCommunityId === undefined ? '请选择小区' : ''"
|
||||||
|
>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="selectedCommunityId"
|
v-model:value="selectedCommunityId"
|
||||||
style="width: 100%"
|
|
||||||
placeholder="请选择小区"
|
placeholder="请选择小区"
|
||||||
allowClear
|
|
||||||
:options="communityOptions"
|
|
||||||
:loading="communityLoading"
|
:loading="communityLoading"
|
||||||
:fieldNames="{ label: 'name', value: 'id' }"
|
:options="communityOptions.map(item => ({
|
||||||
|
value: item.id,
|
||||||
|
label: item.name
|
||||||
|
}))"
|
||||||
|
style="width: 100%"
|
||||||
|
allowClear
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
@ -198,13 +209,13 @@ export default defineComponent({
|
|||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '用户ID',
|
title: 'ID',
|
||||||
dataIndex: 'userid',
|
dataIndex: 'userid',
|
||||||
key: 'userid',
|
key: 'userid',
|
||||||
width: 80,
|
width: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户名',
|
title: '昵称',
|
||||||
dataIndex: 'nickname',
|
dataIndex: 'nickname',
|
||||||
key: 'nickname',
|
key: 'nickname',
|
||||||
width: 120,
|
width: 120,
|
||||||
@ -216,13 +227,7 @@ export default defineComponent({
|
|||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '角色',
|
title: '邀请码',
|
||||||
dataIndex: 'roles',
|
|
||||||
key: 'roles',
|
|
||||||
width: 200,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '用户编号',
|
|
||||||
dataIndex: 'user_code',
|
dataIndex: 'user_code',
|
||||||
key: 'user_code',
|
key: 'user_code',
|
||||||
width: 120,
|
width: 120,
|
||||||
@ -234,18 +239,24 @@ export default defineComponent({
|
|||||||
width: 80,
|
width: 80,
|
||||||
align: 'right',
|
align: 'right',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '角色',
|
||||||
|
dataIndex: 'roles',
|
||||||
|
key: 'roles',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '归属小区',
|
||||||
|
dataIndex: 'community_name',
|
||||||
|
key: 'community_name',
|
||||||
|
width: 250,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
dataIndex: 'create_time',
|
dataIndex: 'create_time',
|
||||||
key: 'create_time',
|
key: 'create_time',
|
||||||
width: 180,
|
width: 180,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '所属小区',
|
|
||||||
dataIndex: 'community_name',
|
|
||||||
key: 'community_name',
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
key: 'action',
|
key: 'action',
|
||||||
@ -603,21 +614,20 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
:deep(.ant-tag) {
|
:deep(.ant-tag) {
|
||||||
margin: 2px;
|
min-width: 80px;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.ant-checkbox-group) {
|
:deep(.ant-space) {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
gap: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.ant-checkbox-wrapper) {
|
:deep(.ant-btn-link) {
|
||||||
margin-left: 0 !important;
|
padding: 0 4px;
|
||||||
}
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
:deep(.ant-checkbox-wrapper + .ant-checkbox-wrapper) {
|
|
||||||
margin-left: 0 !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-filter {
|
.table-filter {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user