Compare commits

..
2 Commits
Author SHA1 Message Date
c-hongqw1 d4a3ef13ac 添加轮播图,手机端首页顶部增加标题 2026-10-22 11:01:14 +08:00
c-hongqw1 3e2059e634 添加附件说明 2026-10-10 13:50:41 +08:00
7 changed files with 43 additions and 6 deletions
@@ -52,6 +52,11 @@ public class CondolenceType extends BaseModel implements Serializable {
@ColDefine(type = ColType.BOOLEAN) @ColDefine(type = ColType.BOOLEAN)
private Boolean need_files; private Boolean need_files;
@Column
@Comment("附件说明,供申请人查看材料要求,最多200字")
@ColDefine(type = ColType.VARCHAR, width = 200)
private String files_desc;
@Column @Column
@Comment("排序字段") @Comment("排序字段")
@Prev({ @Prev({
Binary file not shown.

After

Width:  |  Height:  |  Size: 706 KiB

@@ -222,10 +222,10 @@ layout("/mobile/platform.html"){
:min-date="new Date('1999-01-01')" :min-date="new Date('1999-01-01')"
:color="themeColor"></van-calendar> :color="themeColor"></van-calendar>
<van-field v-model="formData.the_hospital" name="the_hospital" name="type" <!-- 所在医院暂不采集,连同字段内的必填校验一起停用。 <van-field v-model="formData.the_hospital" name="the_hospital" name="type"
label="所在医院" label="所在医院"
placeholder="请填写所在医院" required placeholder="请填写所在医院" required
:rules="[{ required:true, message: '请填写所在医院' }]"></van-field> :rules="[{ required:true, message: '请填写所在医院' }]"></van-field> -->
</template> </template>
<!-- <van-field v-model="formData.remark" name="remark" label="申请事由" <!-- <van-field v-model="formData.remark" name="remark" label="申请事由"
@@ -309,7 +309,10 @@ layout("/mobile/platform.html"){
<div class="mb10">附&emsp;&emsp;件</div> <div class="mb10">附&emsp;&emsp;件</div>
</template> </template>
<template #input> <template #input>
<vant-file-upload :files.sync="formData.files"></vant-file-upload> <div style="width: 100%;">
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
<div v-if="attachmentDescription" style="white-space: pre-wrap; overflow-wrap: anywhere; color: #f56c6c; line-height: 20px; margin-top: 8px;">{{ attachmentDescription }}</div>
</div>
</template> </template>
</van-field> </van-field>
</van-cell-group> </van-cell-group>
@@ -373,6 +376,13 @@ layout("/mobile/platform.html"){
money: 0 money: 0
} }
}, },
computed: {
// 按当前类型读取材料说明,无说明时返回空串,避免切换类型后残留旧提示。
attachmentDescription() {
const selectedType = this.typeColumns.find(item => item.value === this.formData.type)
return selectedType ? (selectedType.files_desc || '') : ''
}
},
watch: { watch: {
"formData.money"(val) { "formData.money"(val) {
if (val > this.money) { if (val > this.money) {
@@ -568,7 +578,7 @@ layout("/mobile/platform.html"){
this.formData.apply_time = moment().format('YYYY-MM-DD') this.formData.apply_time = moment().format('YYYY-MM-DD')
const {code, data} = await $.get("/platform/condolence/type/getAll") const {code, data} = await $.get("/platform/condolence/type/getAll")
data.forEach(v => { data.forEach(v => {
this.typeColumns.push({value: v.id, text: v.name + "(" + v.money + ")"}) this.typeColumns.push({value: v.id, text: v.name + "(" + v.money + ")", files_desc: v.files_desc})
}) })
for (let i in condolence.way) { for (let i in condolence.way) {
this.wayColumns.push({value: condolence.way[i], text: condolence.way[i]}) this.wayColumns.push({value: condolence.way[i], text: condolence.way[i]})
@@ -16,6 +16,12 @@ layout("/mobile/platform.html"){
max-height: 300px !important; max-height: 300px !important;
} }
/* 校园全景图等比例填满轮播区域,靠右保留建筑主体,超宽部分裁剪左侧。 */
.my-swipe .home-panorama .van-image__img {
object-fit: cover;
object-position: right center;
}
.not_open { .not_open {
filter: grayscale(100%); filter: grayscale(100%);
} }
@@ -84,6 +90,7 @@ layout("/mobile/platform.html"){
<van-swipe class="my-swipe" :autoplay="2000" indicator-color="white"> <van-swipe class="my-swipe" :autoplay="2000" indicator-color="white">
<van-swipe-item v-for="item in photoArray"> <van-swipe-item v-for="item in photoArray">
<van-image width="100%" :height="$(document).height() * 0.26" <van-image width="100%" :height="$(document).height() * 0.26"
:class="item.cropLeft ? 'home-panorama' : ''"
:src="item.src"></van-image> :src="item.src"></van-image>
</van-swipe-item> </van-swipe-item>
</van-swipe> </van-swipe>
@@ -119,6 +126,7 @@ layout("/mobile/platform.html"){
{src: '/assets/mobile/img/home/home1.png'}, {src: '/assets/mobile/img/home/home1.png'},
{src: '/assets/mobile/img/home/home2.png'}, {src: '/assets/mobile/img/home/home2.png'},
{src: '/assets/mobile/img/home/home3.png'}, {src: '/assets/mobile/img/home/home3.png'},
{src: '/assets/mobile/img/home/home4.png', cropLeft: true},
], ],
gridArray: [ gridArray: [
// {src: '/assets/mobile/img/home/8活动报名.jpg', text: '活动报名', isOpen: true,}, // {src: '/assets/mobile/img/home/8活动报名.jpg', text: '活动报名', isOpen: true,},
@@ -8,7 +8,7 @@
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
/> />
<van-number-keyboard safe-area-inset-bottom/> <van-number-keyboard safe-area-inset-bottom/>
<title></title> <title>广西师范大学智慧工会</title>
<link rel="stylesheet" href="${base!}/assets/platform/plugins/vant/index.min.css"> <link rel="stylesheet" href="${base!}/assets/platform/plugins/vant/index.min.css">
<link rel="stylesheet" href="${base!}/assets/mobile/css/theme.css"> <link rel="stylesheet" href="${base!}/assets/mobile/css/theme.css">
<link rel="stylesheet" href="${base!}/assets/mobile/css/main.css"> <link rel="stylesheet" href="${base!}/assets/mobile/css/main.css">
@@ -104,6 +104,11 @@ layout("/layouts/platform.html"){
<el-radio v-model="formData.need_files" :label="true" border>是</el-radio> <el-radio v-model="formData.need_files" :label="true" border>是</el-radio>
<el-radio v-model="formData.need_files" :label="false" border>否</el-radio> <el-radio v-model="formData.need_files" :label="false" border>否</el-radio>
</el-form-item> </el-form-item>
<!-- 附件说明为选填文本,双端申请页在上传框下方展示,最多200字。 -->
<el-form-item label="附件说明" prop="files_desc">
<el-input v-model="formData.files_desc" type="textarea" :rows="3"
maxlength="200" show-word-limit placeholder="请填写附件材料要求,最多200字"></el-input>
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
@@ -130,6 +135,7 @@ layout("/layouts/platform.html"){
searchName: "name", searchName: "name",
}, },
formRules: { formRules: {
files_desc: [{max: 200, message: '附件说明最多200字', trigger: ['blur', 'change']}],
name: [{required: true, message: '必填', trigger: ['blur', 'change']}], name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
money: [{required: true, message: '必填', trigger: ['blur', 'change']}], money: [{required: true, message: '必填', trigger: ['blur', 'change']}],
way: [{required: true, message: '必填', trigger: ['blur', 'change']}], way: [{required: true, message: '必填', trigger: ['blur', 'change']}],
@@ -177,7 +183,7 @@ layout("/layouts/platform.html"){
}); });
}, },
openAdd() { openAdd() {
this.formData = {need_files: false} this.formData = {need_files: false, files_desc: ''}
this.dialogVisible = true this.dialogVisible = true
if (this.$refs['form']) { if (this.$refs['form']) {
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
@@ -348,6 +348,7 @@ layout("/layouts/platform.html"){
<el-col :span="24" v-if="needFiles()"> <el-col :span="24" v-if="needFiles()">
<el-form-item prop="files" label="附&emsp;&emsp;件" required> <el-form-item prop="files" label="附&emsp;&emsp;件" required>
<file-upload :files.sync="formData.files" card></file-upload> <file-upload :files.sync="formData.files" card></file-upload>
<div v-if="attachmentDescription" style="white-space: pre-wrap; overflow-wrap: anywhere; color: #f56c6c; line-height: 20px; margin-top: 8px;">{{ attachmentDescription }}</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -443,6 +444,13 @@ layout("/layouts/platform.html"){
typeOptions: [], typeOptions: [],
} }
}, },
computed: {
// 按当前类型读取材料说明,无说明时返回空串,避免切换类型后残留旧提示。
attachmentDescription() {
const selectedType = this.typeOptions.find(item => item.id === this.formData.type)
return selectedType ? (selectedType.files_desc || '') : ''
}
},
watch: { watch: {
"formData.money"(val) { "formData.money"(val) {
if (val > this.money) { if (val > this.money) {