优化设置信息的代码

This commit is contained in:
TOP糯米 2023-04-06 23:00:28 +08:00
parent 0d7a250e1e
commit cd41d2d663
1 changed files with 2 additions and 1 deletions

View File

@ -236,8 +236,9 @@ export default {
this.$models.service.getInstallCate().then((list) => { this.$models.service.getInstallCate().then((list) => {
this.cateList = list; this.cateList = list;
if (this.finishInfo) { if (this.finishInfo) {
let cateIds = this.userInfo.worker.cateIds.split(",");
list.forEach((item) => { list.forEach((item) => {
if (this.userInfo.worker.cateIds.split(",").indexOf(item.id + "") >= 0) { if (cateIds.indexOf(item.id + "") >= 0) {
this.currentCateList.push({ this.currentCateList.push({
id: item.id, id: item.id,
name: item.name, name: item.name,