-- fix bug

This commit is contained in:
yuping
2023-02-22 02:10:42 +08:00
parent 304c0e35cb
commit 29f24bd775

View File

@@ -1419,7 +1419,6 @@ export default {
// state.imgData = ; // state.imgData = ;
// } // }
}); });
debugger
const imgData = computed(() => store.state.router_pic); const imgData = computed(() => store.state.router_pic);
//添加权限 //添加权限
watch( watch(
@@ -1477,13 +1476,12 @@ export default {
state.organizationSelectId = detail.organizationId; state.organizationSelectId = detail.organizationId;
state.pathIntro = detail.remark; state.pathIntro = detail.remark;
state.editPathId = id; state.editPathId = id;
let arr = imgData.value; const imgDict = imgData.value.find((img)=>img.value.split(',')[0] === state.pathBg)
arr.forEach((item) => { if(imgDict){
if (item.value === state.pathBg) { state.pathBgId = imgDict.code;
state.pathBgId = item.code; state.pathBg = imgDict.value.split(',')[0];
state.mobilePicUrl = imgDict.value.split(',')[1];
} }
});
//for (let i = 0; i < arr.length; i++) { //for (let i = 0; i < arr.length; i++) {
// console.log("arr[i].dictValue", arr[i].dictValue, state.pathBg); // console.log("arr[i].dictValue", arr[i].dictValue, state.pathBg);