修改国际化

master
夜笙歌 2 years ago
parent c0be54a340
commit e9e72e7f75

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1676008436800" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1990" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M162.816 672h199.68c-5.472-40.192-8.96-83.2-10.08-128H129.28c3.744 45.344 15.36 88.48 33.504 128z m37.248 64a384.32 384.32 0 0 0 223.712 149.824c-20.64-38.272-37.92-89.6-50.368-149.824H200.064z m661.12-64c18.144-39.52 29.76-82.656 33.504-128h-223.104a1166.624 1166.624 0 0 1-10.08 128h199.68z m-37.248 64H650.56c-12.448 60.192-29.728 111.552-50.368 149.824A384.32 384.32 0 0 0 823.904 736z m-399.232-64h174.592c4.544-39.52 7.424-82.656 8.384-128h-191.36c0.96 45.344 3.84 88.48 8.384 128z m9.312 64c17.44 96.896 45.856 160 77.984 160 32.128 0 60.544-63.104 77.984-160h-155.968z m-304.704-256h223.104c1.12-44.8 4.608-87.808 10.08-128h-199.68a381.632 381.632 0 0 0-33.504 128z m765.376 0a381.632 381.632 0 0 0-33.504-128h-199.68c5.472 40.192 8.96 83.2 10.08 128h223.104zM416.32 480h191.36a1379.936 1379.936 0 0 0-8.384-128h-174.592a1379.936 1379.936 0 0 0-8.384 128zM200.064 288h173.344c12.448-60.192 29.728-111.552 50.368-149.824A384.32 384.32 0 0 0 200.096 288z m623.872 0a384.32 384.32 0 0 0-223.712-149.824c20.64 38.272 37.92 89.6 50.368 149.824h173.344zM434.016 288h155.968C572.544 191.104 544.128 128 512 128c-32.128 0-60.544 63.104-77.984 160zM512 960C264.576 960 64 759.424 64 512S264.576 64 512 64s448 200.576 448 448-200.576 448-448 448z" fill="#333333" p-id="1991"></path></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -1,4 +1,5 @@
import request from '@/utils/request'
import Cookies from "js-cookie";
// 登录方法
export function login(username, password, code, uuid) {
@ -14,7 +15,7 @@ export function login(username, password, code, uuid) {
isToken: false
},
method: 'post',
data: data
data: {...data, lang: Cookies.get('language') === 'en' ? 'en' : 'zhCn'}
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 51 KiB

@ -33,7 +33,7 @@ import Cookies from "js-cookie";
const {t} = useI18n();
const isEN = (Cookies.get('language') || 'zh-cn') === 'en'
const isEN = (Cookies.get('language') || 'zhCn') === 'en'
const space = isEN ? ' ' : ''

@ -3,20 +3,51 @@ export default {
title: 'RuoYi Login Form',
logIn: 'Log in',
username: 'Username',
password: 'Password'
password: 'Password',
verificationCode: 'Verification Code',
loggingIn: 'Logging In ...',
signUpNow: 'signUpNow',
yourAccount: 'Your Account',
yourPassword: 'Your Password',
rememberPassword: 'Remember Password'
},
tagsView: {
refresh: 'Refresh',
close: 'Close',
closeOthers: 'Close Others',
closeLeft: 'close Left',
closeRight: 'close Right',
closeAll: 'Close All'
},
navBar: {
layoutSize: 'Layout Size',
personalCenter: 'Personal Center',
layoutSettings: 'Layout Settings',
signOut: 'Sign Out',
exitSystem: 'Are you sure you want to log off and exit the system?'
},
settings: {
styleSetting: 'Theme Style Settings',
title: 'Page style setting',
theme: 'Theme Color',
TopNav: 'Open TopNav',
tagsView: 'Open Tags-View',
fixedHeader: 'Fixed Header',
sidebarLogo: 'Sidebar Logo'
showLogo: 'Show Logo',
dynamicTitle: 'Dynamic Title',
saveConfiguration: 'Save Config',
resetConfiguration: 'Reset Config',
},
profile:{
personalInfo:'Personal Info',
userName:'User Name',
phone:'Phone',
email:'Email',
department:'Department',
role:'Role',
creationDate:'Creation Date',
basicInformation:'Basic Information',
changePassword:'Change Password'
},
option: {
refresh: 'refresh',
@ -29,6 +60,7 @@ export default {
reset: 'reset',
cancel: 'cancel',
ok: 'ok',
hint: 'hint',
confirmDeletion: 'Are you sure to delete the data item whose {key} is {value}?',
modificationSuccessful: 'Modification Successful',
addedSuccessfully: 'Added Successfully',

@ -8,7 +8,7 @@ const messages = {
en: {
...enLocale,
},
'zh-cn': {
zhCn: {
...zhLocale,
}
}
@ -16,7 +16,7 @@ const messages = {
const i18n = createI18n({
legacy: false,
globalInjection: true,
locale: Cookies.get('language') || 'zh-cn',
locale: Cookies.get('language') || 'zhCn',
messages
});

@ -1,22 +1,53 @@
export default {
login: {
title: '若依后台管理系统',
logIn: '登录',
logIn: '登 录',
username: '账号',
password: '密码'
password: '密码',
verificationCode: '验证码',
loggingIn: '登 录 中 ...',
signUpNow: '立即注册',
yourAccount: '您的账号',
yourPassword: '您的密码',
rememberPassword: '记住密码'
},
tagsView: {
refresh: '刷新',
close: '关闭',
refresh: '刷新页面',
close: '关闭当前',
closeOthers: '关闭其它',
closeLeft: '关闭左侧',
closeRight: '关闭右侧',
closeAll: '关闭所有'
},
navBar: {
layoutSize: '布局大小',
personalCenter: '个人中心',
layoutSettings: '布局设置',
signOut: '退出登录',
exitSystem: '确定注销并退出系统吗?'
},
settings: {
styleSetting: '主题风格设置',
title: '系统布局配置',
theme: '主题色',
theme: '主题颜色',
TopNav: '开启 TopNav',
tagsView: '开启 Tags-View',
fixedHeader: '固定 Header',
sidebarLogo: '侧边栏 Logo'
showLogo: '显示 Logo',
dynamicTitle: '动态标题',
saveConfiguration: '保存配置',
resetConfiguration: '重置配置',
},
profile:{
personalInfo:'个人信息',
userName:'用户名称',
phone:'手机号码',
email:'用户邮箱',
department:'所属部门',
role:'所属角色',
creationDate:'创建日期',
basicInformation:'基本资料',
changePassword:'修改密码'
},
option: {
refresh: '刷新',
@ -29,6 +60,7 @@ export default {
reset: '重置',
cancel: '取 消',
ok: '确 定',
hint: '提示',
confirmDeletion: '是否确认删除%{key}为%{value}的数据项?',
modificationSuccessful: '修改成功',
addedSuccessfully: '新增成功',

@ -2,26 +2,49 @@
<div class="navbar">
<hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container"
@toggleClick="toggleSideBar"/>
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav"/>
<breadcrumb v-if="!settingsStore.topNav" id="breadcrumb-container" class="breadcrumb-container"/>
<top-nav v-if="settingsStore.topNav" id="topmenu-container" class="topmenu-container"/>
<div class="right-menu">
<template v-if="appStore.device !== 'mobile'">
<el-tooltip content="中英文切换" effect="dark" placement="bottom">
<el-icon style="font-size: 18px;height: 100%;cursor:pointer;" @click="lang">
<Switch style="font-size: 18px"/>
</el-icon>
<el-tooltip effect="dark" placement="bottom">
<el-popover
placement="bottom"
trigger="click"
width="100"
>
<template #reference>
<img class="m-2" height="24" src="@/../public/globalization.svg" style="margin-top: 13px;" width="24"/>
</template>
<template #default>
<el-button
style="width:100%;"
text
type="primary"
@click="lang('zhCn')"
>中文
</el-button>
<br>
<el-button
style="width:100%"
text
type="primary"
@click="lang('en')"
>English
</el-button>
</template>
</el-popover>
</el-tooltip>
<header-search id="header-search" class="right-menu-item"/>
<screenfull id="screenfull" class="right-menu-item hover-effect"/>
<el-tooltip content="布局大小" effect="dark" placement="bottom">
<el-tooltip :content="t('navBar.layoutSize')" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect"/>
</el-tooltip>
</template>
<div class="avatar-container">
<el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
<el-dropdown class="right-menu-item hover-effect" trigger="click" @command="handleCommand">
<div class="avatar-wrapper">
<img :src="userStore.avatar" class="user-avatar"/>
<el-icon>
@ -31,13 +54,13 @@
<template #dropdown>
<el-dropdown-menu>
<router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
<el-dropdown-item>{{ t('navBar.personalCenter') }}</el-dropdown-item>
</router-link>
<el-dropdown-item command="setLayout">
<span>布局设置</span>
<span>{{ t('navBar.layoutSettings') }}</span>
</el-dropdown-item>
<el-dropdown-item divided command="logout">
<span>退出登录</span>
<el-dropdown-item command="logout" divided>
<span>{{ t('navBar.signOut') }}</span>
</el-dropdown-item>
</el-dropdown-menu>
</template>
@ -55,8 +78,6 @@ import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import HeaderSearch from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
import useAppStore from '@/store/modules/app'
import useUserStore from '@/store/modules/user'
import useSettingsStore from '@/store/modules/settings'
@ -68,9 +89,8 @@ import Cookies from 'js-cookie'
const appStore = useAppStore()
const userStore = useUserStore()
const settingsStore = useSettingsStore()
const lang = () => {
let type = Cookies.get('language') || 'zh-cn'
Cookies.set('language', type === 'zh-cn' ? 'en' : 'zh-cn')
const lang = (e) => {
Cookies.set('language', e)
location.reload()
}
@ -92,9 +112,9 @@ function handleCommand(command) {
}
function logout() {
ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
ElMessageBox.confirm(t('navBar.exitSystem'), t('option.hint'), {
confirmButtonText: t('option.ok'),
cancelButtonText: t('option.cancel'),
type: 'warning'
}).then(() => {
userStore.logOut().then(() => {

@ -1,7 +1,7 @@
<template>
<el-drawer v-model="showSettings" :withHeader="false" direction="rtl" size="300px">
<el-drawer v-model="showSettings" :withHeader="false" direction="rtl" :size="isEN? '340px':'300px'">
<div class="setting-drawer-title">
<h3 class="drawer-title">主题风格设置</h3>
<h3 class="drawer-title">{{ t('settings.styleSetting') }}</h3>
</div>
<div class="setting-drawer-block-checbox">
<div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-dark')">
@ -26,45 +26,45 @@
</div>
</div>
<div class="drawer-item">
<span>主题颜色</span>
<span>{{ t('settings.theme') }}</span>
<span class="comp-style">
<el-color-picker v-model="theme" :predefine="predefineColors" @change="themeChange"/>
</span>
</div>
<el-divider />
<h3 class="drawer-title">系统布局配置</h3>
<h3 class="drawer-title">{{ t('settings.title') }}</h3>
<div class="drawer-item">
<span>开启 TopNav</span>
<span>{{ t('settings.TopNav') }}</span>
<span class="comp-style">
<el-switch v-model="topNav" class="drawer-switch" />
</span>
</div>
<div class="drawer-item">
<span>开启 Tags-Views</span>
<span>{{ t('settings.tagsView') }}</span>
<span class="comp-style">
<el-switch v-model="tagsView" class="drawer-switch" />
</span>
</div>
<div class="drawer-item">
<span>固定 Header</span>
<span>{{ t('settings.fixedHeader') }}</span>
<span class="comp-style">
<el-switch v-model="fixedHeader" class="drawer-switch" />
</span>
</div>
<div class="drawer-item">
<span>显示 Logo</span>
<span>{{ t('settings.showLogo') }}</span>
<span class="comp-style">
<el-switch v-model="sidebarLogo" class="drawer-switch" />
</span>
</div>
<div class="drawer-item">
<span>动态标题</span>
<span>{{ t('settings.dynamicTitle') }}</span>
<span class="comp-style">
<el-switch v-model="dynamicTitle" class="drawer-switch" />
</span>
@ -72,8 +72,8 @@
<el-divider />
<el-button type="primary" plain icon="DocumentAdd" @click="saveSetting"></el-button>
<el-button plain icon="Refresh" @click="resetSetting"></el-button>
<el-button type="primary" plain icon="DocumentAdd" @click="saveSetting">{{ t('settings.saveConfiguration') }}</el-button>
<el-button plain icon="Refresh" @click="resetSetting">{{ t('settings.resetConfiguration') }}</el-button>
</el-drawer>
</template>
@ -88,6 +88,11 @@ import useAppStore from '@/store/modules/app'
import useSettingsStore from '@/store/modules/settings'
import usePermissionStore from '@/store/modules/permission'
import { handleThemeStyle } from '@/utils/theme'
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
const {t} = useI18n();
const isEN = (Cookies.get('language') || 'zhCn') === 'en'
const { proxy } = getCurrentInstance();
const appStore = useAppStore()

@ -2,51 +2,59 @@
<div id="tags-view-container" class="tags-view-container">
<scroll-pane ref="scrollPaneRef" class="tags-view-wrapper" @scroll="handleScroll">
<router-link
v-for="tag in visitedViews"
:key="tag.path"
:data-path="tag.path"
:class="isActive(tag) ? 'active' : ''"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
class="tags-view-item"
:style="activeStyle(tag)"
@click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''"
@contextmenu.prevent="openMenu(tag, $event)"
v-for="tag in visitedViews"
:key="tag.path"
:data-path="tag.path"
:class="isActive(tag) ? 'active' : ''"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
class="tags-view-item"
:style="activeStyle(tag)"
@click.middle="!isAffix(tag) ? closeSelectedTag(tag) : ''"
@contextmenu.prevent="openMenu(tag, $event)"
>
{{ tag.title }}
<span v-if="!isAffix(tag)" @click.prevent.stop="closeSelectedTag(tag)">
<close class="el-icon-close" style="width: 1em; height: 1em;vertical-align: middle;" />
<close class="el-icon-close" style="width: 1em; height: 1em;vertical-align: middle;"/>
</span>
</router-link>
</scroll-pane>
<ul v-show="visible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
<li @click="refreshSelectedTag(selectedTag)">
<refresh-right style="width: 1em; height: 1em;" /> 刷新页面
<refresh-right style="width: 1em; height: 1em;"/>
{{ t('tagsView.refresh') }}
</li>
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">
<close style="width: 1em; height: 1em;" /> 关闭当前
<close style="width: 1em; height: 1em;"/>
{{ t('tagsView.close') }}
</li>
<li @click="closeOthersTags">
<circle-close style="width: 1em; height: 1em;" /> 关闭其他
<circle-close style="width: 1em; height: 1em;"/>
{{ t('tagsView.closeOthers') }}
</li>
<li v-if="!isFirstView()" @click="closeLeftTags">
<back style="width: 1em; height: 1em;" /> 关闭左侧
<back style="width: 1em; height: 1em;"/>
{{ t('tagsView.closeLeft') }}
</li>
<li v-if="!isLastView()" @click="closeRightTags">
<right style="width: 1em; height: 1em;" /> 关闭右侧
<right style="width: 1em; height: 1em;"/>
{{ t('tagsView.closeRight') }}
</li>
<li @click="closeAllTags(selectedTag)">
<circle-close style="width: 1em; height: 1em;" /> 全部关闭
<circle-close style="width: 1em; height: 1em;"/>
{{ t('tagsView.closeAll') }}
</li>
</ul>
</div>
</template>
<script setup>
import ScrollPane from './ScrollPane'
import { getNormalPath } from '@/utils/ruoyi'
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';
const {t} = useI18n();
const visible = ref(false);
const top = ref(0);
@ -55,7 +63,7 @@ const selectedTag = ref({});
const affixTags = ref([]);
const scrollPaneRef = ref(null);
const { proxy } = getCurrentInstance();
const {proxy} = getCurrentInstance();
const route = useRoute();
const router = useRouter();
@ -82,6 +90,7 @@ onMounted(() => {
function isActive(r) {
return r.path === route.path
}
function activeStyle(tag) {
if (!isActive(tag)) return {};
return {
@ -89,9 +98,11 @@ function activeStyle(tag) {
"border-color": theme.value
};
}
function isAffix(tag) {
return tag.meta && tag.meta.affix
}
function isFirstView() {
try {
return selectedTag.value.fullPath === visitedViews.value[1].fullPath || selectedTag.value.fullPath === '/index'
@ -99,6 +110,7 @@ function isFirstView() {
return false
}
}
function isLastView() {
try {
return selectedTag.value.fullPath === visitedViews.value[visitedViews.value.length - 1].fullPath
@ -106,6 +118,7 @@ function isLastView() {
return false
}
}
function filterAffixTags(routes, basePath = '') {
let tags = []
routes.forEach(route => {
@ -115,7 +128,7 @@ function filterAffixTags(routes, basePath = '') {
fullPath: tagPath,
path: tagPath,
name: route.name,
meta: { ...route.meta }
meta: {...route.meta}
})
}
if (route.children) {
@ -127,18 +140,20 @@ function filterAffixTags(routes, basePath = '') {
})
return tags
}
function initTags() {
const res = filterAffixTags(routes.value);
affixTags.value = res;
for (const tag of res) {
// Must have tag name
if (tag.name) {
useTagsViewStore().addVisitedView(tag)
useTagsViewStore().addVisitedView(tag)
}
}
}
function addTags() {
const { name } = route
const {name} = route
if (name) {
useTagsViewStore().addView(route)
if (route.meta.link) {
@ -147,6 +162,7 @@ function addTags() {
}
return false
}
function moveToCurrentTag() {
nextTick(() => {
for (const r of visitedViews.value) {
@ -160,19 +176,22 @@ function moveToCurrentTag() {
}
})
}
function refreshSelectedTag(view) {
proxy.$tab.refreshPage(view);
if (route.meta.link) {
useTagsViewStore().delIframeView(route);
}
}
function closeSelectedTag(view) {
proxy.$tab.closePage(view).then(({ visitedViews }) => {
proxy.$tab.closePage(view).then(({visitedViews}) => {
if (isActive(view)) {
toLastView(visitedViews, view)
}
})
}
function closeRightTags() {
proxy.$tab.closeRightPage(selectedTag.value).then(visitedViews => {
if (!visitedViews.find(i => i.fullPath === route.fullPath)) {
@ -180,6 +199,7 @@ function closeRightTags() {
}
})
}
function closeLeftTags() {
proxy.$tab.closeLeftPage(selectedTag.value).then(visitedViews => {
if (!visitedViews.find(i => i.fullPath === route.fullPath)) {
@ -187,20 +207,24 @@ function closeLeftTags() {
}
})
}
function closeOthersTags() {
router.push(selectedTag.value).catch(() => { });
router.push(selectedTag.value).catch(() => {
});
proxy.$tab.closeOtherPage(selectedTag.value).then(() => {
moveToCurrentTag()
})
}
function closeAllTags(view) {
proxy.$tab.closeAllPage().then(({ visitedViews }) => {
proxy.$tab.closeAllPage().then(({visitedViews}) => {
if (affixTags.value.some(tag => tag.path === route.path)) {
return
}
toLastView(visitedViews, view)
})
}
function toLastView(visitedViews, view) {
const latestView = visitedViews.slice(-1)[0]
if (latestView) {
@ -210,12 +234,13 @@ function toLastView(visitedViews, view) {
// you can adjust it according to your needs.
if (view.name === 'Dashboard') {
// to reload home page
router.replace({ path: '/redirect' + view.fullPath })
router.replace({path: '/redirect' + view.fullPath})
} else {
router.push('/')
}
}
}
function openMenu(tag, e) {
const menuMinWidth = 105
const offsetLeft = proxy.$el.getBoundingClientRect().left // container margin left
@ -233,9 +258,11 @@ function openMenu(tag, e) {
visible.value = true
selectedTag.value = tag
}
function closeMenu() {
visible.value = false
}
function handleScroll() {
closeMenu()
}
@ -248,6 +275,7 @@ function handleScroll() {
background: #fff;
border-bottom: 1px solid #d8dce5;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
.tags-view-wrapper {
.tags-view-item {
display: inline-block;
@ -262,16 +290,20 @@ function handleScroll() {
font-size: 12px;
margin-left: 5px;
margin-top: 4px;
&:first-of-type {
margin-left: 15px;
}
&:last-of-type {
margin-right: 15px;
}
&.active {
background-color: #42b983;
color: #fff;
border-color: #42b983;
&::before {
content: "";
background: #fff;
@ -285,6 +317,7 @@ function handleScroll() {
}
}
}
.contextmenu {
margin: 0;
background: #fff;
@ -297,10 +330,12 @@ function handleScroll() {
font-weight: 400;
color: #333;
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
li {
margin: 0;
padding: 7px 16px;
cursor: pointer;
&:hover {
background: #eee;
}
@ -321,11 +356,13 @@ function handleScroll() {
text-align: center;
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transform-origin: 100% 50%;
&:before {
transform: scale(0.6);
display: inline-block;
vertical-align: -3px;
}
&:hover {
background-color: #b4bccc;
color: #fff;

@ -55,9 +55,6 @@ app.config.globalProperties.handleTree = handleTree
app.config.globalProperties.addDateRange = addDateRange
app.config.globalProperties.selectDictLabel = selectDictLabel
app.config.globalProperties.selectDictLabels = selectDictLabels
app.config.globalProperties.scrin = ()=>{
console.log('scrin')
}
// 全局组件挂载
app.component('DictTag', DictTag)

@ -259,7 +259,7 @@
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['basetyre:basetyre:add']"
v-hasPermi="['basecar:car:add']"
>{{ t('option.add') }}
</el-button>
</el-col>
@ -270,7 +270,7 @@
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['basetyre:basetyre:edit']"
v-hasPermi="['basecar:car:edit']"
>{{ t('option.edit') }}
</el-button>
</el-col>
@ -281,7 +281,7 @@
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['basetyre:basetyre:remove']"
v-hasPermi="['basecar:car:remove']"
>{{ t('option.remove') }}
</el-button>
</el-col>
@ -291,7 +291,7 @@
plain
icon="Download"
@click="handleExport"
v-hasPermi="['basetyre:basetyre:export']"
v-hasPermi="['basecar:car:export']"
>{{ t('option.export') }}
</el-button>
</el-col>
@ -340,14 +340,14 @@
type="text"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['basetyre:basetyre:edit']"
v-hasPermi="['basecar:car:edit']"
>{{ t('option.edit') }}
</el-button>
<el-button
type="text"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['basetyre:basetyre:remove']"
v-hasPermi="['basecar:car:remove']"
>{{ t('option.remove') }}
</el-button>
</template>
@ -538,7 +538,7 @@ import Cookies from "js-cookie";
const {t} = useI18n();
const locale = (Cookies.get('language') || 'zh-cn') === 'zh-cn'
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();
const {sys_normal_disable} = proxy.useDict("sys_normal_disable");

@ -156,7 +156,7 @@
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['basetyre:basetyre:add']"
v-hasPermi="['carqueue:carqueue:add']"
>{{ t('option.add') }}
</el-button>
</el-col>
@ -167,7 +167,7 @@
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['basetyre:basetyre:edit']"
v-hasPermi="['carqueue:carqueue:edit']"
>{{ t('option.edit') }}
</el-button>
</el-col>
@ -178,7 +178,7 @@
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['basetyre:basetyre:remove']"
v-hasPermi="['carqueue:carqueue:remove']"
>{{ t('option.remove') }}
</el-button>
</el-col>
@ -188,7 +188,7 @@
plain
icon="Download"
@click="handleExport"
v-hasPermi="['basetyre:basetyre:export']"
v-hasPermi="['carqueue:carqueue:export']"
>{{ t('option.export') }}
</el-button>
</el-col>
@ -222,14 +222,14 @@
type="text"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['basetyre:basetyre:edit']"
v-hasPermi="['carqueue:carqueue:edit']"
>{{ t('option.edit') }}
</el-button>
<el-button
type="text"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['basetyre:basetyre:remove']"
v-hasPermi="['carqueue:carqueue:remove']"
>{{ t('option.remove') }}
</el-button>
</template>
@ -348,14 +348,14 @@
</template>
<script setup name="CarQueue">
import {addCarQueue, delCarQueue, getCarQueue, listCarQueue, updateCarQueue} from "@/api/carqueue/carqueue";
import {addCarQueue, delCarQueue, getCarQueue, listCarQueue, updateCarQueue} from "@/api/basecar/carqueue";
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
const {t} = useI18n();
const locale = (Cookies.get('language') || 'zh-cn') === 'zh-cn'
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();

@ -174,7 +174,7 @@
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['basetyre:basetyre:add']"
v-hasPermi="['cartype:cartype:add']"
>{{ t('option.add') }}
</el-button>
</el-col>
@ -185,7 +185,7 @@
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['basetyre:basetyre:edit']"
v-hasPermi="['cartype:cartype:edit']"
>{{ t('option.edit') }}
</el-button>
</el-col>
@ -196,7 +196,7 @@
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['basetyre:basetyre:remove']"
v-hasPermi="['cartype:cartype:remove']"
>{{ t('option.remove') }}
</el-button>
</el-col>
@ -206,7 +206,7 @@
plain
icon="Download"
@click="handleExport"
v-hasPermi="['basetyre:basetyre:export']"
v-hasPermi="['cartype:cartype:export']"
>{{ t('option.export') }}
</el-button>
</el-col>
@ -242,14 +242,14 @@
type="text"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['basetyre:basetyre:edit']"
v-hasPermi="['cartype:cartype:edit']"
>{{ t('option.edit') }}
</el-button>
<el-button
type="text"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['basetyre:basetyre:remove']"
v-hasPermi="['cartype:cartype:remove']"
>{{ t('option.remove') }}
</el-button>
</template>
@ -385,7 +385,7 @@ import Cookies from "js-cookie";
const {t} = useI18n();
const locale = (Cookies.get('language') || 'zh-cn') === 'zh-cn'
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();
const {sys_normal_disable} = proxy.useDict("sys_normal_disable");

@ -178,7 +178,7 @@
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['basetyre:basetyre:add']"
v-hasPermi="['basedevice:basedevice:add']"
>{{ t('option.add') }}
</el-button>
</el-col>
@ -189,7 +189,7 @@
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['basetyre:basetyre:edit']"
v-hasPermi="['basedevice:basedevice:edit']"
>{{ t('option.edit') }}
</el-button>
</el-col>
@ -200,7 +200,7 @@
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['basetyre:basetyre:remove']"
v-hasPermi="['basedevice:basedevice:remove']"
>{{ t('option.remove') }}
</el-button>
</el-col>
@ -210,7 +210,7 @@
plain
icon="Download"
@click="handleExport"
v-hasPermi="['basetyre:basetyre:export']"
v-hasPermi="['basedevice:basedevice:export']"
>{{ t('option.export') }}
</el-button>
</el-col>
@ -249,14 +249,14 @@
type="text"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['basetyre:basetyre:edit']"
v-hasPermi="['basedevice:basedevice:edit']"
>{{ t('option.edit') }}
</el-button>
<el-button
type="text"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['basetyre:basetyre:remove']"
v-hasPermi="['basedevice:basedevice:remove']"
>{{ t('option.remove') }}
</el-button>
</template>
@ -408,7 +408,7 @@ import Cookies from "js-cookie";
const {t} = useI18n();
const locale = (Cookies.get('language') || 'zh-cn') === 'zh-cn'
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();

@ -1,462 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="轮胎厂编码" prop="tyreFacCode">
<el-input
v-model="queryParams.tyreFacCode"
placeholder="请输入轮胎厂编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="企业编码" prop="companyCode">
<el-input
v-model="queryParams.companyCode"
placeholder="请输入企业编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="车牌号" prop="carLicense">
<el-input
v-model="queryParams.carLicense"
placeholder="请输入车牌号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="轮胎编号" prop="tureCode">
<el-input
v-model="queryParams.tureCode"
placeholder="请输入轮胎编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="RFID" prop="tyreRfid">
<el-input
v-model="queryParams.tyreRfid"
placeholder="请输入RFID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="轮位" prop="tyrePosition">
<el-input
v-model="queryParams.tyrePosition"
placeholder="请输入轮位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="当前轮胎传感器ID" prop="sensorId">
<el-input
v-model="queryParams.sensorId"
placeholder="请输入当前轮胎传感器ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="当前花纹深度" prop="currentTextureDepth">
<el-input
v-model="queryParams.currentTextureDepth"
placeholder="请输入当前花纹深度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-input
v-model="queryParams.state"
placeholder="请输入状态"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否删除" prop="isDelete">
<el-input
v-model="queryParams.isDelete"
placeholder="请输入是否删除"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建者姓名" prop="createName">
<el-input
v-model="queryParams.createName"
placeholder="请输入创建者姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="修改时间" prop="modifyTime">
<el-date-picker clearable
style="width: 200px"
v-model="queryParams.modifyTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择修改时间">
</el-date-picker>
</el-form-item>
<el-form-item label="修改者账号" prop="modifyBy">
<el-input
v-model="queryParams.modifyBy"
placeholder="请输入修改者账号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="编辑者姓名" prop="modifyName">
<el-input
v-model="queryParams.modifyName"
placeholder="请输入编辑者姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" size="mini" @click="handleQuery"></el-button>
<el-button icon="Refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['basetyre:basetyre:add']"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['basetyre:basetyre:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['basetyre:basetyre:remove']"
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
size="mini"
@click="handleExport"
v-hasPermi="['basetyre:basetyre:export']"
>导出
</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="basetyreList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="轮胎厂编码" align="center" prop="tyreFacCode"/>
<el-table-column label="企业编码" align="center" prop="companyCode"/>
<el-table-column label="车辆ID" align="center" prop="carId"/>
<el-table-column label="车牌号" align="center" prop="carLicense"/>
<el-table-column label="轮胎编号" align="center" prop="tureCode"/>
<el-table-column label="轮胎型号" align="center" prop="tureModel"/>
<el-table-column label="轮胎型号表ID" align="center" prop="tureModelId"/>
<el-table-column label="品牌ID" align="center" prop="tureBrandId"/>
<el-table-column label="RFID" align="center" prop="tyreRfid"/>
<el-table-column label="轮位" align="center" prop="tyrePosition"/>
<el-table-column label="当前轮胎传感器ID" align="center" prop="sensorId"/>
<el-table-column label="当前花纹深度" align="center" prop="currentTextureDepth"/>
<el-table-column label="状态" align="center" prop="state"/>
<el-table-column label="是否删除" align="center" prop="isDelete"/>
<el-table-column label="创建者ID" align="center" prop="createId"/>
<el-table-column label="创建者姓名" align="center" prop="createName"/>
<el-table-column label="修改时间" align="center" prop="modifyTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.modifyTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="修改者ID" align="center" prop="modifyId"/>
<el-table-column label="修改者账号" align="center" prop="modifyBy"/>
<el-table-column label="编辑者姓名" align="center" prop="modifyName"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['basetyre:basetyre:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['basetyre:basetyre:remove']"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改轮胎基础信息对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="轮胎厂编码" prop="tyreFacCode">
<el-input v-model="form.tyreFacCode" placeholder="请输入轮胎厂编码"/>
</el-form-item>
<el-form-item label="企业编码" prop="companyCode">
<el-input v-model="form.companyCode" placeholder="请输入企业编码"/>
</el-form-item>
<el-form-item label="车牌号" prop="carLicense">
<el-input v-model="form.carLicense" placeholder="请输入车牌号"/>
</el-form-item>
<el-form-item label="轮胎编号" prop="tureCode">
<el-input v-model="form.tureCode" placeholder="请输入轮胎编号"/>
</el-form-item>
<el-form-item label="RFID" prop="tyreRfid">
<el-input v-model="form.tyreRfid" placeholder="请输入RFID"/>
</el-form-item>
<el-form-item label="轮位" prop="tyrePosition">
<el-input v-model="form.tyrePosition" placeholder="请输入轮位"/>
</el-form-item>
<el-form-item label="当前轮胎传感器ID" prop="sensorId">
<el-input v-model="form.sensorId" placeholder="请输入当前轮胎传感器ID"/>
</el-form-item>
<el-form-item label="当前花纹深度" prop="currentTextureDepth">
<el-input v-model="form.currentTextureDepth" placeholder="请输入当前花纹深度"/>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-input v-model="form.state" placeholder="请输入状态"/>
</el-form-item>
<el-form-item label="是否删除" prop="isDelete">
<el-input v-model="form.isDelete" placeholder="请输入是否删除"/>
</el-form-item>
<el-form-item label="创建者姓名" prop="createName">
<el-input v-model="form.createName" placeholder="请输入创建者姓名"/>
</el-form-item>
<el-form-item label="修改时间" prop="modifyTime">
<el-date-picker clearable
v-model="form.modifyTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择修改时间">
</el-date-picker>
</el-form-item>
<el-form-item label="修改者账号" prop="modifyBy">
<el-input v-model="form.modifyBy" placeholder="请输入修改者账号"/>
</el-form-item>
<el-form-item label="编辑者姓名" prop="modifyName">
<el-input v-model="form.modifyName" placeholder="请输入编辑者姓名"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {addBasetyre, delBasetyre, getBasetyre, listBasetyre, updateBasetyre} from "@/api/basetyre/basetyre";
export default {
name: "Basetyre",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
basetyreList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
tyreFacCode: null,
companyCode: null,
carId: null,
carLicense: null,
tureCode: null,
tureModel: null,
tureModelId: null,
tureBrandId: null,
tyreRfid: null,
tyrePosition: null,
sensorId: null,
currentTextureDepth: null,
state: null,
isDelete: null,
createId: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null
},
//
form: {},
//
rules: {}
};
},
created() {
this.getList();
},
methods: {
/** 查询轮胎基础信息列表 */
getList() {
this.loading = true;
listBasetyre(this.queryParams).then(response => {
this.basetyreList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
tyreFacCode: null,
companyCode: null,
carId: null,
carLicense: null,
tureCode: null,
tureModel: null,
tureModelId: null,
tureBrandId: null,
tyreRfid: null,
tyrePosition: null,
sensorId: null,
currentTextureDepth: null,
state: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
console.log(2)
this.reset();
this.open = true;
this.title = "添加轮胎基础信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getBasetyre(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改轮胎基础信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateBasetyre(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addBasetyre(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除轮胎基础信息编号为"' + ids + '"的数据项?').then(function () {
return delBasetyre(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('basetyre/basetyre/export', {
...this.queryParams
}, `basetyre_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -1,14 +1,14 @@
<template>
<div class="login">
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">若依后台管理系统</h3>
<h3 class="title">{{ t('login.title') }}</h3>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
type="text"
size="large"
auto-complete="off"
placeholder="账号"
:placeholder="t('login.username')"
>
<template #prefix>
<svg-icon icon-class="user" class="el-input__icon input-icon"/>
@ -21,7 +21,7 @@
type="password"
size="large"
auto-complete="off"
placeholder="密码"
:placeholder="t('login.password')"
@keyup.enter="handleLogin"
>
<template #prefix>
@ -34,7 +34,7 @@
v-model="loginForm.code"
size="large"
auto-complete="off"
placeholder="验证码"
:placeholder="t('login.verificationCode')"
style="width: 63%"
@keyup.enter="handleLogin"
>
@ -46,7 +46,34 @@
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
</div>
</el-form-item>
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;"></el-checkbox>
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">{{ t('login.rememberPassword') }}
</el-checkbox>
<el-popover
placement="bottom"
width="100"
trigger="click"
>
<template #reference>
<img style="float: right" width="24" height="24" class="m-2" src="@/../public/globalization.svg"/>
</template>
<template #default>
<el-button
type="primary"
text
style="width:100%;"
@click="lang('zhCn')"
>中文
</el-button>
<br>
<el-button
type="primary"
text
style="width:100%"
@click="lang('en')"
>English
</el-button>
</template>
</el-popover>
<el-form-item style="width:100%;">
<el-button
:loading="loading"
@ -55,11 +82,11 @@
style="width:100%;"
@click.prevent="handleLogin"
>
<span v-if="!loading"> </span>
<span v-else> ...</span>
<span v-if="!loading">{{ t('login.logIn') }}</span>
<span v-else>{{ t('login.loggingIn') }}</span>
</el-button>
<div style="float: right;" v-if="register">
<router-link class="link-type" :to="'/register'">立即注册</router-link>
<router-link class="link-type" :to="'/register'">{{ t('login.signUpNow') }}</router-link>
</div>
</el-form-item>
</el-form>
@ -73,12 +100,16 @@
<script setup>
import {getCodeImg} from "@/api/login";
import Cookies from "js-cookie";
import {encrypt, decrypt} from "@/utils/jsencrypt";
import {decrypt, encrypt} from "@/utils/jsencrypt";
import useUserStore from '@/store/modules/user'
import {getCurrentInstance} from "vue";
import {useI18n} from 'vue-i18n';
const {t} = useI18n();
const lang = (e) => {
Cookies.set('language',e)
location.reload()
}
const userStore = useUserStore()
const router = useRouter();
const {proxy} = getCurrentInstance();
@ -91,9 +122,9 @@ const loginForm = ref({
});
const loginRules = {
username: [{required: true, trigger: "blur", message: "请输入您的账号"}],
password: [{required: true, trigger: "blur", message: "请输入您的密码"}],
code: [{required: true, trigger: "change", message: "请输入验证码"}]
username: [{required: true, trigger: "blur", message: t('common.pleaseEnter') + t('login.yourAccount')}],
password: [{required: true, trigger: "blur", message: t('common.pleaseEnter') + t('login.yourPassword')}],
code: [{required: true, trigger: "change", message: t('common.pleaseEnter') + t('login.verificationCode')}]
};
const codeUrl = ref("");

@ -17,7 +17,8 @@ let mouseTool = null
let path = [[116.478935, 39.997761], [103.85094, 35.987496], [106.205794, 38.458831], [108.983569, 34.285675], [111.761777, 40.875595]]
AMapLoader.load({
key: "ba8fb8d8bae1b280b93406d5959d492f", // WebKey load
version: "2.0", // JSAPI 1.4.15
// version: "1.4.15", //
version: "2.0", //
plugins: ['AMap.MouseTool', 'AMap.PolygonEditor', 'AMap.ToolBar', 'AMap.Scale', 'AMap.HawkEye', 'AMap.MapType'],
AMapUI: {
@ -38,10 +39,10 @@ AMapLoader.load({
map.addControl(new AMap.Scale());
//
// map.addControl(new AMap.HawkEye({isOpen:true}));
map.addControl(new AMap.HawkEye({isOpen:true}));
//
// map.addControl(new AMap.MapType());
map.addControl(new AMap.MapType());
let polyEditor = new AMap.PolygonEditor(map);

@ -1,73 +1,84 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="6" :xs="24">
<el-card class="box-card">
<template v-slot:header>
<div class="clearfix">
<span>个人信息</span>
</div>
</template>
<div>
<div class="text-center">
<userAvatar :user="state.user" />
</div>
<ul class="list-group list-group-striped">
<li class="list-group-item">
<svg-icon icon-class="user" />用户名称
<div class="pull-right">{{ state.user.userName }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="phone" />手机号码
<div class="pull-right">{{ state.user.phonenumber }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="email" />用户邮箱
<div class="pull-right">{{ state.user.email }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="tree" />所属部门
<div class="pull-right" v-if="state.user.dept">{{ state.user.dept.deptName }} / {{ state.postGroup }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="peoples" />所属角色
<div class="pull-right">{{ state.roleGroup }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="date" />创建日期
<div class="pull-right">{{ state.user.createTime }}</div>
</li>
</ul>
</div>
</el-card>
</el-col>
<el-col :span="18" :xs="24">
<el-card>
<template v-slot:header>
<div class="clearfix">
<span>基本资料</span>
</div>
</template>
<el-tabs v-model="activeTab">
<el-tab-pane label="基本资料" name="userinfo">
<userInfo :user="state.user" />
</el-tab-pane>
<el-tab-pane label="修改密码" name="resetPwd">
<resetPwd />
</el-tab-pane>
</el-tabs>
</el-card>
</el-col>
</el-row>
</div>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="6" :xs="24">
<el-card class="box-card">
<template v-slot:header>
<div class="clearfix">
<span>{{ t('profile.personalInfo') }}</span>
</div>
</template>
<div>
<div class="text-center">
<userAvatar :user="state.user"/>
</div>
<ul class="list-group list-group-striped">
<li class="list-group-item">
<svg-icon icon-class="user"/>
{{ t('profile.userName') }}
<div class="pull-right">{{ state.user.userName }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="phone"/>
{{ t('profile.phone') }}
<div class="pull-right">{{ state.user.phonenumber }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="email"/>
{{ t('profile.email') }}
<div class="pull-right">{{ state.user.email }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="tree"/>
{{ t('profile.department') }}
<div v-if="state.user.dept" class="pull-right">{{ state.user.dept.deptName }} / {{
state.postGroup
}}
</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="peoples"/>
{{ t('profile.role') }}
<div class="pull-right">{{ state.roleGroup }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="date"/>
{{ t('profile.creationDate') }}
<div class="pull-right">{{ state.user.createTime }}</div>
</li>
</ul>
</div>
</el-card>
</el-col>
<el-col :span="18" :xs="24">
<el-card>
<template v-slot:header>
<div class="clearfix">
<span>{{ t('profile.basicInformation') }}</span>
</div>
</template>
<el-tabs v-model="activeTab">
<el-tab-pane :label="t('profile.basicInformation')" name="userinfo">
<userInfo :user="state.user"/>
</el-tab-pane>
<el-tab-pane :label="t('profile.changePassword') " name="resetPwd">
<resetPwd/>
</el-tab-pane>
</el-tabs>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script setup name="Profile">
<script name="Profile" setup>
import userAvatar from "./userAvatar";
import userInfo from "./userInfo";
import resetPwd from "./resetPwd";
import { getUserProfile } from "@/api/system/user";
import {getUserProfile} from "@/api/system/user";
import {useI18n} from "vue-i18n";
const {t} = useI18n();
const activeTab = ref("userinfo");
const state = reactive({
user: {},

@ -319,7 +319,7 @@ import Cookies from "js-cookie";
const {t} = useI18n();
const locale = (Cookies.get('language') || 'zh-cn') === 'zh-cn'
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();
const {sys_normal_disable} = proxy.useDict("sys_normal_disable");

Loading…
Cancel
Save