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.setName(this.getActivityName());
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());
if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) {
sysHomeActivity.setStartDate(this.getActivitySignUpStartTime());
@@ -120,7 +120,7 @@ public class TrainSignUpActivity extends BaseModel implements Serializable, SysH
sysHomeActivity.setId(this.getId());
sysHomeActivity.setName(this.getActivityName());
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());
if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) {
sysHomeActivity.setStartDate(this.getActivitySignUpStartTime());
@@ -120,7 +120,7 @@ public class LiteracyActivity extends BaseModel implements Serializable, SysHome
sysHomeActivity.setId(this.getId());
sysHomeActivity.setName(this.getActivityName());
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());
if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) {
sysHomeActivity.setStartDate(this.getActivitySignUpStartTime());
+7 -44
View File
@@ -324,48 +324,12 @@ layout("/layouts/v4/baseLayout.html"){
this.menus = res.data
window.sessionStorage.setItem("zhgh_sub_app_menus", JSON.stringify(res.data))
this.echoMenus()
// this.matchUrlToMenu()
} else {
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) {
if (app) {
@@ -389,7 +353,6 @@ layout("/layouts/v4/baseLayout.html"){
if (!this.activeMenuIndex && '/platform/v4/subApp' === window.location.pathname) {
this.defaultSelect()
} else {
this.hrefSelect()
}
@@ -419,14 +382,14 @@ layout("/layouts/v4/baseLayout.html"){
const result = findMenuPath(this.menus, window.location.pathname)
this.activeMenuIndex = result[result.length-1]
this.openedMenus = result.map(v=>v.id)
if(result){
this.activeMenuIndex = result[result.length-1]['id']
this.openedMenus = result.map(v=>v.id)
this.$nextTick(() => {
this.menuSelect(this.activeMenuIndex, this.openedMenus)
// 使用pjax跳转
commonUtil.pjaxPush(self.href)
})
this.$nextTick(() => {
this.menuSelect(this.activeMenuIndex, this.openedMenus)
})
}
},
@@ -85,6 +85,7 @@
// 禁用vant的表单验证行内错误信息显示
vant.Form.props.showErrorMessage.default = false
vant.ActionSheet.props.lazyRender.default = false
function toggleShowBar() {
if (["/platform/h5/home", "/platform/home"].includes(window.location.pathname)) {
@@ -175,6 +175,8 @@ layout("/layouts/platform.html"){
time: 0,
infoRow: {},
infoVisible: false,
id: GetQueryString("id"),
}
},
methods: {
@@ -201,11 +203,15 @@ layout("/layouts/platform.html"){
if (res.code === 0) {
this.tableData = res.data.list
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()
}
})
@@ -126,6 +126,8 @@ layout("/layouts/platform.html"){
time: 0,
infoRow: {},
infoVisible: false,
id: GetQueryString("id"),
}
},
methods: {
@@ -143,8 +145,10 @@ layout("/layouts/platform.html"){
return
}
this.infoVisible = false
this.$refs.guava.view(() => {
this.$refs.courseListRef.onOpen(row)
this.$nextTick(() => {
this.$refs.guava.view(() => {
this.$refs.courseListRef.onOpen(row)
})
})
},
pageData() {
@@ -152,11 +156,15 @@ layout("/layouts/platform.html"){
if (res.code === 0) {
this.tableData = res.data.list
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()
}
})
@@ -54,6 +54,7 @@ layout("/layouts/platform_h5.html"){
is-link
placeholder="请选择性别"
readonly
name="sex"
:rules="[{ required: true }]"
@click="showSexPicker = true"
></van-field>
@@ -72,6 +73,7 @@ layout("/layouts/platform_h5.html"){
placeholder="请填写出生年月"
@click="showDatePicker = true"
required
name="birthday"
:rules="[{ required: true }]"
></van-field>
<van-popup v-model="showDatePicker" position="bottom">
@@ -89,6 +91,7 @@ layout("/layouts/platform_h5.html"){
label="所在工会"
placeholder="请选择所在工会"
readonly
name="unionName"
:rules="[{ required: true }]"
required
></van-field>
@@ -97,6 +100,7 @@ layout("/layouts/platform_h5.html"){
label="所在单位"
placeholder="请选择所在单位"
readonly
name="unitName"
:rules="[{ required: true }]"
required
></van-field>
@@ -107,6 +111,7 @@ layout("/layouts/platform_h5.html"){
maxlength="50"
clearable
required
name="officialCapacity"
:rules="[{ required: true }]"
></van-field>
@@ -117,6 +122,7 @@ layout("/layouts/platform_h5.html"){
maxlength="11"
clearable
required
name="mobile"
:rules="[{ required: true }]"
></van-field>
<van-field
@@ -126,6 +132,7 @@ layout("/layouts/platform_h5.html"){
maxlength="18"
clearable
required
name="idCard"
:rules="[{ required: true }]"
></van-field>
@@ -136,6 +143,7 @@ layout("/layouts/platform_h5.html"){
placeholder="请填写本人月收入"
:rules="[{ required: true }]"
required
name="monthlyIncome"
></van-field>
</van-cell-group>
@@ -147,6 +155,7 @@ layout("/layouts/platform_h5.html"){
is-link
@click="showSubsidyPicker = true"
required
name="subsidyStandards"
:rules="[{ required: true, message: '请选择款项' }]"
></van-field>
<van-popup v-model="showSubsidyPicker" position="bottom">
@@ -163,6 +172,7 @@ layout("/layouts/platform_h5.html"){
label="银行卡号"
maxlength="20"
clearable
name="bankCardNum"
placeholder="请填写华夏银行工资卡号"
:rules="[{ required: true }]"
required
@@ -178,6 +188,7 @@ layout("/layouts/platform_h5.html"){
placeholder="请简述申请原因"
maxlength="500"
required
name="reason"
:rules="[{ required: true, message: '请简述申请原因' }]"
></van-field>
@@ -203,7 +214,7 @@ layout("/layouts/platform_h5.html"){
</van-cell-group>
<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>
<h5-file-upload
slot="input"
@@ -219,7 +230,7 @@ layout("/layouts/platform_h5.html"){
</van-cell-group>
<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>
<h5-signature v-model="formData.sign" slot="input"></h5-signature>
</template>
@@ -227,7 +238,7 @@ layout("/layouts/platform_h5.html"){
</van-cell-group>
<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="onFinishTask" v-else>提交</van-button>
</div>
@@ -316,7 +327,7 @@ layout("/layouts/platform_h5.html"){
}).then(() => {
this.$axios.post('/platform/difficultHelp/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) {
this.$message.success("保存成功")
this.$toast('保存成功')
this.$pjaxReplace('/platform/difficultHelp/mine/h5')
}
})
@@ -345,7 +356,7 @@ layout("/layouts/platform_h5.html"){
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
this.$toast('提交成功')
this.$pjaxReplace('/platform/difficultHelp/mine/h5')
}
})
@@ -375,7 +386,7 @@ layout("/layouts/platform_h5.html"){
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$message.success("提交成功")
this.$toast('提交成功')
this.$pjaxReplace('/platform/difficultHelp/mine/h5')
}
})
@@ -23,33 +23,8 @@ const INFO = {
<van-cell title="困难类型">{{viewData.subsidyStandards}}</van-cell>
<van-cell title="申请原因">{{viewData.reason}}</van-cell>
<van-cell title="家庭成员经济收入" class="column-cell">
<table class="family-table">
<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 class="direction-column-cell" title="附件">
<file-preview :files="viewData.files" complete_result></file-preview>
</van-cell>
<van-cell title="签字">
<van-image v-if="viewData.sign" :src="viewData.sign"
@@ -58,6 +33,29 @@ const INFO = {
</van-cell>
</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">
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
@@ -128,35 +126,25 @@ const INFO = {
},
},
style: /*language=CSS*/ `
.column-cell {
flex-direction: column;
}
.family-table {
/deep/ .table-class{
width: 100%;
max-width: 100%;
border-radius: 5px;
overflow: hidden;
line-height: 1.5rem;
font-size: 13px;
table-layout: fixed;
border-collapse: collapse;
table-layout: auto;
}
/deep/ .table-class th {
background-color: #f2f2f2;
border: 1px solid #dddddd;
}
/deep/ .table-class tr {
text-align: center;
font-family: 'Arial', sans-serif;
margin: 20px 0;
border-bottom: 1px solid #dddddd;
}
.table-header {
background-color: gray;
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;
/deep/ .table-class td {
border: 1px solid #dddddd;
}
`
}
@@ -32,7 +32,7 @@ layout("/layouts/platform_h5.html"){
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="困难类型">{{row.subsidyStandards}}</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 #actions="{index,row}">
<div class="action-btn" @click="onView(row)">