mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
fix:修改项目、编辑项目封面图回显问题及默认封面图下拉框文字展示
This commit is contained in:
@@ -75,11 +75,12 @@
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
"
|
||||
v-model:value="projectInfo.picUrl"
|
||||
v-model:value="picUrlName"
|
||||
dropdownClassName="dropdown-style"
|
||||
style="width: 440px"
|
||||
placeholder="请选择"
|
||||
:options="projectPic"
|
||||
@change="handleChangeSelect"
|
||||
allowClear
|
||||
></a-select>
|
||||
<img
|
||||
@@ -328,8 +329,14 @@ export default {
|
||||
},
|
||||
classifyList5: [],
|
||||
courseSyncFlag: false,
|
||||
picUrlName:'请选择封面图'
|
||||
});
|
||||
|
||||
// 封面图选择
|
||||
const handleChangeSelect = (value) => {
|
||||
console.log(value)
|
||||
state.projectInfo.picUrl= value
|
||||
}
|
||||
onMounted(() => {
|
||||
state.projectPic = store.state.projectPic.map((e) => ({value: e.dictValue, label: e.dictName}));
|
||||
state.viewDetail = routers.query.viewDetail;
|
||||
@@ -355,6 +362,17 @@ export default {
|
||||
.getProjectDetail({projectId: routers.query.projectId})
|
||||
.then((res) => {
|
||||
state.projectInfo = res.data.data.projectInfo;
|
||||
|
||||
console.log(res)
|
||||
let picurl = res.data.data.projectInfo.picUrl
|
||||
let dates = store.state.projectPic.map((e) => ({value: e.dictValue, label: e.dictName}));
|
||||
console.log(dates,picurl)
|
||||
for(let i=0;i<dates.length;i++){
|
||||
if(dates[i].value==picurl){
|
||||
state.picUrlName = dates[i].label
|
||||
}
|
||||
}
|
||||
|
||||
state.projectInfo.rangeTime = [
|
||||
state.projectInfo.beginTime,
|
||||
state.projectInfo.endTime,
|
||||
@@ -472,6 +490,7 @@ export default {
|
||||
createProject,
|
||||
backPage,
|
||||
templateScroll,
|
||||
handleChangeSelect
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user