130 lines
4.8 KiB
HTML
130 lines
4.8 KiB
HTML
<!--#
|
|
layout("/mobile/platform.html"){
|
|
#-->
|
|
|
|
<style>
|
|
.test {
|
|
width: 9em;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
font-size: 10px;
|
|
text-align: center;
|
|
color: #a0a1a1;
|
|
}
|
|
.test:hover {
|
|
text-overflow: inherit;
|
|
overflow: visible;
|
|
}
|
|
</style>
|
|
|
|
<div id="app" v-cloak>
|
|
<van-nav-bar title="生日祝福" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
|
<div class="search-fixed">
|
|
<van-search
|
|
v-model="pageForm.searchKeyWord"
|
|
shape="round"
|
|
maxlength="10"
|
|
@search="doSearch"
|
|
placeholder="请输入教职工姓名或者教职工编号进行查询"
|
|
></van-search>
|
|
|
|
<div style="display: flex">
|
|
<div style="width: calc(100% - 100px); background: rgb(255, 255, 255)">
|
|
<h4 style="margin-left: 5%; color: rgb(122, 110, 96)">一份祝福拉进同事的距离~</h4>
|
|
<h5 style="margin-left: 5%; color: rgb(122, 110, 96)">{{tableData.length}}同事即将生日</h5>
|
|
</div>
|
|
<div style="width: 100px; max-width: 100px">
|
|
<van-image width="100px" height="100px" src="/assets/mobile/img/birthday/birthday1.png"></van-image>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="margin-top: 160px; margin-bottom: 50px">
|
|
<div>
|
|
<van-checkbox-group v-model="result">
|
|
<van-grid :column-num="3" :border="false" style="background-color: white">
|
|
<van-grid-item v-for="o in tableData" :key="o.userId" style="padding: 5px">
|
|
<span style="font-size: 10px">{{o.birthday.substr(0,2)}}-{{o.birthday.substr(2,4)}}</span>
|
|
|
|
<div
|
|
style="
|
|
background-image: url("/assets/mobile/img/birthday/birthday2.png");
|
|
width: 100px;
|
|
height: 100px;
|
|
background-size: 100% 100%;
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
"
|
|
>
|
|
<span style="font-size: 20px; font-weight: bold; font-family: cursive">{{o.username.substr(0,1)}}</span>
|
|
</div>
|
|
<span style="font-size: 10px">{{o.username}}</span>
|
|
<div class="test">
|
|
<span>{{o.unitName}}</span>
|
|
</div>
|
|
<!-- <span v-if="o.unitName.length>7" style="font-size: 10px;">{{o.unitName.substr(0,7)+"..."}}</span>-->
|
|
<!-- <span v-else style="font-size: 10px">{{o.unitName}}</span>-->
|
|
<van-checkbox style="margin-left: 80px; margin-top: -35px" icon-size="20px" :name="o.userId" ref="checkboxes"></van-checkbox>
|
|
</van-grid-item>
|
|
</van-grid>
|
|
</van-checkbox-group>
|
|
</div>
|
|
|
|
<div>
|
|
<van-tabbar route>
|
|
<van-tabbar-item replace @click="sendBlessings()" style="font-size: 16px">送上祝福</van-tabbar-item>
|
|
<van-tabbar-item replace @click="showMine()" style="font-size: 16px">我收到的</van-tabbar-item>
|
|
</van-tabbar>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
new Vue({
|
|
el: "#app",
|
|
data() {
|
|
return {
|
|
tableData: [],
|
|
pageForm: {},
|
|
checked: true,
|
|
result: []
|
|
}
|
|
},
|
|
methods: {
|
|
doSearch() {
|
|
this.onLoad()
|
|
},
|
|
async onLoad() {
|
|
const res = await $.post("/mobile/birthday/greeting/pageData", this.pageForm)
|
|
if (res.code === 0) {
|
|
this.tableData = res.data
|
|
}
|
|
},
|
|
//送上祝福
|
|
sendBlessings() {
|
|
if (this.result.length === 0) {
|
|
this.$toast.fail("请选择教职工")
|
|
return
|
|
}
|
|
localStorage.setItem("greetingResult", this.result)
|
|
window.location.href = "/mobile/birthday/greeting/greeting_list"
|
|
},
|
|
toggle(index) {
|
|
this.$refs.checkboxes[index].toggle()
|
|
},
|
|
showMine() {
|
|
window.location.href = "/mobile/birthday/greeting/greeting_info"
|
|
}
|
|
},
|
|
created() {
|
|
this.onLoad()
|
|
},
|
|
components: {}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|