This commit is contained in:
@jyuhsin
2025-09-25 21:34:09 +08:00
parent 7630890799
commit a61e800017
10 changed files with 121 additions and 144 deletions
@@ -138,7 +138,7 @@ public class FamilyActivity extends BaseModel implements Serializable, SysHomeCo
sysHomeActivity.setId(this.getId()); sysHomeActivity.setId(this.getId());
sysHomeActivity.setName(this.getActivityName()); sysHomeActivity.setName(this.getActivityName());
sysHomeActivity.setCover(this.getCover()); sysHomeActivity.setCover(this.getCover());
sysHomeActivity.setUrl("/platform/family/apply"); sysHomeActivity.setUrl("/platform/family/apply?id=" + this.getId());
sysHomeActivity.setH5Url("/platform/family/apply/h5?id=" + this.getId()); sysHomeActivity.setH5Url("/platform/family/apply/h5?id=" + this.getId());
if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) { if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) {
sysHomeActivity.setStartDate(this.getActivitySignUpStartTime()); sysHomeActivity.setStartDate(this.getActivitySignUpStartTime());
@@ -120,7 +120,7 @@ public class TrainSignUpActivity extends BaseModel implements Serializable, SysH
sysHomeActivity.setId(this.getId()); sysHomeActivity.setId(this.getId());
sysHomeActivity.setName(this.getActivityName()); sysHomeActivity.setName(this.getActivityName());
sysHomeActivity.setCover(this.getCover()); sysHomeActivity.setCover(this.getCover());
sysHomeActivity.setUrl("/platform/trainSignUp/apply"); sysHomeActivity.setUrl("/platform/trainSignUp/apply?id=" + this.getId());
sysHomeActivity.setH5Url("/platform/trainSignUp/apply/h5?id=" + this.getId()); sysHomeActivity.setH5Url("/platform/trainSignUp/apply/h5?id=" + this.getId());
if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) { if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) {
sysHomeActivity.setStartDate(this.getActivitySignUpStartTime()); sysHomeActivity.setStartDate(this.getActivitySignUpStartTime());
@@ -120,7 +120,7 @@ public class LiteracyActivity extends BaseModel implements Serializable, SysHome
sysHomeActivity.setId(this.getId()); sysHomeActivity.setId(this.getId());
sysHomeActivity.setName(this.getActivityName()); sysHomeActivity.setName(this.getActivityName());
sysHomeActivity.setCover(this.getCover()); sysHomeActivity.setCover(this.getCover());
sysHomeActivity.setUrl("/platform/literacy/apply"); sysHomeActivity.setUrl("/platform/literacy/apply?id=" + this.getId());
sysHomeActivity.setH5Url("/platform/literacy/apply/h5?id=" + this.getId()); sysHomeActivity.setH5Url("/platform/literacy/apply/h5?id=" + this.getId());
if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) { if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) {
sysHomeActivity.setStartDate(this.getActivitySignUpStartTime()); sysHomeActivity.setStartDate(this.getActivitySignUpStartTime());
+7 -44
View File
@@ -324,48 +324,12 @@ layout("/layouts/v4/baseLayout.html"){
this.menus = res.data this.menus = res.data
window.sessionStorage.setItem("zhgh_sub_app_menus", JSON.stringify(res.data)) window.sessionStorage.setItem("zhgh_sub_app_menus", JSON.stringify(res.data))
this.echoMenus() this.echoMenus()
// this.matchUrlToMenu()
} else { } else {
this.menus = [] this.menus = []
} }
}) })
}, },
// 按 URL 精准激活
matchUrlToMenu() {
// 跳转带过来的地址
const pathname = window.location.pathname
const find = (list, parentIds = []) => {
for (const m of list) {
if (m.href && pathname.includes(m.href.split('?')[0])) {
return {menu: m, parentIds}
}
if (m.children?.length) {
const hit = find(m.children, [...parentIds, m.id])
if (hit) return hit
}
}
return null
}
const hit = find(this.menus)
if (hit) {
// 激活跳转菜单
this.activeMenuIndex = hit.menu.id
this.openedMenus = hit.parentIds
const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app"))
$("#sub-app-container #sidebar-menu .menu-header .menu-title").text(app?.name)
this.$nextTick(() => {
this.menuSelect(hit.menu.id, hit.parentIds)
// 保证内容区对应
commonUtil.pjaxPush(hit.menu.href)
})
} else if (!this.activeMenuIndex) {
// 没命中且缓存也没有 → 再降级到第一个
this.defaultSelect()
}
},
// 设置应用信息 // 设置应用信息
setAppInfo(app) { setAppInfo(app) {
if (app) { if (app) {
@@ -389,7 +353,6 @@ layout("/layouts/v4/baseLayout.html"){
if (!this.activeMenuIndex && '/platform/v4/subApp' === window.location.pathname) { if (!this.activeMenuIndex && '/platform/v4/subApp' === window.location.pathname) {
this.defaultSelect() this.defaultSelect()
} else { } else {
this.hrefSelect() this.hrefSelect()
} }
@@ -419,14 +382,14 @@ layout("/layouts/v4/baseLayout.html"){
const result = findMenuPath(this.menus, window.location.pathname) const result = findMenuPath(this.menus, window.location.pathname)
this.activeMenuIndex = result[result.length-1] if(result){
this.openedMenus = result.map(v=>v.id) this.activeMenuIndex = result[result.length-1]['id']
this.openedMenus = result.map(v=>v.id)
this.$nextTick(() => { this.$nextTick(() => {
this.menuSelect(this.activeMenuIndex, this.openedMenus) this.menuSelect(this.activeMenuIndex, this.openedMenus)
// 使用pjax跳转 })
commonUtil.pjaxPush(self.href) }
})
}, },
@@ -85,6 +85,7 @@
// 禁用vant的表单验证行内错误信息显示 // 禁用vant的表单验证行内错误信息显示
vant.Form.props.showErrorMessage.default = false vant.Form.props.showErrorMessage.default = false
vant.ActionSheet.props.lazyRender.default = false
function toggleShowBar() { function toggleShowBar() {
if (["/platform/h5/home", "/platform/home"].includes(window.location.pathname)) { if (["/platform/h5/home", "/platform/home"].includes(window.location.pathname)) {
@@ -175,6 +175,8 @@ layout("/layouts/platform.html"){
time: 0, time: 0,
infoRow: {}, infoRow: {},
infoVisible: false, infoVisible: false,
id: GetQueryString("id"),
} }
}, },
methods: { methods: {
@@ -201,11 +203,15 @@ layout("/layouts/platform.html"){
if (res.code === 0) { if (res.code === 0) {
this.tableData = res.data.list this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount this.pageForm.totalCount = res.data.totalCount
if(this.id) {
const activity = this.tableData.find(o => o.id === this.id)
this.onOpen(activity)
}
} }
}) })
}, },
}, },
async created() { async mounted() {
this.pageData() this.pageData()
} }
}) })
@@ -126,6 +126,8 @@ layout("/layouts/platform.html"){
time: 0, time: 0,
infoRow: {}, infoRow: {},
infoVisible: false, infoVisible: false,
id: GetQueryString("id"),
} }
}, },
methods: { methods: {
@@ -143,8 +145,10 @@ layout("/layouts/platform.html"){
return return
} }
this.infoVisible = false this.infoVisible = false
this.$refs.guava.view(() => { this.$nextTick(() => {
this.$refs.courseListRef.onOpen(row) this.$refs.guava.view(() => {
this.$refs.courseListRef.onOpen(row)
})
}) })
}, },
pageData() { pageData() {
@@ -152,11 +156,15 @@ layout("/layouts/platform.html"){
if (res.code === 0) { if (res.code === 0) {
this.tableData = res.data.list this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount this.pageForm.totalCount = res.data.totalCount
if(this.id) {
const activity = this.tableData.find(o => o.id === this.id)
this.onOpen(activity)
}
} }
}) })
}, },
}, },
async created() { mounted() {
this.pageData() this.pageData()
} }
}) })
@@ -54,6 +54,7 @@ layout("/layouts/platform_h5.html"){
is-link is-link
placeholder="请选择性别" placeholder="请选择性别"
readonly readonly
name="sex"
:rules="[{ required: true }]" :rules="[{ required: true }]"
@click="showSexPicker = true" @click="showSexPicker = true"
></van-field> ></van-field>
@@ -72,6 +73,7 @@ layout("/layouts/platform_h5.html"){
placeholder="请填写出生年月" placeholder="请填写出生年月"
@click="showDatePicker = true" @click="showDatePicker = true"
required required
name="birthday"
:rules="[{ required: true }]" :rules="[{ required: true }]"
></van-field> ></van-field>
<van-popup v-model="showDatePicker" position="bottom"> <van-popup v-model="showDatePicker" position="bottom">
@@ -89,6 +91,7 @@ layout("/layouts/platform_h5.html"){
label="所在工会" label="所在工会"
placeholder="请选择所在工会" placeholder="请选择所在工会"
readonly readonly
name="unionName"
:rules="[{ required: true }]" :rules="[{ required: true }]"
required required
></van-field> ></van-field>
@@ -97,6 +100,7 @@ layout("/layouts/platform_h5.html"){
label="所在单位" label="所在单位"
placeholder="请选择所在单位" placeholder="请选择所在单位"
readonly readonly
name="unitName"
:rules="[{ required: true }]" :rules="[{ required: true }]"
required required
></van-field> ></van-field>
@@ -107,6 +111,7 @@ layout("/layouts/platform_h5.html"){
maxlength="50" maxlength="50"
clearable clearable
required required
name="officialCapacity"
:rules="[{ required: true }]" :rules="[{ required: true }]"
></van-field> ></van-field>
@@ -117,6 +122,7 @@ layout("/layouts/platform_h5.html"){
maxlength="11" maxlength="11"
clearable clearable
required required
name="mobile"
:rules="[{ required: true }]" :rules="[{ required: true }]"
></van-field> ></van-field>
<van-field <van-field
@@ -126,6 +132,7 @@ layout("/layouts/platform_h5.html"){
maxlength="18" maxlength="18"
clearable clearable
required required
name="idCard"
:rules="[{ required: true }]" :rules="[{ required: true }]"
></van-field> ></van-field>
@@ -136,6 +143,7 @@ layout("/layouts/platform_h5.html"){
placeholder="请填写本人月收入" placeholder="请填写本人月收入"
:rules="[{ required: true }]" :rules="[{ required: true }]"
required required
name="monthlyIncome"
></van-field> ></van-field>
</van-cell-group> </van-cell-group>
@@ -147,6 +155,7 @@ layout("/layouts/platform_h5.html"){
is-link is-link
@click="showSubsidyPicker = true" @click="showSubsidyPicker = true"
required required
name="subsidyStandards"
:rules="[{ required: true, message: '请选择款项' }]" :rules="[{ required: true, message: '请选择款项' }]"
></van-field> ></van-field>
<van-popup v-model="showSubsidyPicker" position="bottom"> <van-popup v-model="showSubsidyPicker" position="bottom">
@@ -163,6 +172,7 @@ layout("/layouts/platform_h5.html"){
label="银行卡号" label="银行卡号"
maxlength="20" maxlength="20"
clearable clearable
name="bankCardNum"
placeholder="请填写华夏银行工资卡号" placeholder="请填写华夏银行工资卡号"
:rules="[{ required: true }]" :rules="[{ required: true }]"
required required
@@ -178,6 +188,7 @@ layout("/layouts/platform_h5.html"){
placeholder="请简述申请原因" placeholder="请简述申请原因"
maxlength="500" maxlength="500"
required required
name="reason"
:rules="[{ required: true, message: '请简述申请原因' }]" :rules="[{ required: true, message: '请简述申请原因' }]"
></van-field> ></van-field>
@@ -203,7 +214,7 @@ layout("/layouts/platform_h5.html"){
</van-cell-group> </van-cell-group>
<van-cell-group title="附件信息" class="form-section"> <van-cell-group title="附件信息" class="form-section">
<van-field class="more-text" name="avatar" label=""> <van-field class="more-text" name="files" label="">
<template #input> <template #input>
<h5-file-upload <h5-file-upload
slot="input" slot="input"
@@ -219,7 +230,7 @@ layout("/layouts/platform_h5.html"){
</van-cell-group> </van-cell-group>
<van-cell-group title="签字" class="form-section"> <van-cell-group title="签字" class="form-section">
<van-field class="more-text" name="signature" label=""> <van-field class="more-text" name="sign" label="">
<template #input> <template #input>
<h5-signature v-model="formData.sign" slot="input"></h5-signature> <h5-signature v-model="formData.sign" slot="input"></h5-signature>
</template> </template>
@@ -227,7 +238,7 @@ layout("/layouts/platform_h5.html"){
</van-cell-group> </van-cell-group>
<div class="form-actions"> <div class="form-actions">
<van-button plain type="info" @click="onSave">保存</van-button> <van-button native-type="button" plain type="info" @click="onSave">保存</van-button>
<van-button type="primary" @click="onSubmit" v-if="!taskId">提交</van-button> <van-button type="primary" @click="onSubmit" v-if="!taskId">提交</van-button>
<van-button type="primary" @click="onFinishTask" v-else>提交</van-button> <van-button type="primary" @click="onFinishTask" v-else>提交</van-button>
</div> </div>
@@ -316,7 +327,7 @@ layout("/layouts/platform_h5.html"){
}).then(() => { }).then(() => {
this.$axios.post('/platform/difficultHelp/apply/save', {data: JSON.stringify(this.formData)}).then(res => { this.$axios.post('/platform/difficultHelp/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("保存成功") this.$toast('保存成功')
this.$pjaxReplace('/platform/difficultHelp/mine/h5') this.$pjaxReplace('/platform/difficultHelp/mine/h5')
} }
}) })
@@ -345,7 +356,7 @@ layout("/layouts/platform_h5.html"){
data: JSON.stringify(this.formData) data: JSON.stringify(this.formData)
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("提交成功") this.$toast('提交成功')
this.$pjaxReplace('/platform/difficultHelp/mine/h5') this.$pjaxReplace('/platform/difficultHelp/mine/h5')
} }
}) })
@@ -375,7 +386,7 @@ layout("/layouts/platform_h5.html"){
taskId: GetQueryString("taskId") taskId: GetQueryString("taskId")
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success("提交成功") this.$toast('提交成功')
this.$pjaxReplace('/platform/difficultHelp/mine/h5') this.$pjaxReplace('/platform/difficultHelp/mine/h5')
} }
}) })
@@ -23,33 +23,8 @@ const INFO = {
<van-cell title="困难类型">{{viewData.subsidyStandards}}</van-cell> <van-cell title="困难类型">{{viewData.subsidyStandards}}</van-cell>
<van-cell title="申请原因">{{viewData.reason}}</van-cell> <van-cell title="申请原因">{{viewData.reason}}</van-cell>
<van-cell title="家庭成员经济收入" class="column-cell"> <van-cell class="direction-column-cell" title="附件">
<table class="family-table"> <file-preview :files="viewData.files" complete_result></file-preview>
<thead>
<tr>
<th class="table-header">序号</th>
<th class="table-header">姓名</th>
<th class="table-header">年龄</th>
<th class="table-header">关系</th>
<th class="table-header">月收入(元)</th>
</tr>
</thead>
<tbody>
<tr class="table-row" v-for="(item, index) in viewData.families" :key="index">
<td class="table-cell">{{ index + 1 }}</td>
<td class="table-cell">{{ item.name }}</td>
<td class="table-cell">{{ item.age }}</td>
<td class="table-cell">{{ item.relation }}</td>
<td class="table-cell">{{ item.monthlyIncome }}</td>
</tr>
</tbody>
</table>
</van-cell>
<van-cell title="附件">
<div slot="label">
{{ viewData.files }}
</div>
</van-cell> </van-cell>
<van-cell title="签字"> <van-cell title="签字">
<van-image v-if="viewData.sign" :src="viewData.sign" <van-image v-if="viewData.sign" :src="viewData.sign"
@@ -58,6 +33,29 @@ const INFO = {
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
<van-cell-group title="家庭成员经济收入" v-if="viewData.familyList && viewData.familyList.length > 0">
<table class="table-class">
<thead>
<tr>
<th>序号</th>
<th>姓名</th>
<th>年龄</th>
<th>关系</th>
<th>月收入(元)</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in viewData.familyList" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ item.name }}</td>
<td>{{ item.age }}</td>
<td>{{ item.relation }}</td>
<td>{{ item.monthlyIncome }}</td>
</tr>
</tbody>
</table>
</van-cell-group>
<template v-for="task in doneTasks"> <template v-for="task in doneTasks">
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode"> <van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}}) <van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
@@ -128,35 +126,25 @@ const INFO = {
}, },
}, },
style: /*language=CSS*/ ` style: /*language=CSS*/ `
.column-cell { /deep/ .table-class{
flex-direction: column;
}
.family-table {
width: 100%; width: 100%;
max-width: 100%; border-radius: 5px;
overflow: hidden;
line-height: 1.5rem;
font-size: 13px;
table-layout: fixed;
border-collapse: collapse; border-collapse: collapse;
table-layout: auto; }
/deep/ .table-class th {
background-color: #f2f2f2;
border: 1px solid #dddddd;
}
/deep/ .table-class tr {
text-align: center; text-align: center;
font-family: 'Arial', sans-serif; border-bottom: 1px solid #dddddd;
margin: 20px 0;
} }
.table-header { /deep/ .table-class td {
background-color: gray; border: 1px solid #dddddd;
color: white;
font-weight: bold;
text-transform: uppercase;
}
.table-row {
background-color: #f9f9f9;
transition: background-color 0.3s;
}
.table-row:hover {
background-color: #f1f1f1;
}
.table-cell {
padding: 10px 20px;
border: 1px solid #ddd;
text-align: center;
} }
` `
} }
@@ -32,7 +32,7 @@ layout("/layouts/platform_h5.html"){
<table-column label="工作单位">{{row.unitName}}</table-column> <table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="困难类型">{{row.subsidyStandards}}</table-column> <table-column label="困难类型">{{row.subsidyStandards}}</table-column>
<table-column label="填报时间">{{row.applyTime}}</table-column> <table-column label="填报时间">{{row.applyTime}}</table-column>
<table-column label="当前节点">{{row.curTaskName}}</table-column> <table-column label="当前节点">{{row.taskName}}</table-column>
</template> </template>
<template #actions="{index,row}"> <template #actions="{index,row}">
<div class="action-btn" @click="onView(row)"> <div class="action-btn" @click="onView(row)">