优化页面
This commit is contained in:
@@ -265,6 +265,15 @@ export default {
|
||||
closePopup() {
|
||||
this.$refs.popup.close();
|
||||
},
|
||||
//格式化日期
|
||||
dateformat(date) {
|
||||
const isoString = date.replace(" ", "T");
|
||||
const timestamp = Date.parse(isoString);
|
||||
if (isNaN(timestamp)) {
|
||||
throw new Error(`Invalid date format: ${this.datetimesingle}`);
|
||||
}
|
||||
return Math.floor(timestamp / 1000);
|
||||
},
|
||||
//确认弹窗
|
||||
confirm() {
|
||||
//判断金币是否有为空
|
||||
@@ -348,11 +357,11 @@ export default {
|
||||
}
|
||||
if (this.mindatetimesingle !== "") {
|
||||
condition.pkTime = {
|
||||
start: this.mindatetimesingle,
|
||||
start: this.dateformat(this.mindatetimesingle),
|
||||
};
|
||||
}
|
||||
if (this.maxdatetimesingle !== "") {
|
||||
condition.pkTime.end = this.maxdatetimesingle;
|
||||
condition.pkTime.end = this.dateformat(this.maxdatetimesingle);
|
||||
}
|
||||
if (this.countrys !== "") {
|
||||
condition.country = this.countrys;
|
||||
@@ -482,7 +491,7 @@ export default {
|
||||
formatDate: formatDate,
|
||||
|
||||
async pkList(condition) {
|
||||
console.log(condition);
|
||||
console.log("`````````````````````````````",condition);
|
||||
//获取list
|
||||
const res = await request({
|
||||
url: "pk/pkList",
|
||||
@@ -497,7 +506,7 @@ export default {
|
||||
userInfo: false,
|
||||
});
|
||||
if (res.code === 200) {
|
||||
console.log(res.data);
|
||||
console.log("````````````````````````````````",res.data);
|
||||
this.triggered = false;
|
||||
if (condition.type === 1) {
|
||||
this.MakeAppointmentPKlist.push(...res.data);
|
||||
@@ -509,6 +518,9 @@ export default {
|
||||
if (condition.type == this.listtype) {
|
||||
this.list = this.RealTimePklist;
|
||||
}
|
||||
if (condition.type == null) {
|
||||
this.list = this.RealTimePklist;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user