Merge branch 'test' of git.code.tencent.com:lian-cbtc/jl-client into yly_eg2d

This commit is contained in:
yuan 2021-07-06 09:53:50 +08:00
commit d84a52912d
9 changed files with 149 additions and 133 deletions

View File

@ -199,7 +199,7 @@ export default {
} else {
let newValue = parseInt(value);
if (newValue) {
if (newValue > 0 & newValue < 9) {
if (newValue > 0 & newValue <= 9) {
newValue = '0' + newValue;
}
this.addModel.serviceNumber = newValue;

View File

@ -107,7 +107,7 @@ export default {
} else {
let newValue = parseInt(value);
if (newValue) {
if (newValue > 0 & newValue < 9) {
if (newValue > 0 & newValue <= 9) {
newValue = '0' + newValue;
}
this.model.serviceNumber = newValue;
@ -129,7 +129,7 @@ export default {
this.doClose();
})
.catch(e => {
this.$messageBox(e);
this.$messageBox(e.message);
});
}
});

View File

@ -199,7 +199,7 @@ export default {
} else {
let newValue = parseInt(value);
if (newValue) {
if (newValue > 0 & newValue < 9) {
if (newValue > 0 & newValue <= 9) {
newValue = '0' + newValue;
}
this.addModel.serviceNumber = newValue;

View File

@ -18,10 +18,10 @@
:rules="rules"
>
<el-form-item prop="serviceNumber" label="表号">
<el-input maxlength="2" v-model="model.serviceNumber" />
<el-input v-model="model.serviceNumber" maxlength="2" />
</el-form-item>
<el-form-item prop="tripNumber" label="车次号">
<el-input maxlength="4" v-model="model.tripNumber" />
<el-input v-model="model.tripNumber" maxlength="4" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
@ -40,22 +40,22 @@
</template>
<script>
import { sendCommandNew } from "@/api/jmap/training";
import { sendCommandNew } from '@/api/jmap/training';
export default {
name: "DeleteRunplanLine",
name: 'DeleteRunplanLine',
data() {
return {
loading: false,
dialogShow: false,
model: {
serviceNumber: "",
tripNumber: ""
serviceNumber: '',
tripNumber: ''
},
rules: {
serviceNumber: [
{
required: true,
trigger: "blur",
trigger: 'blur',
validator:this.validateService
// message: ""
}
@ -63,8 +63,8 @@ export default {
tripNumber: [
{
required: true,
trigger: "blur",
message: "请输入车次号"
trigger: 'blur',
message: '请输入车次号'
}
]
}
@ -72,12 +72,17 @@ export default {
},
computed: {
title() {
return "抽线";
return '抽线';
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}
},
watch: {
'$store.state.runPlan': function(oldVal, newVal) {
console.log(newVal);
}
},
methods: {
doShow(operate) {
// this.operate = operate || {};
@ -88,13 +93,13 @@ export default {
// }
this.dialogShow = true;
this.$nextTick(function() {
this.$store.dispatch("training/emitTipFresh");
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
// this.loading = false;
this.dialogShow = false;
this.$store.dispatch("training/emitTipFresh");
this.$store.dispatch('training/emitTipFresh');
},
validateService (rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
@ -102,7 +107,7 @@ export default {
} else {
let newValue = parseInt(value);
if (newValue) {
if (newValue > 0 & newValue < 9) {
if (newValue > 0 & newValue <= 9) {
newValue = '0' + newValue;
}
this.model.serviceNumber = newValue;
@ -117,23 +122,18 @@ export default {
if (valid) {
const group = this.$route.query.group;
const data = this.model;
sendCommandNew(group, "RunPlan_Delete_Trip", data)
sendCommandNew(group, 'RunPlan_Delete_Trip', data)
.then(resp => {
console.log(resp);
this.$message.success('删除计划车成功');
this.doClose();
})
.catch(e => {
this.$messageBox(e);
this.$messageBox(e.message);
});
}
});
}
},
watch: {
"$store.state.runPlan": function(oldVal, newVal) {
console.log(newVal);
}
}
};
</script>

View File

@ -92,9 +92,10 @@ const user = {
const type = userInfo.type;
const project = userInfo.project;
const deviceCode = userInfo.deviceCode;
const teacherLogin = userInfo.teacherLogin;
return new Promise((resolve, reject) => {
// 登录系统
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode }, type == 'design' ? LoginParams.Design : LoginParams.LianKeTang);
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode, teacherLogin:teacherLogin }, type == 'design' ? LoginParams.Design : LoginParams.LianKeTang);
login(params).then(resp => {
const token = resp.data;
const header = { group: '', 'X-Token': token };

View File

@ -77,6 +77,7 @@
<div style="display: inline-block;width: 100%;margin-bottom: 10px;">
<div style="display:inline-block">
<el-checkbox v-model="isAutoLogin">{{ $t('login.autoLogin') }}</el-checkbox>
<el-checkbox v-if="project === 'cgy'" v-model="teacherLogin">教师登录</el-checkbox>
</div>
<el-popover
v-if="!noQrcodeList.includes(project)"
@ -179,6 +180,7 @@ export default {
QCode: QCode,
loading111: true,
isAutoLogin: false,
teacherLogin: false,
loginForm: {
username: '',
password: ''
@ -420,6 +422,7 @@ export default {
model.type = this.modelType;
model.project = loginInfo[this.project].loginParam;
model.deviceCode = this.$route.query.projectDevice;
model.teacherLogin = this.teacherLogin;
this.loading = true;
if (this.isAutoLogin) {
Cookies.set(this.cookiesName, model.username, { expires: 2});
@ -564,9 +567,13 @@ export default {
});
}
});
} else {
if (this.teacherLogin) {
this.$router.push({ path: '/info/organization/classManage?enter=teacher' });
} else {
this.$router.push({ path: this.path });
}
}
},
handleLanguage() {
this.$i18n.locale = this.lang;
@ -774,7 +781,7 @@ export default {
position: relative;
}
.text-box{
font-size: 40px;
font-size: 39px;
font-weight: bold;
top: 150px;
width: 1050px;

View File

@ -9,10 +9,10 @@
:close-on-click-modal="false"
top="25vh"
>
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="100px" class="demo-ruleForm">
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="110px" class="demo-ruleForm">
<el-form-item prop="email">
<template slot="label">
<span>&emsp;&emsp;</span>
<span>(账号)</span>
</template>
<el-input v-model="form.email" />
</el-form-item>

View File

@ -1,7 +1,7 @@
<template>
<div>
<div class="title_content">{{ $store.state.user.companyName + '教学管理' }}</div>
<el-button type="text" class="lessonManageBack" @click="back">返回</el-button>
<div class="title_content">{{ companyName + '教学管理' }}</div>
<el-button v-if="!hideBack" type="text" class="lessonManageBack" @click="back">返回</el-button>
<div class="lessonManageInfo">
<el-menu class="lessonManageMenu" default-active="2-1">
<el-menu-item index="1" @click="clickMenu">
@ -56,7 +56,12 @@ export default {
};
},
computed: {
companyName() {
return this.$store.state.user.companyName;
},
hideBack() {
return this.$route.query.enter === 'teacher';
}
},
created() {

View File

@ -111,7 +111,8 @@ export default {
'delayWhenCancelRouteWithAbnormalInterlock',
'noARB',
'checkDirectionWhenSetHead',
'transferRouteCanOnlyFaultUnlock'
'transferRouteCanOnlyFaultUnlock',
'setManualWhenHeadTrainArriveTarget'
],
selectList: ['runMode'],
generalConfig: [
@ -155,7 +156,8 @@ export default {
'figuresOfServiceNumber',
'noARB',
'checkDirectionWhenSetHead',
'transferRouteCanOnlyFaultUnlock'
'transferRouteCanOnlyFaultUnlock',
'setManualWhenHeadTrainArriveTarget'
],
rangeList: ['noParkingSM', 'parkingSM'],
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
@ -204,7 +206,8 @@ export default {
figuresOfServiceNumber: '服务号的位数',
noARB: '没有ARB判定',
checkDirectionWhenSetHead: '设置头码车时检查方向',
transferRouteCanOnlyFaultUnlock: '转换轨进路只能通过故障解锁来取消'
transferRouteCanOnlyFaultUnlock: '转换轨进路只能通过故障解锁来取消',
setManualWhenHeadTrainArriveTarget: '头码车抵达目的地后变为人工车'
}
};
},