desc: 调整登陆页面样式

This commit is contained in:
zyy 2019-10-10 18:05:26 +08:00
parent a8e491ea6e
commit f7cf33a5e2
9 changed files with 347 additions and 314 deletions

View File

@ -1,72 +1,81 @@
<template>
<el-dialog class="chengdou-03__systerm notice-info" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span>{{message}}</span><br>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm notice-info"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<span class="context">
<template v-for="(message, index) in messages">
<span :key="index">{{ message }}</span>
</template>
</span>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'NoticeInfo',
data() {
return {
dialogShow: false,
messages: ['命令下达失败'],
operate: null
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages) {
this.messages = messages;
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
}
export default {
name: 'NoticeInfo',
data() {
return {
dialogShow: false,
messages: ['命令下达失败'],
operate: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages) {
this.messages = messages;
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
};
</script>
<style>

View File

@ -1,163 +1,173 @@
<template>
<el-dialog class="chengdou-03__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span>{{message}}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message, index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo'
import { OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo';
export default {
name: 'ConfirmTrain',
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
return '添加列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
return '修改列车识别号';
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
return '删除列车识别号';
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
return '移动列车识别号';
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
return '交换列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return '修改车组号'
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
/** 删除列车识别号*/
return OperationEvent.Train.delTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
/** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
/** 交换列车识别号*/
return OperationEvent.Train.switchTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
/** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId
}
}
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
this.operation = operate.operation;
}
export default {
name: 'ConfirmTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
return '添加列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
return '修改列车识别号';
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
return '删除列车识别号';
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
return '移动列车识别号';
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
return '交换列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return '修改车组号';
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
/** 删除列车识别号*/
return OperationEvent.Train.delTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
/** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
/** 交换列车识别号*/
return OperationEvent.Train.switchTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
/** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId;
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('map/setTrainWindowShow', false);
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
this.routeSetting();
}
},
//
routeSetting() {
let operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Train.addTrainId.confirm.operation,
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('map/setTrainWindowShow', false);
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
this.routeSetting();
}
},
//
routeSetting() {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Train.addTrainId.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>

View File

@ -1,85 +1,94 @@
<template>
<el-dialog class="chengdou-03__systerm popup-alarm" :title="title" :visible.sync="show" width="500px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-row>
<el-col :offset="2">
<span v-for="message in messages">{{message}}</span><br>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm popup-alarm"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<el-row>
<el-col :offset="2">
<span v-for="(message, index) in messages" :key="index">{{ message }}</span>
</el-col>
</el-row>
<el-button justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-button>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'Popup-Alarm',
data() {
return {
dialogShow: false,
messages: [],
operate: null,
operation: '',
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '弹出式告警';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.operation = operate.operation;
this.dialogShow = true;
this.messages = messages || [];
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
//
this.alxeEffective();
}
export default {
name: 'PopupAlarm',
data() {
return {
dialogShow: false,
messages: [],
operate: null,
operation: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '弹出式告警';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.operation = operate.operation;
this.dialogShow = true;
this.messages = messages || [];
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
//
this.alxeEffective();
}
},
alxeEffective() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation,
}
},
alxeEffective() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
})
}
}
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
}
}
};
</script>
<style>

View File

@ -14,7 +14,7 @@
>
<div class="context">
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span><br>
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row class="button-group">

View File

@ -3,9 +3,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
} else {
BASE_API = process.env.VUE_APP_BASE_API;

View File

@ -37,7 +37,7 @@
</span>
<el-input v-model="loginForm.username" name="username" type="text" placeholder="手机号/邮箱" />
</el-form-item>
<el-form-item prop="password" class="item_form_box">
<el-form-item prop="password" class="item_form_box item_form_password">
<span class="svg-container">
<svg-icon icon-class="password" />
</span>
@ -61,7 +61,7 @@
content="请在琏课堂小程序助手,完善个人信息,设置登陆密码,手机号或邮箱。"
class="popover_box"
>
<div slot="reference">无法登陆</div>
<div slot="reference">无法登陆?</div>
</el-popover>
<el-form-item>
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
@ -247,11 +247,16 @@ export default {
color: #454545;
}
.item_form_password{
margin-bottom: 10px;
}
.tip-message {
color: #F56C61;
padding: 5px;
font-size: 12px;
height: 23px;
margin-bottom: 10px;
}
}
</style>
@ -265,9 +270,9 @@ export default {
.popover_box {
position: absolute;
right: 80px;
bottom: 97px;
bottom: 106px;
cursor: pointer;
color: #6c6c6c;
color: #225592;
font-size: 14px;
}

View File

@ -37,7 +37,7 @@
</span>
<el-input v-model="loginForm.username" name="username" type="text" placeholder="Mobile phone number/email" />
</el-form-item>
<el-form-item prop="password" class="item_form_box">
<el-form-item prop="password" class="item_form_box item_form_password">
<span class="svg-container">
<svg-icon icon-class="password" />
</span>
@ -61,7 +61,7 @@
content="Please in lian classroom small program assistant, perfect personal information, set login password, mobile phone number or email."
class="popover_box"
>
<div slot="reference">unable to login</div>
<div slot="reference">unable to login?</div>
</el-popover>
<el-form-item>
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
@ -211,7 +211,7 @@ export default {
Cookies.set('user_lang', 'en');
});
}).catch(() => {
this.tipsMsg = 'Incorrect user name or password, please retype.';
this.tipsMsg = 'Incorrect user name or password.';
this.loading = false;
setTimeout(() => { this.tipsMsg = ''; }, 5000);
});
@ -235,9 +235,9 @@ export default {
.popover_box {
position: absolute;
right: 80px;
bottom: 97px;
bottom: 113px;
cursor: pointer;
color: #6c6c6c;
color: #225592;
font-size: 14px;
}

View File

@ -37,7 +37,7 @@
</span>
<el-input v-model="loginForm.username" name="username" type="text" placeholder="手机号/邮箱" />
</el-form-item>
<el-form-item prop="password" class="item_form_box">
<el-form-item prop="password" class="item_form_box item_form_password">
<span class="svg-container">
<svg-icon icon-class="password" />
</span>
@ -61,7 +61,7 @@
content="请在琏课堂小程序助手,完善个人信息,设置登陆密码,手机号或邮箱。"
class="popover_box"
>
<div slot="reference">无法登陆</div>
<div slot="reference">无法登陆?</div>
</el-popover>
<el-form-item>
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
@ -228,9 +228,9 @@ export default {
.popover_box {
position: absolute;
right: 80px;
bottom: 97px;
bottom: 106px;
cursor: pointer;
color: #6c6c6c;
color: #225592;
font-size: 14px;
}

View File

@ -37,7 +37,7 @@
</span>
<el-input v-model="loginForm.username" name="username" type="text" placeholder="手机号/邮箱" />
</el-form-item>
<el-form-item prop="password" class="item_form_box">
<el-form-item prop="password" class="item_form_box item_form_password">
<span class="svg-container">
<svg-icon icon-class="password" />
</span>
@ -61,7 +61,7 @@
content="请在琏课堂小程序助手,完善个人信息,设置登陆密码,手机号或邮箱。"
class="popover_box"
>
<div slot="reference">无法登陆</div>
<div slot="reference">无法登陆?</div>
</el-popover>
<el-form-item>
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
@ -228,9 +228,9 @@ export default {
.popover_box {
position: absolute;
right: 80px;
bottom: 97px;
bottom: 106px;
cursor: pointer;
color: #6c6c6c;
color: #225592;
font-size: 14px;
}