Files
UNION_NSI/target/classes/views/mobile/wmhd/userList.html
T
2026-09-08 19:49:21 +08:00

162 lines
5.8 KiB
HTML

<!--#
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
title="作品列表"
left-arrow
placeholder
fixed
@click-left="history.go(-1)"
></van-nav-bar>
<div class="search-fixed">
<van-dropdown-menu active-color="#1989fa">
<van-dropdown-item v-model="pageForm.year" :options="yearOption"
@change="yearChange"></van-dropdown-item>
</van-dropdown-menu>
</div>
<div style="margin: 60px auto 0 auto">
<van-notice-bar mode="closeable">左滑可删除作品。</van-notice-bar>
<van-list
v-model="mLoading"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
<div v-for="o in tableData" class="list-card" @click.stop="openView(o)">
<van-swipe-cell :disabled="o.auditstate!=='3999'">
<van-cell-group inset>
<image class="register-icon" src="/assets/mobile/svg/wmhd/bianji.svg"
@click.stop="openEdit(o.id,o.hdid)"
v-if="o.auditstate==='3999'||o.auditstate==='4100'||o.auditstate==='4250'"></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-group>
<template #right>
<van-button square text="删除" type="danger" @click="doDelete(o.id)"
style="height: 100%;"></van-button>
</template>
</van-swipe-cell>
</div>
</van-list>
<van-empty
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div>
<van-popup v-model="viewShow" position="right"
:style="{ height: '100%',width:'100%' }">
<van-nav-bar title="详细信息" left-arrow placeholder fixed
@click-left="viewShow=false"></van-nav-bar>
<mobile-wmhd-info ref="minfo"></mobile-wmhd-info>
</van-popup>
</div>
<script>
let vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
viewShow: false,
yearOption: [],
pageForm: {
year: '',
hdtype: 1,
}
}
},
components: {
'mobile-wmhd-info': httpVueLoader('/components/mobile/wmhd/info.vue?v=' + new Date().getTime()),
},
methods: {
openEdit(id, hdid) {
window.location.href = '/platform/staffActivities?client=mobile&id=' + hdid + '&zpid=' + id
},
async doDelete(id) {
const confirm = await vant.Dialog.confirm({
title: '提示',
message: '确定要删除此次作品吗?',
})
if (confirm === 'confirm') {
const data = await $.post("/platform/hd/wmhd/dodelete", {id: id})
if (data.code == 0) {
await this.yearChange()
vant.Toast.success('删除成功');
}
}
},
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>
<!--#
}
#-->