设置 id=“editAbleTrends”
mounted () {
// 获取优选规则列表
this.getInfo()
},
methods: {
getInfo () {
this.tableloading = true
queryAll({
mold: "yx"
}).then(res => {
if (!res) return
if (res.primaryOpinionList.length) {
this.primaryOpinionList = res.primaryOpinionList
} else {
this.primaryOpinionList.push(
{
survey: '',//评选内容
surveyStr: '',//评选标准
score: 0,//最高得分
sort: 1, //排序
isHide: true, //默认展示
mold: "yx"
}
)
}
const tables = document.querySelectorAll(
"#editAbleTrends .el-table__footer-wrapper tr>td"
);
console.log("tables", tables);
tables[0].colSpan = 3;
tables[0].style.textAlign = "center";
tables[1].style.display = "none";
tables[2].style.display = "none";
tables[3].style.textAlign = "center";
tables[4].style.textAlign = "center";
// 获取总计
this.numChange()
this.tableloading = false
})
}
}
在mounted 写的方法里调用js代码
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)