feat: v3版疗休养优化5

This commit is contained in:
2026-10-26 15:27:53 +08:00
parent fcb6ba7e2d
commit 4c03b389d4
12 changed files with 266 additions and 89 deletions
@@ -109,7 +109,7 @@ Vue.component('table-tool', {
<div>
<el-checkbox-group v-model="checkedFields" @change="columnChange">
<el-checkbox v-for="field in columns" :label="field.prop" style="display: block">{{
<el-checkbox v-for="field in columns" :key="field.prop" :label="field.prop" style="display: block">{{
field.label
}}
</el-checkbox>
@@ -126,4 +126,4 @@ Vue.component('table-tool', {
</div>
</el-row>
`,
})
})
@@ -153,9 +153,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
:key="column.prop"
>
<template scope="{row}" v-if="column.prop==='isDisabled'">
<template slot-scope="{row}">
<el-switch
v-if="column.prop==='isDisabled'"
:active-value="false"
:inactive-value="true"
@change="(val)=>{lineStatusChange(row.id)}"
@@ -163,21 +165,20 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
inactive-color="#ff4949"
v-model="row.isDisabled">
</el-switch>
</template>
<template scope="{row:{signUpMode}}" v-else-if="column.prop==='signUpMode'">
{{signUpModeName(signUpMode)}}
</template>
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
{{createModeName(createMode)}}
</template>
<template scope="{row}" v-else-if="column.prop==='createUserName'">
<span v-else-if="column.prop==='signUpMode'">
{{signUpModeName(row.signUpMode)}}
</span>
<span v-else-if="column.prop==='createMode'">
{{createModeName(row.createMode)}}
</span>
<span v-else-if="column.prop==='createUserName'">
{{row.createUserName + '(' + row.createUnionName + ')'}}
</template>
<template scope="{row}" v-else-if="column.prop==='playTime'">
<el-button @click="viewUnionSelectTimeInfo(row.id)"
</span>
<el-button v-else-if="column.prop==='playTime'" @click="viewUnionSelectTimeInfo(row.id)"
type="text">
查看详情
</el-button>
<span v-else>{{row[column.prop]}}</span>
<!-- v-if="row.createMode===2 && row.signUpMode===1"-->
<!--<span v-else>
{{row.playStartTime + '至' + row.playEndTime}}
@@ -185,7 +186,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="操作" width="250px">
<template scope="{row}">
<template slot-scope="{row}">
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
<el-button @click="openEdit(row.id)" size="mini" type="primary">编辑</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
@@ -502,7 +503,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" type=""
@click="location.href='/platform/inclusiveTherapyV3/line/exportTemplate'"
@click="downloadLegacyTemplate"
icon="el-icon-download">下载模板
</el-button>
@@ -512,6 +513,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-card>
<el-form>
<el-upload
action="/platform/inclusiveTherapyV3/line/travelLineImport"
name="file"
ref="upload"
:on-remove="(file, fileList) => {
@@ -551,7 +553,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" type=""
@click="location.href='/platform/inclusiveTherapyV3/line/exportPageFieldsTemplate'"
@click="downloadTemplate"
icon="el-icon-download">下载模板
</el-button>
</el-card>
@@ -560,6 +562,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-card>
<el-form>
<el-upload
action="/platform/inclusiveTherapyV3/line/importLineByPageFields"
name="file"
ref="lineImportUpload"
:on-remove="(file, fileList) => {
@@ -977,6 +980,12 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
this.lineImportVisible = true
},
downloadTemplate() {
window.location.href = '/platform/inclusiveTherapyV3/line/downloadTemplate';
},
downloadLegacyTemplate() {
window.location.href = '/platform/inclusiveTherapyV3/line/exportTemplate';
},
async doLineImport() {
if (this.lineImportData.fileList.length === 0) {
this.notifyWarning("请选择文件")
@@ -64,9 +64,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
:key="column.prop"
>
<template scope="{row}" v-if="column.prop==='isDisabled'">
<template slot-scope="{row}">
<el-switch
v-if="column.prop==='isDisabled'"
:active-value="false"
:inactive-value="true"
@change="(val)=>{travelAgencyStatusChange(row.id)}"
@@ -74,15 +76,14 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
inactive-color="#ff4949"
v-model="row.isDisabled">
</el-switch>
</template>
<template scope="{row:{officialWebsite}}" v-else-if="column.prop==='officialWebsite'">
<a :href="officialWebsite" class="text-primary" target="_blank">
{{officialWebsite}}
<a v-else-if="column.prop==='officialWebsite'" :href="row.officialWebsite" class="text-primary" target="_blank">
{{row.officialWebsite}}
</a>
<span v-else>{{row[column.prop]}}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="250px">
<template scope="{row}">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
@@ -234,7 +235,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" type=""
@click="location.href='/platform/inclusiveTherapyV3/common/downloadTemplate?filePath=travel/TravelAgencyImport.xlsx&fileName=旅行社导入模板.xls'"
@click="downloadTemplate"
icon="el-icon-download">下载模板
</el-button>
@@ -244,6 +245,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-card>
<el-form>
<el-upload
action="/platform/inclusiveTherapyV3/travelAgency/travelAgencyImport"
name="file"
ref="upload"
:on-remove="(file, fileList) => {
@@ -353,6 +355,9 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
methods: {
downloadTemplate() {
window.location.href = '/platform/inclusiveTherapyV3/travelAgency/downloadTemplate';
},
openAdd() {
this.editDialogVisible = true
this.$nextTick(() => {
@@ -442,20 +447,24 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
});
this.importLoading = true
const resp = await $.ajax({
url: loc() + '/travelAgencyImport',
type: 'POST',
data: data,
processData: false,
contentType: false
})
if (resp.code===0){
this.$message.success(resp.msg)
this.pageData();
this.importVisible = false
this.importLoading = false
}else {
this.notifyWarning("导入失败")
try {
const resp = await $.ajax({
url: loc() + '/travelAgencyImport',
type: 'POST',
data: data,
processData: false,
contentType: false
})
if (resp.code===0){
this.$message.success(resp.msg)
this.pageData();
this.importVisible = false
}else {
this.notifyWarning(resp.msg || "导入失败")
}
} catch (error) {
this.notifyWarning("导入请求失败,请重试")
} finally {
this.importLoading = false
}
},
@@ -1,7 +1,7 @@
<!--#
layout("/layouts/platform.html"){
#-->
<!--# if(therapyShowTabs){ #-->
<!--# if(therapyShowTabs && therapyPageUrl != '/platform/inclusiveTherapyV3/line' && therapyPageUrl != '/platform/inclusiveTherapyV3/baseManagement'){ #-->
<div style="padding:10px;background:#fff;border-bottom:1px solid #eee">
<!--# for(tab in therapyTabs){ #-->
<a class="btn btn-default" href="/platform/inclusiveTherapyV3?screen=${tab[0],escape}">${tab[1],escape}</a>