optimize: ♻️ 角色分配优化
This commit is contained in:
parent
f2c809a142
commit
d980398b7f
|
@ -6,6 +6,10 @@ RUN rm /etc/nginx/conf.d/default.conf
|
|||
|
||||
# 将自定义的 Nginx 配置文件复制到容器中
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
#COPY bunny-web.site.csr /etc/nginx/bunny-web.site.csr
|
||||
#COPY bunny-web.site.key /etc/nginx/bunny-web.site.key
|
||||
#COPY bunny-web.site_bundle.crt /etc/nginx/bunny-web.site_bundle.crt
|
||||
#COPY bunny-web.site_bundle.pem /etc/nginx/bunny-web.site_bundle.pem
|
||||
|
||||
# 设置时区,构建镜像时执行的命令
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
@ -24,4 +28,3 @@ EXPOSE 80
|
|||
|
||||
# 自动启动 Nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
|
|
|
@ -4,28 +4,28 @@ map $http_upgrade $connection_upgrade {
|
|||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
listen 80 ;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /etc/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
location / {
|
||||
root /etc/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
|
||||
# 后端跨域请求
|
||||
location ~/admin/ {
|
||||
proxy_pass http://172.17.0.1:8000;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
# 后端跨域请求
|
||||
location ~/admin/ {
|
||||
proxy_pass http://172.17.0.1:8000;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
error_page 404 404.html;
|
||||
error_page 404 404.html;
|
||||
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ import { computed, defineComponent, h, onBeforeMount, onMounted, reactive, ref }
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useLayout } from './hooks/useLayout';
|
||||
import { setType } from './types';
|
||||
|
||||
import BackTopIcon from '@/assets/svg/back_top.svg?component';
|
||||
import LayContent from './components/lay-content/index.vue';
|
||||
import LayNavbar from './components/lay-navbar/index.vue';
|
||||
|
@ -18,6 +17,7 @@ import LaySetting from './components/lay-setting/index.vue';
|
|||
import NavHorizontal from './components/lay-sidebar/NavHorizontal.vue';
|
||||
import NavVertical from './components/lay-sidebar/NavVertical.vue';
|
||||
import LayTag from './components/lay-tag/index.vue';
|
||||
import { useUserStore } from '@/store/system/user';
|
||||
|
||||
const { t } = useI18n();
|
||||
const appWrapperRef = ref();
|
||||
|
@ -26,6 +26,7 @@ const { layout } = useLayout();
|
|||
const isMobile = deviceDetection();
|
||||
const pureSetting = useSettingStoreHook();
|
||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||
const userStore = useUserStore();
|
||||
|
||||
const set: setType = reactive({
|
||||
sidebar: computed(() => {
|
||||
|
@ -104,9 +105,9 @@ useResizeObserver(appWrapperRef, entries => {
|
|||
});
|
||||
|
||||
onMounted(() => {
|
||||
if (isMobile) {
|
||||
toggle('mobile', false);
|
||||
}
|
||||
if (isMobile) toggle('mobile', false);
|
||||
// 获取用户信息
|
||||
userStore.getUserinfo();
|
||||
});
|
||||
|
||||
onBeforeMount(() => {
|
||||
|
|
|
@ -38,7 +38,7 @@ defineExpose({ assignRoles });
|
|||
|
||||
<template>
|
||||
<div class="flex flex-col items-center">
|
||||
<el-text v-show="warning" class="mx-1" type="warning">{{ warning }}</el-text>
|
||||
<el-text v-show="warning" class="mx-1" type="danger">{{ warning }}</el-text>
|
||||
<el-transfer
|
||||
v-model="assignRoles"
|
||||
:button-texts="[$t('take_back'), $t('add')]"
|
||||
|
|
|
@ -79,6 +79,6 @@ export const columns: TableColumnList = [
|
|||
export const formRules = reactive<FormRules>({
|
||||
title: [{ required: true, message: '菜单名称为必填项', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '路由名称为必填项', trigger: 'blur' }],
|
||||
path: [{ required: true, message: '路由路径为必填项', trigger: 'blur' }],
|
||||
path: [{ required: true, message: '路由路径为必填项且为"/"开头', trigger: ['blur', 'change'], pattern: /^\/.*/ }],
|
||||
auths: [{ required: true, message: '权限标识为必填项', trigger: 'blur' }],
|
||||
});
|
||||
|
|
|
@ -261,7 +261,7 @@ export const clearAllRolesSelect = async () => {
|
|||
draggable: true,
|
||||
closeOnClickModal: false,
|
||||
fullscreenIcon: true,
|
||||
contentRenderer: () => <ElText type={'warning'}>{$t('clearAllRolesSelectTip')}</ElText>,
|
||||
contentRenderer: () => <ElText type={'danger'}>{$t('clearAllRolesSelectTip')}</ElText>,
|
||||
beforeSure: async () => {
|
||||
// 表格功能
|
||||
const { clearSelection } = tableRef.value.getTableRef();
|
||||
|
@ -272,7 +272,7 @@ export const clearAllRolesSelect = async () => {
|
|||
draggable: true,
|
||||
closeOnClickModal: false,
|
||||
fullscreenIcon: true,
|
||||
contentRenderer: () => <ElText type={'warning'}>{$t('clearAllRolesSelectTip')}</ElText>,
|
||||
contentRenderer: () => <ElText type={'danger'}>{$t('clearAllRolesSelectTip')}</ElText>,
|
||||
beforeSure: async () => {
|
||||
// 清除所有角色
|
||||
const result = await menuStore.clearAllRolesSelect(selectIds.value);
|
||||
|
|
Loading…
Reference in New Issue