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

@ -1,108 +1,113 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form
ref="form"
size="small"
label-width="100px"
:model="model"
:rules="rules"
>
<el-form-item prop="serviceNumber" label="表号">
<el-input maxlength="2" v-model="model.serviceNumber" />
</el-form-item>
<el-form-item prop="tripNumber" label="车次号">
<el-input maxlength="4" v-model="model.tripNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button type="primary" :loading="loading" @click="commit">{{
$t("menu.menuDialog.confirm")
}}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button @click="doClose">{{
$t("menu.menuDialog.cancel")
}}</el-button>
</el-col>
</el-row>
</el-dialog>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form
ref="form"
size="small"
label-width="100px"
:model="model"
:rules="rules"
>
<el-form-item prop="serviceNumber" label="表号">
<el-input v-model="model.serviceNumber" maxlength="2" />
</el-form-item>
<el-form-item prop="tripNumber" label="车次号">
<el-input v-model="model.tripNumber" maxlength="4" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button type="primary" :loading="loading" @click="commit">{{
$t("menu.menuDialog.confirm")
}}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button @click="doClose">{{
$t("menu.menuDialog.cancel")
}}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { sendCommandNew } from "@/api/jmap/training";
import { sendCommandNew } from '@/api/jmap/training';
export default {
name: "DeleteRunplanLine",
data() {
return {
loading: false,
dialogShow: false,
model: {
serviceNumber: "",
tripNumber: ""
},
rules: {
serviceNumber: [
{
required: true,
trigger: "blur",
validator:this.validateService
// message: ""
}
],
tripNumber: [
{
required: true,
trigger: "blur",
message: "请输入车次号"
}
]
}
};
},
computed: {
title() {
return "抽线";
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}
},
methods: {
doShow(operate) {
// this.operate = operate || {};
// this.operation = operate.operation;
// //
// if (!this.dialogShow) {
// this.loading = false;
// }
this.dialogShow = true;
this.$nextTick(function() {
this.$store.dispatch("training/emitTipFresh");
});
},
doClose() {
// this.loading = false;
this.dialogShow = false;
this.$store.dispatch("training/emitTipFresh");
},
validateService (rule, value, callback) {
name: 'DeleteRunplanLine',
data() {
return {
loading: false,
dialogShow: false,
model: {
serviceNumber: '',
tripNumber: ''
},
rules: {
serviceNumber: [
{
required: true,
trigger: 'blur',
validator:this.validateService
// message: ""
}
],
tripNumber: [
{
required: true,
trigger: 'blur',
message: '请输入车次号'
}
]
}
};
},
computed: {
title() {
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 || {};
// this.operation = operate.operation;
// //
// if (!this.dialogShow) {
// this.loading = false;
// }
this.dialogShow = true;
this.$nextTick(function() {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
// this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
validateService (rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请输入表号'));
} else {
let newValue = parseInt(value);
if (newValue) {
if (newValue > 0 & newValue < 9) {
if (newValue > 0 & newValue <= 9) {
newValue = '0' + newValue;
}
this.model.serviceNumber = newValue;
@ -112,29 +117,24 @@ export default {
}
}
},
commit() {
this.$refs.form.validate(valid => {
if (valid) {
const group = this.$route.query.group;
const data = this.model;
sendCommandNew(group, "RunPlan_Delete_Trip", data)
.then(resp => {
console.log(resp);
commit() {
this.$refs.form.validate(valid => {
if (valid) {
const group = this.$route.query.group;
const data = this.model;
sendCommandNew(group, 'RunPlan_Delete_Trip', data)
.then(resp => {
console.log(resp);
this.$message.success('删除计划车成功');
this.doClose();
})
.catch(e => {
this.$messageBox(e);
});
}
});
}
},
watch: {
"$store.state.runPlan": function(oldVal, newVal) {
console.log(newVal);
}
}
this.doClose();
})
.catch(e => {
this.$messageBox(e.message);
});
}
});
}
}
};
</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});
@ -565,7 +568,11 @@ export default {
}
});
} else {
this.$router.push({ path: this.path });
if (this.teacherLogin) {
this.$router.push({ path: '/info/organization/classManage?enter=teacher' });
} else {
this.$router.push({ path: this.path });
}
}
},
handleLanguage() {
@ -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">
@ -30,7 +30,7 @@
<div class="lessonManageOther">
<router-view />
</div>
</div>
</div>
</div>
</template>
@ -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: '头码车抵达目的地后变为人工车'
}
};
},