|
@@ -18,29 +18,22 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <!-- <el-col :span="24">
|
|
|
|
|
- <el-form-item label="预测方法" prop="predictType" class="input">
|
|
|
|
|
- <el-select
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- v-model="ruleForm.predictType"
|
|
|
|
|
- placeholder="预测方法"
|
|
|
|
|
- clearable
|
|
|
|
|
- >
|
|
|
|
|
- <el-option label="依据历史数据" value="0">依据历史数据</el-option>
|
|
|
|
|
- <el-option label="温度和历史数据" value="2">温度和历史数据</el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
- label="温度"
|
|
|
|
|
|
|
+ label="温度范围"
|
|
|
prop="temperatures"
|
|
prop="temperatures"
|
|
|
class="input"
|
|
class="input"
|
|
|
- :rules="[{ required: true, message: '请输入温度', trigger: ['blur'] }]"
|
|
|
|
|
|
|
+ :rules="[{ required: true, trigger: ['blur'], validator: validateTemperatures }]"
|
|
|
>
|
|
>
|
|
|
- <el-input style="width: 100%" type="number" v-model="ruleForm.temperatures" placeholder="请输入温度" :readonly="type == 'view'">
|
|
|
|
|
- <template slot="append">℃</template>
|
|
|
|
|
- </el-input>
|
|
|
|
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
|
|
+ <el-input type="number" v-model="ruleForm.minTemperatures" placeholder="请输入最小温度" :readonly="type == 'view'">
|
|
|
|
|
+ <template slot="append">℃</template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ <span style="margin: 0 5px">-</span>
|
|
|
|
|
+ <el-input type="number" v-model="ruleForm.maxTemperatures" placeholder="请输入最大温度" :readonly="type == 'view'">
|
|
|
|
|
+ <template slot="append">℃</template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
@@ -75,22 +68,6 @@
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <!-- <el-col :span="24">
|
|
|
|
|
- <el-form-item
|
|
|
|
|
- label="当前用户数量"
|
|
|
|
|
- prop="userCount"
|
|
|
|
|
- class="input"
|
|
|
|
|
- :rules="[{ required: true, message: '请输入当前用户数量', trigger: ['blur'] }]"
|
|
|
|
|
- >
|
|
|
|
|
- <el-input
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- type="number"
|
|
|
|
|
- v-model="ruleForm.userCount"
|
|
|
|
|
- placeholder="请输入当前用户数量"
|
|
|
|
|
- :readonly="type == 'view'"
|
|
|
|
|
- />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="开始时间"
|
|
label="开始时间"
|
|
@@ -192,6 +169,13 @@ export default {
|
|
|
this.getRegionList();
|
|
this.getRegionList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ validateTemperatures(rule, value, callback) {
|
|
|
|
|
+ if (!this.ruleForm.minTemperatures || !this.ruleForm.maxTemperatures) {
|
|
|
|
|
+ callback(new Error('请输入温度范围'));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
init(id, type) {
|
|
init(id, type) {
|
|
|
this.type = type;
|
|
this.type = type;
|
|
|
this.resetForm();
|
|
this.resetForm();
|