车辆接口更新

This commit is contained in:
wangshiming
2022-01-20 16:26:08 +08:00
parent 9232c4cc0e
commit 60544b8896
9 changed files with 121 additions and 48 deletions

View File

@ -30,6 +30,7 @@ export class AnnouncementMessageComponent implements OnInit {
columns: STColumn[] = [
{ title: '公告标题', index: 'announcementTitle' },
{ title: '发布平台', index: 'appName' },
{ title: '创建时间', index: 'createTime' },
{ title: '发送时间', index: 'sendTime' },
{ title: '公告内容', index: 'announcementContent' },
@ -209,18 +210,47 @@ this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
this.service.msgSrv.warning('请正确填写完整!')
return
}
var c = new Date(this.sfFre.value.sendTime);
this.sfFre.value.sendTime =
c.getFullYear() +
'-' +
this.addPreZero(c.getMonth() + 1) +
'-' +
this.addPreZero(c.getDate()) +
' ' +
this.addPreZero(c.getHours()) +
':' +
this.addPreZero(c.getMinutes()) +
':' +
this.addPreZero(c.getSeconds());
const params ={
...this.sfFre.value
}
if(this.editId) {
params.id = this.editId
console.log(params)
this.service.request(this.service.$api_addAnnouncementInfo, params).subscribe((res:any) => {
if(res) {
this.service.msgSrv.success('保存成功!')
this.isVisible = false
this.st.reload();
}
})
} else {
this.service.request(this.service.$api_modifyAnnouncementInfo, params).subscribe((res:any) => {
if(res) {
this.service.msgSrv.success('保存成功!')
this.isVisible = false
this.st.reload();
}
}
)}
}
addPreZero(num: any) {
if (num < 10) {
return '0' + num;
} else {
return num;
}
this.service.request(this.service.$api_saveButtonInfo, params).subscribe((res:any) => {
if(res) {
this.service.msgSrv.success('保存成功!')
this.isVisible = false
this.st.reload();
}
})
}
}