This commit is contained in:
caozc
2023-02-25 22:28:10 +08:00
parent 145c8e6acb
commit afe9b38669
2 changed files with 51 additions and 19 deletions

View File

@@ -1114,7 +1114,7 @@ export default defineComponent({
routered.push({
path: "/templateAdd",
query: {
projectTemplateId: state.projectInfo.projectTemplateId,
projectTemplateId: projectTemplateId,
},
});
};

View File

@@ -4,10 +4,10 @@
<div class="header">
<span class="title">创建/编辑单层模板</span>
<div
@click="backPage"
style="cursor: pointer"
to="/libraryAdd"
class="goback"
@click="backPage"
style="cursor: pointer"
to="/libraryAdd"
class="goback"
>
<span class="return"></span><span class="returntext">返回</span>
</div>
@@ -31,18 +31,18 @@
/>
</div>
</div>
<div class="name" style="align-items: flex-start">
<div class="name flex-top">
<div class="namebox" style="margin-top: 10px">
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">封面图</div>
</div>
<div class="in select" style="display: flex">
<div class="in select" style="flex: 1; display: flex">
<div
:class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`"
style="
:class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`"
style="
width: 100px;
height: 100px;
border-radius: 5px;
@@ -50,23 +50,52 @@
position: relative;
overflow: hidden;
"
v-for="(src, index) in projectPic"
:key="index"
@click="() => (projectInfo.picUrl = src.value)"
v-for="(src, index) in projectPic"
:key="index"
:style="{
display: index >= 3 ? 'none' : 'flex',
}"
@click="() => (projectInfo.picUrl = src.value)"
>
<img
style="
style="
width: 100px;
height: 100px;
margin-bottom: 4px;
margin-right: 4px;
"
:src="src.value"
alt="avatar"
:src="src.value"
alt="avatar"
/>
</div>
<div
@click="showLearnBgMore"
v-if="projectPic.length > 3"
style="
width: 100px;
height: 100px;
padding-left: 15px;
border-radius: 5px;
cursor: pointer;
position: relative;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #c7cbd2;
font-size: 14px;
font-weight: 400;
color: #4ea6ff;
line-height: 36px;
"
>
查看更多
<img src="../../assets/images/projectadd/go.png" alt="" />
</div>
</div>
</div>
<div class="name">
<div class="namebox">
<img
@@ -262,11 +291,14 @@ const getDetail = () =>
projectInfo.value.rangeTime = [dayjs(projectInfo.value.beginTime).format("YYYY-MM-DD HH:mm"),
dayjs(projectInfo.value.endTime).format("YYYY-MM-DD HH:mm"),
];
projectInfo.value.courseSyncFlag = !!projectInfo.value.courseSyncFlag
projectInfo.value.courseSyncFlag = !!projectInfo.value.courseSyncFlag;
console.log("查询到的模板库数据:" + JSON.stringify(projectInfo.value));
});
const backPage = () => {
router.back();
router.push({
path: "/libraryAdd",
});
};
function timeChange(e) {