----->
mounted():{
this.getActivitiInfo()
}
method:{
getActivitiInfo() {
const param = new URLSearchParams();
param.append("processInstanceId", this.dobusDetails.processInstanceId);
getActivitiDetailInfo(param).then((res) => { //接口
if (res.code === 200) {
this.activitiDetailList = res.data.data;
this.activitiDetailList.forEach((item) => {
var endmask = item.endTime.substring(
0,
item.endTime.lastIndexOf(":")
);
item.yeartime = endmask.substring(0, endmask.indexOf(" "));
item.hourtime = endmask.substr(11, 5);
});
}
}
给数组种添加属性的方法:
1、 this.obj["name"] ="哈哈哈" //对象
2、this.obj.name="嘻嘻嘻" //对象
3、this.obj.push({age:"20"}) //数组