first commit
This commit is contained in:
+221
@@ -0,0 +1,221 @@
|
||||
const basicForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-card shadow="never">
|
||||
<el-form :model="formData" ref="formRef" label-width="130px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="activityName" label="活动名称"
|
||||
:rules="[{required:true,message:'请输入活动名称',trigger:['change','blur']}]">
|
||||
<el-input v-model="formData.activityName" placeholder="请输入活动名称"
|
||||
maxlength="30"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="signUpTime" label="报名时间"
|
||||
:rules="[{required:true,message:'请选择报名时间',trigger:['change','blur']}]">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.signUpTime"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="linIds" label="活动线路"
|
||||
:rules="[{required:true,message:'请选择活动线路',trigger:['change','blur']}]">
|
||||
<el-select clearable filterable multiple style="width: 100%"
|
||||
v-model="formData.linIds"
|
||||
placeholder="请选择活动线路">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lineName"
|
||||
:value="item.id"
|
||||
v-for="item in lineList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="unionId" label="查找工会">
|
||||
<el-select clearable filterable multiple style="width: 100%"
|
||||
v-model="formData.unionId"
|
||||
placeholder="请选择工会"
|
||||
@change="onUnionChange">
|
||||
<el-option :value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
v-for="item in unionOptions"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="unionQuotaAllocationList" label="工会名额分配">
|
||||
<el-table :data="filteredUnionQuotaAllocationList" size="medium" height="70vh">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column label="工会名称" prop="unionName"></el-table-column>
|
||||
<el-table-column label="会员人数" prop="memberNum"></el-table-column>
|
||||
<el-table-column label="名额" prop="allocationNum">
|
||||
<template slot="header">
|
||||
<el-button size="mini" @click="clearUnionQuotaAllocation" type="primary">
|
||||
清空分配名额
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-slot="{row}">
|
||||
<el-input-number v-model="row.allocationNum" placeholder="请填写名额数"
|
||||
:min="0"
|
||||
style="width: 100%"
|
||||
:max="row.memberNum"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="activityContent" label="活动内容"
|
||||
:rules="[{required:true,message:'活动内容',trigger:['change','blur']}]">
|
||||
<text-editor v-model="formData.activityContent" key="activityContent"
|
||||
placeholder="活动内容"></text-editor>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件上传" prop="files">
|
||||
<file-upload
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_mode="file"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" @click="onSubmit">提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
`,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
lineList: [],
|
||||
unionOptions: [],
|
||||
allUnionQuotaAllocationList: [], // 保存所有工会名额分配数据
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 计算属性:根据选择的工会过滤显示的名额分配列表
|
||||
filteredUnionQuotaAllocationList() {
|
||||
// 如果没有选择任何工会,显示所有工会
|
||||
if (!this.formData.unionId || this.formData.unionId.length === 0) {
|
||||
return this.allUnionQuotaAllocationList;
|
||||
}
|
||||
|
||||
// 如果选择了工会,只显示选中的工会
|
||||
return this.allUnionQuotaAllocationList.filter(item =>
|
||||
this.formData.unionId.includes(item.unionId)
|
||||
);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getLineList() {
|
||||
this.$axios.post("/platform/excellentRecuperation/activityList/listLineListByThisYear").then(res => {
|
||||
if (res.code === 0) {
|
||||
this.lineList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
listUnion() {
|
||||
this.$axios.post("/platform/excellentRecuperation/activityList/listUnion").then(res => {
|
||||
if (res.code === 0) {
|
||||
this.allUnionQuotaAllocationList = res.data; // 保存所有数据
|
||||
// 如果formData.unionQuotaAllocationList存在,则更新对应数据
|
||||
if (this.formData.unionQuotaAllocationList) {
|
||||
this.updateUnionQuotaAllocationList();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 更新名额分配列表数据
|
||||
updateUnionQuotaAllocationList() {
|
||||
this.allUnionQuotaAllocationList.forEach(item => {
|
||||
const existingItem = this.formData.unionQuotaAllocationList.find(
|
||||
formDataItem => formDataItem.unionId === item.unionId
|
||||
);
|
||||
if (existingItem) {
|
||||
item.allocationNum = existingItem.allocationNum || 0;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 工会选择变化时的处理
|
||||
onUnionChange(selectedUnions) {
|
||||
// 数据会自动根据计算属性更新显示
|
||||
console.log("Selected unions:", selectedUnions);
|
||||
},
|
||||
clearUnionQuotaAllocation() {
|
||||
this.$confirm("您确定要清空分配名额吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
// 清空所有名额分配
|
||||
this.allUnionQuotaAllocationList.forEach(item => {
|
||||
this.$set(item, 'allocationNum', 0);
|
||||
});
|
||||
})
|
||||
},
|
||||
onOpen(id) {
|
||||
this.formData = {}
|
||||
this.$refs.formRef.clearValidate()
|
||||
this.getLineList()
|
||||
this.listUnion(); // 始终加载所有工会数据
|
||||
if (id) {
|
||||
this.$axios.post("/platform/excellentRecuperation/activityList/findOne", {id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
this.$set(this.formData, "signUpTime", [res.data.signUpStartTime, res.data.signUpEndTIme])
|
||||
// 更新名额分配数据
|
||||
if (this.allUnionQuotaAllocationList.length > 0) {
|
||||
this.updateUnionQuotaAllocationList();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const formData = clone(this.formData)
|
||||
formData.signUpStartTime = formData.signUpTime[0]
|
||||
formData.signUpEndTIme = formData.signUpTime[1]
|
||||
// 传递过滤后的名额分配列表
|
||||
formData.unionQuotaAllocationList = this.filteredUnionQuotaAllocationList;
|
||||
const resp = await this.$axios.post("/platform/excellentRecuperation/activityList/onSubmit", {
|
||||
data: JSON.stringify(formData)
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.$emit('refresh')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
}
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
format="yyyy"
|
||||
style="width: 100%"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
>
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="活动列表">
|
||||
<el-button type="primary" size="small" @click="onAdd">
|
||||
<i class="ti-plus"></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="活动名称" prop="activityName"></el-table-column>
|
||||
<el-table-column label="报名开始时间" prop="signUpStartTime"></el-table-column>
|
||||
<el-table-column label="报名结束时间" prop="signUpEndTIme"></el-table-column>
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="onEdit(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>
|
||||
|
||||
<template #edit>
|
||||
<basic-form ref="basicFormRef" @refresh="refresh"></basic-form>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('basicForm.js'){}#-->
|
||||
<!--#include('info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm:{
|
||||
year: moment().format('YYYY'),
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"basic-form": basicForm,
|
||||
"info": info,
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/excellentRecuperation/activityList/onDelete", {id: row.id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
onAdd() {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen()
|
||||
})
|
||||
},
|
||||
refresh() {
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="活动名称">{{ viewData.activityName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="报名时间">{{ viewData.signUpStartTime }}至{{viewData.signUpEndTIme}}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动线路" :span="2">{{viewData.linNames}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会名额分配" :span="2">
|
||||
<el-table :data="viewData.unionQuotaAllocationList" size="medium" height="70vh">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column label="工会名称" prop="unionName"></el-table-column>
|
||||
<el-table-column label="会员人数" prop="memberNum"></el-table-column>
|
||||
<el-table-column label="名额" prop="allocationNum"></el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动内容" :span="2">
|
||||
<div v-html="viewData.activityContent"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件上传" :span="2">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(id) {
|
||||
await this.findOne(id)
|
||||
},
|
||||
async findOne(id) {
|
||||
this.$axios.post("/platform/excellentRecuperation/activityList/findOne", {id}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
<!--#
|
||||
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
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
format="yyyy"
|
||||
style="width: 100%"
|
||||
:clearable="false"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
>
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动:">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.activityId"
|
||||
placeholder="请选择活动">
|
||||
<el-option :key="item.id"
|
||||
:label="item.activityName"
|
||||
:value="item.id"
|
||||
v-for="item in activityList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="报名列表">
|
||||
|
||||
</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="活动名称" prop="activityName"></el-table-column>
|
||||
<el-table-column label="报名开始时间" prop="signUpStartTime"></el-table-column>
|
||||
<el-table-column label="报名结束时间" prop="signUpEndTIme"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="分配名额数" prop="allocationNum"></el-table-column>
|
||||
<!-- <el-table-column label="报名数(已审核通过数)">
|
||||
<template v-slot="{ row }">
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="onSignUp(row)" size="mini" type="primary"
|
||||
v-if="$moment(row.signUpStartTime).valueOf() < $moment().valueOf()
|
||||
&&
|
||||
$moment(row.signUpEndTIme).valueOf() > $moment().valueOf()">报名</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<sign-up-form ref="signUpFormRef"></sign-up-form>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('info.js'){}#-->
|
||||
<!--#include('signUpForm.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"info": info,
|
||||
"sign-up-form": SIGN_UP_FORM,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
activityList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSignUp(row){
|
||||
this.$refs.guava.edit(() => {
|
||||
const activity= this.activityList.find(item => item.id === row.activityId)
|
||||
this.$refs.signUpFormRef.onOpen(row.activityId, row.unionId,activity)
|
||||
})
|
||||
},
|
||||
onView(row){
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row.activityId, row.unionId)
|
||||
})
|
||||
},
|
||||
getActivityList() {
|
||||
this.$axios.post("/platform/excellentRecuperation/activitySignUp/listActivityByYear", {year: this.pageForm.year}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.activityList = res.data
|
||||
if (this.activityList.length > 0) {
|
||||
this.$set(this.pageForm, 'activityId', this.activityList[0].id)
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.getActivityList()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="活动基础信息" name="one">
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="活动名称">{{ viewData.activityName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="报名时间">{{ viewData.signUpStartTime
|
||||
}}至{{viewData.signUpEndTIme}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动线路" :span="2">{{viewData.linNames}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会名额分配" :span="2">
|
||||
<el-table :data="viewData.unionQuotaAllocationList" size="medium" height="70vh">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column label="工会名称" prop="unionName"></el-table-column>
|
||||
<el-table-column label="会员人数" prop="memberNum"></el-table-column>
|
||||
<el-table-column label="名额" prop="allocationNum"></el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动内容" :span="2">
|
||||
<div v-html="viewData.activityContent"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件上传" :span="2">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="报名信息" name="two">
|
||||
<el-table :data="userTableData" :size="tableSize" height="70vh">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="联系方式" prop="mobile"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="报名线路" prop="lineName"></el-table-column>
|
||||
<el-table-column prop="signUpTime" label="填报时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template v-slot="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">
|
||||
查看
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:append-to-body="true"
|
||||
:visible.sync="userDialogVisible"
|
||||
title="详细信息查看"
|
||||
width="40%"
|
||||
>
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="姓名">{{ userViewData.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{ userViewData.loginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">{{ userViewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会">{{ userViewData.unionName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="附件">
|
||||
<file-preview :files="userViewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="userDialogVisible = false" type="primary">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
`,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
activeName: "one",
|
||||
userTableData: [],
|
||||
activityId: "",
|
||||
unionId: "",
|
||||
userDialogVisible:false,
|
||||
userViewData:{}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
|
||||
this.userViewData = row
|
||||
this.userViewData.files = JSON.parse(row.files)
|
||||
this.userDialogVisible = true
|
||||
},
|
||||
async onOpen(id, unionId) {
|
||||
this.activityId = id
|
||||
this.unionId = unionId
|
||||
await this.findOne(id)
|
||||
this.listQuotaAllocation()
|
||||
},
|
||||
async findOne(id) {
|
||||
this.$axios.post("/platform/excellentRecuperation/activityList/findOne", {id}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
listQuotaAllocation() {
|
||||
this.$axios.post("/platform/excellentRecuperation/activitySignUp/listQuotaAllocation", {
|
||||
activityId: this.activityId,
|
||||
unionId: this.unionId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.userTableData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
+335
@@ -0,0 +1,335 @@
|
||||
const SIGN_UP_FORM = {
|
||||
template: /*language=HTML*/ `
|
||||
|
||||
<div>
|
||||
<div class="process-title">报名信息</div>
|
||||
<el-card shadow="never">
|
||||
<el-form :model="formData" ref="formRef" label-width="130px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="lineId" label="活动线路"
|
||||
:rules="[{required:true,message:'请选择活动线路',trigger:['change','blur']}]">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="formData.lineId"
|
||||
placeholder="请选择活动线路">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lineName"
|
||||
:value="item.id"
|
||||
v-for="item in lineList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="userId" label="报名人员"
|
||||
:rules="[{required:true,message:'请选择报名人员',trigger:['change','blur']}]">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="formData.userId"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入姓名或工号查询"
|
||||
@change="userChange"
|
||||
:remote-method="createRemoteMethod(userOptions)">
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="mobile" label="联系方式"
|
||||
:rules="[{required:true,message:'请输入联系方式',trigger:['change','blur']}]">
|
||||
<el-input maxlength="50" v-model="formData.mobile"
|
||||
placeholder="请输入联系方式"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="idCard" label="身份证号"
|
||||
:rules="[{required:true,message:'请输入身份证号',trigger:['change','blur']}]">
|
||||
<el-input maxlength="50" v-model="formData.idCard"
|
||||
placeholder="请输入身份证号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件上传" prop="files"
|
||||
:rules="[{required:true,message:'请上传附件',trigger:['change','blur']}]">
|
||||
<file-upload
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_mode="file"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<div class="process-title">报名人员信息<span style="color:#ee0a24;">(如需修改或提交报名人员信息请点击编辑后提交)</span></div>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize" height="70vh">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="联系方式" prop="mobile"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="报名线路" prop="lineName"></el-table-column>
|
||||
<el-table-column prop="signUpTime" label="填报时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template v-slot="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
<el-button @click="doDelete(row.id)" size="mini" type="danger"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:append-to-body="true"
|
||||
:visible.sync="userDialogVisible"
|
||||
title="详细信息查看"
|
||||
width="40%"
|
||||
>
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="姓名">{{ userViewData.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{ userViewData.loginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">{{ userViewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会">{{ userViewData.unionName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="附件">
|
||||
<file-preview :files="userViewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="userDialogVisible = false" type="primary">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
bizId: "",
|
||||
taskId: "",
|
||||
activityId: "",
|
||||
unionId: "",
|
||||
lineList: [],
|
||||
userOptions: [],
|
||||
userViewData: {},
|
||||
activityData: {},
|
||||
userDialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
userChange(val) {
|
||||
const user = this.userOptions.find(o => o.id === val)
|
||||
if (user) {
|
||||
const {userName, loginName, unitId, unitName, unionId, unionName, mobile, idCard} = user
|
||||
this.$set(this.formData, "userName", userName)
|
||||
this.$set(this.formData, "loginName", loginName)
|
||||
this.$set(this.formData, "unitId", unitId)
|
||||
this.$set(this.formData, "unitName", unitName)
|
||||
this.$set(this.formData, "unionId", unionId)
|
||||
this.$set(this.formData, "unionName", unionName)
|
||||
this.$set(this.formData, "mobile", mobile)
|
||||
this.$set(this.formData, "idCard", idCard)
|
||||
} else {
|
||||
this.formData = {
|
||||
lineId: this.lineList[0].id,
|
||||
activityId: this.activityId
|
||||
}
|
||||
}
|
||||
},
|
||||
async getSIgnUpUserList() {
|
||||
const res = await this.$axios.post('/platform/excellentRecuperation/activitySignUp/getSIgnUpUserList', {
|
||||
activityId: this.activityId,
|
||||
unionId: this.unionId
|
||||
})
|
||||
if (res.code === 0) {
|
||||
return res.data.length
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
onSave() {
|
||||
this.getSIgnUpUserList().then(data => {
|
||||
const union = this.activityData.unionQuotaAllocationList.find(v => v.unionId === this.unionId)
|
||||
if (data >= union.allocationNum) {
|
||||
this.$message.error("该活动已满")
|
||||
return
|
||||
} else {
|
||||
this.$axios.post('/platform/excellentRecuperation/activitySignUp/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.listQuotaAllocation()
|
||||
this.$message.success("保存成功")
|
||||
this.formData = {
|
||||
lineId: this.lineList[0].id,
|
||||
activityId: this.activityId
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.getSIgnUpUserList().then(data => {
|
||||
const union = this.activityData.unionQuotaAllocationList.find(v => v.unionId === this.unionId)
|
||||
if (data >= union.allocationNum) {
|
||||
this.$message.error("该活动已满")
|
||||
return
|
||||
} else {
|
||||
this.$axios.post('/platform/excellentRecuperation/activitySignUp/submit', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.listQuotaAllocation()
|
||||
this.$message.success("提交成功")
|
||||
this.formData = {
|
||||
lineId: this.lineList[0].id,
|
||||
activityId: this.activityId
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
listQuotaAllocation() {
|
||||
this.$axios.post("/platform/excellentRecuperation/activitySignUp/listQuotaAllocation", {
|
||||
activityId: this.activityId,
|
||||
unionId: this.unionId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
|
||||
this.userViewData = row
|
||||
this.userViewData.files = JSON.parse(row.files)
|
||||
this.userDialogVisible = true
|
||||
},
|
||||
openEdit(row) {
|
||||
const formData = clone(row)
|
||||
this.bizId = formData.id
|
||||
this.taskId = formData.startTaskId
|
||||
formData.files = JSON.parse(formData.files)
|
||||
this.formData = formData
|
||||
this.selectQueryUser(this.formData.loginName, this.userOptions)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.listQuotaAllocation()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/excellentRecuperation/activitySignUp/doDelete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.listQuotaAllocation()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
createRemoteMethod(options) {
|
||||
return (keyword) => {
|
||||
this.selectQueryUser(keyword, options)
|
||||
}
|
||||
},
|
||||
selectQueryUser(keyword, options) {
|
||||
options.length = 0
|
||||
this.$axios.post("/platform/excellentRecuperation/activitySignUp/listUser", {
|
||||
keyword: keyword,
|
||||
unionId: this.unionId
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
options.push(...res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
getLineList(id) {
|
||||
this.$axios.post("/platform/excellentRecuperation/activitySignUp/listLineByActivityId", {id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (res.data.length === 1) {
|
||||
this.$set(this.formData, "lineId", res.data[0].id)
|
||||
}
|
||||
this.$set(this.formData, "activityId", this.activityId)
|
||||
this.lineList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
onOpen(activityId, unionId, activity) {
|
||||
this.activityId = activityId
|
||||
this.unionId = unionId
|
||||
this.activityData = activity
|
||||
this.listQuotaAllocation()
|
||||
this.getLineList(activityId)
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
const EXCELLENT_RECUPERATION_USER_INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="姓名">{{ viewData.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{ viewData.loginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号">{{ viewData.idCard }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会">{{ viewData.unionName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="附件">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template v-for="(task,index) in doneTasks">
|
||||
<div class="task-panel mt10">
|
||||
<div class="task-panel-header">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode" :span="3">
|
||||
{{
|
||||
task.taskFormData.opinion
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<slot></slot>
|
||||
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null
|
||||
}
|
||||
},
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/excellentRecuperation/activitySignUp/findUserSignUp', {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
|
||||
}
|
||||
}
|
||||
}
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
const basicForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="160px" label-position="left">
|
||||
<el-row :gutter="20" class="">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="年度" prop="year">
|
||||
<el-date-picker style="width: 100%"
|
||||
@change="yearChange"
|
||||
type="year"
|
||||
placeholder="请选择年度"
|
||||
v-model="formData.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="排序号" prop="serialNumber">
|
||||
<el-input maxlength="50" v-model="formData.serialNumber"
|
||||
placeholder="请输入排序号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="线路名称" prop="lineName">
|
||||
<el-input maxlength="50" v-model="formData.lineName"
|
||||
placeholder="请输入线路名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="旅行社名称" prop="travelAgencyId">
|
||||
<el-select clearable filterable style="width: 100%" v-model="formData.travelAgencyId"
|
||||
placeholder="请选择旅行社">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName+'('+ item.year +'年)'"
|
||||
:value="item.id"
|
||||
v-for="item in localTravelList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人" prop="lineContact">
|
||||
<el-input clearable max="50" v-model="formData.lineContact"
|
||||
placeholder="请输入联系人"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :rules="[
|
||||
{ required: false, message: '手机号码不能为空', trigger: 'blur' },
|
||||
{ pattern: /^1[34578]\\d{9}$/, message: '手机号码格式不正确', trigger: 'blur' }
|
||||
]" label="联系方式" prop="lineContactPhone">
|
||||
<el-input clearable v-model="formData.lineContactPhone"
|
||||
placeholder="请输入联系方式"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="线路内容" prop="content">
|
||||
<text-editor v-model="formData.content"></text-editor>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="是否启用" prop="isDisabled">
|
||||
<el-switch
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="formData.isDisabled">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="移动端缩略图" prop="file">
|
||||
<file-upload :value.sync="formData.file" accept=".jpg,.jpeg,.png"
|
||||
:upload_number="1" upload_result_category="interval"
|
||||
complete_result upload_mode="drag"></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row class="mt10" justify="end" type="flex">
|
||||
<el-button @click="$emit('refresh')">取消</el-button>
|
||||
<el-button @click="onSubmit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
travelList: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
localTravelList: [...this.travelList],
|
||||
formData: {
|
||||
isDisabled: true
|
||||
},
|
||||
formRules: {
|
||||
serialNumber: [{required: true, message: '请输入排序号', trigger: ['change', 'blur']}],
|
||||
lineName: [{required: true, message: '请输入线路名称', trigger: ['change', 'blur']}],
|
||||
travelAgencyId: [{required: true, message: '请选择旅行社', trigger: ['change', 'blur']}],
|
||||
year: [{required: true, message: '请选择年度', trigger: ['change', 'blur']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async yearChange() {
|
||||
this.$set(this.formData, 'travelAgencyId', null)
|
||||
await this.selectTravelAgencyList()
|
||||
},
|
||||
async selectTravelAgencyList() {
|
||||
const resp = await this.$axios.post('/platform/excellentRecuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
|
||||
this.localTravelList = resp.data
|
||||
},
|
||||
|
||||
async onOpen(row) {
|
||||
if (row && row.id) {
|
||||
this.$axios.post(loc() + '/selectLineInfoById/' + row.id)
|
||||
.then((resp) => {
|
||||
const data = resp.data
|
||||
data.year = data.year.toString()
|
||||
this.formData = {...data}
|
||||
})
|
||||
} else {
|
||||
await this.getNumber()
|
||||
}
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post("/platform/excellentRecuperation/line/onSubmit", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async getEnumOptions(enumName) {
|
||||
const resp = await this.$axios.post("/open/common/dictEnumOptions", { name: enumName })
|
||||
return resp.data
|
||||
},
|
||||
async getNumber() {
|
||||
const resp = await this.$axios.post(loc() + '/getNo')
|
||||
this.$set(this.formData, 'serialNumber', resp.data)
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
+234
@@ -0,0 +1,234 @@
|
||||
<!--#
|
||||
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
|
||||
v-model="pageForm.startYear"
|
||||
type="year"
|
||||
class="picker-year"
|
||||
format="yyyy"
|
||||
style="width: 100%"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择开始年度"
|
||||
@change="handleChangeYear"
|
||||
>
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="结束年度">
|
||||
<el-date-picker
|
||||
v-model="pageForm.endYear"
|
||||
type="year"
|
||||
class="picker-year"
|
||||
format="yyyy"
|
||||
style="width: 100%"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择结束年度"
|
||||
@change="handleChangeYear"
|
||||
>
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="旅行社">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.travelAgencyId"
|
||||
@change="doSearch"
|
||||
placeholder="请选择旅行社">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="线路名称">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入线路名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.lineName">
|
||||
</el-input>
|
||||
</search-item>
|
||||
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="线路列表">
|
||||
<el-button type="primary" size="small" @click="onAdd">
|
||||
<i class="ti-plus"></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"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'isDisabled'">
|
||||
<el-switch
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
@change="(val)=>{lineStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="onEdit(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>
|
||||
|
||||
<template #edit>
|
||||
<basic-form ref="basicFormRef" @refresh="refresh"
|
||||
:travel-list="travelAgencyList"
|
||||
></basic-form>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
|
||||
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('basicForm.js'){}#-->
|
||||
<!--#include('info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"basic-form": basicForm,
|
||||
"info": info,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
travelAgencyList: [],
|
||||
unionOptions: [],
|
||||
showImportDialog: false,
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '线路名称', prop: 'lineName', sortable: true, width: '200'},
|
||||
{label: '承担旅行社', prop: 'travelAgencyName', sortable: true},
|
||||
{label: '创建人', prop: 'createUserName', sortable: true},
|
||||
{label: '是否启用', prop: 'isDisabled', sortable: true}
|
||||
],
|
||||
}
|
||||
},
|
||||
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
|
||||
},
|
||||
async selectTravelAgencyList() {
|
||||
const resp = await this.$axios.post('/platform/excellentRecuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
|
||||
this.travelAgencyList = resp.data
|
||||
},
|
||||
handleChangeYear(){
|
||||
if (this.pageForm.startYear && this.pageForm.endYear){
|
||||
if (this.pageForm.startYear > this.pageForm.endYear){
|
||||
this.pageForm.endYear = '';
|
||||
this.$message.error('起始年份需小于结束年份!');
|
||||
}
|
||||
}
|
||||
},
|
||||
async travelAgencyStatusChange(id) {
|
||||
const resp = await $.post(loc() + '/openClosedLine/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
refresh() {
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
onAdd() {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen()
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/excellentRecuperation/line/onDelete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
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 initData() {
|
||||
await this.selectTravelAgencyList()
|
||||
this.signUpModeList = await this.getEnumOptions('RecuperationSignUpMode')
|
||||
this.unionOptions = await this.$businessTool.listUnion()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initData()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,55 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">线路信息</div>
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="年度">{{ viewData.year }}</el-descriptions-item>
|
||||
<el-descriptions-item label="编号">{{ viewData.serialNumber }}</el-descriptions-item>
|
||||
<el-descriptions-item label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<el-descriptions-item label="线路内容" :span="2">
|
||||
<div v-html="viewData.content"></div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="process-title">旅行社信息</div>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item :span="2" label="旅行社名称">
|
||||
{{ viewData.travelAgency.travelAgencyName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">{{ viewData.travelAgency.contact }}</el-descriptions-item>
|
||||
<el-descriptions-item label="电话">{{ viewData.travelAgency.contactMobileNumber }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="邮箱">{{ viewData.travelAgency.email }}</el-descriptions-item>
|
||||
<el-descriptions-item label="官网">
|
||||
<a :href="viewData.travelAgency.officialWebsite" class="text-primary" target="_blank">
|
||||
{{ viewData.travelAgency.officialWebsite }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
viewData: {
|
||||
travelAgency:{}
|
||||
},
|
||||
//是否只看基本信息 因为出行时间针对每个分工会都不一样
|
||||
showTravelTimePeriod: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(lineId, usUnionId) {
|
||||
await this.findOne(lineId, usUnionId)
|
||||
},
|
||||
async findOne(id, unionId) {
|
||||
const resp = await this.$axios.get('/platform/excellentRecuperation/line/selectLineInfoById/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
+226
@@ -0,0 +1,226 @@
|
||||
<!--#
|
||||
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
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
format="yyyy"
|
||||
style="width: 100%"
|
||||
:clearable="false"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
>
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="活动:">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.activityId"
|
||||
placeholder="请选择活动">
|
||||
<el-option :key="item.id"
|
||||
:label="item.activityName"
|
||||
:value="item.id"
|
||||
v-for="item in activityList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" clearable style="width: 100%"
|
||||
@change="flushUnits" @clear="flushUnits">
|
||||
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select placeholder="请选择所属单位" style="width: 100%" v-model="pageForm.unitId" clearable
|
||||
filterable>
|
||||
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="报名列表">
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</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="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="报名线路" prop="lineName"></el-table-column>
|
||||
<el-table-column prop="signUpTime" label="报名时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template v-slot="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="300px">
|
||||
<template v-slot="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<excellent-recuperation-user-info ref="userInfo">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</excellent-recuperation-user-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"excellent-recuperation-user-info":EXCELLENT_RECUPERATION_USER_INFO
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/excellentRecuperation/schoolAudit/pageData",
|
||||
pageForm: {
|
||||
year: moment().format('YYYY'),
|
||||
approval: false
|
||||
},
|
||||
activityList: [],
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.userInfo.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.userInfo.onOpen(row)
|
||||
})
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
getActivityList() {
|
||||
this.$axios.post("/platform/excellentRecuperation/schoolAudit/listActivityByYear", {year: this.pageForm.year}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.activityList = res.data
|
||||
if (this.activityList.length > 0) {
|
||||
this.$set(this.pageForm, 'activityId', this.activityList[0].id)
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unionOptions = await this.$businessTool.listUnion()
|
||||
this.unitOptions = await this.$businessTool.listUnit()
|
||||
this.getActivityList()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
<!--#
|
||||
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
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
format="yyyy"
|
||||
style="width: 100%"
|
||||
:clearable="false"
|
||||
value-format="yyyy"
|
||||
placeholder="请选择年度"
|
||||
>
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="活动">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.activityId"
|
||||
placeholder="请选择活动">
|
||||
<el-option :key="item.id"
|
||||
:label="item.activityName"
|
||||
:value="item.id"
|
||||
v-for="item in activityList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" clearable style="width: 100%"
|
||||
@change="flushUnits" @clear="flushUnits">
|
||||
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select placeholder="请选择所属单位" style="width: 100%" v-model="pageForm.unitId" clearable
|
||||
filterable>
|
||||
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="报名列表">
|
||||
<el-button @click="doExportExcel" size="mini" type="primary">导出汇总名单
|
||||
</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="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="报名线路" prop="lineName"></el-table-column>
|
||||
<el-table-column prop="signUpTime" label="报名时间"></el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="300px">
|
||||
<template v-slot="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="doDelete(row)" size="mini" type="danger"
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN'])">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<excellent-recuperation-user-info ref="userInfo"></excellent-recuperation-user-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"excellent-recuperation-user-info": EXCELLENT_RECUPERATION_USER_INFO
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/excellentRecuperation/summary/pageData",
|
||||
pageForm: {
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
activityList: [],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doDelete(row) {
|
||||
this.$confirm("确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/excellentRecuperation/summary/doDelete", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success("删除成功")
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doExportExcel() {
|
||||
this.$downLoad("/platform/excellentRecuperation/summary/doExportExcel", {
|
||||
data: JSON.stringify(this.pageForm)
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.userInfo.onOpen(row)
|
||||
})
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
getActivityList() {
|
||||
this.$axios.post("/platform/excellentRecuperation/schoolAudit/listActivityByYear", {year: this.pageForm.year}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.activityList = res.data
|
||||
if (this.activityList.length > 0) {
|
||||
this.$set(this.pageForm, 'activityId', this.activityList[0].id)
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unionOptions = await this.$businessTool.listUnion()
|
||||
this.unitOptions = await this.$businessTool.listUnit()
|
||||
this.getActivityList()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
const basicForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left">
|
||||
<el-form-item label="年度" prop="year">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="year"
|
||||
placeholder="请选择年度"
|
||||
v-model="formData.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="编号" prop="serialNumber">
|
||||
<el-input maxlength="50" v-model="formData.serialNumber" placeholder="请输入编号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="旅行社名称" prop="travelAgencyName">
|
||||
<el-input maxlength="50" v-model="formData.travelAgencyName" placeholder="请输入旅行社名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="旅行社联系人" prop="contact">
|
||||
<el-input maxlength="10" v-model="formData.contact" placeholder="请输入旅行社联系人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="contactMobileNumber">
|
||||
<el-input v-model="formData.contactMobileNumber" placeholder="请输入联系电话"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input maxlength="50" v-model="formData.email" placeholder="请输入邮箱"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="官网" prop="officialWebsite">
|
||||
<el-input maxlength="100" v-model="formData.officialWebsite" placeholder="请输入官网"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="note">
|
||||
<el-input maxlength="100"
|
||||
type="textarea"
|
||||
placeholder="请输入备注"
|
||||
v-model="formData.note"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="isDisabled">
|
||||
<el-switch
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="formData.isDisabled">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="移动端缩略图" prop="file">
|
||||
<file-upload :value.sync="formData.file" accept=".jpg,.jpeg,.png"
|
||||
:upload_number="1" upload_result_category="interval"
|
||||
complete_result upload_mode="drag"></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row class="mt10" justify="end" type="flex">
|
||||
<el-button @click="$emit('refresh')">取消</el-button>
|
||||
<el-button @click="onSubmit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
isDisabled: true
|
||||
},
|
||||
formRules: {
|
||||
serialNumber: [{required: true, message: '请输入编号', trigger: ['change', 'blur']}],
|
||||
travelAgencyName: [{required: true, message: '请输入旅行社名称', trigger: ['change', 'blur']}],
|
||||
contact: [{required: true, message: '请输入联系人姓名', trigger: ['change', 'blur']}],
|
||||
contactMobileNumber: [
|
||||
{required: true, message: '请输入联系人电话', trigger: 'blur',},
|
||||
{
|
||||
pattern: /^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/,
|
||||
message: '请输入正确的联系人电话',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
email: [
|
||||
{required: false, message: '请输入邮箱地址', trigger: 'blur'},
|
||||
{type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change']}
|
||||
],
|
||||
officialWebsite: [
|
||||
{required: false, message: '请输入官网地址', trigger: ['change', 'blur']},
|
||||
{type: 'url', message: '请输入正确的官网地址', trigger: ['blur', 'change']}],
|
||||
note: [{required: false, message: '请输入备注', trigger: ['change', 'blur']}],
|
||||
year: [{required: true, message: '请选择年度', trigger: ['change', 'blur']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
if(row && row.id) {
|
||||
const cloneData = clone(row)
|
||||
cloneData.year = cloneData.year.toString()
|
||||
this.formData = {...cloneData}
|
||||
}
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post("/platform/excellentRecuperation/travelAgency/onSubmit", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
<!--#
|
||||
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="doSearch"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="旅行社:">
|
||||
<el-input placeholder="请输入旅行社查询" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch"></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="旅行社列表">
|
||||
<el-button type="primary" size="small" @click="showImportDialog = true">
|
||||
<i class="el-icon-upload2"></i>
|
||||
导入旅行社
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" @click="onAdd">
|
||||
<i class="ti-plus"></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"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'isDisabled'">
|
||||
<el-switch
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
@change="(val)=>{travelAgencyStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="column.prop === 'officialWebsite'">
|
||||
<a :href="row.officialWebsite" class="text-primary" target="_blank">
|
||||
{{ row.officialWebsite }}
|
||||
</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="onEdit(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>
|
||||
|
||||
<template #edit>
|
||||
<basic-form ref="basicFormRef" @refresh="refresh"></basic-form>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
|
||||
<excel-import
|
||||
ref="excelImportRef"
|
||||
url="/platform/excellentRecuperation/travelAgency/travelAgencyImport"
|
||||
template_url="/platform/excellentRecuperation/travelAgency/downloadTemplate"
|
||||
:visible.sync="showImportDialog"
|
||||
title="导入旅行社数据"
|
||||
width="700px"
|
||||
@import-success="doSearch"
|
||||
:extra_params="{}"
|
||||
></excel-import>
|
||||
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('basicForm.js'){}#-->
|
||||
<!--#include('info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"basic-form": basicForm,
|
||||
"info": info,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showImportDialog: false,
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '旅行社名称', prop: 'travelAgencyName', width: '200'},
|
||||
{label: '旅行社编号', prop: 'serialNumber', sortable: true},
|
||||
{label: '联系人', prop: 'contact'},
|
||||
{label: '联系人手机', prop: 'contactMobileNumber'},
|
||||
{label: '邮箱', prop: 'email'},
|
||||
{label: '是否启用', prop: 'isDisabled'}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async travelAgencyStatusChange(id) {
|
||||
const resp = await $.post(loc() + '/openClosedTravelAgency/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
refresh() {
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onAdd() {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen()
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/excellentRecuperation/travelAgency/onDelete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
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.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="旅行社编号">{{viewData.serialNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="旅行社名称">{{viewData.travelAgencyName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">{{viewData.contact}}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{viewData.contactMobileNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="邮箱">{{viewData.email}}</el-descriptions-item>
|
||||
<el-descriptions-item label="官网">
|
||||
<a :href="viewData.officialWebsite" target="_blank">
|
||||
{{viewData.officialWebsite}}
|
||||
<span class="text-primary">立即访问</span>
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="备注">{{viewData.note}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.viewData = clone(row)
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
Reference in New Issue
Block a user