1. 调整设备列表页面
This commit is contained in:
parent
8fa35003e7
commit
b2cfaf1e0c
|
@ -259,7 +259,7 @@
|
|||
<el-option
|
||||
v-for="item in modelOptions"
|
||||
:key="item.modelId"
|
||||
:label="item.modelName"
|
||||
:label="item.model"
|
||||
:value="item.modelId"
|
||||
>
|
||||
</el-option>
|
||||
|
@ -294,8 +294,8 @@
|
|||
<el-input v-model="form.mac" placeholder="请输入设备Mac号" :disabled="title=='修改设备'"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户" prop="userId" style="width: 100%">
|
||||
<el-col :span="12" v-show="title=='修改设备'">
|
||||
<el-form-item label="用户" prop="userId" style="width: 100%" >
|
||||
<el-select
|
||||
v-model="form.userId"
|
||||
filterable
|
||||
|
@ -451,8 +451,8 @@
|
|||
<el-slider
|
||||
:max="5"
|
||||
v-model="form.waterIntensity"
|
||||
:step="1"
|
||||
:min="1"
|
||||
:step="1"
|
||||
:min="1"
|
||||
show-stops
|
||||
class="margin-40px switch-water"
|
||||
>
|
||||
|
@ -571,7 +571,7 @@
|
|||
<div class="lt" @click="editds(item, index)">
|
||||
<div class="tltle" style="font-size: 24px">
|
||||
{{ item.startTime }} <span style="font-size: 18px;color:#ccc">{{ item.mode == 1 ? '单次浇水' : '循环浇水' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<span>{{ item.displayedDays[index] }}</span>
|
||||
<span
|
||||
style="
|
||||
|
@ -954,7 +954,7 @@ export default {
|
|||
// { required: true, message: "分类名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
modelId: [{ required: true, message: "型号不能为空", trigger: "blur" }],
|
||||
userId: [{ required: true, message: "用户不能为空", trigger: "blur" }],
|
||||
// userId: [{ required: true, message: "用户不能为空", trigger: "blur" }],
|
||||
mac: [{ required: true, message: "mac值不能为空", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
|
@ -1060,10 +1060,10 @@ export default {
|
|||
}
|
||||
this.addflag2 = true;
|
||||
},
|
||||
convertToSecondsFromArray(arr) {
|
||||
return parseInt(arr[0], 10) * 3600 + parseInt(arr[1], 10) * 60 + parseInt(arr[2], 10);
|
||||
convertToSecondsFromArray(arr) {
|
||||
return parseInt(arr[0], 10) * 3600 + parseInt(arr[1], 10) * 60 + parseInt(arr[2], 10);
|
||||
},
|
||||
|
||||
|
||||
btnedit(){
|
||||
this.addlist.push(this.yiindex==''?0:this.yiindex, this.erindex==''?0:this.erindex, this.sanindex == '' ? 0:this.sanindex, this.siindex == '' ? 0 :this.siindex, this.wuindex == 0 ? 0 :this.wuindex, this.liuindex == '' ? 0 : this.liuindex,this.riindex == '' ? 0 :this.riindex)
|
||||
console.log(this.addlist);
|
||||
|
@ -1094,49 +1094,49 @@ export default {
|
|||
this.checkedval = false
|
||||
})
|
||||
},
|
||||
extractedTimeToArrays(originalDateString) {
|
||||
// 尝试解析日期字符串
|
||||
const date = new Date(originalDateString);
|
||||
if (isNaN(date)) {
|
||||
console.error('无法解析日期字符串');
|
||||
return null; // 或者返回一个空数组,取决于你如何处理错误情况
|
||||
}
|
||||
|
||||
// 提取时分秒
|
||||
const hours = date.getHours().toString().padStart(2, '0');
|
||||
const minutes = date.getMinutes().toString().padStart(2, '0');
|
||||
const seconds = date.getSeconds().toString().padStart(2, '0');
|
||||
|
||||
// 返回时分秒组成的数组
|
||||
return [hours, minutes, seconds];
|
||||
extractedTimeToArrays(originalDateString) {
|
||||
// 尝试解析日期字符串
|
||||
const date = new Date(originalDateString);
|
||||
if (isNaN(date)) {
|
||||
console.error('无法解析日期字符串');
|
||||
return null; // 或者返回一个空数组,取决于你如何处理错误情况
|
||||
}
|
||||
|
||||
// 提取时分秒
|
||||
const hours = date.getHours().toString().padStart(2, '0');
|
||||
const minutes = date.getMinutes().toString().padStart(2, '0');
|
||||
const seconds = date.getSeconds().toString().padStart(2, '0');
|
||||
|
||||
// 返回时分秒组成的数组
|
||||
return [hours, minutes, seconds];
|
||||
},
|
||||
extractedTime(originalDateString) {
|
||||
// 尝试解析日期字符串
|
||||
const date = new Date(originalDateString);
|
||||
if (isNaN(date)) {
|
||||
console.error('无法解析日期字符串');
|
||||
return '';
|
||||
}
|
||||
|
||||
// 提取时分秒
|
||||
const hours = date.getHours().toString().padStart(2, '0');
|
||||
const minutes = date.getMinutes().toString().padStart(2, '0');
|
||||
const seconds = date.getSeconds().toString().padStart(2, '0');
|
||||
|
||||
// 返回格式化后的字符串
|
||||
return `${hours}:${minutes}:${seconds}`;
|
||||
extractedTime(originalDateString) {
|
||||
// 尝试解析日期字符串
|
||||
const date = new Date(originalDateString);
|
||||
if (isNaN(date)) {
|
||||
console.error('无法解析日期字符串');
|
||||
return '';
|
||||
}
|
||||
|
||||
// 提取时分秒
|
||||
const hours = date.getHours().toString().padStart(2, '0');
|
||||
const minutes = date.getMinutes().toString().padStart(2, '0');
|
||||
const seconds = date.getSeconds().toString().padStart(2, '0');
|
||||
|
||||
// 返回格式化后的字符串
|
||||
return `${hours}:${minutes}:${seconds}`;
|
||||
},
|
||||
|
||||
|
||||
formatSeconds(totalSeconds) {
|
||||
const hours = Math.floor(totalSeconds / 3600);
|
||||
const minutes = Math.floor((totalSeconds % 3600) / 60);
|
||||
const seconds = totalSeconds % 60;
|
||||
// 使用padStart来确保小时、分钟和秒数都是两位数
|
||||
const formattedHours = String(hours).padStart(2, '0');
|
||||
const formattedMinutes = String(minutes).padStart(2, '0');
|
||||
const formattedSeconds = String(seconds).padStart(2, '0');
|
||||
return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`;
|
||||
formatSeconds(totalSeconds) {
|
||||
const hours = Math.floor(totalSeconds / 3600);
|
||||
const minutes = Math.floor((totalSeconds % 3600) / 60);
|
||||
const seconds = totalSeconds % 60;
|
||||
// 使用padStart来确保小时、分钟和秒数都是两位数
|
||||
const formattedHours = String(hours).padStart(2, '0');
|
||||
const formattedMinutes = String(minutes).padStart(2, '0');
|
||||
const formattedSeconds = String(seconds).padStart(2, '0');
|
||||
return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`;
|
||||
},
|
||||
|
||||
// 请求定时列表
|
||||
|
@ -1461,10 +1461,10 @@ export default {
|
|||
this.$modal.msg(response.msg);
|
||||
});
|
||||
},
|
||||
convertSecondsToString(seconds) {
|
||||
const minutes = Math.floor(seconds / 60);
|
||||
const secs = seconds % 60;
|
||||
return `${minutes.toString().padStart(2, '0') + '分'}${secs.toString().padStart(2, '0') + '秒'}`;
|
||||
convertSecondsToString(seconds) {
|
||||
const minutes = Math.floor(seconds / 60);
|
||||
const secs = seconds % 60;
|
||||
return `${minutes.toString().padStart(2, '0') + '分'}${secs.toString().padStart(2, '0') + '秒'}`;
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
|
@ -1483,7 +1483,7 @@ export default {
|
|||
this.form.pulseModeParamObj.js_sec = this.convertSecondsToString(JSON.stringify(this.form.pulseModeParamObj.js_sec))
|
||||
this.form.pulseModeParam = JSON.stringify(this.form.pulseModeParamObj)
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.form.regularWateringJson = JSON.stringify(
|
||||
this.form.regularWateringJsonObj
|
||||
|
@ -1532,7 +1532,7 @@ export default {
|
|||
});
|
||||
setTimeout(() => {
|
||||
this.getgetregular(deviceid);
|
||||
}, 2000);
|
||||
}, 2000);
|
||||
this.list = [];
|
||||
this.result = [];
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user