| | |
| | | <script> |
| | | import const_page from "@/assets/js/const/const_page"; |
| | | import getItemByKey from "@/assets/js/tools/getItemByKey"; |
| | | import i18n from '../i18n/realTime'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | const i18nMixin = createI18nOption(i18n, [[i18nConst_61850, '61850']]); |
| | | import { |
| | | getPageParamUserAllList, |
| | | upPageParamUserList, |
| | |
| | | <template> |
| | | <div class="menu-setting"> |
| | | <card-wrapper title="配置"> |
| | | <card-wrapper :title="$t('Config')"> |
| | | <el-button type="primary" size="mini" slot="tools" @click="updateMenu" |
| | | >提交</el-button |
| | | >{{ $t('Submit') }}</el-button |
| | | > |
| | | <el-tree |
| | | ref="menuTree" |
| | |
| | | @check="checkChange" |
| | | ></el-tree> |
| | | </card-wrapper> |
| | | <card-wrapper class="left32 page-menu" title="实时预览"> |
| | | <card-wrapper class="left32 page-menu" :title="$t('RealtimePreview')"> |
| | | <page-nav :menus="menus" :status="true"></page-nav> |
| | | </card-wrapper> |
| | | </div> |
| | |
| | | import getPageMenu from "@/assets/js/tools/getPageMenu"; |
| | | import PageNav from "@/layout/components/Sidebar/PageNav"; |
| | | import { getPageMenuApi, updatePageMenuApi } from "@/views/pageSetting/js/api"; |
| | | import i18n from './i18n/realTime'; |
| | | import i18n from '../i18n/menuSetting'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | const i18nMixin = createI18nOption(i18n); |
| | | export default { |
| | | name: "menuSetting", |
| | | mixins: [i18nMixin], |
| | | components: { |
| | | CardWrapper, |
| | | PageNav |
| | |
| | | if (rs.code == 1) { |
| | | data = rs.data; |
| | | } |
| | | this.menus = getPageMenu(); |
| | | this.changeMenus(this.menus, data); |
| | | this.changeChangeKeys(this.menus); |
| | | }) |
| | |
| | | }); |
| | | }, |
| | | changeMenus(menus, list) { |
| | | let lang = this.$store.state.settings.lang; |
| | | menus.forEach(menu => { |
| | | let item = ""; |
| | | for (let i = 0; i < list.length; i++) { |
| | | if (menu.id == list[i].id) { |
| | | item = list[i]; |
| | | menu.lableEnUs = item.lableEnUs; |
| | | menu.label = 'US' == lang ? menu.lableEnUs : menu.label; |
| | | break; |
| | | } |
| | | } |
| | |
| | | for (let i = 0; i < menu.childrens.length; i++) { |
| | | let item2 = menu.childrens[i]; |
| | | if (item2.id == children.id) { |
| | | item2.lableEnUs = children.lableEnUs; |
| | | item2.label = 'US' == lang ? children.lableEnUs : children.label; |
| | | item2.enableduse = children.enableduse; |
| | | break; |
| | | } |
| | |
| | | }, |
| | | mounted() { |
| | | this.getPageMenu(); |
| | | this.$bus.$on('langChanged', () => { |
| | | this.getPageMenu(); |
| | | }); |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | .left32 { |
| | | margin-left: 32px; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | export default { |
| | | messages: { |
| | | CN: { |
| | | SystemConfiguration: '系统配置', |
| | | NavigationConfiguration: '导航配置', |
| | | StatusInformation: '状态信息', |
| | | Nostatusinformationadded: '未添加状态信息', |
| | | Addedstatusinformation: '已添加状态信息', |
| | | Remove: '移除', |
| | | Add: '添加', |
| | | RemoteManagement: '远程管理', |
| | | NoFunctionAdded: '未添加功能', |
| | | AddedFunction: '已添加功能', |
| | | TabConfig: '标签配置', |
| | | PlatformName: '平台名称', |
| | | Config: '配置', |
| | | Submit: '提交', |
| | | RealtimePreview: '实时预览', |
| | | }, |
| | | US: { |
| | | SystemConfiguration: 'System Configuration', |
| | | NavigationConfiguration: 'Navigation Configuration', |
| | | StatusInformation: 'Status Information', |
| | | Nostatusinformationadded: 'No status information added', |
| | | Addedstatusinformation: 'Added status information', |
| | | Remove: 'Remove', |
| | | Add: 'Add', |
| | | RemoteManagement: 'Remote Management', |
| | | NoFunctionAdded: 'No Function Added', |
| | | AddedFunction: 'Added Function', |
| | | TabConfig: 'Tab Config', |
| | | PlatformName: 'Platform Name', |
| | | Config: 'Config', |
| | | Submit: 'Submit', |
| | | RealtimePreview: 'Real-time Preview', |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-tab-pane :label="$t('NavigationConfiguration')" v-if="isSystemAdmin"> |
| | | <menu-setting></menu-setting> |
| | | </el-tab-pane> |
| | | <el-tab-pane |
| | | :label="$t('StatusInformation')" |
| | | class="el-transfer-container" |
| | | v-if="isSystemAdmin" |
| | | > |
| | | <el-transfer |
| | | v-model="status.value" |
| | | filterable |
| | | :props="status.props" |
| | | <el-tab-pane :label="$t('StatusInformation')" class="el-transfer-container" v-if="isSystemAdmin"> |
| | | <el-transfer v-model="status.value" filterable :props="statusProps" |
| | | :titles="[$t('Nostatusinformationadded'), $t('Addedstatusinformation')]" |
| | | :button-texts="[$t('Remove'), $t('Add')]" |
| | | :data="status.data" |
| | | class="transfer-width320" |
| | | @change="handlerChange" |
| | | ></el-transfer> |
| | | :button-texts="[$t('Remove'), $t('Add')]" :data="status.data" class="transfer-width320" |
| | | @change="handlerChange"></el-transfer> |
| | | </el-tab-pane> |
| | | <el-tab-pane |
| | | :label="$t('RemoteManagement')" |
| | | class="el-transfer-container" |
| | | v-if="isSystemAdmin" |
| | | > |
| | | <el-transfer |
| | | v-model="control.value" |
| | | filterable |
| | | :props="control.props" |
| | | :titles="[$t('NoFunctionAdded'), $t('AddedFunction')]" |
| | | :button-texts="[$t('Remove'), $t('Add')]" |
| | | :data="control.data" |
| | | class="transfer-width320" |
| | | @change="handlerChange" |
| | | ></el-transfer> |
| | | <el-tab-pane :label="$t('RemoteManagement')" class="el-transfer-container" v-if="isSystemAdmin"> |
| | | <el-transfer v-model="control.value" filterable :props="controlProps" |
| | | :titles="[$t('NoFunctionAdded'), $t('AddedFunction')]" :button-texts="[$t('Remove'), $t('Add')]" |
| | | :data="control.data" class="transfer-width320" @change="handlerChange"></el-transfer> |
| | | </el-tab-pane> |
| | | <el-tab-pane :label="$t('TabConfig')" class="el-transfer-container"> |
| | | <tabs-config></tabs-config> |
| | |
| | | upDatePageParamAllList |
| | | } from "@/views/pageSetting/js/api"; |
| | | import ThreeInterfaceManage from "@/views/pageSetting/components/threeInterfaceManage"; |
| | | import {isHasPermit} from "@/assets/js/tools"; |
| | | import { isHasPermit } from "@/assets/js/tools"; |
| | | import i18n from './i18n/realTime'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | const i18nMixin = createI18nOption(i18n); |
| | |
| | | return { |
| | | isSystemAdmin, |
| | | status: { |
| | | props: { |
| | | key: "id", |
| | | label: "param" |
| | | }, |
| | | value: [], |
| | | data: [] |
| | | }, |
| | | control: { |
| | | props: { |
| | | key: "id", |
| | | label: "param" |
| | | }, |
| | | value: [], |
| | | data: [] |
| | | }, |
| | |
| | | data: [] |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | statusProps() { |
| | | let lang = this.$store.state.settings.lang; |
| | | return { |
| | | key: "id", |
| | | label: 'US' == lang ? 'paramEnUs' : "param", |
| | | } |
| | | }, |
| | | controlProps() { |
| | | let lang = this.$store.state.settings.lang; |
| | | return { |
| | | key: "id", |
| | | label: 'US' == lang ? 'paramEnUs' : "param", |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | searchStatus() { |
| | |
| | | padding-top: 8px; |
| | | padding-bottom: 8px; |
| | | } |
| | | |
| | | /deep/ .el-transfer .el-transfer__buttons { |
| | | width: 5.2rem; |
| | | } |