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

138 lines
5.0 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="location.href='/mobile/index'"
></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="openView(o)">
<van-swipe-cell>
<van-cell-group inset>
<image class="register-icon" src="/assets/mobile/svg/wmhd/bianji.svg"
@click.stop="openEdit(o.id,o.hdid)"></image>
<van-cell :border="false" title="活动主题">{{o.hdname}}</van-cell>
<van-cell :border="false" title="作品主题">{{o.zpzt}}</van-cell>
<van-cell :border="false" title="子女姓名">{{o.znxm}}</van-cell>
<van-cell :border="false" title="教职工姓名">{{o.sbrname}}</van-cell>
<van-cell :border="false" title="工资号">{{o.loginname}}</van-cell>
<van-cell :border="false" title="与子女关系">{{o.zngx}}</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="上传时间">{{o.sbsj}}</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>
</div>
<script>
let vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
yearOption: [],
pageForm: {
year: '',
hdtype: 1,
}
}
},
methods: {
openEdit(id, hdid) {
window.location.href = '/childrenActivities?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/childhd/zpxx/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/childhd/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) {
window.location.href = '/mobile/cahd/list/view?id=' + o.id
}
},
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>
<!--#
}
#-->