Merge branch 'warm-flw-future' of https://gitee.com/JavaLionLi/plus-ui into warm-flw-future
This commit is contained in:
commit
157f261058
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ruoyi-vue-plus",
|
"name": "ruoyi-vue-plus",
|
||||||
"version": "5.2.1",
|
"version": "5.2.2",
|
||||||
"description": "RuoYi-Vue-Plus多租户管理系统",
|
"description": "RuoYi-Vue-Plus多租户管理系统",
|
||||||
"author": "LionLi",
|
"author": "LionLi",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -91,3 +91,11 @@ export function syncTenantPackage(tenantId: string | number, packageId: string |
|
|||||||
params: data
|
params: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 同步租户字典
|
||||||
|
export function syncTenantDict() {
|
||||||
|
return request({
|
||||||
|
url: '/system/tenant/syncTenantDict',
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -10,6 +10,7 @@ import FileSaver from 'file-saver';
|
|||||||
import { getLanguage } from '@/lang';
|
import { getLanguage } from '@/lang';
|
||||||
import { encryptBase64, encryptWithAes, generateAesKey, decryptWithAes, decryptBase64 } from '@/utils/crypto';
|
import { encryptBase64, encryptWithAes, generateAesKey, decryptWithAes, decryptBase64 } from '@/utils/crypto';
|
||||||
import { encrypt, decrypt } from '@/utils/jsencrypt';
|
import { encrypt, decrypt } from '@/utils/jsencrypt';
|
||||||
|
import router from "@/router";
|
||||||
|
|
||||||
const encryptHeader = 'encrypt-key';
|
const encryptHeader = 'encrypt-key';
|
||||||
let downloadLoadingInstance: LoadingInstance;
|
let downloadLoadingInstance: LoadingInstance;
|
||||||
@ -134,8 +135,13 @@ service.interceptors.response.use(
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
isRelogin.show = false;
|
isRelogin.show = false;
|
||||||
useUserStore().logout().then(() => {
|
useUserStore().logout().then(() => {
|
||||||
location.href = import.meta.env.VITE_APP_CONTEXT_PATH + 'index';
|
router.replace({
|
||||||
});
|
path: '/login',
|
||||||
|
query: {
|
||||||
|
redirect: encodeURIComponent(router.currentRoute.value.fullPath || '/')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
isRelogin.show = false;
|
isRelogin.show = false;
|
||||||
});
|
});
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
* 部署方式 Docker 容器编排 一键部署业务集群<br />
|
* 部署方式 Docker 容器编排 一键部署业务集群<br />
|
||||||
* 国际化 SpringMessage Spring标准国际化方案<br />
|
* 国际化 SpringMessage Spring标准国际化方案<br />
|
||||||
</p>
|
</p>
|
||||||
<p><b>当前版本:</b> <span>v5.2.1</span></p>
|
<p><b>当前版本:</b> <span>v5.2.2</span></p>
|
||||||
<p>
|
<p>
|
||||||
<el-tag type="danger">¥免费开源</el-tag>
|
<el-tag type="danger">¥免费开源</el-tag>
|
||||||
</p>
|
</p>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
* 分布式监控 Prometheus、Grafana 全方位性能监控<br />
|
* 分布式监控 Prometheus、Grafana 全方位性能监控<br />
|
||||||
* 其余与 Vue 版本一致<br />
|
* 其余与 Vue 版本一致<br />
|
||||||
</p>
|
</p>
|
||||||
<p><b>当前版本:</b> <span>v2.2.0</span></p>
|
<p><b>当前版本:</b> <span>v2.2.1</span></p>
|
||||||
<p>
|
<p>
|
||||||
<el-tag type="danger">¥免费开源</el-tag>
|
<el-tag type="danger">¥免费开源</el-tag>
|
||||||
</p>
|
</p>
|
||||||
|
@ -97,7 +97,7 @@ const tenantEnabled = ref(true);
|
|||||||
|
|
||||||
// 注册开关
|
// 注册开关
|
||||||
const register = ref(false);
|
const register = ref(false);
|
||||||
const redirect = ref(undefined);
|
const redirect = ref('/');
|
||||||
const loginRef = ref<ElFormInstance>();
|
const loginRef = ref<ElFormInstance>();
|
||||||
// 租户列表
|
// 租户列表
|
||||||
const tenantList = ref<TenantVO[]>([]);
|
const tenantList = ref<TenantVO[]>([]);
|
||||||
@ -105,7 +105,7 @@ const tenantList = ref<TenantVO[]>([]);
|
|||||||
watch(
|
watch(
|
||||||
() => router.currentRoute.value,
|
() => router.currentRoute.value,
|
||||||
(newRoute: any) => {
|
(newRoute: any) => {
|
||||||
redirect.value = newRoute.query && newRoute.query.redirect;
|
redirect.value = newRoute.query && decodeURIComponent(newRoute.query.redirect);
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
@ -49,6 +49,9 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['system:dict:remove']" type="danger" plain icon="Refresh" @click="handleRefreshCache">刷新缓存</el-button>
|
<el-button v-hasPermi="['system:dict:remove']" type="danger" plain icon="Refresh" @click="handleRefreshCache">刷新缓存</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button v-if="userId === 1" type="success" plain icon="Refresh" @click="handleSyncTenantDict">同步租户字典</el-button>
|
||||||
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @query-table="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @query-table="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
@ -109,11 +112,15 @@
|
|||||||
|
|
||||||
<script setup name="Dict" lang="ts">
|
<script setup name="Dict" lang="ts">
|
||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
|
import useUserStore from "@/store/modules/user";
|
||||||
import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type';
|
import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type';
|
||||||
import { DictTypeForm, DictTypeQuery, DictTypeVO } from '@/api/system/dict/type/types';
|
import { DictTypeForm, DictTypeQuery, DictTypeVO } from '@/api/system/dict/type/types';
|
||||||
|
import { syncTenantDict } from "@/api/system/tenant";
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const userId = ref(userStore.userId);
|
||||||
const typeList = ref<DictTypeVO[]>([]);
|
const typeList = ref<DictTypeVO[]>([]);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
@ -239,6 +246,12 @@ const handleRefreshCache = async () => {
|
|||||||
proxy?.$modal.msgSuccess('刷新成功');
|
proxy?.$modal.msgSuccess('刷新成功');
|
||||||
useDictStore().cleanDict();
|
useDictStore().cleanDict();
|
||||||
};
|
};
|
||||||
|
/**同步租户字典*/
|
||||||
|
const handleSyncTenantDict = async () => {
|
||||||
|
await proxy?.$modal.confirm('确认要同步所有租户字典吗?');
|
||||||
|
let res = await syncTenantDict();
|
||||||
|
proxy?.$modal.msgSuccess(res.msg);
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
|
@ -321,7 +321,7 @@ const handleDelete = async (row?: TenantPkgVO) => {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
const handleExport = () => {
|
const handleExport = () => {
|
||||||
proxy?.download(
|
proxy?.download(
|
||||||
'system/package/export',
|
'system/tenant/package/export',
|
||||||
{
|
{
|
||||||
...queryParams.value
|
...queryParams.value
|
||||||
},
|
},
|
||||||
|
@ -274,7 +274,6 @@ const setSubTableColumns = (value: string) => {
|
|||||||
/** 查询菜单下拉树结构 */
|
/** 查询菜单下拉树结构 */
|
||||||
const getMenuTreeselect = async () => {
|
const getMenuTreeselect = async () => {
|
||||||
const res = await listMenu();
|
const res = await listMenu();
|
||||||
res.data.forEach((m) => (m.menuId = m.menuId.toString()));
|
|
||||||
const data = proxy?.handleTree<MenuOptionsType>(res.data, 'menuId');
|
const data = proxy?.handleTree<MenuOptionsType>(res.data, 'menuId');
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
|
@ -75,61 +75,7 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
|
|||||||
'diagram-js/lib/draw/BaseRenderer',
|
'diagram-js/lib/draw/BaseRenderer',
|
||||||
'tiny-svg',
|
'tiny-svg',
|
||||||
'image-conversion',
|
'image-conversion',
|
||||||
|
'element-plus/es/components/**/css'
|
||||||
'element-plus/es/components/text/style/css',
|
|
||||||
'element-plus/es/components/collapse-item/style/css',
|
|
||||||
'element-plus/es/components/collapse/style/css',
|
|
||||||
'element-plus/es/components/space/style/css',
|
|
||||||
'element-plus/es/components/container/style/css',
|
|
||||||
'element-plus/es/components/aside/style/css',
|
|
||||||
'element-plus/es/components/main/style/css',
|
|
||||||
'element-plus/es/components/header/style/css',
|
|
||||||
'element-plus/es/components/button-group/style/css',
|
|
||||||
'element-plus/es/components/radio-button/style/css',
|
|
||||||
'element-plus/es/components/checkbox-group/style/css',
|
|
||||||
'element-plus/es/components/form/style/css',
|
|
||||||
'element-plus/es/components/form-item/style/css',
|
|
||||||
'element-plus/es/components/button/style/css',
|
|
||||||
'element-plus/es/components/input/style/css',
|
|
||||||
'element-plus/es/components/input-number/style/css',
|
|
||||||
'element-plus/es/components/switch/style/css',
|
|
||||||
'element-plus/es/components/upload/style/css',
|
|
||||||
'element-plus/es/components/menu/style/css',
|
|
||||||
'element-plus/es/components/col/style/css',
|
|
||||||
'element-plus/es/components/icon/style/css',
|
|
||||||
'element-plus/es/components/row/style/css',
|
|
||||||
'element-plus/es/components/tag/style/css',
|
|
||||||
'element-plus/es/components/dialog/style/css',
|
|
||||||
'element-plus/es/components/loading/style/css',
|
|
||||||
'element-plus/es/components/radio/style/css',
|
|
||||||
'element-plus/es/components/radio-group/style/css',
|
|
||||||
'element-plus/es/components/popover/style/css',
|
|
||||||
'element-plus/es/components/scrollbar/style/css',
|
|
||||||
'element-plus/es/components/tooltip/style/css',
|
|
||||||
'element-plus/es/components/dropdown/style/css',
|
|
||||||
'element-plus/es/components/dropdown-menu/style/css',
|
|
||||||
'element-plus/es/components/dropdown-item/style/css',
|
|
||||||
'element-plus/es/components/sub-menu/style/css',
|
|
||||||
'element-plus/es/components/menu-item/style/css',
|
|
||||||
'element-plus/es/components/divider/style/css',
|
|
||||||
'element-plus/es/components/card/style/css',
|
|
||||||
'element-plus/es/components/link/style/css',
|
|
||||||
'element-plus/es/components/breadcrumb/style/css',
|
|
||||||
'element-plus/es/components/breadcrumb-item/style/css',
|
|
||||||
'element-plus/es/components/table/style/css',
|
|
||||||
'element-plus/es/components/tree-select/style/css',
|
|
||||||
'element-plus/es/components/table-column/style/css',
|
|
||||||
'element-plus/es/components/select/style/css',
|
|
||||||
'element-plus/es/components/option/style/css',
|
|
||||||
'element-plus/es/components/pagination/style/css',
|
|
||||||
'element-plus/es/components/tree/style/css',
|
|
||||||
'element-plus/es/components/alert/style/css',
|
|
||||||
'element-plus/es/components/checkbox/style/css',
|
|
||||||
'element-plus/es/components/date-picker/style/css',
|
|
||||||
'element-plus/es/components/transfer/style/css',
|
|
||||||
'element-plus/es/components/tabs/style/css',
|
|
||||||
'element-plus/es/components/image/style/css',
|
|
||||||
'element-plus/es/components/tab-pane/style/css'
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user