2019-07-26 13:32:43 +08:00
|
|
|
<template>
|
2019-09-23 13:37:11 +08:00
|
|
|
<el-dialog v-dialogDrag class="planEdit__tool update-station-interval-time" :title="title" :visible.sync="dialogShow" width="420px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
2019-08-13 15:54:26 +08:00
|
|
|
<el-row>
|
|
|
|
<el-form ref="form" :model="runPlanLevelVO" label-width="140px" size="mini" :rules="rules">
|
2019-09-19 14:58:41 +08:00
|
|
|
<el-form-item :label="$t('planMonitor.updateStation.level1')" prop="level1">
|
2019-08-13 15:54:26 +08:00
|
|
|
<el-input-number v-model="runPlanLevelVO.level1" :min="1" />
|
2019-09-23 13:37:11 +08:00
|
|
|
<span>{{ $t('global.second') }}</span>
|
2019-08-13 15:54:26 +08:00
|
|
|
</el-form-item>
|
2019-09-19 14:58:41 +08:00
|
|
|
<el-form-item :label="$t('planMonitor.updateStation.level2')" prop="level2">
|
2019-08-13 15:54:26 +08:00
|
|
|
<el-input-number v-model="runPlanLevelVO.level2" :min="1" />
|
2019-09-23 13:37:11 +08:00
|
|
|
<span>{{ $t('global.second') }}</span>
|
2019-08-13 15:54:26 +08:00
|
|
|
</el-form-item>
|
2019-09-19 14:58:41 +08:00
|
|
|
<el-form-item :label="$t('planMonitor.updateStation.level3')" prop="level3">
|
2019-08-13 15:54:26 +08:00
|
|
|
<el-input-number v-model="runPlanLevelVO.level3" :min="1" />
|
2019-09-23 13:37:11 +08:00
|
|
|
<span>{{ $t('global.second') }}</span>
|
2019-08-13 15:54:26 +08:00
|
|
|
</el-form-item>
|
2019-09-19 14:58:41 +08:00
|
|
|
<el-form-item :label="$t('planMonitor.updateStation.level4')" prop="level4">
|
2019-08-13 15:54:26 +08:00
|
|
|
<el-input-number v-model="runPlanLevelVO.level4" :min="1" />
|
2019-09-23 13:37:11 +08:00
|
|
|
<span>{{ $t('global.second') }}</span>
|
2019-08-13 15:54:26 +08:00
|
|
|
</el-form-item>
|
2019-09-19 14:58:41 +08:00
|
|
|
<el-form-item :label="$t('planMonitor.updateStation.level5')" prop="level5">
|
2019-08-13 15:54:26 +08:00
|
|
|
<el-input-number v-model="runPlanLevelVO.level5" :min="1" />
|
2019-09-23 13:37:11 +08:00
|
|
|
<span>{{ $t('global.second') }}</span>
|
2019-08-13 15:54:26 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-row>
|
|
|
|
<el-row type="flex" justify="center" class="button-group">
|
2019-09-23 13:37:11 +08:00
|
|
|
<el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
|
|
|
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
2019-08-13 15:54:26 +08:00
|
|
|
</el-row>
|
|
|
|
</el-dialog>
|
2019-07-26 13:32:43 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-08-13 15:54:26 +08:00
|
|
|
export default {
|
2020-10-28 13:51:26 +08:00
|
|
|
name: 'UpdateStationIntervalTime',
|
|
|
|
components: {
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
dialogShow: false,
|
|
|
|
loading: false,
|
|
|
|
editModel: {},
|
|
|
|
runPlanLevelVO: {}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
title() {
|
|
|
|
return this.$t('planMonitor.updateStation.updateData');
|
|
|
|
},
|
|
|
|
rules() {
|
|
|
|
return {
|
|
|
|
level1: [
|
|
|
|
{ required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel1'), trigger: 'blur' }
|
|
|
|
],
|
|
|
|
level2: [
|
|
|
|
{ required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel2'), trigger: 'blur' }
|
|
|
|
],
|
|
|
|
level3: [
|
|
|
|
{ required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel3'), trigger: 'blur' }
|
|
|
|
],
|
|
|
|
level4: [
|
|
|
|
{ required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel4'), trigger: 'blur' }
|
|
|
|
],
|
|
|
|
level5: [
|
|
|
|
{ required: true, message: this.$t('planMonitor.updateStation.pleaseInputLevel5'), trigger: 'blur' }
|
|
|
|
]
|
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
doShow(params) {
|
|
|
|
this.editModel = params || {};
|
|
|
|
this.runPlanLevelVO = Object.assign({}, this.editModel.runPlanLevelVO || {});
|
|
|
|
this.dialogShow = true;
|
|
|
|
},
|
|
|
|
doClose() {
|
|
|
|
this.loading = false;
|
|
|
|
this.dialogShow = false;
|
|
|
|
},
|
|
|
|
handleCommit() {
|
|
|
|
this.$refs['form'].validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
const model = {
|
|
|
|
level1: this.runPlanLevelVO.level1,
|
|
|
|
level2: this.runPlanLevelVO.level2,
|
|
|
|
level3: this.runPlanLevelVO.level3,
|
|
|
|
level4: this.runPlanLevelVO.level4,
|
|
|
|
level5: this.runPlanLevelVO.level5,
|
|
|
|
stationRunningId: this.runPlanLevelVO.stationRunningId
|
|
|
|
};
|
|
|
|
this.$emit('handleConfirm', model);
|
|
|
|
this.doClose();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2019-08-13 15:54:26 +08:00
|
|
|
};
|
2019-07-26 13:32:43 +08:00
|
|
|
</script>
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
@import "src/styles/mixin.scss";
|
|
|
|
|
|
|
|
/deep/ {
|
|
|
|
.el-input {
|
|
|
|
width: 120px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-input-number {
|
|
|
|
width: 120px;
|
|
|
|
}
|
|
|
|
}
|
2019-08-13 15:54:26 +08:00
|
|
|
</style>
|