first commit

This commit is contained in:
2026-09-20 15:46:34 +08:00
parent 72fb5eae10
commit e558339dcc
3340 changed files with 671310 additions and 251 deletions
@@ -0,0 +1,189 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.register-icon {
position: absolute;
bottom: 8px;
right: 16px;
z-index: 1;
}
</style>
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<van-nav-bar
@click-left="history.go(-1)"
fixed
left-arrow
placeholder
title="作品列表"
></van-nav-bar>
<div class="search-fixed">
<van-dropdown-menu active-color="#1989fa">
<van-dropdown-item :options="yearOption" @change="yearChange"
v-model="pageForm.year"></van-dropdown-item>
</van-dropdown-menu>
</div>
<div style="margin: 60px auto">
<van-notice-bar mode="closeable">左滑可删除作品。</van-notice-bar>
<van-list
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad"
v-model="mLoading">
<div @click.stop="openView(o)" class="list-card" v-for="o in tableData">
<van-swipe-cell :disabled="!isActivityTime(o)">
<van-cell-group inset>
<image @click.stop="openEdit(o.id,o.hdid)" class="register-icon"
src="/assets/mobile/svg/wmhd/bianji.svg"
v-if="isActivityTime(o)"></image>
<van-cell :border="false" title="姓名">{{o.sbrname}}</van-cell>
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
<van-cell :border="false" title="单位">{{o.dwname}}</van-cell>
<van-cell :border="false" title="工会">{{o.ghname}}</van-cell>
<van-cell :border="false" title="活动类别">{{o.hdlbname}}</van-cell>
<van-cell :border="false" title="作品类别" v-if="o.zplbname">{{o.zplbname}}
</van-cell>
<!-- <van-cell :border="false" title="主题">{{o.hdsbzpzt}}</van-cell>-->
<van-cell :border="false" title="上传时间">{{o.hdsbsj}}</van-cell>
<!-- <van-cell :border="false" title="审核状态">
<span :style="'color:'+o.statecolor">{{o.statename}}</span>
</van-cell>--><!--
<van-cell :border="false" title="总点赞数">
{{o.dz_znum}}次
</van-cell>-->
</van-cell-group>
<template #right>
<van-button @click="doDelete(o)" square style="height: 100%;" text="删除"
type="danger"></van-button>
</template>
</van-swipe-cell>
</div>
</van-list>
<van-empty
class="custom-image"
description="暂无数据"
image="/none.svg"
v-if="mLoading==false&&tableData.length==0"
></van-empty>
</div>
<van-popup :style="{ height: '100%',width:'100%' }" position="right"
v-model="viewShow">
<van-nav-bar @click-left="viewShow=false" fixed left-arrow placeholder
title="详细信息"></van-nav-bar>
<mobile-wmhd-info ref="minfo"></mobile-wmhd-info>
</van-popup>
<div>
<van-tabbar v-model="tarBarActive">
<van-tabbar-item icon="home-o" replace url="/mobile/wmhd/apply">教工作品征集</van-tabbar-item>
<van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/list">我的教工作品
</van-tabbar-item><!--
<van-tabbar-item icon="manager-o" replace url="/mobile/wmhd/statistics">点赞教工作品
</van-tabbar-item>-->
</van-tabbar>
</div>
</div>
<script>
let vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
viewShow: false,
tarBarActive: 1,
yearOption: [],
pageForm: {
year: '',
hdtype: 1,
}
}
},
components: {
'mobile-wmhd-info': httpVueLoader('/components/mobile/wmhd/info.vue?v=' + new Date().getTime()),
},
methods: {
isActivityTime(o) {
if (!o || !o.hdflag || !o.hdkssj || !o.hdjssj) {
return false
}
const startTime = new Date(o.hdkssj.replace(/-/g, '/')).getTime()
const endTime = new Date(o.hdjssj.replace(/-/g, '/')).getTime()
const nowTime = new Date().getTime()
return startTime <= nowTime && nowTime <= endTime
},
openEdit(id, hdid) {
window.location.href = '/platform/staffActivities?client=mobile&id=' + hdid + '&zpid=' + id
},
async doDelete(o) {
if (!this.isActivityTime(o)) {
vant.Toast('不在活动时间范围内,不能删除')
return
}
const confirm = await vant.Dialog.confirm({
title: '提示',
message: '确定要删除此次作品吗?',
})
if (confirm === 'confirm') {
const data = await $.post("/platform/hd/wmhd/dodelete", {id: o.id})
if (data.code == 0) {
await this.yearChange()
vant.Toast.success('删除成功');
} else {
vant.Toast(data.msg || '删除失败')
}
}
},
yearChange() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.onLoad()
},
async onLoad() {
this.mLoading = true
$.post('/platform/hd/jzghd/sczp/pageData', this.pageForm).then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
this.mLoading = false
})
},
openView(o) {
this.viewShow = true
setTimeout(() => {
this.$refs.minfo.getInfo(o.id)
}, 100)
}
},
async created() {
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
this.yearOption.unshift({value: i, text: i + '年'},)
}
this.$set(this.pageForm, "year", this.yearOption[0].value)
}
})
</script>
<!--#
}
#-->