更新用户列表 列顺序。
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
|
||||
|
||||
# 复制 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
|
||||
|
||||
27
nginx.conf
27
nginx.conf
@ -1,9 +1,31 @@
|
||||
server {
|
||||
# 移除 user 指令,因为我们以非 root 用户运行
|
||||
worker_processes auto;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
gzip on;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
# 添加 gzip 压缩
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# 设置客户端最大body大小
|
||||
@ -38,4 +60,5 @@ server {
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -87,9 +87,14 @@
|
||||
</template>
|
||||
<template v-if="column.key === 'community_name'">
|
||||
<a-space>
|
||||
<span>{{ record.community_name || '-' }}</span>
|
||||
<a-button type="link" @click="handleEditCommunity(record)">
|
||||
修改
|
||||
<template v-if="record.community_name">
|
||||
<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-space>
|
||||
</template>
|
||||
@ -147,21 +152,27 @@
|
||||
<!-- 添加小区选择模态框 -->
|
||||
<a-modal
|
||||
v-model:visible="communityModalVisible"
|
||||
title="修改所属小区"
|
||||
:title="selectedCommunityId ? '修改所属小区' : '设置所属小区'"
|
||||
:confirm-loading="communitySaving"
|
||||
@ok="handleCommunitySave"
|
||||
@cancel="handleCommunityCancel"
|
||||
:confirmLoading="communitySaving"
|
||||
>
|
||||
<a-form layout="vertical">
|
||||
<a-form-item label="所属小区">
|
||||
<a-form-item
|
||||
label="选择小区"
|
||||
:validate-status="selectedCommunityId === undefined ? 'error' : ''"
|
||||
:help="selectedCommunityId === undefined ? '请选择小区' : ''"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="selectedCommunityId"
|
||||
style="width: 100%"
|
||||
placeholder="请选择小区"
|
||||
allowClear
|
||||
:options="communityOptions"
|
||||
: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>
|
||||
@ -198,13 +209,13 @@ export default defineComponent({
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '用户ID',
|
||||
title: 'ID',
|
||||
dataIndex: 'userid',
|
||||
key: 'userid',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '用户名',
|
||||
title: '昵称',
|
||||
dataIndex: 'nickname',
|
||||
key: 'nickname',
|
||||
width: 120,
|
||||
@ -216,13 +227,7 @@ export default defineComponent({
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '角色',
|
||||
dataIndex: 'roles',
|
||||
key: 'roles',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '用户编号',
|
||||
title: '邀请码',
|
||||
dataIndex: 'user_code',
|
||||
key: 'user_code',
|
||||
width: 120,
|
||||
@ -234,18 +239,24 @@ export default defineComponent({
|
||||
width: 80,
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
title: '角色',
|
||||
dataIndex: 'roles',
|
||||
key: 'roles',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '归属小区',
|
||||
dataIndex: 'community_name',
|
||||
key: 'community_name',
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'create_time',
|
||||
key: 'create_time',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: '所属小区',
|
||||
dataIndex: 'community_name',
|
||||
key: 'community_name',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
@ -603,21 +614,20 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
:deep(.ant-tag) {
|
||||
margin: 2px;
|
||||
min-width: 80px;
|
||||
text-align: center;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
:deep(.ant-checkbox-group) {
|
||||
:deep(.ant-space) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
:deep(.ant-checkbox-wrapper) {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.ant-checkbox-wrapper + .ant-checkbox-wrapper) {
|
||||
margin-left: 0 !important;
|
||||
:deep(.ant-btn-link) {
|
||||
padding: 0 4px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.table-filter {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user