Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
a5c97fc6b5
@ -60,9 +60,11 @@ export default {
|
|||||||
this.bacground = 'rgba(0,0,0,0)';
|
this.bacground = 'rgba(0,0,0,0)';
|
||||||
this.scaleRate = window.innerWidth / 2200;
|
this.scaleRate = window.innerWidth / 2200;
|
||||||
if (this.stationId == 'mainHouseOne') {
|
if (this.stationId == 'mainHouseOne') {
|
||||||
this.title = '黄山主变电所接线图';
|
// 黄山
|
||||||
|
this.title = '主所1主变电所接线图';
|
||||||
} else {
|
} else {
|
||||||
this.title = '茶亭主变电所接线图';
|
// 茶亭
|
||||||
|
this.title = '主所2主变电所接线图';
|
||||||
}
|
}
|
||||||
params.userInterface = 'substation';
|
params.userInterface = 'substation';
|
||||||
// parkingLotName
|
// parkingLotName
|
||||||
|
@ -10,12 +10,11 @@
|
|||||||
:modal="false"
|
:modal="false"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-form ref="form" :rules="rules" :model="formModel" label-width="100px" size="medium" @submit.native.prevent>
|
||||||
<el-col :span="6" :offset="2" style="height: 30px; line-height: 30px;">{{ $t('planMonitor.serviceNumber2')+$t('global.colon') }}</el-col>
|
<el-form-item prop="serviceNumber" :label="$t('planMonitor.serviceNumber2')+$t('global.colon')" :required="true">
|
||||||
<el-col :span="10" :offset="1">
|
<el-input v-model="formModel.serviceNumber" type="text" size="mini" maxlength="3" minlength="2" />
|
||||||
<el-input v-model="serviceNumber" size="mini" maxlength="3" minlength="2" />
|
</el-form-item>
|
||||||
</el-col>
|
</el-form>
|
||||||
</el-row>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||||
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||||
@ -40,7 +39,15 @@ export default {
|
|||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
formModel:{
|
||||||
serviceNumber: ''
|
serviceNumber: ''
|
||||||
|
},
|
||||||
|
rules:{
|
||||||
|
serviceNumber:[
|
||||||
|
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
|
||||||
|
{required: true, validator: this.validateServiceNumber, trigger: 'change'}
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -58,9 +65,30 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
},
|
},
|
||||||
|
validateServiceNumber(rule, value, callback) {
|
||||||
|
if (typeof value == 'string' && value.trim().length == 0) {
|
||||||
|
return callback(new Error('请填写服务号'));
|
||||||
|
} else {
|
||||||
|
const newValue = parseInt(value);
|
||||||
|
if (newValue) {
|
||||||
|
if (newValue.toString() != value) {
|
||||||
|
this.formModel.serviceNumber = newValue;
|
||||||
|
}
|
||||||
|
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||||
|
if (serviceNumberList.includes(value)) {
|
||||||
|
return callback(new Error('该服务号已存在,请重新填写'));
|
||||||
|
} else {
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.formModel.serviceNumber = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
handleCommit() {
|
handleCommit() {
|
||||||
|
this.$refs.dataform.validateForm(() => {
|
||||||
if (this.$route.query.planId || this.loadRunPlanId) {
|
if (this.$route.query.planId || this.loadRunPlanId) {
|
||||||
if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {
|
|
||||||
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.serviceNumber }).then(resp => {
|
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.serviceNumber }).then(resp => {
|
||||||
if (resp.data) {
|
if (resp.data) {
|
||||||
this.$emit('dispatchDialog', {
|
this.$emit('dispatchDialog', {
|
||||||
@ -78,12 +106,14 @@ export default {
|
|||||||
this.handleConfirm(true);
|
this.handleConfirm(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
this.$messageBox('长度在二到三位');
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(this.$t('tip.chooseToOpenTheRunGraph'));
|
this.$messageBox(this.$t('tip.chooseToOpenTheRunGraph'));
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
// if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {
|
||||||
|
// } else {
|
||||||
|
// this.$messageBox('长度在二到三位');
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
handleConfirm(isNew = false) {
|
handleConfirm(isNew = false) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
@ -58,7 +58,8 @@ export default {
|
|||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
serviceNumber:[
|
serviceNumber:[
|
||||||
{required: true, validator: this.validateServiceNumber, trigger: 'blur'}
|
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
|
||||||
|
{required: true, validator: this.validateServiceNumber, trigger: 'change'}
|
||||||
],
|
],
|
||||||
beginTime: [
|
beginTime: [
|
||||||
{ required: true, message: '请填写开始时间', trigger: 'blur' }
|
{ required: true, message: '请填写开始时间', trigger: 'blur' }
|
||||||
@ -134,15 +135,24 @@ export default {
|
|||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
},
|
},
|
||||||
validateServiceNumber(rule, value, callback) {
|
validateServiceNumber(rule, value, callback) {
|
||||||
if (value.trim().length == 0) {
|
if (typeof value == 'string' && value.trim().length == 0) {
|
||||||
return callback(new Error('请填写服务号'));
|
return callback(new Error('请填写服务号'));
|
||||||
} else {
|
} else {
|
||||||
|
const newValue = parseInt(value);
|
||||||
|
if (newValue) {
|
||||||
|
if (newValue.toString() != value) {
|
||||||
|
this.formModel.serviceNumber = newValue;
|
||||||
|
}
|
||||||
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
|
||||||
if (serviceNumberList.includes(value.trim())) {
|
if (serviceNumberList.includes(value)) {
|
||||||
return callback(new Error('该服务号已存在,请重新填写'));
|
return callback(new Error('该服务号已存在,请重新填写'));
|
||||||
} else {
|
} else {
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.formModel.serviceNumber = '';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
validateRunningRouting(rule, value, callback) {
|
validateRunningRouting(rule, value, callback) {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<span>{{ $t('global.startTime')+$t('global.colon') }}</span>
|
<span>{{ $t('global.startTime')+$t('global.colon') }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-time-picker v-model="addModel.startTime" size="mini" value-format="HH:mm:ss" :clearable="false" />
|
<el-time-picker v-model="addModel.startTime" size="mini" value-format="HH:mm:ss" :clearable="false" :picker-options="{selectableRange:'02:00:00-23:59:59'}" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 5px;height: 28px;line-height: 28px;">
|
<el-row style="margin-top: 5px;height: 28px;line-height: 28px;">
|
||||||
|
@ -146,6 +146,7 @@
|
|||||||
value-format="HH:mm:ss"
|
value-format="HH:mm:ss"
|
||||||
size="mini"
|
size="mini"
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
|
:picker-options="{selectableRange:'02:00:00-23:59:59'}"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -80,8 +80,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'beginTime', label: '开始时间', type: 'timePicker'},
|
{ prop: 'beginTime', label: '开始时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
|
||||||
{ prop: 'overTime', label: '结束时间', type: 'timePicker'},
|
{ prop: 'overTime', label: '结束时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
|
||||||
{ prop: 'departureTimeInterval', label: '发车间隔', type: 'number'},
|
{ prop: 'departureTimeInterval', label: '发车间隔', type: 'number'},
|
||||||
{ prop: 'parkedTime', label: '停站时间', type: 'number'},
|
{ prop: 'parkedTime', label: '停站时间', type: 'number'},
|
||||||
{ prop: 'reentryTime', label: '折返时间', type: 'number'},
|
{ prop: 'reentryTime', label: '折返时间', type: 'number'},
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
value-format="timestamp"
|
value-format="timestamp"
|
||||||
:disabled="isEdit"
|
:disabled="isEdit"
|
||||||
:picker-options="pickerOptions"
|
:picker-options="pickerOptions"
|
||||||
|
@change="handle"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -37,8 +38,8 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
value-format="timestamp"
|
value-format="timestamp"
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
:picker-options="pickerOptions"
|
|
||||||
/>
|
/>
|
||||||
|
<!-- :picker-options="pickerOptions" -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -123,6 +124,7 @@ export default {
|
|||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
return time.getTime() < new Date(new Date().toLocaleDateString()).getTime();
|
return time.getTime() < new Date(new Date().toLocaleDateString()).getTime();
|
||||||
|
// return time.getTime() < Date.now() - 1 * 24 * 3600 * 1000;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
formDetail: {
|
formDetail: {
|
||||||
@ -217,6 +219,12 @@ export default {
|
|||||||
passMark: data.passMark
|
passMark: data.passMark
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
handle() {
|
||||||
|
var startAt = new Date(this.form.startDate) * 1000 / 1000;
|
||||||
|
if (startAt < Date.now()) {
|
||||||
|
this.form.startDate = new Date().getTime();
|
||||||
|
}
|
||||||
|
},
|
||||||
getClassList() {
|
getClassList() {
|
||||||
if (this.isClassShow) {
|
if (this.isClassShow) {
|
||||||
this.classList = [];
|
this.classList = [];
|
||||||
@ -255,34 +263,26 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
this.submit('definition');
|
||||||
|
},
|
||||||
|
submit(type) {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.startDate) {
|
const form = Object.assign({}, this.form);
|
||||||
this.form.startDate = this.getDate(this.form.startDate);
|
if (form.startDate) {
|
||||||
|
form.startDate = this.getDate(form.startDate);
|
||||||
}
|
}
|
||||||
if (this.form.endDate) {
|
if (form.endDate) {
|
||||||
this.form.endDate = this.getDate(this.form.endDate);
|
form.endDate = this.getDate(form.endDate);
|
||||||
}
|
}
|
||||||
this.form['trial'] = this.trial;
|
form['trial'] = this.trial;
|
||||||
this.$store.dispatch('exam/setCourseDetail', this.form);
|
this.$store.dispatch('exam/setCourseDetail', form);
|
||||||
this.$emit('definition', this.form);
|
this.$emit(type, form);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
createQuickly() {
|
createQuickly() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.submit('createQuickly');
|
||||||
if (valid) {
|
|
||||||
if (this.form.startDate) {
|
|
||||||
this.form.startDate = this.getDate(this.form.startDate);
|
|
||||||
}
|
|
||||||
if (this.form.endDate) {
|
|
||||||
this.form.endDate = this.getDate(this.form.endDate);
|
|
||||||
}
|
|
||||||
this.form['trial'] = this.trial;
|
|
||||||
this.$store.dispatch('exam/setCourseDetail', this.form);
|
|
||||||
this.$emit('createQuickly', this.form);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
getDate(date) {
|
getDate(date) {
|
||||||
const now = new Date(date);
|
const now = new Date(date);
|
||||||
|
@ -149,6 +149,7 @@ export default {
|
|||||||
this.$store.dispatch('exam/setRuleList', []); // 清空规则列表数据
|
this.$store.dispatch('exam/setRuleList', []); // 清空规则列表数据
|
||||||
const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleManage}`;
|
const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleManage}`;
|
||||||
const lessonId = this.$route.params.lessonId;
|
const lessonId = this.$route.params.lessonId;
|
||||||
|
this.$store.dispatch('exam/setCourseDetail', {});
|
||||||
if (parseInt(lessonId)) {
|
if (parseInt(lessonId)) {
|
||||||
this.$router.replace({ path: `${path}`, query: { mapId: this.$route.query.mapId, lessonId: lessonId, noPreLogout: this.$route.query.noPreLogout } });
|
this.$router.replace({ path: `${path}`, query: { mapId: this.$route.query.mapId, lessonId: lessonId, noPreLogout: this.$route.query.noPreLogout } });
|
||||||
} else {
|
} else {
|
||||||
|
@ -141,8 +141,8 @@ export default {
|
|||||||
name: this.course.name, // 名称
|
name: this.course.name, // 名称
|
||||||
passingPoint: Number(this.course.passMark), // 及格分
|
passingPoint: Number(this.course.passMark), // 及格分
|
||||||
remarks: this.course.desc, // 考试说明
|
remarks: this.course.desc, // 考试说明
|
||||||
endTime: this.course.endTime,
|
endTime: this.course.endDate,
|
||||||
startTime: this.course.startTime,
|
startTime: this.course.startDate,
|
||||||
type: this.course.type, // 类型
|
type: this.course.type, // 类型
|
||||||
trial: this.course.trial == 2 // 权限判断
|
trial: this.course.trial == 2 // 权限判断
|
||||||
};
|
};
|
||||||
|
@ -76,7 +76,8 @@ export default {
|
|||||||
title: this.$t('publish.examTime'),
|
title: this.$t('publish.examTime'),
|
||||||
prop: 'startTime',
|
prop: 'startTime',
|
||||||
type: 'formatter',
|
type: 'formatter',
|
||||||
format: 'yyyy-MM-dd hh:ss'
|
format: 'yyyy-MM-dd hh:ss',
|
||||||
|
width:'200px'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('publish.fullMark'),
|
title: this.$t('publish.fullMark'),
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<el-dialog title="复制iscs数据" :visible.sync="dialogVisible" width="400px" center>
|
<el-dialog title="复制iscs数据" :visible.sync="dialogVisible" width="400px" center>
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button :loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
<el-button @click="close">{{ $t('global.cancel') }}</el-button>
|
<el-button @click="close">{{ $t('global.cancel') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -158,11 +158,14 @@ export default {
|
|||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
|
this.loading = true;
|
||||||
copyIscsData(this.formModel).then(res=>{
|
copyIscsData(this.formModel).then(res=>{
|
||||||
|
this.loading = false;
|
||||||
this.$message.success('复制ISCS数据成功');
|
this.$message.success('复制ISCS数据成功');
|
||||||
this.close();
|
this.close();
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$messageBox('复制ISCS数据失败');
|
this.$messageBox('复制ISCS数据失败');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user