代码调整

This commit is contained in:
joylink_cuiweidong 2022-07-27 13:43:13 +08:00
parent 6fa3e9dec6
commit 523d0a111e
2 changed files with 9 additions and 7 deletions

View File

@ -1,9 +1,9 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="550px" :before-close="doClose">
<el-form ref="form" label-width="120px" :model="formModel" :rules="rules">
<el-form-item :label="$t('display.setTime.systemTime')" prop="initTime">
<el-form-item :label="$t('display.setTime.systemTime')" prop="time">
<el-time-picker
v-model="formModel.initTime"
v-model="formModel.time"
:picker-options="pickerOptions"
:placeholder="$t('display.setTime.anyTime')"
/>
@ -57,10 +57,10 @@ export default {
this.status = false;
this.show = false;
},
formatTime(initTime) {
const hh = prefixIntrger(initTime.getHours(), 2);
const mm = prefixIntrger(initTime.getMinutes(), 2);
const ss = prefixIntrger(initTime.getSeconds(), 2);
formatTime(time) {
const hh = prefixIntrger(time.getHours(), 2);
const mm = prefixIntrger(time.getMinutes(), 2);
const ss = prefixIntrger(time.getSeconds(), 2);
return `${hh}:${mm}:${ss}`;
},
handleSure() {
@ -72,6 +72,7 @@ export default {
};
modifySystemTime(model, this.group).then(resp => {
this.status = false;
this.$message.success('修改系统时间成功!');
}).catch(() => {
this.status = false;
this.$messageBox('修改系统时间失败,请稍后再试');

View File

@ -114,7 +114,8 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
this.lodaing = true;
if (this.formModel.type !== 'STATION_SUPERVISOR') { delete this.formModel.deviceCode; }
// this.formModel.type !== 'STATION_SUPERVISOR'
if (!this.stationRoleList.includes(this.formModel.type)) { delete this.formModel.deviceCode; }
addSimulationMember(this.formModel, this.$route.query.group).then((res) => {
this.$message.success('添加仿真角色成员成功!');
this.$emit('addScriptMember', res.data);