拼图汇报

This commit is contained in:
yanran200730
2022-05-20 09:06:50 +08:00
parent a766a732b9
commit e82b8bef20
2 changed files with 56 additions and 11 deletions

View File

@@ -2,11 +2,14 @@
<div class="report"> <div class="report">
<components class="report-item" :is="component"></components> <components class="report-item" :is="component"></components>
<div class="report-list" data-html2canvas-ignore> <div class="report-list" data-html2canvas-ignore>
<image @click="component = 'WorkReport'" :class="[component === 'WorkReport' ? 'active' : '']" src="./images/report1.png" /> <image
<image @click="component = 'Daily'" :class="[component === 'Daily' ? 'active' : '']" src="./images/report4.png" /> v-for="(item, index) in configList"
<image @click="component = 'InspectLog'" :class="[component === 'InspectLog' ? 'active' : '']" src="./images/report2.png" /> :src="item.thum"
<image @click="component = 'MeetingMminutes'" :class="[component === 'MeetingMminutes' ? 'active' : '']" src="./images/report3.png" /> :key="index"
:class="[currIndex === index ? 'active' : '']"
@click="changeComponent(item, index)" />
</div> </div>
<div class="report-btn">完成</div>
</div> </div>
</template> </template>
@@ -23,7 +26,9 @@
data () { data () {
return { return {
component: 'WorkReport' component: 'WorkReport',
configList: [],
currIndex: 0
} }
}, },
@@ -35,21 +40,61 @@
}, },
onLoad () { onLoad () {
this.getConfig()
}, },
methods: { methods: {
getConfig () {
this.$http.post(`/api/appalbumtemplate/list?size=100&templateType=1&status=1`).then(res => {
if (res.code === 0) {
this.configList = res.data.records
}
})
},
changeComponent (e, index) {
this.currIndex = index
this.component = this.mapComponent(e.watermarkType)
},
mapComponent (type) {
return {
'9': 'WorkReport',
'10': 'Daily',
'11': 'InspectLog',
'12': 'MeetingMminutes'
}[type]
}
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.report { .report {
// height: 100vh; position: relative;
// overflow: hidden;
padding-bottom: 240px; padding-bottom: 240px;
.report-btn {
position: fixed;
bottom: 272px;
left: 32px;
z-index: 11;
width: 144px;
height: 64px;
line-height: 64px;
text-align: center;
background: #FFFFFF;
font-size: 32px;
color: #408EF6;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
border-radius: 40px;
&:active {
opacity: 0.7;
}
}
* { * {
box-sizing: border-box; box-sizing: border-box;
} }

View File

@@ -46,19 +46,19 @@
<h2>工作相册</h2> <h2>工作相册</h2>
<div class="album-list__wrapper"> <div class="album-list__wrapper">
<div class="item" v-for="(item, index) in list" :key="index" @click="linkTo('./AlbumDetail?id=' + item.id)"> <div class="item" v-for="(item, index) in list" :key="index" @click="linkTo('./AlbumDetail?id=' + item.id)">
<span>未查看</span> <span v-if="item.photoHasRead === 'NO'">未查看</span>
<image src="https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/fa50994a01ff415294729ac6e0623845~tplv-k3u1fbpfcp-no-mark:240:240:240:160.awebp?" /> <image src="https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/fa50994a01ff415294729ac6e0623845~tplv-k3u1fbpfcp-no-mark:240:240:240:160.awebp?" />
<div class="item-bottom"> <div class="item-bottom">
<h2>{{ item.albumName }}</h2> <h2>{{ item.albumName }}</h2>
<div class="item-bottom__info"> <div class="item-bottom__info">
<div class="left"> <div class="left">
<span>今日新增</span> <span>今日新增</span>
<i>5</i> <i>{{ item.dayPhtoto }}</i>
<span></span> <span></span>
</div> </div>
<div class="right"> <div class="right">
<image src="../images/zhaopianshuliang.png" /> <image src="../images/zhaopianshuliang.png" />
<span>16</span> <span>{{ item.photoTotal }}</span>
</div> </div>
</div> </div>
</div> </div>