commit
This commit is contained in:
@@ -88,7 +88,7 @@ layout("/layouts/platform.html"){
|
||||
activityType: "2"
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: "活动名称", prop: "activityName", width: 800},
|
||||
{ label: "活动名称", prop: "activityName", width: 600},
|
||||
{ label: "活动性质", prop: "trainType"},
|
||||
{ label: "报名时间", prop: "activitySignUpStartTime"},
|
||||
{ label: "活动时间", prop: "activityStartTime"},
|
||||
|
||||
@@ -3,7 +3,7 @@ const signForm = {
|
||||
<div>
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="signDialog" title="信息填写" width="50%"
|
||||
append-to-body>
|
||||
<el-form :model="formData" ref="form" label-width="80px">
|
||||
<el-form :model="formData" ref="form" label-width="120px">
|
||||
<div class="left-span-label">个人信息</div>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
||||
@@ -64,9 +64,9 @@ layout("/layouts/platform.html"){
|
||||
{{ $moment(createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="column.prop === 'activityTime'">
|
||||
<span>{{ $moment(row.activityStartTime).format('MM/DD') }}</span>
|
||||
<span>{{ $moment(row.activityStartTime).format('YYYY/MM/DD') }}</span>
|
||||
<span> 至 </span>
|
||||
<span>{{ $moment(row.activityEndTime).format('MM/DD') }}</span>
|
||||
<span>{{ $moment(row.activityEndTime).format('YYYY/MM/DD') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150px">
|
||||
@@ -135,7 +135,7 @@ layout("/layouts/platform.html"){
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: "活动名称", prop: "activityName", width: 800 },
|
||||
{ label: "活动名称", prop: "activityName", width: 600 },
|
||||
{ label: "活动时间", prop: "activityTime" },
|
||||
{ label: "是否开启", prop: "isDisabled", width: 100 },
|
||||
{ label: "创建时间", prop: "createdAt" }
|
||||
|
||||
@@ -16,9 +16,10 @@ layout("/layouts/platform.html"){
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker
|
||||
placeholder="选择年度"
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
@change="yearChange"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
|
||||
@@ -12,11 +12,12 @@ layout("/layouts/platform.html"){
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
@change="yearChange"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动名称:">
|
||||
@@ -69,7 +70,7 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<user-info ref="userInfoRef"></user-info>
|
||||
<user-info ref="userInfoRef" @refresh="doSearch"></user-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
@@ -152,16 +152,16 @@ const userInfo = {
|
||||
background: "rgba(0, 0, 0, 0.7)"
|
||||
})
|
||||
const resp = await this.$axios.post(loc() + "/adjust", {
|
||||
activityId: this.pageForm.activityId,
|
||||
activityId: this.activity.id,
|
||||
oldCourseId: this.registerCourse.id,
|
||||
newCourseId: this.afterAdjustCourse,
|
||||
userId: this.userInfo.userId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.$refs.guava.index()
|
||||
this.adjustDialogVisible = false
|
||||
this.doSearch()
|
||||
await this.registerSearch()
|
||||
this.$emit("refresh", null)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
@@ -184,7 +184,7 @@ const userInfo = {
|
||||
})
|
||||
.then(async () => {
|
||||
const resp = await this.$axios.post(loc() + "/deleteSignUser", {
|
||||
activityId: this.pageForm.activityId,
|
||||
activityId: this.activity.id,
|
||||
courseId: this.registerCourse.id,
|
||||
userId: o.userId
|
||||
})
|
||||
|
||||
@@ -79,8 +79,8 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column prop="username" label="姓名"></el-table-column>
|
||||
<el-table-column prop="loginname" label="工号"></el-table-column>
|
||||
<el-table-column prop="mobile" label="联系方式"></el-table-column>
|
||||
<el-table-column prop="unitname" label="单位"></el-table-column>
|
||||
<el-table-column prop="unionname" label="工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="工会"></el-table-column>
|
||||
<el-table-column prop="signUpTime" label="报名时间"></el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const basicForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left">
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="120px" label-position="left">
|
||||
<el-form-item prop="planType" label="计划类型">
|
||||
<el-select v-model="formData.planType" placeholder="请选择计划类型" filterable clearable
|
||||
style="width: 100%">
|
||||
@@ -68,6 +68,12 @@ const basicForm = {
|
||||
<el-form-item prop="content" label="计划内容" class="is-required">
|
||||
<text-editor v-model="formData.content"></text-editor>
|
||||
</el-form-item>
|
||||
<el-form-item prop="content" label="附件上传">
|
||||
<file-upload :upload_number="5" :value.sync="formData.files"
|
||||
upload_result_type="url"
|
||||
complete_result upload_mode="drag"
|
||||
upload_result_category="array"></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row class="mt10" justify="end" type="flex">
|
||||
<el-button @click="$emit('refresh')">取消</el-button>
|
||||
@@ -120,6 +126,7 @@ const basicForm = {
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
this.formData.files = JSON.stringify(this.formData.files)
|
||||
const resp = await this.$axios.post("/platform/yearPlan/manage/onSubmit", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
|
||||
@@ -57,6 +57,10 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="年度计划">
|
||||
<el-button type="primary" size="small" @click="onDownLoad">
|
||||
<i class="el-icon-download"></i>
|
||||
下载全部附件
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" @click="onAdd">
|
||||
<i class="ti-plus"></i>
|
||||
新增计划
|
||||
@@ -133,6 +137,9 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onDownLoad() {
|
||||
this.$downLoad(loc() + '/downloadFiles', this.pageForm)
|
||||
},
|
||||
refresh() {
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
const basicForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left">
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="120px" label-position="left">
|
||||
<el-form-item label="上传人" prop="userName">
|
||||
<el-input maxlength="50" placeholder="请填写上传人" :value="$store.state.user.username"
|
||||
type="text"></el-input>
|
||||
|
||||
@@ -54,6 +54,10 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="年度总结">
|
||||
<el-button type="primary" size="small" @click="onDownLoad">
|
||||
<i class="el-icon-download"></i>
|
||||
下载全部附件
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" @click="onAdd">
|
||||
<i class="ti-plus"></i>
|
||||
新增计划
|
||||
@@ -129,6 +133,9 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onDownLoad() {
|
||||
this.$downLoad(loc() + '/downloadFiles', this.pageForm)
|
||||
},
|
||||
refresh() {
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
|
||||
@@ -88,7 +88,7 @@ layout("/layouts/platform.html"){
|
||||
activityType: "2"
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: "活动名称", prop: "activityName", width: 800},
|
||||
{ label: "活动名称", prop: "activityName", width: 600},
|
||||
{ label: "活动性质", prop: "trainType"},
|
||||
{ label: "报名时间", prop: "activitySignUpStartTime"},
|
||||
{ label: "活动时间", prop: "activityStartTime"},
|
||||
|
||||
@@ -2,7 +2,7 @@ const signForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="signDialog" title="信息填写" width="50%" append-to-body>
|
||||
<el-form :model="formData" ref="form" label-width="80px">
|
||||
<el-form :model="formData" ref="form" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="姓名" prop="username">
|
||||
@@ -155,7 +155,7 @@ const signForm = {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.courseRow.courseIsLimitApply) {
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/validateSourceSignUp', {activityCourseId: this.formData.activityCourseId})
|
||||
const resp = await this.$axios.post('/platform/mobile/trainSignUpActivity/validateSourceSignUp', {activityCourseId: this.formData.activityCourseId})
|
||||
if (resp.code !== 0) {
|
||||
this.$message.warning(res.msg)
|
||||
return
|
||||
|
||||
@@ -64,9 +64,9 @@ layout("/layouts/platform.html"){
|
||||
{{ $moment(createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="column.prop === 'activityTime'">
|
||||
<span>{{ $moment(row.activityStartTime).format('MM/DD') }}</span>
|
||||
<span>{{ $moment(row.activityStartTime).format('YYYY/MM/DD') }}</span>
|
||||
<span> 至 </span>
|
||||
<span>{{ $moment(row.activityEndTime).format('MM/DD') }}</span>
|
||||
<span>{{ $moment(row.activityEndTime).format('YYYY/MM/DD') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150px">
|
||||
@@ -135,7 +135,7 @@ layout("/layouts/platform.html"){
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: "活动名称", prop: "activityName", width: 800 },
|
||||
{ label: "活动名称", prop: "activityName", width: 600 },
|
||||
{ label: "活动时间", prop: "activityTime" },
|
||||
{ label: "是否开启", prop: "isDisabled", width: 100 },
|
||||
{ label: "创建时间", prop: "createdAt" }
|
||||
|
||||
@@ -16,9 +16,10 @@ layout("/layouts/platform.html"){
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker
|
||||
placeholder="选择年度"
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
@change="yearChange"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
|
||||
@@ -12,9 +12,10 @@ layout("/layouts/platform.html"){
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker
|
||||
placeholder="选择年度"
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
@change="yearChange"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
@@ -69,7 +70,7 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<user-info ref="userInfoRef"></user-info>
|
||||
<user-info ref="userInfoRef" @refresh="doSearch"></user-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
@@ -152,20 +152,20 @@ const userInfo = {
|
||||
background: "rgba(0, 0, 0, 0.7)"
|
||||
})
|
||||
const resp = await this.$axios.post(loc() + "/adjust", {
|
||||
activityId: this.pageForm.activityId,
|
||||
activityId: this.activity.id,
|
||||
oldCourseId: this.registerCourse.id,
|
||||
newCourseId: this.afterAdjustCourse,
|
||||
userId: this.userInfo.userId
|
||||
})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.$refs.guava.index()
|
||||
this.adjustDialogVisible = false
|
||||
this.doSearch()
|
||||
await this.registerSearch()
|
||||
this.$emit("refresh", null)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
loading.close()
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
@@ -184,14 +184,14 @@ const userInfo = {
|
||||
})
|
||||
.then(async () => {
|
||||
const resp = await this.$axios.post(loc() + "/deleteSignUser", {
|
||||
activityId: this.pageForm.activityId,
|
||||
activityId: this.activity.id,
|
||||
courseId: this.registerCourse.id,
|
||||
userId: o.userId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
await this.registerSearch()
|
||||
this.doSearch()
|
||||
this.$emit("refresh", null)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
|
||||
@@ -79,8 +79,8 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column prop="username" label="姓名"></el-table-column>
|
||||
<el-table-column prop="loginname" label="工号"></el-table-column>
|
||||
<el-table-column prop="mobile" label="联系方式"></el-table-column>
|
||||
<el-table-column prop="unitname" label="单位"></el-table-column>
|
||||
<el-table-column prop="unionname" label="工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="工会"></el-table-column>
|
||||
<el-table-column prop="signUpTime" label="报名时间"></el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
||||
@@ -119,6 +119,9 @@ const addForm = {
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.queryDoctorUser(null)
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
|
||||
@@ -8,6 +8,7 @@ const basicForm = {
|
||||
v-model="formData.userId"
|
||||
filterable
|
||||
remote
|
||||
:disabled="formData.id !== '' && formData.id !== null && formData.id !== undefined"
|
||||
reserve-keyword
|
||||
placeholder="请输入关键词"
|
||||
:remote-method="selectQueryUser"
|
||||
|
||||
@@ -101,7 +101,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'unitName', label: '单位'},
|
||||
{prop: 'jobTitle', label: '职称'},
|
||||
{prop: 'technicalTitle', label: '职称'},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'avatar', label: '头像'}
|
||||
],
|
||||
|
||||
@@ -42,6 +42,10 @@ const info = {
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
.el-descriptions-item__label {
|
||||
width: 200px;
|
||||
min-width: 200px;
|
||||
max-width: 200px;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
+3
@@ -119,6 +119,9 @@ const addForm = {
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.queryDoctorUser(null)
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
|
||||
+1
@@ -8,6 +8,7 @@ const basicForm = {
|
||||
v-model="formData.userId"
|
||||
filterable
|
||||
remote
|
||||
:disabled="formData.id !== '' && formData.id !== null && formData.id !== undefined"
|
||||
reserve-keyword
|
||||
placeholder="请输入关键词"
|
||||
:remote-method="selectQueryUser"
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'unitName', label: '单位'},
|
||||
{prop: 'jobTitle', label: '职称'},
|
||||
{prop: 'technicalTitle', label: '职称'},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'avatar', label: '头像'}
|
||||
],
|
||||
|
||||
@@ -42,6 +42,10 @@ const info = {
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
.el-descriptions-item__label {
|
||||
width: 200px;
|
||||
min-width: 200px;
|
||||
max-width: 200px;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
+353
@@ -0,0 +1,353 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.top_block {
|
||||
width: 100%;
|
||||
padding: 20px 80px;
|
||||
border-bottom: 10px solid rgb(240, 240, 240);
|
||||
}
|
||||
.top_title {
|
||||
font-size: 18px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.top_num {
|
||||
font-size: 26px;
|
||||
color: #808492;
|
||||
}
|
||||
.two_num {
|
||||
margin-top: 8px;
|
||||
font-size: 18px;
|
||||
color: #808492;
|
||||
}
|
||||
.cut-off-line {
|
||||
width: 1px;
|
||||
height: 70%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
background-color: rgb(230, 230, 230);
|
||||
}
|
||||
.chartTitle {
|
||||
font-size: 14px;
|
||||
color: #808492;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="线路类型:">
|
||||
<el-select v-model="pageForm.lineType" placeholder="请选择线路类型" clearable style="width: 100%" @change="doSearch">
|
||||
<el-option v-for="item in regionalNatureList" :key="item.value" :label="item.label" :value="item.value">{{item.label}}</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<div class="top_block">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4" style="position: relative">
|
||||
<div class="top_title">总人数</div>
|
||||
<div class="top_num">{{numData.allNum || '0'}}</div>
|
||||
<div class="cut-off-line"></div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4" style="position: relative">
|
||||
<div class="top_title">省内人数</div>
|
||||
<div class="top_num">{{numData.provinceNum || '0'}}</div>
|
||||
<div class="cut-off-line"></div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4" style="position: relative">
|
||||
<div class="top_title">省外人数</div>
|
||||
<div class="top_num">{{numData.outProvinceNum || '0'}}</div>
|
||||
<div class="cut-off-line"></div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4" style="position: relative">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<div class="top_title">总线路数</div>
|
||||
<div style="margin-top: 2px;font-size: 18px;color: #1867b0">共{{numData.lineNum || '0'}}条</div>
|
||||
</div>
|
||||
<div class="two_num">省内{{numData.inLineNum || '0'}} | 省外{{numData.outLineNum || '0'}}</div>
|
||||
<div class="cut-off-line"></div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4" style="position: relative">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<div class="top_title">校工会组织</div>
|
||||
<div style="margin-top: 2px;font-size: 18px;color: #1867b0">共{{numData.schoolUnionLineNum || '0'}}条</div>
|
||||
</div>
|
||||
<div class="two_num">省内{{numData.schoolInLineNum || '0'}} | 省外{{numData.schoolOutLineNum || '0'}}</div>
|
||||
<div class="cut-off-line"></div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<div class="top_title">分工会组织</div>
|
||||
<div style="margin-top: 2px;font-size: 18px;color: #1867b0">共{{numData.unionLineNum || '0'}}条</div>
|
||||
</div>
|
||||
<div class="two_num">省内{{numData.unionInLineNum || '0'}} | 省外{{numData.unionOutLineNum || '0'}}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-row :gutter="20" style="padding: 30px 0;border-bottom: 10px solid rgb(240, 240, 240)">
|
||||
<el-col :span="12" v-loading="lotLoading">
|
||||
<div class="chartTitle">时间标段统计</div>
|
||||
<div id="lotChart" style="width: 100%;height: 300px"></div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" v-loading="ageLoading">
|
||||
<div class="chartTitle">年龄分布统计</div>
|
||||
<div id="ageChart" style="width: 100%;height: 300px"></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row style="padding: 30px 0;border-bottom: 10px solid rgb(240, 240, 240)">
|
||||
<el-col :span="24" style="padding: 0 20px" v-loading="lineTravelOrAgeLoading">
|
||||
<div class="chartTitle">线路人数及年龄统计</div>
|
||||
<div id="lineTravelChart"></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
},
|
||||
numData: {
|
||||
allNum: '',
|
||||
provinceNum: '',
|
||||
outProvinceNum: '',
|
||||
allLineNum: '',
|
||||
schoolLineNum: '',
|
||||
branchLineNum: ''
|
||||
},
|
||||
regionalNatureList: [{label:'全部线路',name:'provinceAll',ordinal:0,provinceIn:'provinceIn',provinceOut:'provinceOut',value:'全部'}],
|
||||
|
||||
lotLoading: false,
|
||||
ageLoading: false,
|
||||
|
||||
lineTravelOrAgeLoading: false,
|
||||
isLineTravel: false,
|
||||
lineTravelOrAgeTip: '出行线路年龄统计',
|
||||
dualAxisChartInstance: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getNumData(){
|
||||
const resp = await this.$axios.post('/platform/recuperation/annualAnalysis/getNumData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.numData = resp.data
|
||||
}
|
||||
},
|
||||
async getLotNumData(){
|
||||
this.lotLoading = true
|
||||
const resp = await this.$axios.post('/platform/recuperation/annualAnalysis/getLotNum', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
let {data} = resp
|
||||
document.getElementById("lotChart").innerHTML = ''
|
||||
const config = {
|
||||
isStack: true,
|
||||
"legend": {
|
||||
"position": "top-right",
|
||||
"flipPage": false
|
||||
},
|
||||
autoFit: true,
|
||||
title: {
|
||||
visible: true,
|
||||
text: '出行时间标段统计详情',
|
||||
},
|
||||
description: {
|
||||
visible: true,
|
||||
text: '人',
|
||||
},
|
||||
xField: 'label',
|
||||
yField: 'value',
|
||||
stackField: 'type',
|
||||
color: ["#5B8FF9", "#5AD8A6"],
|
||||
"xAxis": {
|
||||
label: {
|
||||
formatter: (v) => {
|
||||
if (data.length > 30 && v.length > 3) {
|
||||
return v.substr(0, 2) + '...'
|
||||
} else if (data.length > 20 && v.length > 4) {
|
||||
return v.substr(0, 3) + '...'
|
||||
} else if (data.length > 10 && v.length > 6) {
|
||||
return v.substr(0, 5) + '...'
|
||||
}
|
||||
return v
|
||||
}
|
||||
}
|
||||
},
|
||||
"yAxis": {},
|
||||
meta: {
|
||||
label: {
|
||||
alias: '标段时长',
|
||||
},
|
||||
value: {
|
||||
alias: '人数',
|
||||
}
|
||||
},
|
||||
connectedArea: {
|
||||
visible: true,
|
||||
triggerOn: false,
|
||||
},
|
||||
}
|
||||
const plot = new G2Plot.Column(document.getElementById("lotChart"), {
|
||||
data,
|
||||
...config,
|
||||
});
|
||||
plot.render();
|
||||
this.lotLoading = false
|
||||
}
|
||||
},
|
||||
async getAgeData(){
|
||||
this.ageLoading = true
|
||||
const resp = await this.$axios.post('/platform/recuperation/annualAnalysis/getAgeNum', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
let {data} = resp
|
||||
document.getElementById("ageChart").innerHTML = ''
|
||||
const config = {
|
||||
"legend": {
|
||||
"flipPage": false
|
||||
},
|
||||
"label": {
|
||||
"type": "spider",
|
||||
"offset": 50
|
||||
},
|
||||
"width": $('#ageChart').width(),
|
||||
"height": $('#ageChart').height(),
|
||||
"forceFit": false,
|
||||
"radius": 1,
|
||||
"colorField": "label",
|
||||
"angleField": "value",
|
||||
meta: {
|
||||
label: {
|
||||
alias: '年龄结构',
|
||||
},
|
||||
value: {
|
||||
alias: '人数',
|
||||
}
|
||||
},
|
||||
}
|
||||
const plot = new G2Plot.Pie(document.getElementById("ageChart"), {
|
||||
data,
|
||||
...config,
|
||||
});
|
||||
plot.render();
|
||||
this.ageLoading = false
|
||||
}
|
||||
},
|
||||
async getLineTravelData(){
|
||||
if (this.dualAxisChartInstance) {
|
||||
this.dualAxisChartInstance.destroy(); // 如果已有实例,先销毁
|
||||
}
|
||||
const resp = await this.$axios.post('/platform/recuperation/annualAnalysis/getLineTravelAndAgeData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
let {data} = resp
|
||||
document.getElementById("lineTravelChart").innerHTML = ''
|
||||
const dualAxes = new G2Plot.DualAxes('lineTravelChart', {
|
||||
data: [data.uvData, data.transformData],
|
||||
xField: 'lineName',
|
||||
yField: ['value', 'count'],
|
||||
meta: {
|
||||
value: {
|
||||
alias: '出行人数',
|
||||
},
|
||||
count: {
|
||||
alias: '年龄段人数',
|
||||
}
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
min: 0, // 设置Y轴最小值为0
|
||||
max: null, // 自动计算最大值
|
||||
title: {
|
||||
text: '出行人数',
|
||||
},
|
||||
},
|
||||
{
|
||||
position: 'right',
|
||||
min: 0,
|
||||
max: null,
|
||||
title: {
|
||||
text: '年龄段人数',
|
||||
},
|
||||
},
|
||||
],
|
||||
geometryOptions: [
|
||||
{
|
||||
geometry: 'column',
|
||||
columnWidthRatio: 0.4,
|
||||
color: '#5B8FF9', // 设置柱状图颜色
|
||||
},
|
||||
{
|
||||
geometry: 'line',
|
||||
seriesField: 'name',
|
||||
color: ['#5AD8A6', '#E8684A', '#FF9D4D'], // 设置线的颜色
|
||||
},
|
||||
],
|
||||
tooltip: {
|
||||
shared: true, // 共享提示框
|
||||
},
|
||||
});
|
||||
dualAxes.render();
|
||||
}
|
||||
},
|
||||
doLineTravelOrAgeSwitch(){
|
||||
this.isLineTravel = !this.isLineTravel
|
||||
this.lineTravelOrAgeTip = this.isLineTravel ? '出行线路年龄统计' : '出行线路人数统计'
|
||||
},
|
||||
async initData(){
|
||||
await this.getNumData()
|
||||
await this.getLotNumData()
|
||||
await this.getAgeData()
|
||||
await this.getLineTravelData()
|
||||
},
|
||||
async getEnumOptions(enumName) {
|
||||
const resp = await this.$axios.post("/open/common/dictEnumOptions", { name: enumName })
|
||||
return resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.regionalNatureList.push(...await this.getEnumOptions('RecuperationProvinceType'))
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+2
-2
@@ -90,8 +90,8 @@ layout("/layouts/platform.html"){
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'isDisabled'">
|
||||
<el-switch
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{baseStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
const editForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog title="编辑" :visible.sync="visible" top="50px">
|
||||
<el-form :model="formData" label-width="120px" :formRules="formRules" ref="formRef"
|
||||
style="margin-right: 40px">
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="loginName" label="工号">
|
||||
<el-input v-model="formData.loginName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="姓名">
|
||||
<el-input v-model="formData.userName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="手机号">
|
||||
<el-input v-model="formData.mobile" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="身份证号">
|
||||
<el-input v-model="formData.idCard" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="unionName" label="工会">
|
||||
<el-input v-model="formData.unionName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="unitName" label="单位">
|
||||
<el-input v-model="formData.unitName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="prop" :label="labelName">
|
||||
<template v-if="config.familyInfo == 2">
|
||||
<el-collapse v-model="activeNames">
|
||||
<el-collapse-item title="点击可展开详细信息" name="1">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="formData.companionList">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard"></el-table-column>
|
||||
<el-table-column label="年龄" prop="age"></el-table-column>
|
||||
<el-table-column label="床型" prop="bedType">
|
||||
<template v-slot="{row}">
|
||||
{{ row.bedInfo.bedType }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="床位" prop="bedNum">
|
||||
<template v-slot="{row}">
|
||||
{{ row.bedInfo.bedNum }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="意向拼床人" prop="otherSleepUser">
|
||||
<template v-slot="{row}">
|
||||
{{ row.bedInfo.otherSleepUser ?
|
||||
row.bedInfo.otherSleepUser : '暂无' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关系" prop="relation"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input v-model="formData.bedType" readonly></el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item prop="travelLine" :label="lineLabelName">
|
||||
<el-select v-model="formData.takePartInLineId" filterable clearable
|
||||
placeholder="请选择线路"
|
||||
@change="validateLine"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in unionSelectLines"
|
||||
:key="item.id"
|
||||
:label="item.lineName + '-' + item.regionalNature + '【' + item.lotName + '】' + '(' + item.playStartTime + '至' + item.playEndTime + ')' + '(' + item.signUpMode + ')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="specificTime" label="出行时间" v-if="pageForm.state==='3'">-->
|
||||
<!-- <el-select v-model="formData.specificTime" filterable clearable-->
|
||||
<!-- placeholder="请选择出行时间"-->
|
||||
<!-- style="width: 100%">-->
|
||||
<!-- <el-option v-for="item in editSpecificTimes"-->
|
||||
<!-- :key="item"-->
|
||||
<!-- :label="item"-->
|
||||
<!-- :value="item">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="onSubmit">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
year: null,
|
||||
config: {},
|
||||
formData: {},
|
||||
formRules: {},
|
||||
labelName: null,
|
||||
lineLabelName: '线路',
|
||||
unionSelectLines: [],
|
||||
activeNames: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(id, year) {
|
||||
this.year = year
|
||||
this.visible = true
|
||||
await this.getUnionSelectLine()
|
||||
await this.getModifyConfig()
|
||||
const {code, msg, data} = await this.$axios.get("/platform/recuperation/branchUnionUserQuery/findOne", {id})
|
||||
if (code === 0) {
|
||||
this.formData = data
|
||||
if (this.config.familyInfo === 2) {
|
||||
this.labelName = "家属信息"
|
||||
} else {
|
||||
this.editFormData.bedType = data.familyNumber
|
||||
this.labelName = "家属数量"
|
||||
}
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const {code, data, msg} = await this.$axios.post('/platform/recuperation/config/findOne')
|
||||
if (code === 0) {
|
||||
this.config = data
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
},
|
||||
async getUnionSelectLine() {
|
||||
const resp = await this.$axios.post('/platform/recuperation/user/query/getUnionSelectLine', {
|
||||
year: this.year,
|
||||
signUpMode: 1,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.unionSelectLines = resp.data
|
||||
}
|
||||
},
|
||||
async validateLine() {
|
||||
const resp = await $.post('/platform/recuperation/line/enroll/validSignUpInfo'
|
||||
, {enroll: JSON.stringify(this.editFormData)})
|
||||
if (resp.code !== 0) {
|
||||
this.$message.warning(resp.msg)
|
||||
this.formData.takePartInLineId = ''
|
||||
}
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要修改报名信息吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
if (!this.formData.takePartInLineId && !this.formData.takePartInBaseManagementId) {
|
||||
this.$message.warning('请选择线路')
|
||||
return
|
||||
}
|
||||
const {code,msg} = await $.post('/platform/recuperation/user/query/doEdit', this.formData)
|
||||
if (code === 0) {
|
||||
this.$message.success(msg)
|
||||
this.visible = false
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
}).catch()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
+377
@@ -0,0 +1,377 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.filter-container {
|
||||
margin-bottom: 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.filter-container .el-form {
|
||||
padding: 10px 15px;
|
||||
}
|
||||
.form-row {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
margin-bottom: 22px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.form-row .el-form-item {
|
||||
flex: 1;
|
||||
min-width: 240px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.flex-grow-1 {
|
||||
flex: 1;
|
||||
}
|
||||
.route-line {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
.route-line-title {
|
||||
width: 90px;
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.route-line-content {
|
||||
flex: 1;
|
||||
}
|
||||
.route-radio-group {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 15px;
|
||||
}
|
||||
.route-radio-group .el-radio {
|
||||
margin-right: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.button-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 15px;
|
||||
border-top: 1px dashed #ebeef5;
|
||||
}
|
||||
.button-container .el-button {
|
||||
padding-left: 25px;
|
||||
padding-right: 25px;
|
||||
margin: 0 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never" class="filter-container">
|
||||
<el-form :model="pageForm" ref="pageFormRef" label-width="90px" size="medium">
|
||||
<div class="form-row">
|
||||
<el-form-item label="年度">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
placeholder="选择年度"
|
||||
value-format="yyyy"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="pageForm.userName" placeholder="请输入姓名" clearable
|
||||
prefix-icon="el-icon-user"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="工号">
|
||||
<el-input v-model="pageForm.loginName" placeholder="请输入工号" clearable
|
||||
prefix-icon="el-icon-postcard"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="route-line">
|
||||
<div class="route-line-title">报名线路</div>
|
||||
<div class="route-line-content">
|
||||
<el-radio-group v-model="pageForm.signUpMode" class="route-radio-group" size="small"
|
||||
@change="signUpModeChange">
|
||||
<el-radio :label="1" border>校工会线路</el-radio>
|
||||
<el-radio :label="2" border>本分工会线路本工会人员</el-radio>
|
||||
<el-radio :label="3" border>其他工会线路本工会人员</el-radio>
|
||||
<el-radio :label="4" border>个人组织线路</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="route-line">
|
||||
<div class="route-line-title">区域</div>
|
||||
<div class="route-line-content">
|
||||
<el-radio-group @change="doSearch"
|
||||
size="small"
|
||||
v-model="pageForm.regionalNature">
|
||||
<el-radio label="" border>全部</el-radio>
|
||||
<el-radio label="省内" border>省内</el-radio>
|
||||
<el-radio label="省外" border>省外</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<el-form-item label="线路选择">
|
||||
<el-select v-model="pageForm.takePartInLineId" placeholder="请选择线路" clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in takePartInLines"
|
||||
:key="item.takePartInLineId"
|
||||
:label="item.lineName+'('+item.unionName+')'"
|
||||
:value="item.takePartInLineId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="标段">
|
||||
<el-select v-model="pageForm.lotId" placeholder="请选择标段" clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in config.lots"
|
||||
:key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="flex-grow-1">
|
||||
<!-- 占位,保持布局平衡 -->
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="button-container">
|
||||
<el-button type="primary" icon="el-icon-search" round @click="doSearch">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" round @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool label="人员列表" ref="table_tool">
|
||||
<el-button icon="el-icon-s-promotion" size="small" type="primary" @click="doExport">
|
||||
导出
|
||||
</el-button>
|
||||
<el-button icon="el-icon-s-promotion" size="small" type="primary"
|
||||
@click="openSetUpPart"
|
||||
>设置参加人员
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" row-key="id" style="width: 100%" ref="tableRef">
|
||||
<el-table-column reserve-selection type="selection" width="55"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index" label="序号" :index="indexMethod"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template v-slot="{row}" v-if="column.prop=='isFamily'">
|
||||
<el-link v-if="!row.familyNumber" type="primary" @click="openUser(row)">
|
||||
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
|
||||
</el-link>
|
||||
<el-link v-else type="primary">
|
||||
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
|
||||
</el-link>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop=='times'">
|
||||
<div v-if="row.playStartTime">{{row.playStartTime}}</div>
|
||||
<div v-else>{{row.playStartTime1}}</div>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop=='isTakePartIn'">
|
||||
{{row.isTakePartIn?'已参加':'未参加'}}
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop=='stateId'">
|
||||
<span v-if="row.stateId">
|
||||
|
||||
</span>
|
||||
<sapn v-else style="color: #67C23A">暂无</sapn>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop=='lineOrMaName'">
|
||||
{{row.lineName?row.lineName:row.baseName?row.baseName:row.travelAgencyName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="pageForm.state=='1'||pageForm.state=='3'" align="center"
|
||||
prop="lotName"
|
||||
show-overflow-tooltip
|
||||
header-align="center"
|
||||
label="标段"
|
||||
sortable>
|
||||
<template v-slot="{row}">
|
||||
{{row.lotName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px">
|
||||
<template v-slot="{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="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="查看报名信息" :visible.sync="viewVisible" top="50px">
|
||||
<enroll-info ref="viewEnrollInfoRef"></enroll-info>
|
||||
</el-dialog>
|
||||
|
||||
<set-up-part ref="setUpRef"></set-up-part>
|
||||
|
||||
<edit-form ref="editRef" @refresh="doSearch"></edit-form>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('setUpPart.js'){}#-->
|
||||
<!--#include('editForm.js'){}#-->
|
||||
<!--#include('../line/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'line-info': info,
|
||||
'set-up-part': setUpPart,
|
||||
'edit-form': editForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
loginName: '',
|
||||
userName: '',
|
||||
takePartInLineId: '',
|
||||
unionId: '',
|
||||
signUpMode: 1,
|
||||
lotId: '',
|
||||
regionalNature: ''
|
||||
},
|
||||
takePartInLines: [],
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'lineOrMaName', label: '线路'},
|
||||
{prop: 'times', label: '出行时间'},
|
||||
{prop: 'isFamily', label: '是否携带家属'},
|
||||
{prop: 'isTakePartIn', label: '是否参加'}
|
||||
],
|
||||
viewVisible: false,
|
||||
unionOptions: [],
|
||||
config: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
signUpModeChange(val) {
|
||||
this.pageForm.takePartInLineId = ''
|
||||
this.getLines()
|
||||
this.doSearch()
|
||||
},
|
||||
resetQuery() {
|
||||
this.pageForm = {
|
||||
year: new Date().getFullYear().toString(),
|
||||
loginName: '',
|
||||
userName: '',
|
||||
takePartInLineId: '',
|
||||
unionId: '',
|
||||
signUpMode: 1,
|
||||
lotId: '',
|
||||
regionalNature: '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
openView(row) {
|
||||
this.viewVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.viewEnrollInfoRef.openView(row.id)
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$refs.editRef.onOpen(row.id)
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的信息吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
dangerouslyUseHTMLString: true,
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {code, msg} = await this.$axios.post('/platform/recuperation/branchUnionUserQuery/deleteMyEnrollInfoById', {
|
||||
id: row.id
|
||||
})
|
||||
if (code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(msg)
|
||||
} else {
|
||||
this.$message.warning(msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doExport() {
|
||||
const {year, userName, loginName, unionId, signUpMode, regionalNature, takePartInLineId, lotId} = this.pageForm
|
||||
window.open('/platform/recuperation/schoolUnionUserQuery/exportXlsx?year=' +
|
||||
year
|
||||
+ '&userName=' + userName
|
||||
+ '&loginName=' + loginName
|
||||
+ '&unionId=' + unionId
|
||||
+ '&signUpMode=' + signUpMode
|
||||
+ '®ionalNature=' + regionalNature
|
||||
+ '&takePartInLineId=' + takePartInLineId
|
||||
+ '&lotId=' + lotId)
|
||||
},
|
||||
openSetUpPart() {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length === 0) {
|
||||
this.$message.error('请选择要设置的人员')
|
||||
return
|
||||
}
|
||||
this.$refs.setUpRef.onOpen(selection)
|
||||
},
|
||||
getConfig() {
|
||||
this.$axios.post('/platform/recuperation/config/fetchOne').then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.config = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getLines() {
|
||||
this.$axios.post('/platform/recuperation/branchUnionUserQuery/listLine', {
|
||||
year: this.pageForm.year,
|
||||
signUpMode: this.pageForm.signUpMode,
|
||||
regionalNature: this.pageForm.regionalNature
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.takePartInLines = res.data
|
||||
} else {
|
||||
this.$message.warning(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch(){
|
||||
this.getLines()
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.doSearch()
|
||||
this.getConfig()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
const setUpPart = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog :visible.sync="visible" title="设置参加人员" top="50px">
|
||||
<el-row class="text-primary p20">
|
||||
选择标段/参加时间(设置前请先勾选需要设置的用户)
|
||||
</el-row>
|
||||
|
||||
<el-row type="flex" style="column-gap: 10px">
|
||||
<el-select v-model="lotId" filterable clearable
|
||||
placeholder="请选择标段"
|
||||
style="width: 100%"
|
||||
@change="lotChange">
|
||||
<el-option v-for="item in config.lots"
|
||||
:key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="takePartInTime"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
@change="takePartInTimeChange"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择参加时间">
|
||||
</el-date-picker>
|
||||
</el-row>
|
||||
|
||||
<el-row class="mt10">
|
||||
<el-table :data="tableData" border ref="tableRef" row-key="id">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column type="index" label="序号" width="80"></el-table-column>
|
||||
<el-table-column prop="loginName" label="一卡通号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="unitName" label="单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="工会"></el-table-column>
|
||||
<el-table-column prop="signingUptime" label="报名时间"></el-table-column>
|
||||
<el-table-column prop="takePartInTime" label="参加时间"></el-table-column>
|
||||
<el-table-column prop="lotName" label="标段"></el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
config: {},
|
||||
tableData: [],
|
||||
lotId: null,
|
||||
takePartInTime: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(selection) {
|
||||
this.visible = true
|
||||
this.tableData = JSON.parse(JSON.stringify(selection))
|
||||
this.getModifyConfig()
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await $.post('/platform/recuperation/config/findOne')
|
||||
if (res.code === 0) {
|
||||
this.config = res.data
|
||||
}
|
||||
},
|
||||
lotChange(val) {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length === 0) {
|
||||
this.$message.error('请选择要设置的人员')
|
||||
this.lotId = null
|
||||
return
|
||||
}
|
||||
if (!val) {
|
||||
this.$refs.tableRef.clearSelection()
|
||||
return
|
||||
}
|
||||
const lot = this.config.lots.find(v => v.id === val)
|
||||
this.tableData.map((v, index) => {
|
||||
this.$set(this.tableData[index], "lotId", val)
|
||||
this.$set(this.tableData[index], "lotName", lot.lotName)
|
||||
})
|
||||
},
|
||||
takePartInTimeChange(val) {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length === 0) {
|
||||
this.$message.error('请选择要设置的人员')
|
||||
this.takePartInTime = null
|
||||
return
|
||||
}
|
||||
if (!val) {
|
||||
this.$refs.tableRef.clearSelection()
|
||||
return
|
||||
}
|
||||
this.tableData.map((v, index) => {
|
||||
this.$set(this.tableData[index], "takePartInTime", val)
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
// 检查哪几条数据填写不完整
|
||||
this.tableData.forEach((v, index) => {
|
||||
if (!v.lotId || !v.takePartInTime) {
|
||||
this.$message.error('第' + (index + 1) + '行数据填写不完整')
|
||||
return
|
||||
}
|
||||
})
|
||||
const data = this.tableData.map((v, index) => {
|
||||
return{
|
||||
lotId: v.lotId,
|
||||
takePartInTime: v.takePartInTime,
|
||||
id: v.id
|
||||
}
|
||||
})
|
||||
this.$confirm('确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async res => {
|
||||
const {
|
||||
code,
|
||||
msg
|
||||
} = await $.post("/platform/recuperation/branchUnionUserQuery/setUpParticipants", {data: JSON.stringify(data)})
|
||||
if (code === 0) {
|
||||
this.$message.success(msg)
|
||||
this.$refs.tableRef.clearSelection()
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -109,8 +109,8 @@ layout("/layouts/platform.html"){
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'isDisabled'">
|
||||
<el-switch
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{lineStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
@@ -189,6 +189,14 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async lineStatusChange(id) {
|
||||
const resp = await this.$axios.post(loc() + '/openClosedLine/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getEnumOptions(enumName) {
|
||||
const resp = await this.$axios.post("/open/common/dictEnumOptions", { name: enumName })
|
||||
return resp.data
|
||||
|
||||
+237
@@ -0,0 +1,237 @@
|
||||
const batchSelect = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="setLineTimeDialog" title="统赋出行时间段信息" width="80%">
|
||||
<el-form :model="formData" :rules="rules" label-width="0" ref="form" size="small">
|
||||
<div v-for="(row,$index) in formData.times" :key="row.id" class="panel panel-default mt20"
|
||||
style="border: none">
|
||||
<div class="panel-heading"
|
||||
style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none;display: flex;align-items: center;justify-content: space-between">
|
||||
<h3 class="panel-title">
|
||||
出行时间段
|
||||
</h3>
|
||||
</div>
|
||||
<el-row class="playPeriod">
|
||||
<el-descriptions border :column="3" class="playPeriodTable">
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
报名开始时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.signUpStartTime'"
|
||||
:rules="{required:true,message:'请选择报名开始时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
placeholder="请选择报名开始时间"
|
||||
v-model="row.signUpStartTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
报名结束时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.signUpEndTime'"
|
||||
:rules="{required:true,message:'请选择报名结束时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
placeholder="请选择报名结束时间"
|
||||
@change="doSetChangeTime($index,row.signUpEndTime)"
|
||||
v-model="row.signUpEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
变更截至时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.changeEndTime'"
|
||||
:rules="{required:true,message:'请选择变更截至时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
placeholder="请选择变更截至时间"
|
||||
v-model="row.changeEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
出行开始时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.playStartTime'"
|
||||
:rules="{required:true,message:'请选择出行开始时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
placeholder="请选择出行开始时间"
|
||||
v-model="row.playStartTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
出行结束时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.playEndTime'"
|
||||
:rules="{required:true,message:'请选择出行结束时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
placeholder="请选择出行结束时间"
|
||||
v-model="row.playEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-alert closable show-icon style="margin:10px 0"
|
||||
title="温馨提醒:变更时间应该大于报名截至时间,小于出行时间。"
|
||||
type="warning"></el-alert>
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="setLineTimeDialog = false">取 消</el-button>
|
||||
<el-button @click="onSelect" type="primary">提 交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
const validateGiveSignUpEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择报名截至时间'))
|
||||
}
|
||||
if (this.formData.signUpStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpStartTime)) {
|
||||
callback(new Error('报名截至时间必须大于报名开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
const validateGiveChangeEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择变更截至时间'))
|
||||
}
|
||||
if (this.formData.signUpEndTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpEndTime)) {
|
||||
callback(new Error('变更截至时间必须大于报名截至时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
const validateGivePlayEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择出行结束时间'))
|
||||
}
|
||||
if (this.formData.playStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.playStartTime)) {
|
||||
callback(new Error('出行结束时间必须大于出行开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
return {
|
||||
setLineTimeDialog: false,
|
||||
rules: {
|
||||
signUpStartTime: [{required: false, message: '请选择报名开始时间', trigger: ['change', 'blur']}],
|
||||
signUpEndTime: [{required: false, validator: validateGiveSignUpEndTime, trigger: ['change', 'blur']}],
|
||||
changeEndTime: [{required: false, validator: validateGiveChangeEndTime, trigger: ['change', 'blur']}],
|
||||
playStartTime: [{required: false, message: '请选择出行开始时间', trigger: ['change', 'blur']}],
|
||||
playEndTime: [{required: false, validator: validateGivePlayEndTime, trigger: ['change', 'blur']}],
|
||||
},
|
||||
formData: {
|
||||
times: []
|
||||
},
|
||||
multipleSelection: [],
|
||||
year: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSetChangeTime(index, value){
|
||||
this.$set(this.formData.times[index], "changeEndTime", value)
|
||||
},
|
||||
async onOpen(multipleSelection, year) {
|
||||
if (!multipleSelection || multipleSelection.length === 0) {
|
||||
this.$message.warning('请在线路列表中勾选您想要统赋时间的线路');
|
||||
return
|
||||
}
|
||||
this.multipleSelection = multipleSelection
|
||||
this.year = year
|
||||
this.formData = {
|
||||
times: [{
|
||||
signUpStartTime: '',
|
||||
signUpEndTime: '',
|
||||
changeEndTime: '',
|
||||
playStartTime: '',
|
||||
playEndTime: '',
|
||||
}]
|
||||
}
|
||||
this.setLineTimeDialog = true
|
||||
},
|
||||
async onSelect() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
const confirm = await this.$confirm('请再次确认,是否为选择线路统赋时间?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
const lineIds = this.multipleSelection.map(v => v.id)
|
||||
const fmtData = this.formData.times.map(v => {
|
||||
return {
|
||||
...v,
|
||||
signUpMode: this.formData.signUpMode,
|
||||
mode: GetQueryString('mode')
|
||||
}
|
||||
})
|
||||
const resp = await this.$axios.post(loc() + '/setGiveLineTimes', {
|
||||
lineIds: JSON.stringify(lineIds),
|
||||
lineUnionSelects: JSON.stringify(fmtData),
|
||||
year: this.year
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.setLineTimeDialog = false
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.panel-heading {
|
||||
border-color: #eeeff8;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
.panel-title {
|
||||
font-weight: bold;
|
||||
color: #777;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
`
|
||||
}
|
||||
+312
@@ -0,0 +1,312 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.playPeriod .el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.el-button--text {
|
||||
padding: 0 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="线路:">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择线路"
|
||||
v-model="pageForm.travelAgencyId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="线路类型:">
|
||||
<el-select v-model="pageForm.regionalNature" placeholder="请选择线路类型" filterable clearable
|
||||
@change="doSearch" :disabled="pageForm.mode == 1">
|
||||
<el-option v-for="item in regionalNatureList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="线路名称:">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入线路名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.keywords">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])" label="所属工会:">
|
||||
<el-select @change="doSearch" v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable>
|
||||
<el-option v-for="item in unionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="时间标段:">
|
||||
<el-select @change="doSearch" clearable filterable
|
||||
style="width: 100%" placeholder="请选择时间标段"
|
||||
v-model="pageForm.lotId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id"
|
||||
v-for="item in lotList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="线路列表(温馨提示:如查询条件的年度为空时,已选择默认查询当年选择的线路)">
|
||||
<el-button @click="showGiveTimes" type="primary"
|
||||
size="small" style="margin-right: 10px">
|
||||
一键统赋时间
|
||||
</el-button>
|
||||
<el-radio-group @change="doSearch" size="small" v-model="pageForm.selectStatus">
|
||||
<el-radio-button :label="1">已选择</el-radio-button>
|
||||
<el-radio-button :label="-1">可选择</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize" ref="table"
|
||||
@selection-change="handleSelectionChange" row-key="id">
|
||||
<el-table-column type="selection" reserve-selection width="55"
|
||||
:selectable="(row)=>{return row.isDisabled==true || !(row.usId==null || row.usId == '')}"></el-table-column>
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:show-overflow-tooltip="column.prop!=='playTime'"
|
||||
v-if="pageForm.mode != 2 || (pageForm.mode == 2 && column.prop !== 'isOpen')"
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
|
||||
{{ signUpModeList.find(v => v.value === signUpMode)?.label || '' }}
|
||||
</template>
|
||||
<template v-slot="{row:{createMode}}" v-else-if="column.prop==='createMode'">
|
||||
{{ createModeList.find(v => v.value === createMode)?.label || '' }}
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="column.prop==='belongUnionName'">
|
||||
{{ pageForm.mode == 2 && pageForm.selectStatus == 1 ? '校工会' : row.belongUnionName }}
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="column.prop==='playTime'">
|
||||
<template v-if="row.playTimes">
|
||||
<el-tooltip placement="top">
|
||||
<div slot="content">
|
||||
<div v-for="(t,ti) in row.playTimes.split(',')" :key="t"
|
||||
:class="[ti==row.playTimes.split(',').length-1?'':'mb10']">
|
||||
{{t}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis">
|
||||
{{row.playTimes}}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<el-button v-else @click="openSetLineTime(row)" type="text">
|
||||
选择并设置出行时间段
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop==='createUnionName'">
|
||||
<span v-if="!row.isSelect">
|
||||
{{row.createUnionName}}
|
||||
</span>
|
||||
<span v-else>{{row.belongUnionName}}</span>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop==='isOpen'">
|
||||
<template v-if="row.usId">
|
||||
<el-switch
|
||||
@change="doEditOpen(row)"
|
||||
v-model="row.isOpen"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span>暂未选择</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{action:openViewLineInfo,value:row}">
|
||||
查看线路基本信息
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:openViewTimeSlot,value:row}" v-if="row.isSelect">
|
||||
查看出行时间段
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:openSetLineTime,value:row}" v-if="!row.isSelect">
|
||||
选择设置出行时间段
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:openSetLineTime,value:row}" v-if="row.isSelect">
|
||||
修改出行时间段
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:cancelSelect,value:row}" v-if="row.isSelect">
|
||||
取消选择
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
<select-line ref="selectRef" @refresh="refresh"></select-line>
|
||||
<batch-select ref="batchSelectRef" @refresh="batchRefresh"></batch-select>
|
||||
<time-info ref="timeInfoRef" :sign-mode-list="signUpModeList"></time-info>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../line/info.js'){}#-->
|
||||
<!--#include('select.js'){}#-->
|
||||
<!--#include('batchSelect.js'){}#-->
|
||||
<!--#include('timeInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"info": info,
|
||||
"select-line": select,
|
||||
"batch-select": batchSelect,
|
||||
"time-info": timeInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
unionList: [],
|
||||
tableColumns: [
|
||||
{label: '线路名称', prop: 'lineName', sortable: true},
|
||||
{label: '线路类型', prop: 'regionalNature', sortable: true},
|
||||
{label: '时间标段', prop: 'lotName', sortable: true, sortProp: 'lotValue'},
|
||||
{label: '出行时间', prop: 'playTime', sortable: 'custom', sortProp: 'playStartTime', width: 230},
|
||||
{label: '承担旅行社', prop: 'travelAgencyName', sortable: true},
|
||||
{label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||
{label: '选择工会', prop: 'belongUnionName', sortable: true},
|
||||
{label: '是否开放对外报名', prop: 'isOpen', sortable: true},
|
||||
],
|
||||
pageForm: {
|
||||
keywords: null,
|
||||
selectStatus: -1,
|
||||
unionId: null,
|
||||
regionalNature: '省内'
|
||||
},
|
||||
travelAgencyOptions: [],
|
||||
regionalNatureList: [{label:'全部线路',name:'provinceAll',ordinal:0,provinceIn:'provinceIn',provinceOut:'provinceOut',value:'全部'}],
|
||||
lotList: [],
|
||||
multipleSelection: [],
|
||||
createModeList: [],
|
||||
signUpModeList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async cancelSelect({applyCount, id: lineId, usUnionId: unionId}) {
|
||||
const msg = applyCount > 0 ? '已经有教工选择本线路,请确认是否取消选择本线路,一旦取消将清空报名人员!!!' : '您确定要取消吗?'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
const resp = await this.$axios.post(loc() + '/deSelect', {lineId, unionId})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
refresh() {
|
||||
this.doSearch()
|
||||
},
|
||||
batchRefresh() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.doSearch()
|
||||
},
|
||||
openViewTimeSlot({id, usUnionId}) {
|
||||
this.$refs.timeInfoRef.onOpen(id, usUnionId, this.pageForm.year)
|
||||
},
|
||||
openViewLineInfo(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
openSetLineTime({id, lineName, usUnionId, signUpMode}) {
|
||||
this.$refs.selectRef.onOpen(id, lineName, usUnionId, signUpMode, this.pageForm.year)
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
},
|
||||
showGiveTimes() {
|
||||
this.$refs.batchSelectRef.onOpen(this.multipleSelection, this.pageForm.year)
|
||||
},
|
||||
pageData() {
|
||||
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
async getTravelAgencyOptions() {
|
||||
const {data} = await this.$axios.post(loc() + '/getTravelAgencyOptions')
|
||||
this.travelAgencyOptions = data
|
||||
},
|
||||
async getEnumOptions(enumName) {
|
||||
const resp = await this.$axios.post("/open/common/dictEnumOptions", { name: enumName })
|
||||
return resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.pageForm, 'mode', Number(GetQueryString('mode')))
|
||||
if(this.pageForm.mode === 2) {
|
||||
this.$set(this.pageForm, 'regionalNature', '全部')
|
||||
}
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.createModeList = await this.getEnumOptions('RecuperationLineCreateMode')
|
||||
this.signUpModeList = await this.getEnumOptions('RecuperationSignUpMode')
|
||||
this.regionalNatureList.push(...await this.getEnumOptions('RecuperationProvinceType'))
|
||||
this.travelAgencyOptions = this.getTravelAgencyOptions()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+337
@@ -0,0 +1,337 @@
|
||||
const select = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="setLineTimeDialog" title="设置出行时间段信息" width="80%">
|
||||
<el-form :model="formData" :rules="rules" label-width="0" ref="form" size="small">
|
||||
<h4>{{formData.lineName}}</h4>
|
||||
|
||||
<div v-for="(row,$index) in formData.times" :key="row.id" class="panel panel-default mt20"
|
||||
style="border: none">
|
||||
<div class="panel-heading"
|
||||
style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none;display: flex;align-items: center;justify-content: space-between">
|
||||
<h3 class="panel-title">
|
||||
时间段{{$index+1}}
|
||||
</h3>
|
||||
<el-button icon="el-icon-circle-close" circle size="mini" type="danger"
|
||||
@click="formData.times.splice($index,1)"></el-button>
|
||||
</div>
|
||||
<el-row class="playPeriod">
|
||||
<el-descriptions border :column="3" class="playPeriodTable">
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
报名开始时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.signUpStartTime'"
|
||||
:rules="{required:true,message:'请选择报名开始时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
placeholder="请选择报名开始时间"
|
||||
v-model="row.signUpStartTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
报名结束时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.signUpEndTime'"
|
||||
:rules="{required:true,message:'请选择报名结束时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
placeholder="请选择报名结束时间"
|
||||
@change="doSetChangeTime($index,row.signUpEndTime)"
|
||||
v-model="row.signUpEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
变更截至时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.changeEndTime'"
|
||||
:rules="{required:true,message:'请选择变更截至时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
placeholder="请选择变更截至时间"
|
||||
v-model="row.changeEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
出行开始时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.playStartTime'"
|
||||
:rules="{required:true,message:'请选择出行开始时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
placeholder="请选择出行开始时间"
|
||||
v-model="row.playStartTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
出行结束时间
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.playEndTime'"
|
||||
:rules="{required:true,message:'请选择出行结束时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
placeholder="请选择出行结束时间"
|
||||
v-model="row.playEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
联系人
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.contact'"
|
||||
:rules="{required:true,message:'请输入联系人',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-input placeholder="请输入联系人" clearable maxlength="10" v-model="row.contact"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
<span class="text-danger">*</span>
|
||||
联系方式
|
||||
</template>
|
||||
<el-form-item :prop="'times.' + $index + '.contactPhone'"
|
||||
:rules="[
|
||||
{ required: true, message: '手机号码不能为空', trigger: 'blur' },
|
||||
{ pattern: /^1[34578]\\d{9}$/, message: '手机号码格式不正确', trigger: 'blur' }
|
||||
]"
|
||||
label-width="0">
|
||||
<el-input placeholder="请输入联系方式" clearable maxlength="11" v-model="row.contactPhone"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最少参与教工">
|
||||
<el-form-item :prop="'times.' + $index + '.minimumGroupSize'"
|
||||
:rules="[
|
||||
{ required: true, message: '最少参与教工不能为空', trigger: 'blur' },
|
||||
{ pattern: /^[0-9]*$/, message: '最少参与教工格式不正确', trigger: 'blur' }
|
||||
]"
|
||||
label-width="0">
|
||||
<el-input placeholder="请输入最少参与教工" clearable v-model="row.minimumGroupSize"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交通工具">
|
||||
<el-form-item :prop="'times.' + $index + '.trafficTools'"
|
||||
:rules="{required:false,message:'请输入交通工具',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-input placeholder="请输入交通工具" clearable v-model="row.trafficTools"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预计费用(元/人次)">
|
||||
<el-form-item :prop="'times.' + $index + '.estimatedCost'"
|
||||
:rules="{required:true,message:'请输入预计费用',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-input placeholder="请输入预计费用" clearable v-model="row.estimatedCost"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="成团人数包括家属">
|
||||
<el-form-item :prop="'times.' + $index + '.estimatedFamilyNumbers'"
|
||||
:rules="[
|
||||
{ required: false, message: '成团人数包括家属不能为空', trigger: 'blur' },
|
||||
{ pattern: /^[0-9]*$/, message: '成团人数包括家属格式不正确', trigger: 'blur' }
|
||||
]"
|
||||
label-width="0">
|
||||
<el-input clearable v-model="row.estimatedFamilyNumbers"
|
||||
placeholder="省外线路人数上限,不限制请忽略"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否开启">
|
||||
<el-form-item :prop="'times.' + $index + '.enable'"
|
||||
label-width="0">
|
||||
<el-switch
|
||||
v-model="row.enable"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<el-button
|
||||
@click="formData.times.push({enable:true,minimumGroupSize:lineConfig.groupNumber,estimatedCost:lineConfig.cost})"
|
||||
size="mini" type="primary">新增出行时间
|
||||
</el-button>
|
||||
</div>
|
||||
<el-alert closable show-icon style="margin:10px 0"
|
||||
title="温馨提醒:变更时间应该大于报名截至时间,小于出行时间。"
|
||||
type="warning"></el-alert>
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="setLineTimeDialog = false">取 消</el-button>
|
||||
<el-button @click="onSelect" type="primary">提 交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
const validateSignUpEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择报名截至时间'))
|
||||
}
|
||||
if (this.formData.signUpStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpStartTime)) {
|
||||
callback(new Error('报名截至时间必须大于报名开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
const validateChangeEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择变更截至时间'))
|
||||
}
|
||||
if (this.formData.signUpEndTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpEndTime)) {
|
||||
callback(new Error('变更截至时间必须大于报名截至时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
const validatePlayEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择出行结束时间'))
|
||||
}
|
||||
if (this.formData.playStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.playStartTime)) {
|
||||
callback(new Error('出行结束时间必须大于出行开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
return {
|
||||
setLineTimeDialog: false,
|
||||
rules: {
|
||||
signUpStartTime: [{required: true, message: '请选择报名开始时间', trigger: ['change', 'blur']}],
|
||||
signUpEndTime: [{required: true, validator: validateSignUpEndTime, trigger: ['change', 'blur']}],
|
||||
changeEndTime: [{required: true, validator: validateChangeEndTime, trigger: ['change', 'blur']}],
|
||||
playStartTime: [{required: true, message: '请选择出行开始时间', trigger: ['change', 'blur']}],
|
||||
playEndTime: [{required: true, validator: validatePlayEndTime, trigger: ['change', 'blur']}],
|
||||
},
|
||||
formData: {
|
||||
signUpStartTime: null,
|
||||
signUpEndTime: null,
|
||||
changeEndTime: null,
|
||||
playStartTime: null,
|
||||
playEndTime: null,
|
||||
id: null,
|
||||
lineId: null,
|
||||
times: []
|
||||
},
|
||||
lineConfig: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSetChangeTime(index, value){
|
||||
this.$set(this.formData.times[index], "changeEndTime", value)
|
||||
},
|
||||
async getLineConfig(lineId) {
|
||||
const {data} = await this.$axios.post(loc() + '/getLineConfig/' + lineId)
|
||||
this.lineConfig = data
|
||||
},
|
||||
async onOpen(id, lineName, usUnionId, signUpMode, year) {
|
||||
await this.getLineConfig(id)
|
||||
const resp = await this.$axios.post(loc() + '/selectLineInfo', {
|
||||
lineId: id,
|
||||
unionId: usUnionId,
|
||||
mode: GetQueryString('mode'),
|
||||
year: year
|
||||
})
|
||||
if (resp.code === 0 && resp.data) {
|
||||
this.formData = {
|
||||
times: []
|
||||
}
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.$set(this.formData, 'times', resp.data)
|
||||
} else {
|
||||
this.formData.times.push({
|
||||
enable: true,
|
||||
minimumGroupSize: this.lineConfig.groupNumber,
|
||||
estimatedCost: this.lineConfig.cost
|
||||
})
|
||||
}
|
||||
this.formData.lineId = id
|
||||
this.formData.signUpMode = signUpMode
|
||||
this.$set(this.formData, 'lineName', lineName)
|
||||
this.setLineTimeDialog = true
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
async onSelect() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
const confirm = await this.$confirm('请再次确认,是否选择此线路为疗休养线路?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
const fmtData = this.formData.times.map(v => {
|
||||
return {
|
||||
...v,
|
||||
lineId: this.formData.lineId,
|
||||
signUpMode: this.formData.signUpMode,
|
||||
mode: GetQueryString('mode')
|
||||
}
|
||||
})
|
||||
const resp = await this.$axios.post(loc() + '/selectLineTimes', {lineSelects: JSON.stringify(fmtData)})
|
||||
if (resp.code === 0) {
|
||||
this.setLineTimeDialog = false
|
||||
this.$emit('refresh')
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.panel-heading {
|
||||
border-color: #eeeff8;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
.panel-title {
|
||||
font-weight: bold;
|
||||
color: #777;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
`
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
const timeInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="timeLotsDialogVisible" title="查看出行时间段信息" width="80%">
|
||||
<div v-for="(row,$index) in timeLots" :key="row.id" class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading"
|
||||
style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none;display: flex;align-items: center;justify-content: space-between">
|
||||
<h3 class="panel-title">
|
||||
时间段{{$index+1}}
|
||||
</h3>
|
||||
</div>
|
||||
<el-row class="playPeriod">
|
||||
<el-descriptions border :column="3" class="playPeriodTable">
|
||||
<el-descriptions-item label="报名开始时间">
|
||||
{{row.signUpStartTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名结束时间">
|
||||
{{row.signUpEndTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="变更截至时间">
|
||||
{{row.changeEndTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出行开始时间">
|
||||
{{row.playStartTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出行结束时间">
|
||||
{{row.playEndTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
{{row.contact}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
{{row.contactPhone}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最少参与教工">
|
||||
{{row.minimumGroupSize}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交通工具">
|
||||
{{row.trafficTools}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="预计费用(元/人次)">
|
||||
{{row.estimatedCost}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="成团人数包括家属">
|
||||
{{row.estimatedFamilyNumbers}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否开启">
|
||||
<el-switch
|
||||
disabled
|
||||
v-model="row.enable"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="组织形式">
|
||||
{{ signModeList.find(v => v.value === row.signUpMode)?.label || '' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
signModeList: {
|
||||
type: Array,
|
||||
required: false
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timeLotsDialogVisible: false,
|
||||
timeLots: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(id, usUnionId, year) {
|
||||
const resp = await this.$axios.post(loc() + '/selectLineInfo', {
|
||||
lineId: id,
|
||||
unionId: usUnionId,
|
||||
mode: GetQueryString('mode'),
|
||||
year: year
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.timeLots = resp.data
|
||||
this.timeLotsDialogVisible = true
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.panel-heading {
|
||||
border-color: #eeeff8;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
.panel-title {
|
||||
font-weight: bold;
|
||||
color: #777;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.el-dialog__body {
|
||||
padding-top: 0;
|
||||
}
|
||||
`
|
||||
}
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
const editForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog title="编辑" :visible.sync="visible" top="50px">
|
||||
<el-form :model="formData" label-width="120px" :formRules="formRules" ref="formRef"
|
||||
style="margin-right: 40px">
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="loginName" label="工号">
|
||||
<el-input v-model="formData.loginName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="姓名">
|
||||
<el-input v-model="formData.userName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="手机号">
|
||||
<el-input v-model="formData.mobile" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="userName" label="身份证号">
|
||||
<el-input v-model="formData.idCard" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="unionName" label="工会">
|
||||
<el-input v-model="formData.unionName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item prop="unitName" label="单位">
|
||||
<el-input v-model="formData.unitName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="prop" :label="labelName">
|
||||
<template v-if="config.familyInfo == 2">
|
||||
<el-collapse v-model="activeNames">
|
||||
<el-collapse-item title="点击可展开详细信息" name="1">
|
||||
<el-card shadow="never">
|
||||
<el-table :data="formData.companionList">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard"></el-table-column>
|
||||
<el-table-column label="年龄" prop="age"></el-table-column>
|
||||
<el-table-column label="床型" prop="bedType">
|
||||
<template v-slot="{row}">
|
||||
{{ row.bedInfo.bedType }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="床位" prop="bedNum">
|
||||
<template v-slot="{row}">
|
||||
{{ row.bedInfo.bedNum }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="意向拼床人" prop="otherSleepUser">
|
||||
<template v-slot="{row}">
|
||||
{{ row.bedInfo.otherSleepUser ?
|
||||
row.bedInfo.otherSleepUser : '暂无' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关系" prop="relation"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input v-model="formData.bedType" readonly></el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item prop="travelLine" :label="lineLabelName">
|
||||
<el-select v-model="formData.takePartInLineId" filterable clearable
|
||||
placeholder="请选择线路"
|
||||
@change="validateLine"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in unionSelectLines"
|
||||
:key="item.id"
|
||||
:label="item.lineName + '-' + item.regionalNature + '【' + item.lotName + '】' + '(' + item.playStartTime + '至' + item.playEndTime + ')' + '(' + item.signUpMode + ')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="specificTime" label="出行时间" v-if="pageForm.state==='3'">-->
|
||||
<!-- <el-select v-model="formData.specificTime" filterable clearable-->
|
||||
<!-- placeholder="请选择出行时间"-->
|
||||
<!-- style="width: 100%">-->
|
||||
<!-- <el-option v-for="item in editSpecificTimes"-->
|
||||
<!-- :key="item"-->
|
||||
<!-- :label="item"-->
|
||||
<!-- :value="item">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="onSubmit">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
year: null,
|
||||
config: {},
|
||||
formData: {},
|
||||
formRules: {},
|
||||
labelName: null,
|
||||
lineLabelName: '线路',
|
||||
unionSelectLines: [],
|
||||
activeNames: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(id, year) {
|
||||
this.year = year
|
||||
this.visible = true
|
||||
await this.getUnionSelectLine()
|
||||
await this.getModifyConfig()
|
||||
const {code, msg, data} = await this.$axios.get("/platform/recuperation/schoolUnionUserQuery/findOne", {id})
|
||||
if (code === 0) {
|
||||
this.formData = data
|
||||
if (this.config.familyInfo === 2) {
|
||||
this.labelName = "家属信息"
|
||||
} else {
|
||||
this.editFormData.bedType = data.familyNumber
|
||||
this.labelName = "家属数量"
|
||||
}
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const {code, data, msg} = await this.$axios.post('/platform/recuperation/config/fetchOne')
|
||||
if (code === 0) {
|
||||
this.config = data
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
},
|
||||
async getUnionSelectLine() {
|
||||
const resp = await this.$axios.post('/platform/recuperation/user/query/getUnionSelectLine', {
|
||||
year: this.year,
|
||||
signUpMode: 1,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.unionSelectLines = resp.data
|
||||
}
|
||||
},
|
||||
async validateLine() {
|
||||
const resp = await this.$axios.post('/platform/recuperation/line/enroll/validSignUpInfo'
|
||||
, {enroll: JSON.stringify(this.editFormData)})
|
||||
if (resp.code !== 0) {
|
||||
this.$message.warning(resp.msg)
|
||||
this.formData.takePartInLineId = ''
|
||||
}
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要修改报名信息吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
if (!this.formData.takePartInLineId && !this.formData.takePartInBaseManagementId) {
|
||||
this.$message.warning('请选择线路')
|
||||
return
|
||||
}
|
||||
const {code,msg} = await this.$axios.post('/platform/recuperation/user/query/doEdit', this.formData)
|
||||
if (code === 0) {
|
||||
this.$message.success(msg)
|
||||
this.visible = false
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
}).catch()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
+375
@@ -0,0 +1,375 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.filter-container {
|
||||
margin-bottom: 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.filter-container .el-form {
|
||||
padding: 10px 15px;
|
||||
}
|
||||
.form-row {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
margin-bottom: 22px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.form-row .el-form-item {
|
||||
flex: 1;
|
||||
min-width: 240px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.flex-grow-1 {
|
||||
flex: 1;
|
||||
}
|
||||
.route-line {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
.route-line-title {
|
||||
width: 90px;
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.route-line-content {
|
||||
flex: 1;
|
||||
}
|
||||
.route-radio-group {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 15px;
|
||||
}
|
||||
.route-radio-group .el-radio {
|
||||
margin-right: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.button-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 15px;
|
||||
border-top: 1px dashed #ebeef5;
|
||||
}
|
||||
.button-container .el-button {
|
||||
padding-left: 25px;
|
||||
padding-right: 25px;
|
||||
margin: 0 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never" class="filter-container">
|
||||
<el-form :model="pageForm" ref="pageFormRef" label-width="90px" size="medium">
|
||||
<div class="form-row">
|
||||
<el-form-item label="年度">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
placeholder="选择年度"
|
||||
value-format="yyyy"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="pageForm.userName" placeholder="请输入姓名" clearable
|
||||
prefix-icon="el-icon-user"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工号">
|
||||
<el-input v-model="pageForm.loginName" placeholder="请输入工号" clearable
|
||||
prefix-icon="el-icon-postcard"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<el-form-item label="分工会">
|
||||
<el-select v-model="pageForm.unionId"
|
||||
@change="doSearch"
|
||||
placeholder="请选择所属工会"
|
||||
filterable
|
||||
clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionOptions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="route-line">
|
||||
<div class="route-line-title">区域</div>
|
||||
<div class="route-line-content">
|
||||
<el-radio-group @change="doSearch"
|
||||
size="small"
|
||||
v-model="pageForm.regionalNature">
|
||||
<el-radio label="" border>全部</el-radio>
|
||||
<el-radio label="省内" border>省内</el-radio>
|
||||
<el-radio label="省外" border>省外</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<el-form-item label="线路选择">
|
||||
<el-select v-model="pageForm.takePartInLineId" placeholder="请选择线路" clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in takePartInLines"
|
||||
:key="item.takePartInLineId"
|
||||
:label="item.lineName+'('+item.unionName+')'"
|
||||
:value="item.takePartInLineId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="标段">
|
||||
<el-select v-model="pageForm.lotId" placeholder="请选择标段" clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in config.lots"
|
||||
:key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="flex-grow-1"></el-form-item>
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<el-button type="primary" icon="el-icon-search" round @click="doSearch">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" round @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="人员列表" ref="table_tool">
|
||||
<el-button icon="el-icon-s-promotion" size="small" type="primary" @click="noSignExport">
|
||||
导出未报名人员
|
||||
</el-button>
|
||||
<el-button icon="el-icon-s-promotion" size="small" type="primary" @click="doExport">
|
||||
导出
|
||||
</el-button>
|
||||
<el-button icon="el-icon-s-promotion" size="small" type="primary"
|
||||
@click="openSetUpPart"
|
||||
>设置参加人员
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" row-key="id" style="width: 100%" ref="tableRef">
|
||||
<el-table-column reserve-selection type="selection" width="55"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index" label="序号" :index="indexMethod"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template v-slot="{row}" v-if="column.prop=='isFamily'">
|
||||
<el-link v-if="!row.familyNumber" type="primary" @click="openUser(row)">
|
||||
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
|
||||
</el-link>
|
||||
<el-link v-else type="primary">
|
||||
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
|
||||
</el-link>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop=='times'">
|
||||
<div v-if="row.playStartTime">{{row.playStartTime}}</div>
|
||||
<div v-else>{{row.playStartTime1}}</div>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop=='isTakePartIn'">
|
||||
{{row.isTakePartIn?'已参加':'未参加'}}
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop=='stateId'">
|
||||
<span v-if="row.stateId">
|
||||
|
||||
</span>
|
||||
<sapn v-else style="color: #67C23A">暂无</sapn>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop=='lineOrMaName'">
|
||||
{{row.lineName?row.lineName:row.baseName?row.baseName:row.travelAgencyName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="pageForm.state=='1'||pageForm.state=='3'" align="center"
|
||||
prop="lotName"
|
||||
show-overflow-tooltip
|
||||
header-align="center"
|
||||
label="标段"
|
||||
sortable>
|
||||
<template v-slot="{row}">
|
||||
{{row.lotName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px">
|
||||
<template v-slot="{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="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="查看报名信息" :visible.sync="viewVisible" top="50px">
|
||||
<enroll-info ref="viewEnrollInfoRef"></enroll-info>
|
||||
</el-dialog>
|
||||
|
||||
<set-up-part ref="setUpRef"></set-up-part>
|
||||
|
||||
<edit-form ref="editRef" @refresh="doSearch"></edit-form>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('setUpPart.js'){}#-->
|
||||
<!--#include('editForm.js'){}#-->
|
||||
<!--#include('../line/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'line-info': info,
|
||||
'set-up-part': setUpPart,
|
||||
'edit-form': editForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
loginName: '',
|
||||
userName: '',
|
||||
takePartInLineId: '',
|
||||
unionId: '',
|
||||
signUpMode: 1,
|
||||
lotId: '',
|
||||
regionalNature: ''
|
||||
},
|
||||
takePartInLines: [],
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'lineOrMaName', label: '线路'},
|
||||
{prop: 'times', label: '出行时间'},
|
||||
{prop: 'isFamily', label: '是否携带家属'},
|
||||
{prop: 'isTakePartIn', label: '是否参加'}
|
||||
],
|
||||
viewVisible: false,
|
||||
unionOptions: [],
|
||||
config: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resetQuery() {
|
||||
this.pageForm = {
|
||||
year: new Date().getFullYear().toString(),
|
||||
loginName: '',
|
||||
userName: '',
|
||||
takePartInLineId: '',
|
||||
unionId: '',
|
||||
signUpMode: 1,
|
||||
lotId: '',
|
||||
regionalNature: '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
openView(row) {
|
||||
this.viewVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.viewEnrollInfoRef.openView(row.id)
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$refs.editRef.onOpen(row.id)
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的信息吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
dangerouslyUseHTMLString: true,
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {code, msg} = await this.$axios.post('/platform/recuperation/schoolUnionUserQuery/deleteMyEnrollInfoById', {
|
||||
id: row.id
|
||||
})
|
||||
if (code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(msg)
|
||||
} else {
|
||||
this.$message.warning(msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
noSignExport() {
|
||||
window.open('/platform/recuperation/schoolUnionUserQuery/noSignExport')
|
||||
},
|
||||
doExport() {
|
||||
const {year, userName, loginName, unionId, signUpMode, regionalNature, takePartInLineId, lotId} = this.pageForm
|
||||
window.open('/platform/recuperation/schoolUnionUserQuery/exportXlsx?year=' +
|
||||
year
|
||||
+ '&userName=' + userName
|
||||
+ '&loginName=' + loginName
|
||||
+ '&unionId=' + unionId
|
||||
+ '&signUpMode=' + signUpMode
|
||||
+ '®ionalNature=' + regionalNature
|
||||
+ '&takePartInLineId=' + takePartInLineId
|
||||
+ '&lotId=' + lotId)
|
||||
},
|
||||
openSetUpPart() {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
console.log(selection)
|
||||
if (selection.length === 0) {
|
||||
this.$message.error('请选择要设置的人员')
|
||||
return
|
||||
}
|
||||
this.$refs.setUpRef.onOpen(selection)
|
||||
},
|
||||
getConfig() {
|
||||
this.$axios.post('/platform/recuperation/config/fetchOne').then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.config = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getLines() {
|
||||
this.$axios.post('/platform/recuperation/schoolUnionUserQuery/listLine', {
|
||||
year: this.pageForm.year,
|
||||
unionId: this.pageForm.unionId,
|
||||
signUpMode: this.pageForm.signUpMode,
|
||||
regionalNature: this.pageForm.regionalNature
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.takePartInLines = res.data
|
||||
} else {
|
||||
this.$message.warning(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch(){
|
||||
this.getLines()
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.doSearch()
|
||||
this.getConfig()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
const setUpPart = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog :visible.sync="visible" title="设置参加人员" top="50px">
|
||||
<el-row class="text-primary p20">
|
||||
选择标段/参加时间(设置前请先勾选需要设置的用户)
|
||||
</el-row>
|
||||
|
||||
<el-row type="flex" style="column-gap: 10px">
|
||||
<el-select v-model="lotId" filterable clearable
|
||||
placeholder="请选择标段"
|
||||
style="width: 100%"
|
||||
@change="lotChange">
|
||||
<el-option v-for="item in config.lots"
|
||||
:key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="takePartInTime"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
@change="takePartInTimeChange"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择参加时间">
|
||||
</el-date-picker>
|
||||
</el-row>
|
||||
|
||||
<el-row class="mt10">
|
||||
<el-table :data="tableData" border ref="tableRef" row-key="id">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column type="index" label="序号" width="80"></el-table-column>
|
||||
<el-table-column prop="loginName" label="一卡通号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="unitName" label="单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="工会"></el-table-column>
|
||||
<el-table-column prop="signingUptime" label="报名时间"></el-table-column>
|
||||
<el-table-column prop="takePartInTime" label="参加时间"></el-table-column>
|
||||
<el-table-column prop="lotName" label="标段"></el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
config: {},
|
||||
tableData: [],
|
||||
lotId: null,
|
||||
takePartInTime: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(selection) {
|
||||
this.visible = true
|
||||
this.tableData = JSON.parse(JSON.stringify(selection))
|
||||
this.getModifyConfig()
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await this.$axios.post('/platform/recuperation/config/fetchOne')
|
||||
if (res.code === 0) {
|
||||
this.config = res.data
|
||||
}
|
||||
},
|
||||
// 标段改变
|
||||
lotChange(val) {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length === 0) {
|
||||
this.$message.error('请选择要设置的人员')
|
||||
this.lotId = null
|
||||
return
|
||||
}
|
||||
if (!val) {
|
||||
this.$refs.tableRef.clearSelection()
|
||||
return
|
||||
}
|
||||
const lot = this.config.lots.find(v => v.id === val)
|
||||
this.tableData.map((v, index) => {
|
||||
this.$set(this.tableData[index], "lotId", val)
|
||||
this.$set(this.tableData[index], "lotName", lot.lotName)
|
||||
})
|
||||
},
|
||||
// 参加时间改变
|
||||
takePartInTimeChange(val) {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length === 0) {
|
||||
this.$message.error('请选择要设置的人员')
|
||||
this.takePartInTime = null
|
||||
return
|
||||
}
|
||||
if (!val) {
|
||||
this.$refs.tableRef.clearSelection()
|
||||
return
|
||||
}
|
||||
this.tableData.map((v, index) => {
|
||||
this.$set(this.tableData[index], "takePartInTime", val)
|
||||
})
|
||||
},
|
||||
// 确定提交
|
||||
onSubmit() {
|
||||
// 检查哪几条数据填写不完整
|
||||
this.tableData.forEach((v, index) => {
|
||||
if (!v.lotId || !v.takePartInTime) {
|
||||
this.$message.error('第' + (index + 1) + '行数据填写不完整')
|
||||
return
|
||||
}
|
||||
})
|
||||
const data = this.tableData.map((v, index) => {
|
||||
return{
|
||||
lotId: v.lotId,
|
||||
takePartInTime: v.takePartInTime,
|
||||
id: v.id
|
||||
}
|
||||
})
|
||||
this.$confirm('确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async res => {
|
||||
const {
|
||||
code,
|
||||
msg
|
||||
} = await this.$axios.post("/platform/recuperation/schoolUnionUserQuery/setUpParticipants", {data: JSON.stringify(data)})
|
||||
if (code === 0) {
|
||||
this.$message.success(msg)
|
||||
this.$refs.tableRef.clearSelection()
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.error(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
@change="yearChange"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="线路:">
|
||||
<el-select @change="doSearch" filterable
|
||||
placeholder="请选择线路"
|
||||
style="width: 100%;" clearable
|
||||
v-model="pageForm.lineId">
|
||||
<el-option :label="item.lineName + '(' + item.unionName + ')'" :value="item.id"
|
||||
:key="value.id"
|
||||
v-for="item in lineList"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="关键字:">
|
||||
<el-input placeholder="请输入姓名或工号查询" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch"></el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会:">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable @change="doSearch">
|
||||
<el-option v-for="item in unionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位:">
|
||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位" filterable clearable @change="doSearch">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="评分:">
|
||||
<el-select clearable filterable placeholder="请选择评分"
|
||||
style="width: 100%" @change="doSearch"
|
||||
v-model="pageForm.evaluateScore">
|
||||
<el-option
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
v-for="item in evaluateScores">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="评价名单">
|
||||
<el-button type="primary" size="small" @click="exportEvaluate">
|
||||
<i class="el-icon-download"></i>
|
||||
导出名单
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="evaluateDialogVisible"
|
||||
title="评分内容"
|
||||
width="30%">
|
||||
<el-form :model="formData" label-width="60px" ref="form">
|
||||
<el-form-item :rules="[{ required: true, message: ''}]" label="评分">
|
||||
<span>{{viewData.evaluateScore}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="评价">
|
||||
<span>{{viewData.evaluateText}}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="evaluateDialogVisible = false" type="primary">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
lineList: [],
|
||||
evaluateDialogVisible: false,
|
||||
tableColumns: [
|
||||
{prop: 'lineName', label: '线路'},
|
||||
{prop: 'playStartTime', label: '出行时间'},
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '所属单位'},
|
||||
{prop: 'unionName', label: '所属工会'},
|
||||
{prop: 'evaluateScore', label: '评分', sortable: true},
|
||||
{prop: 'evaluateText', label: '评价'},
|
||||
],
|
||||
viewData: {},
|
||||
evaluateScores: [
|
||||
{name: "满意", code: "满意"},
|
||||
{name: "一般", code: "一般"},
|
||||
{name: "不满意", code: "不满意"},
|
||||
],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
exportEvaluate() {
|
||||
this.$downLoad(loc() + '/exportEvaluate', this.pageForm)
|
||||
},
|
||||
onView(row) {
|
||||
this.viewData = {
|
||||
lineId: row.id,
|
||||
evaluateText: row.evaluateText,
|
||||
evaluateScore: row.evaluateScore,
|
||||
}
|
||||
this.evaluateDialogVisible = true
|
||||
},
|
||||
async getLineList() {
|
||||
const resp = await this.$axios.post(loc() + '/lineList', {year: this.pageForm.year})
|
||||
this.lineList = resp.data
|
||||
},
|
||||
async yearChange() {
|
||||
this.$set(this.pageForm, "lineId", null)
|
||||
await this.getLineList()
|
||||
this.doSearch()
|
||||
},
|
||||
pageData() {
|
||||
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.unitList = await this.$businessTool.listUnit()
|
||||
await this.getLineList()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user