|
|
@@ -1,37 +1,20 @@
|
|
|
<template>
|
|
|
- <el-dialog
|
|
|
- title="参数设置"
|
|
|
- :visible.sync="dialogVisible"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :close-on-press-escape="false"
|
|
|
- @close="handleClose"
|
|
|
- width="800px"
|
|
|
- >
|
|
|
- <el-form
|
|
|
- ref="baseForm"
|
|
|
- class="base-form"
|
|
|
- label-position="right"
|
|
|
- label-width="130px"
|
|
|
- :model="baseForm"
|
|
|
- :rules="rules"
|
|
|
- size="small"
|
|
|
- >
|
|
|
+ <el-dialog title="参数设置" :visible.sync="dialogVisible" :close-on-click-modal="false" :close-on-press-escape="false"
|
|
|
+ @close="handleClose" width="800px">
|
|
|
+ <el-form ref="baseForm" class="base-form" label-position="right" label-width="130px" :model="baseForm" :rules="rules"
|
|
|
+ size="small">
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="电表品牌型号:" prop="tmnconfigElecmetermodel">
|
|
|
- <el-input
|
|
|
- placeholder="请输入"
|
|
|
- v-model="baseForm.tmnconfigElecmetermodel">
|
|
|
+ <el-input placeholder="请输入" v-model="baseForm.tmnconfigElecmetermodel">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="水表品牌型号:" prop="tmnconfigWatermetermodel">
|
|
|
- <el-input
|
|
|
- placeholder="请输入"
|
|
|
- v-model="baseForm.tmnconfigWatermetermodel">
|
|
|
+ <el-input placeholder="请输入" v-model="baseForm.tmnconfigWatermetermodel">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -41,17 +24,13 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="计算模式:" prop="tmnconfigMeteredmodel">
|
|
|
- <el-input
|
|
|
- placeholder="请输入"
|
|
|
- v-model="baseForm.tmnconfigMeteredmodel">
|
|
|
+ <el-input placeholder="请输入" v-model="baseForm.tmnconfigMeteredmodel">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="以电折水系数:" prop="tmnconfigCoefficient">
|
|
|
- <el-input
|
|
|
- placeholder="请输入"
|
|
|
- v-model="baseForm.tmnconfigCoefficient">
|
|
|
+ <el-input placeholder="请输入" v-model="baseForm.tmnconfigCoefficient">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -61,17 +40,9 @@
|
|
|
</el-form>
|
|
|
|
|
|
<div style="text-align: right">
|
|
|
- <el-button type="info" plain @click="resetForm('baseForm')"
|
|
|
- >取消</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- style="margin-left:16px;"
|
|
|
- @click="submitForm('baseForm')"
|
|
|
- :disabled="dialogSubmitLoading"
|
|
|
- :loading="dialogSubmitLoading"
|
|
|
- >确定</el-button
|
|
|
- >
|
|
|
+ <el-button type="info" plain @click="resetForm('baseForm')">取消</el-button>
|
|
|
+ <el-button type="primary" style="margin-left:16px;" @click="submitForm('baseForm')" :disabled="dialogSubmitLoading"
|
|
|
+ :loading="dialogSubmitLoading">确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
@@ -88,7 +59,7 @@ export default {
|
|
|
tmnId: {
|
|
|
type: String,
|
|
|
default: ''
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -100,7 +71,7 @@ export default {
|
|
|
tmnconfigMeteredmodel: '', //计量模式
|
|
|
tmnconfigCoefficient: '',//以电折水系数
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
rules: {
|
|
|
tmnconfigElecmetermodel: [
|
|
|
{ required: true, message: '电表品牌型号', trigger: 'blur' }
|
|
|
@@ -127,7 +98,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
async getTmnconfigInfoHandler(tmnId) {
|
|
|
- const response = await getTmnconfigInfo({tmnId})
|
|
|
+ const response = await getTmnconfigInfo({ tmnId })
|
|
|
const responseData = response?.data
|
|
|
this.baseForm = {
|
|
|
tmnconfigElecmetermodel: responseData?.tmnconfigElecmetermodel || '',
|
|
|
@@ -144,7 +115,7 @@ export default {
|
|
|
await addTmnconfig(params)
|
|
|
this.handleClose()
|
|
|
this.$emit('refresh')
|
|
|
- },
|
|
|
+ },
|
|
|
resetForm(formName) {
|
|
|
this.$refs[formName].resetFields();
|
|
|
this.dialogVisible = false;
|
|
|
@@ -167,6 +138,7 @@ export default {
|
|
|
.input-number {
|
|
|
width: 100%;
|
|
|
}
|
|
|
+
|
|
|
.base-form {
|
|
|
max-height: 70vh;
|
|
|
overflow-y: auto;
|