日期时间 格式化

This commit is contained in:
zhuangyuanke 2024-12-08 22:40:51 +08:00
parent 0aec4b119e
commit 430c7aac24
2 changed files with 14 additions and 4 deletions

View File

@ -154,7 +154,7 @@ export default {
query: {
path: "/patient/patientinfoimport",
// signPatientRecordId: row.id,
importId: row.id ?row.id : '',
importMainId: row.id ?row.id : '',
patientName: row.patientName ? row.patientName : '',
departmentId: row.departmentId ? row.departmentId : '',
departmentName: row.departmentName ? row.departmentName : '',

View File

@ -558,7 +558,7 @@ export default {
optionslisttime: [],
parentDictCodelist: [],
updata: {
importId: "",
importMainId: "",
signPatientRecordId: "",
patientId: "",
patientName: "",
@ -642,7 +642,7 @@ export default {
this.optiononditionOperator();
this.updata.signPatientRecordId = this.$route.query.signPatientRecordId;
this.updata.patientId = this.$route.query.patientId;
this.updata.importId = this.$route.query.importId;
this.updata.importMainId = this.$route.query.importMainId;
this.updata.patientName = this.$route.query.patientName;
this.updata.departmentId = this.$route.query.departmentId;
this.updata.departmentName = this.$route.query.departmentName;
@ -708,7 +708,17 @@ export default {
topclack(item,index){
},
input(item,index){
item.nodePlanTime = new Date();
// item.nodePlanTime = new Date();
const date = new Date(item.nodePlanTime);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 01
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const ss = String(date.getSeconds()).padStart(2, '0');
item.nodePlanTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes;// + ':' + ss ;
this.$forceUpdate()
},
handleDateChange(value) {