|
@@ -413,7 +413,7 @@
|
|
this.searchDeviceName = null;
|
|
this.searchDeviceName = null;
|
|
this.globalUser.deviceName = null;
|
|
this.globalUser.deviceName = null;
|
|
this.globalUser.clientId = null;
|
|
this.globalUser.clientId = null;
|
|
- this.globalUser.todayDate = this.getCurrentDate();
|
|
|
|
|
|
+ this.globalUser.todayDate = dateUtils.getCurrentDate();
|
|
uni.setNavigationBarTitle({
|
|
uni.setNavigationBarTitle({
|
|
title: this.$t('equipmentStatusList.title')
|
|
title: this.$t('equipmentStatusList.title')
|
|
});
|
|
});
|
|
@@ -443,17 +443,6 @@
|
|
getEquipmentTitle(equipment) {
|
|
getEquipmentTitle(equipment) {
|
|
return equipment.name ? equipment.name : equipment.clientId;
|
|
return equipment.name ? equipment.name : equipment.clientId;
|
|
},
|
|
},
|
|
- getCurrentDate() {
|
|
|
|
- const today = new Date();
|
|
|
|
- // 获取年份
|
|
|
|
- const year = today.getFullYear();
|
|
|
|
- // 获取月份 (注意,JavaScript 的月份是从0开始的,所以要加1)
|
|
|
|
- const month = String(today.getMonth() + 1).padStart(2, '0');
|
|
|
|
- // 获取日期
|
|
|
|
- const day = String(today.getDate()).padStart(2, '0');
|
|
|
|
- // 格式化为 "yyyy-MM-dd" 格式
|
|
|
|
- return `${year}-${month}-${day}`;
|
|
|
|
- },
|
|
|
|
getEquipmentListData() {
|
|
getEquipmentListData() {
|
|
if(this.globalUser.id == 1) {
|
|
if(this.globalUser.id == 1) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -462,8 +451,7 @@
|
|
});
|
|
});
|
|
return;
|
|
return;
|
|
} else {
|
|
} else {
|
|
- this.isLoading = true;
|
|
|
|
- console.log('参数', this.globalUser);
|
|
|
|
|
|
+ this.isLoading = true;
|
|
this.getEquipmentListByUser(this.globalUser)
|
|
this.getEquipmentListByUser(this.globalUser)
|
|
.then(data => {
|
|
.then(data => {
|
|
this.merchantList = data;
|
|
this.merchantList = data;
|