This commit is contained in:
qingjiao 2026-04-20 18:10:39 +08:00
parent 34a9cadc02
commit bc09fd7b6e
8 changed files with 69 additions and 44 deletions

View File

@ -2,7 +2,7 @@
<el-breadcrumb class="app-breadcrumb" separator="/"> <el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb"> <transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path"> <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect"> <span v-if="item.redirect==='noRedirect'||index === levelList.length - 1" class="no-redirect">
{{ generateTitle(item.meta.title) }} {{ generateTitle(item.meta.title) }}
</span> </span>
<a v-else @click.prevent="handleLink(item)">{{ generateTitle(item.meta.title) }}</a> <a v-else @click.prevent="handleLink(item)">{{ generateTitle(item.meta.title) }}</a>

View File

@ -25,22 +25,22 @@ export default {
logIn: 'Login', logIn: 'Login',
register: 'Register', register: 'Register',
logCancel: 'Cancel', logCancel: 'Cancel',
username: 'UserName', username: 'Username',
password: 'Password', password: 'Password',
any: 'any', any: 'any',
thirdparty: 'Or connect with', thirdparty: 'Or connect with',
thirdpartyTips: thirdpartyTips:
'Can not be simulated on local, so please combine you own business simulation! ! !', 'Can not be simulated on local, so please combine you own business simulation!',
confirmLogout: 'Confirm Logout', confirmLogout: 'Confirm Logout',
loggedOut: loggedOut:
'You have been logged out, you can cancel to stay on this page or log in again!', 'You have been logged out, you can cancel to stay on this page or log in again!',
toLogin: 'To Login', toLogin: 'To Login',
changePassword: 'Change Password', changePassword: 'Change Password',
changePasswordTip: changePasswordTip:
'Detected that the password is too weak or has expired. Please modify the password before logging in', 'Detected that the password is too weak or has expired. Please modify the password before logging in.',
changePasswordMsg: changePasswordMsg:
'Password expired, please modify the password before logging in!', 'Password expired, please modify the password before logging in.',
upDateMsg: 'Firmware is being upgraded, please wait for a while。' upDateMsg: 'Firmware is being updated, please wait for a while.'
}, },
table: { table: {
productName: 'Product Name', productName: 'Product Name',
@ -51,20 +51,20 @@ export default {
deviceIP: 'Terminal IP', deviceIP: 'Terminal IP',
gatewal: 'Gateway', gatewal: 'Gateway',
suonetMask: 'Subnet Mask', suonetMask: 'Subnet Mask',
storageSpaces: 'Storage Spaces', storageSpaces: 'Storage Capacity',
serverIP: 'Server IP', serverIP: 'Server IP',
corverCommandDort: 'Server Command Port', corverCommandDort: 'Server Port',
deviceCommandPort: 'Terminal Command Port', deviceCommandPort: 'Terminal Port',
deviceStreamPort: 'Terminal Code Stream Port', deviceStreamPort: 'Terminal Stream Port',
macAddress: 'MAC Address', macAddress: 'MAC Address',
serverPort: 'Server Port', serverPort: 'Server Port',
isEmpty: ' cannot be empty', isEmpty: ' cannot be empty.',
isRight: ' is invalid.', isRight: ' is invalid.',
isRight1: ' is out of range (10000-49999).', isRight1: ' is out of range (10000-49999).',
isRight2: ' is out of range (1000-9999).', isRight2: ' is out of range (1000-9999).',
isRight3: ' is out of range (1-9999).', isRight3: ' is out of range (1-9999).',
open: 'Enable', open: 'Enable',
close: 'Disable', close: 'Close',
save: 'Save', save: 'Save',
submit: 'Submit', submit: 'Submit',
toTop: 'Back to top', toTop: 'Back to top',
@ -77,8 +77,8 @@ export default {
factorySettings: 'Restore Factory Settings', factorySettings: 'Restore Factory Settings',
routerRestart: 'Reboot The Device', routerRestart: 'Reboot The Device',
SIPserver: 'SIP Server IP', SIPserver: 'SIP Server IP',
SIPUserName: 'SIP UserName', SIPUserName: 'SIP Username',
SIPPassword: 'SIP PassWord', SIPPassword: 'SIP Password',
programTip: programTip:
'Tip: the total size of uploaded files cannot exceed the capacity of the device storage space!', 'Tip: the total size of uploaded files cannot exceed the capacity of the device storage space!',
firmwareUpdateTip: firmwareUpdateTip:
@ -86,12 +86,12 @@ export default {
factoryTip: factoryTip:
'After returning to the factory setting, the configuration of the device will return to the factory state. Please use with caution!', 'After returning to the factory setting, the configuration of the device will return to the factory state. Please use with caution!',
routerRestartTips: routerRestartTips:
'The device is about to reboot. Are you sure to continue', 'The device is about to reboot. Are you sure to continue!',
programDeteleTip: 'Confirm to delete this file', programDeteleTip: 'Confirm to delete this file!',
logDeteleTip: 'Confirm to delete this log', logDeteleTip: 'Confirm to delete this log!',
freeSpace: 'Free Space', freeSpace: 'Available Space',
chooseFile: 'Upgrade File', chooseFile: 'Upgrade File',
microphoneSwitch: 'Microphone Switch', microphoneSwitch: 'Microphone Input',
factorySettingsTips: factorySettingsTips:
'The default IP address of the device in the factory state is 192.168.1.108. After the restoration, you need to log in again.', 'The default IP address of the device in the factory state is 192.168.1.108. After the restoration, you need to log in again.',
fileUpload: 'File uploading...', fileUpload: 'File uploading...',
@ -142,13 +142,13 @@ export default {
fileSurplusSizeTip: 'Insufficient remaining storage space', fileSurplusSizeTip: 'Insufficient remaining storage space',
upDateTip: 'Please select a file before upgrading!', upDateTip: 'Please select a file before upgrading!',
audio: 'Audio Format', audio: 'Audio Format',
playStatus: 'Playing status', playStatus: 'Status',
aoVol: 'Play Volume', aoVol: 'Play Volume',
aiVol: 'Recording Volume', aiVol: 'Recording Volume',
auth: 'Authentication', auth: 'Authentication',
httpAuth: 'Http Authentication', httpAuth: 'HTTP Authentication',
warningTitle: 'Alarm File', warningTitle: 'Alarm File',
warningFormTitle: 'AlarmIn', warningFormTitle: 'AlarmIn',
@ -165,10 +165,10 @@ export default {
sleCode: 'Login expired, please login again.', // 402code sleCode: 'Login expired, please login again.', // 402code
lllCode: 'The password is too weak, please change it.', // 600code lllCode: 'The password is too weak, please change it.', // 600code
llyCode: 'The firmware is being updated, please wait.', // 601code llyCode: 'The firmware is being updated, please wait.', // 601code
lleCode: '用户登录名称/密码错误.', // 602code lleCode: 'The username or password is incorrect.', // 602code
llsCode: 'Too many failed login attempts, the account has been locked (30 minutes).', // 603code llsCode: 'Too many failed login attempts, the account has been locked (30 minutes).', // 603code
llssCode: 'The account has been logged in elsewhere. Do you want to force logout?.', // 604code llssCode: 'The account has been logged in elsewhere. Do you want to force login?', // 604code
lylCode: 'The old password is wrong.', // 610code lylCode: 'The old password is incorrect.', // 610code
lyyCode: 'The new password must be different from the old password.', // 611code lyyCode: 'The new password must be different from the old password.', // 611code
lelCode: 'The file upload failed because it cannot be played.', // 620code lelCode: 'The file upload failed because it cannot be played.', // 620code
leyCode: 'The file upload failed because a file with the same name already exists.', // 621code leyCode: 'The file upload failed because a file with the same name already exists.', // 621code
@ -177,8 +177,8 @@ export default {
lessCode: 'Failed to rename, please avoid using special characters.', // 624Code lessCode: 'Failed to rename, please avoid using special characters.', // 624Code
lewCode: 'Failed to delete, because the file is playing.', // 625Code lewCode: 'Failed to delete, because the file is playing.', // 625Code
lslCode: '节目文件开始播放失败,节目已在播放中.', // 630code lslCode: 'Failed to start playing, because the file is already playing.', // 630code
lsyCode: '节目文件停止播放失败,节目未在播放中.', // 631code lsyCode: 'Failed to stop playing, because the file is not playing.', // 631code
lsslCode: 'The firmware update has not started.', // 640code lsslCode: 'The firmware update has not started.', // 640code
lssyCode: 'The firmware is being updated, please wait.', // 641code lssyCode: 'The firmware is being updated, please wait.', // 641code
lsseCode: 'The firmware update completed, the device will reboot soon.', // 642code lsseCode: 'The firmware update completed, the device will reboot soon.', // 642code
@ -224,20 +224,20 @@ export default {
password2: 'Confirm Password', password2: 'Confirm Password',
update: 'Update', update: 'Update',
oldPassword: 'Please enter your old password', oldPassword: 'Please enter your old password',
newPassword: 'Please enter a new password', newPassword: 'Please enter a new password!',
newPassword2: 'Please enter the new password again', newPassword2: 'Please enter the new password again!',
passwordDifferent: 'The two password entered is inconsistent', passwordDifferent: 'The two password entered is inconsistent!',
newAndOldPassword: newAndOldPassword:
'Operation exception: the new password is the same as the old password', 'Operation exception: the new password is the same as the old password.',
updatePasswordSuccess: 'User password updated successfully', updatePasswordSuccess: 'Password updated successfully.',
passwordLengthError: 'Enter a password of at least 8 digits', passwordLengthError: 'Enter a password of at least 8 digits.',
passwordStrongError: passwordStrongError:
'The Password strength is insufficient. Please ensure that the length is at least 8 digits and at most 16 digits, and must contain at least three of numbers, Minuscule, uppercase letters, and special symbols!', 'The Password strength is insufficient. Please ensure that the length is at least 8 digits and at most 16 digits, and must contain at least three of numbers, Minuscule, uppercase letters, and special symbols!',
confirmPassword: 'Confirm Password', confirmPassword: 'Confirm Password',
inputusername: 'Please enter your username!', inputusername: 'Please enter the username!',
inputpassword: 'Please enter the password', inputpassword: 'Please enter the password!',
inputpassword2: 'Please enter the password again', inputpassword2: 'Please enter the password again!',
registerSuccess: 'User registration successful', registerSuccess: 'User registration successful!',
gologin: 'Do you want to login' gologin: 'Do you want to login?'
} }
} }

View File

@ -63,7 +63,7 @@ export default {
isRight2: 'está fora do intervalo (1000-9999).', isRight2: 'está fora do intervalo (1000-9999).',
isRight3: 'está fora do intervalo (1-9999).', isRight3: 'está fora do intervalo (1-9999).',
open: 'Ativar', open: 'Ativar',
close: 'Desativar', close: 'Fechar',
save: 'Salvar', save: 'Salvar',
submit: 'Enviar', submit: 'Enviar',
toTop: 'Voltar ao topo', toTop: 'Voltar ao topo',

View File

@ -56,6 +56,9 @@ export default {
// TODO: refactor with render function // TODO: refactor with render function
this.onlyOneChild = null this.onlyOneChild = null
return {} return {}
},
mounted() {
}, },
methods: { methods: {
hasOneShowingChild(children = [], parent) { hasOneShowingChild(children = [], parent) {

View File

@ -12,7 +12,12 @@
:collapse-transition="false" :collapse-transition="false"
mode="vertical" mode="vertical"
> >
<sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" /> <sidebar-item
v-for="route in filteredRoutes"
:key="route.path"
:item="route"
:base-path="route.path"
/>
</el-menu> </el-menu>
</el-scrollbar> </el-scrollbar>
</div> </div>
@ -26,11 +31,21 @@ import variables from '@/styles/variables.scss'
export default { export default {
components: { SidebarItem, Logo }, components: { SidebarItem, Logo },
mounted(){
console.log(this.permission_routes);
// if(this.alarmPage === 'off'){
//
// }
},
computed: { computed: {
...mapGetters([ ...mapGetters([
'permission_routes', 'permission_routes',
'sidebar' 'sidebar',
'alarmPage'
]), ]),
filteredRoutes() {
return this.permission_routes
},
activeMenu() { activeMenu() {
const route = this.$route const route = this.$route
const { meta, path } = route const { meta, path } = route

View File

@ -29,6 +29,7 @@
import ScrollPane from './ScrollPane' import ScrollPane from './ScrollPane'
import { generateTitle } from '@/utils/i18n' import { generateTitle } from '@/utils/i18n'
import path from 'path' import path from 'path'
import { mapGetters } from 'vuex'
export default { export default {
components: { ScrollPane }, components: { ScrollPane },
@ -42,6 +43,9 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters([
'alarmPage'
]),
visitedViews() { visitedViews() {
return this.$store.state.tagsView.visitedViews return this.$store.state.tagsView.visitedViews
}, },

View File

@ -20,7 +20,7 @@ const mutations = {
}, },
SET_LOGIN_DATA: (state, data) => { SET_LOGIN_DATA: (state, data) => {
state.loginData = data state.loginData = data
console.log(state, data.udpPage) console.log(state, data)
setLoginData(data) setLoginData(data)
}, },
SET_KEY: (state, key) => { SET_KEY: (state, key) => {
@ -56,7 +56,10 @@ const actions = {
commit('SET_TOKEN', data.token) commit('SET_TOKEN', data.token)
commit('SET_NAME', username) commit('SET_NAME', username)
data.menuRole = 1 data.menuRole = 1
if (data.alarmPage === 'off') data.menuRole = 2 if (data.alarmPage !== 'off') {
data.menuRole = 2
// console.log('data.alarmPage',data.alarmPage)
}
commit('SET_LOGIN_DATA', data) commit('SET_LOGIN_DATA', data)
if (response.code === 200) { if (response.code === 200) {
resolve() resolve()

View File

@ -87,7 +87,7 @@ module.exports = {
// before: require('./mock/mock-server.js'), // before: require('./mock/mock-server.js'),
proxy: { proxy: {
'/dev-api': { '/dev-api': {
target: 'http://192.168.1.190:8080', // http://127.0.0.1:8080 target: 'http://127.0.0.1:8080', // http://127.0.0.1:8080
secure: true, // 如果是https接口需要配置这个参数 secure: true, // 如果是https接口需要配置这个参数
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置 changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
pathRewrite: { '^/dev-api': '' } pathRewrite: { '^/dev-api': '' }