代码调整

This commit is contained in:
dong 2023-02-08 10:59:38 +08:00
parent 18ebca3ee6
commit 5a6106e8a1

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,'')" 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,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('noticeCadresTime', 'minute')" />
<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)" />
</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,'')" 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,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportDispatcherTime', 'minute')" />
<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)" />
</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,'')" 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,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportCommandCentreTime', 'minute')" />
<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)" />
</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,'')" 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,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('monitorArriveTime', 'minute')" />
<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)" />
</p>
</td>
<td colspan="2" align="center">
@ -199,6 +199,11 @@ 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 = {