代码调整

This commit is contained in:
dong 2023-02-08 11:13:43 +08:00
parent b94a5d4842
commit 967c3e8a01

View File

@ -46,29 +46,29 @@
<td colspan="2" align="center">
<p>通知干部上岗
<br>
<el-input :id="formInput.noticeCadresTimeHour.domId" v-model="form.noticeCadresTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('noticeCadresTime', 'hour')" @input="changeInputMaxVal($event, form.noticeCadresTime, 'hour', 23)" />
<el-input :id="formInput.noticeCadresTimeMinute.domId" v-model="form.noticeCadresTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('noticeCadresTime', 'minute')" @input="changeInputMaxVal($event, form.noticeCadresTime, 'minute', 59)" />
<el-input :id="formInput.noticeCadresTimeHour.domId" v-model="form.noticeCadresTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 23) value = 23" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('noticeCadresTime', 'hour')" />
<el-input :id="formInput.noticeCadresTimeMinute.domId" v-model="form.noticeCadresTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 59) value = 59" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('noticeCadresTime', 'minute')" />
</p>
</td>
<td colspan="2" align="center">
<p>报告列车调度员
<br>
<el-input :id="formInput.reportDispatcherTimeHour.domId" v-model="form.reportDispatcherTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportDispatcherTime', 'hour')" @input="changeInputMaxVal($event, form.reportDispatcherTime, 'hour', 23)" />
<el-input :id="formInput.reportDispatcherTimeMinute.domId" v-model="form.reportDispatcherTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportDispatcherTime', 'minute')" @input="changeInputMaxVal($event, form.reportDispatcherTime, 'minute', 59)" />
<el-input :id="formInput.reportDispatcherTimeHour.domId" v-model="form.reportDispatcherTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 23) value = 23" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportDispatcherTime', 'hour')" />
<el-input :id="formInput.reportDispatcherTimeMinute.domId" v-model="form.reportDispatcherTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 59) value = 59" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportDispatcherTime', 'minute')" />
</p>
</td>
<td colspan="2" align="center">
<p>报告指挥中心
<br>
<el-input :id="formInput.reportCommandCentreTimeHour.domId" v-model="form.reportCommandCentreTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportCommandCentreTime', 'hour')" @input="changeInputMaxVal($event, form.reportCommandCentreTime, 'hour', 23)" />
<el-input :id="formInput.reportCommandCentreTimeMinute.domId" v-model="form.reportCommandCentreTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportCommandCentreTime', 'minute')" @input="changeInputMaxVal($event, form.reportCommandCentreTime, 'minute', 59)" />
<el-input :id="formInput.reportCommandCentreTimeHour.domId" v-model="form.reportCommandCentreTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 23) value = 23" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportCommandCentreTime', 'hour')" />
<el-input :id="formInput.reportCommandCentreTimeMinute.domId" v-model="form.reportCommandCentreTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 59) value = 59" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportCommandCentreTime', 'minute')" />
</p>
</td>
<td colspan="2" align="center">
<p>监控干部到岗
<br>
<el-input :id="formInput.monitorArriveTimeHour.domId" v-model="form.monitorArriveTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('monitorArriveTime', 'hour')" @input="changeInputMaxVal($event, form.monitorArriveTime, 'hour', 23)" />
<el-input :id="formInput.monitorArriveTimeMinute.domId" v-model="form.monitorArriveTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('monitorArriveTime', 'minute')" @input="changeInputMaxVal($event, form.monitorArriveTime, 'minute', 59)" />
<el-input :id="formInput.monitorArriveTimeHour.domId" v-model="form.monitorArriveTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 23) value = 23" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('monitorArriveTime', 'hour')" />
<el-input :id="formInput.monitorArriveTimeMinute.domId" v-model="form.monitorArriveTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2); if(value > 59) value = 59" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('monitorArriveTime', 'minute')" />
</p>
</td>
<td colspan="2" align="center">
@ -199,11 +199,6 @@ export default {
}
},
methods: {
changeInputMaxVal(val, obj, key, max) {
if (val > max) {
this.$set(obj, key, `${max}`);
}
},
listChange(key, index) {
const val = this.form.registerInfoList[index][key];
const operate = {