diff --git a/src/jmapNew/theme/haerbin_01/menus/index.vue b/src/jmapNew/theme/haerbin_01/menus/index.vue index b94437e68..14e896bb2 100644 --- a/src/jmapNew/theme/haerbin_01/menus/index.vue +++ b/src/jmapNew/theme/haerbin_01/menus/index.vue @@ -9,6 +9,7 @@ + @@ -26,6 +27,7 @@ import MenuSection from './menuSection'; import MenuTrain from './menuTrain'; import MenuStation from './menuStation'; import MenuBar from './menuBar'; +import MenuButton from './menuButton'; import PassiveAlarm from './passiveDialog/alarm'; import PassiveContorl from './passiveDialog/control'; import PassiveTimeout from './passiveDialog/timeout'; @@ -34,6 +36,7 @@ export default { name: 'Menus', components: { MenuBar, + MenuButton, MenuCancel, MenuSignal, MenuSwitch, diff --git a/src/jmapNew/theme/haerbin_01/menus/menuBar.vue b/src/jmapNew/theme/haerbin_01/menus/menuBar.vue index 7236c62e3..f94446720 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuBar.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuBar.vue @@ -5,10 +5,11 @@ @@ -87,6 +88,11 @@ export default { }, data() { return { + loginActive:true, + loginText:'登录', + modelType:'text', + keydownTimes:0, + loginParam:'', classA: -1, classB: -1, tempClassA: -1, @@ -167,13 +173,36 @@ export default { }, undeveloped() { this.doClose(); - this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), { confirmButtonText: this.$t('global.confirm'), callback: action => { } }); }, + login() { + if (this.loginActive) { + if (this.loginText === '退出') { + this.loginText = '登录'; + } else { + this.loginText = '用户'; + this.loginActive = false; + } + } + }, + validateData() { + if (this.keydownTimes === 0 && this.loginParam == 'admin') { + this.loginText = '密码'; + this.modelType = 'password'; + this.keydownTimes++; + this.loginParam = ''; + } else if (this.keydownTimes === 1 && this.loginParam == '123456') { + this.loginText = '退出'; + this.keydownTimes = 0; + this.loginParam = ''; + this.modelType = 'text'; + this.loginActive = true; + } + }, doClose() { this.$nextTick(() => { EventBus.$emit('closeMenu'); @@ -344,4 +373,16 @@ export default { background: #ECF5FF; margin: 5px auto; } + + .loginClass{ + width: 100px; + height: 20px; + text-align: center; + border: 1px solid rgb(204, 204, 204); + line-height: 20px; + margin: 5px auto; + border-radius: 5px; + background: #ffffff; + cursor: not-allowed; + } diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue new file mode 100644 index 000000000..ed1b72216 --- /dev/null +++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue @@ -0,0 +1,27 @@ + + +