first commit
This commit is contained in:
@@ -0,0 +1,132 @@
|
||||
<!--#
|
||||
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="history.back()"></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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,134 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.van-cell {
|
||||
padding: 4px 16px;
|
||||
}
|
||||
.van-cell-group--inset {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar title="我收到的祝福" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.username"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入教职工姓名进行查询"
|
||||
>
|
||||
</van-search>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 70px">
|
||||
<van-list v-model="mLoading" :finished="finished" :finished-text="giftInfo.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<div v-for="o in giftInfo" :key="o.id" class="van-doc-card">
|
||||
<div>
|
||||
<div style="font-size: 15px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
margin-left: 15px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;">
|
||||
<span style="color: #3ea1ec">{{o.username}}</span>
|
||||
<span style="color: #3ea1ec">|</span>
|
||||
<span style="font-size: 10px;font-weight: normal;color: #a0a1a1">{{o.name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size: 10px">
|
||||
<van-cell-group inset >
|
||||
<van-cell :border="false" title="赠送日期">{{o.giftTime}}</van-cell>
|
||||
<van-cell :border="false" title="祝福语">
|
||||
<span v-if="o.message.length==0">无</span>
|
||||
<span v-if="o.message.length>0">{{o.message}}</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="生日贺卡" @click="showHk(o)"
|
||||
v-if="o.isSend==1" is-link value="点击展示"></van-cell>
|
||||
<van-cell :border="false" title="赠送礼物">
|
||||
<van-image style="width: 50px;height: 50px" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id" @click="showGift(APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id,o.id)"></van-image>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&giftInfo.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el:'#app',
|
||||
mixins: [mobileMixins],
|
||||
data(){
|
||||
return{
|
||||
show: false,
|
||||
images:'',
|
||||
giftInfo:[],
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doSearch(){
|
||||
this.pageForm.pageNumber = 1
|
||||
this.giftInfo = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
const res = await $.post('/mobile/birthday/greeting/giftInfo', this.pageForm)
|
||||
this.mLoading = false
|
||||
if (res.code === 0) {
|
||||
res.data.list.forEach(v => {
|
||||
if(!(typeof v.files =='object')){
|
||||
v.files = JSON.parse(v.files)
|
||||
}
|
||||
})
|
||||
this.giftInfo = this.giftInfo.concat(res.data.list)
|
||||
if (this.giftInfo.length >= res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
showGift(data){
|
||||
vant.ImagePreview([data])
|
||||
},
|
||||
showHk(o){
|
||||
window.location.href='/mobile/birthday/greeting/hk?id='+o.id
|
||||
},
|
||||
},
|
||||
created(){
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,173 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.sub{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" style="background-color: white">
|
||||
<van-nav-bar title="精选礼物" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<div>
|
||||
<span style="color: rgb(114,90,69);margin-left: 10px;font-size: 14px;font-weight: bold">正在为
|
||||
<span v-for="o in tableData"> {{o.username}} </span>挑选礼物
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-grid :column-num="6" :border="false">
|
||||
<van-grid-item
|
||||
v-for="o in tableData"
|
||||
:key="o.userId" style="padding: 5px;">
|
||||
<div style="background-color: rgb(203,200,222);
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 25px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
">
|
||||
<span style="font-size: 20px">{{o.username.substr(0,1)}}</span>
|
||||
</div>
|
||||
<span style="font-size: 10px">{{o.username}}</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div><h3 style="margin-left: 10px">精选礼物</h3></div>
|
||||
<div>
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item
|
||||
v-for="(o,index) in listGift"
|
||||
:key="o.id" style="padding: 5px;">
|
||||
<div class="sub">
|
||||
<van-image :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id" @click="sendGift(APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id,o.id)"></van-image>
|
||||
</div>
|
||||
<span style="font-size: 10px">{{o.giftName}}</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<van-dialog v-model="show" title="送上礼物" show-cancel-button :before-close="beforeClose">
|
||||
<div>
|
||||
<img :src="images" style="display: flex;align-items: center;justify-content: center;height: 100px;margin: 0 auto"/>
|
||||
</div>
|
||||
<div style="margin-top: 10px;margin-bottom: 10px">
|
||||
<van-field
|
||||
v-model="form.message"
|
||||
rows="2"
|
||||
autosize
|
||||
label="祝福语"
|
||||
type="textarea"
|
||||
maxlength="100"
|
||||
placeholder="请输入祝福语"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</div>
|
||||
<div style="margin-top: 10px;margin-bottom: 10px">
|
||||
<van-row>
|
||||
<van-col span="16">
|
||||
<van-cell center title="是否发送贺卡">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="form.isSend" @click="send" size="24"></van-switch>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button round type="info" @click="showHk()">贺卡展示</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el:'#app',
|
||||
data(){
|
||||
return{
|
||||
pageForm:{
|
||||
greetingResult:localStorage.getItem("greetingResult"),
|
||||
},
|
||||
tableData:[],
|
||||
listGift:[],
|
||||
show: false,
|
||||
images:'',
|
||||
form:{
|
||||
giftId:'',
|
||||
message:'',
|
||||
isSend:false,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async loadList(){
|
||||
const res = await $.post('/mobile/birthday/greeting/loadList',this.pageForm)
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
},
|
||||
async giftList(){
|
||||
const res = await $.get('/mobile/birthday/greeting/giftList')
|
||||
if (res.code === 0) {
|
||||
res.data.forEach(v => {
|
||||
if(!(typeof v.files =='object')){
|
||||
v.files = JSON.parse(v.files)
|
||||
}
|
||||
})
|
||||
this.listGift = res.data
|
||||
}
|
||||
},
|
||||
sendGift(data,id){
|
||||
this.show=true;
|
||||
this.images=data;
|
||||
this.form.giftId=id;
|
||||
this.form.greetingResult=this.pageForm.greetingResult;
|
||||
},
|
||||
beforeClose : async function (action, done) { // 点击事件 - 备注按钮提示框
|
||||
if (action === 'confirm') { // 确认
|
||||
const res = await $.post('/mobile/birthday/greeting/sendBlessing', this.form)
|
||||
if (res.code === 0) {
|
||||
done(); // 关闭提示框
|
||||
this.$toast.success("赠送成功")
|
||||
} else {
|
||||
done();
|
||||
this.$toast.fail("操作失败")
|
||||
}
|
||||
} else if (action === 'cancel') { // 取消
|
||||
this.show = false;
|
||||
this.images = '';
|
||||
this.form = {};
|
||||
done(); // 关闭提示框
|
||||
}
|
||||
},
|
||||
send(){
|
||||
console.log(this.form.isSend)
|
||||
},
|
||||
showHk(){
|
||||
window.location.href='/mobile/birthday/greeting/hk'
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.loadList();
|
||||
this.giftList();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user