From c6b6497c43541568606b524df003c3f1e4df5e65 Mon Sep 17 00:00:00 2001 From: hzz Date: Thu, 28 Mar 2024 17:05:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/casm/device/index.js | 44 ++++ src/layout/components/TagsView/index.vue | 12 +- src/views/casm/device/index.vue | 315 +++++++++++++++++++++++ 3 files changed, 370 insertions(+), 1 deletion(-) create mode 100644 src/api/casm/device/index.js create mode 100644 src/views/casm/device/index.vue diff --git a/src/api/casm/device/index.js b/src/api/casm/device/index.js new file mode 100644 index 0000000..f4061f5 --- /dev/null +++ b/src/api/casm/device/index.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询设备信息列表 +export function listDevice(query) { + return request({ + url: '/casm/device/list', + method: 'get', + params: query + }) +} + +// 查询设备信息详细 +export function getDevice(id) { + return request({ + url: '/casm/device/' + id, + method: 'get' + }) +} + +// 新增设备信息 +export function addDevice(data) { + return request({ + url: '/casm/device', + method: 'post', + data: data + }) +} + +// 修改设备信息 +export function updateDevice(data) { + return request({ + url: '/casm/device', + method: 'put', + data: data + }) +} + +// 删除设备信息 +export function delDevice(id) { + return request({ + url: '/casm/device/' + id, + method: 'delete' + }) +} diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index c1b7e3f..3498d4a 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -12,7 +12,7 @@ @click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''" @contextmenu.prevent="openMenu(tag, $event)" > - {{ tag.title }} + {{ menusTitle(tag.title)}} @@ -47,7 +47,9 @@ import { getNormalPath } from '@/utils/ruoyi' import useTagsViewStore from '@/store/modules/tagsView' import useSettingsStore from '@/store/modules/settings' import usePermissionStore from '@/store/modules/permission' +import { useI18n } from 'vue-i18n' +let {te,t} = useI18n(); const visible = ref(false); const top = ref(0); const left = ref(0); @@ -63,6 +65,14 @@ const visitedViews = computed(() => useTagsViewStore().visitedViews); const routes = computed(() => usePermissionStore().routes); const theme = computed(() => useSettingsStore().theme); + +//菜单栏国际化 +function menusTitle(item) { + if (te("menus." + item)) { + return t("menus." + item) + } + return item +} watch(route, () => { addTags() moveToCurrentTag() diff --git a/src/views/casm/device/index.vue b/src/views/casm/device/index.vue new file mode 100644 index 0000000..18ec190 --- /dev/null +++ b/src/views/casm/device/index.vue @@ -0,0 +1,315 @@ + + + + +