Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # src/layout/components/Sidebar/index.vue # src/permission.ts # src/types/element.d.ts # src/types/global.d.ts # tsconfig.json
This commit is contained in:
commit
40cf0128d8
@ -26,5 +26,5 @@ VITE_APP_RSA_PRIVATE_KEY = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAmc3C
|
||||
# 客户端id
|
||||
VITE_APP_CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e'
|
||||
|
||||
# websocket 开关(开发环境默认关闭ws 因vite的bug导致如ws无法连接则会崩溃)
|
||||
VITE_APP_WEBSOCKET = false
|
||||
# websocket 开关
|
||||
VITE_APP_WEBSOCKET = true
|
||||
|
18
package.json
18
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ruoyi-vue-plus",
|
||||
"version": "5.1.1",
|
||||
"version": "5.1.2",
|
||||
"description": "RuoYi-Vue-Plus多租户管理系统",
|
||||
"author": "LionLi",
|
||||
"license": "MIT",
|
||||
@ -23,10 +23,10 @@
|
||||
"@vueuse/core": "10.7.0",
|
||||
"animate.css": "4.1.1",
|
||||
"await-to-js": "^3.0.0",
|
||||
"axios": "^1.3.4",
|
||||
"crypto-js": "^4.1.1",
|
||||
"axios": "^1.6.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"echarts": "5.4.3",
|
||||
"element-plus": "2.4.3",
|
||||
"element-plus": "2.4.4",
|
||||
"file-saver": "2.0.5",
|
||||
"fuse.js": "6.6.2",
|
||||
"js-cookie": "3.0.5",
|
||||
@ -37,7 +37,7 @@
|
||||
"pinia": "2.1.7",
|
||||
"screenfull": "6.0.0",
|
||||
"vform3-builds": "3.0.8",
|
||||
"vue": "3.3.11",
|
||||
"vue": "3.3.13",
|
||||
"vue-cropper": "1.1.1",
|
||||
"vue-i18n": "9.2.2",
|
||||
"vue-router": "4.2.5",
|
||||
@ -46,9 +46,9 @@
|
||||
"devDependencies": {
|
||||
"@iconify/json": "^2.2.157",
|
||||
"@intlify/unplugin-vue-i18n": "1.6.0",
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
"@types/crypto-js": "^4.2.0",
|
||||
"@types/file-saver": "2.0.5",
|
||||
"@types/js-cookie": "3.0.3",
|
||||
"@types/js-cookie": "3.0.5",
|
||||
"@types/node": "18.14.2",
|
||||
"@types/nprogress": "0.2.0",
|
||||
"@types/path-browserify": "^1.0.0",
|
||||
@ -74,7 +74,7 @@
|
||||
"postcss": "^8.4.21",
|
||||
"prettier": "3.1.1",
|
||||
"sass": "1.69.5",
|
||||
"typescript": "5.2.2",
|
||||
"typescript": "5.3.3",
|
||||
"unocss": "^0.58.0",
|
||||
"unplugin-auto-import": "0.17.2",
|
||||
"unplugin-icons": "0.18.1",
|
||||
@ -85,6 +85,6 @@
|
||||
"vitest": "^0.29.7",
|
||||
"vue-eslint-parser": "9.3.2",
|
||||
"vue-tsc": "0.35.0",
|
||||
"vite": "5.0.4"
|
||||
"vite": "5.0.5"
|
||||
}
|
||||
}
|
||||
|
@ -64,12 +64,12 @@ export const delClient = (id: string | number | Array<string | number>) => {
|
||||
|
||||
/**
|
||||
* 状态修改
|
||||
* @param id ID
|
||||
* @param clientId 客户端id
|
||||
* @param status 状态
|
||||
*/
|
||||
export function changeStatus(id: number | string, status: string) {
|
||||
export function changeStatus(clientId: string, status: string) {
|
||||
const data = {
|
||||
id,
|
||||
clientId,
|
||||
status
|
||||
};
|
||||
return request({
|
||||
|
@ -7,7 +7,7 @@ export interface ClientVO {
|
||||
/**
|
||||
* 客户端id
|
||||
*/
|
||||
clientId: string | number;
|
||||
clientId: string;
|
||||
|
||||
/**
|
||||
* 客户端key
|
||||
|
@ -13,7 +13,7 @@
|
||||
:collapse-transition="false"
|
||||
mode="vertical"
|
||||
>
|
||||
<sidebar-item v-for="(r, index) in sidebarRouters" :key="r.path + index" :item="r" :base-path="r.path" />
|
||||
<sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route" :base-path="route.path" />
|
||||
</el-menu>
|
||||
</transition>
|
||||
</el-scrollbar>
|
||||
@ -35,7 +35,7 @@ const route = useRoute();
|
||||
const appStore = useAppStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
const permissionStore = usePermissionStore();
|
||||
const sidebarRouters = computed<RouteRecordRaw[]>(() => permissionStore.sidebarRouters as any);
|
||||
const sidebarRouters = computed<RouteRecordRaw[]>(() => permissionStore.sidebarRouters);
|
||||
const showLogo = computed(() => settingsStore.sidebarLogo);
|
||||
const sideTheme = computed(() => settingsStore.sideTheme);
|
||||
const theme = computed(() => settingsStore.theme);
|
||||
|
@ -26,6 +26,7 @@ import SideBar from './components/Sidebar/index.vue';
|
||||
import { AppMain, Navbar, Settings, TagsView } from './components';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import { initWebSocket } from '@/utils/websocket';
|
||||
|
||||
const settingsStore = useSettingsStore();
|
||||
const theme = computed(() => settingsStore.theme);
|
||||
@ -65,6 +66,11 @@ onMounted(() => {
|
||||
});
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
let protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://';
|
||||
initWebSocket(protocol + window.location.host + import.meta.env.VITE_APP_BASE_API + '/resource/websocket');
|
||||
});
|
||||
|
||||
const handleClickOutside = () => {
|
||||
useAppStore().closeSideBar({ withoutAnimation: false });
|
||||
};
|
||||
|
12
src/types/element.d.ts
vendored
12
src/types/element.d.ts
vendored
@ -16,11 +16,6 @@ declare global {
|
||||
declare type ElColorPickerInstance = ep.ColorPickerInstance;
|
||||
declare type ElRateInstance = ep.RateInstance;
|
||||
declare type ElSliderInstance = ep.SliderInstance;
|
||||
declare type TransferKey = ep.TransferKey;
|
||||
declare type CheckboxValueType = ep.CheckboxValueType;
|
||||
declare type ElFormRules = ep.FormRules;
|
||||
declare type DateModelType = ep.DateModelType;
|
||||
declare type UploadFile = ep.UploadFile;
|
||||
|
||||
declare type ElTreeInstance = InstanceType<typeof ep.ElTree>;
|
||||
declare type ElTreeSelectInstance = InstanceType<typeof ep.ElTreeSelect>;
|
||||
@ -31,4 +26,11 @@ declare global {
|
||||
declare type ElDatePickerInstance = InstanceType<typeof ep.ElDatePicker>;
|
||||
declare type ElTimePickerInstance = InstanceType<typeof ep.ElTimePicker>;
|
||||
declare type ElTimeSelectInstance = InstanceType<typeof ep.ElTimeSelect>;
|
||||
|
||||
declare type TransferKey = ep.TransferKey;
|
||||
declare type CheckboxValueType = ep.CheckboxValueType;
|
||||
declare type ElFormRules = ep.FormRules;
|
||||
declare type DateModelType = ep.DateModelType;
|
||||
declare type UploadFile = ep.UploadFile;
|
||||
|
||||
}
|
||||
|
@ -19,10 +19,8 @@
|
||||
*/
|
||||
|
||||
import { getToken } from '@/utils/auth';
|
||||
import useNoticeStore from '@/store/modules/notice';
|
||||
import { ElNotification } from 'element-plus';
|
||||
|
||||
const { addNotice } = useNoticeStore();
|
||||
import useNoticeStore from '@/store/modules/notice';
|
||||
|
||||
let socketUrl: any = ''; // socket地址
|
||||
let websocket: any = null; // websocket 实例
|
||||
@ -125,7 +123,7 @@ export const websocketonmessage = () => {
|
||||
if (e.data.indexOf('ping') > 0) {
|
||||
return;
|
||||
}
|
||||
addNotice({
|
||||
useNoticeStore().addNotice({
|
||||
message: e.data,
|
||||
read: false,
|
||||
time: new Date().toLocaleString()
|
||||
|
@ -33,7 +33,7 @@
|
||||
* 部署方式 Docker 容器编排 一键部署业务集群<br />
|
||||
* 国际化 SpringMessage Spring标准国际化方案<br />
|
||||
</p>
|
||||
<p><b>当前版本:</b> <span>v5.1.1</span></p>
|
||||
<p><b>当前版本:</b> <span>v5.1.2</span></p>
|
||||
<p>
|
||||
<el-tag type="danger">¥免费开源</el-tag>
|
||||
</p>
|
||||
@ -78,7 +78,7 @@
|
||||
* 分布式监控 Prometheus、Grafana 全方位性能监控<br />
|
||||
* 其余与 Vue 版本一致<br />
|
||||
</p>
|
||||
<p><b>当前版本:</b> <span>v2.1.1</span></p>
|
||||
<p><b>当前版本:</b> <span>v2.1.2</span></p>
|
||||
<p>
|
||||
<el-tag type="danger">¥免费开源</el-tag>
|
||||
</p>
|
||||
@ -96,13 +96,6 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Index" lang="ts">
|
||||
import { initWebSocket } from '@/utils/websocket';
|
||||
|
||||
onMounted(() => {
|
||||
let protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://';
|
||||
initWebSocket(protocol + window.location.host + import.meta.env.VITE_APP_BASE_API + '/resource/websocket');
|
||||
});
|
||||
|
||||
const goTarget = (url: string) => {
|
||||
window.open(url, '__blank');
|
||||
};
|
||||
|
@ -303,7 +303,7 @@ const handleStatusChange = async (row: ClientVO) => {
|
||||
let text = row.status === '0' ? '启用' : '停用';
|
||||
try {
|
||||
await proxy?.$modal.confirm('确认要"' + text + '"吗?');
|
||||
await changeStatus(row.id, row.status);
|
||||
await changeStatus(row.clientId, row.status);
|
||||
proxy?.$modal.msgSuccess(text + '成功');
|
||||
} catch (err) {
|
||||
row.status = row.status === '0' ? '1' : '0';
|
||||
|
@ -70,7 +70,7 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-model="dialog.visible" :title="dialog.title" destroy-on-close append-to-bod width="600px">
|
||||
<el-dialog v-model="dialog.visible" :title="dialog.title" destroy-on-close append-to-body width="600px">
|
||||
<el-form ref="deptFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col v-if="form.parentId !== 0" :span="24">
|
||||
|
@ -222,7 +222,7 @@ const submitForm = () => {
|
||||
noticeFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
form.value.noticeId ? await updateNotice(form.value) : await addNotice(form.value);
|
||||
proxy?.$modal.msgSuccess('修改成功');
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user