This commit is contained in:
@jyuhsin
2025-08-27 13:57:46 +08:00
parent 1e9e14cc1f
commit 3171c30d43
90 changed files with 4905 additions and 1862 deletions
@@ -9,9 +9,17 @@ function autoEnhanceForm(formVm) {
if (formVm[MARK]) return
formVm[MARK] = true
const vnode = formVm.$vnode
if (vnode && vnode.data && vnode.data.attrs && vnode.data.attrs['no-auto-enhance'] !== undefined) {
return
const attrs = formVm.$attrs;
if (attrs && attrs['no-auto-enhance'] !== undefined) {
return; // 有 no-auto-enhance 属性,跳过增强
}
// 如果 $attrs 没有,也可以尝试从 $vnode 回退(兼容旧版)
if (!attrs) {
const vnode = formVm.$vnode;
if (vnode && vnode.data && vnode.data.attrs && vnode.data.attrs['no-auto-enhance'] !== undefined) {
return;
}
}
const originalValidate = formVm.validate
@@ -57,6 +57,10 @@ const REGISTER_INFO_COMPONENT = {
<template slot="label">其他附件</template>
<file-preview :files="viewData.files" complete_result></file-preview>
</el-descriptions-item>
<el-descriptions-item :span="2">
<template slot="label">换届报告</template>
<file-preview :files="viewData.replaceReport" complete_result></file-preview>
</el-descriptions-item>
</el-descriptions>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
@@ -65,11 +69,7 @@ const REGISTER_INFO_COMPONENT = {
<div class="process-title">成员信息</div>
<el-table :data="viewData.clubUser" size="small" border
:header-cell-style="{background:'#F5F5F5',color:'#606266'}">
<el-table-column label="人员身份" width="150px" prop="roleCode">
<template v-slot="scope">
<span>{{ getRoleName(scope.row.roleCode) }}</span>
</template>
</el-table-column>
<el-table-column label="人员身份" width="150px" prop="roleName"></el-table-column>
<el-table-column label="工号" width="150px" prop="loginName"></el-table-column>
<el-table-column label="姓名" width="150px" prop="userName"></el-table-column>
<el-table-column label="性别" width="150px" prop="sex"></el-table-column>
@@ -126,9 +126,6 @@ const REGISTER_INFO_COMPONENT = {
}
},
methods: {
getRoleName(roleCode) {
return CLUB_ROLE_CONSTANT.getRoleName(roleCode)
},
onOpen(row) {
this.row = row
this.$axios.post("/platform/club/register/clubRegisterApply/info", { id: this.row.id }).then((res) => {
@@ -16,7 +16,7 @@ const CLUB_ROLE_CONSTANT = {
case this.CLUB_VICE_SECRETARY:
return "副秘书长"
case this.CLUB_MEMBER:
return "会员"
return "协会会员"
default:
return ""
}
@@ -86,9 +86,9 @@ layout("/layouts/platform.html"){
</el-form>
<el-row class="mt20" justify="end" type="flex">
<el-button v-if="id !== ''" @click="doBack">返回</el-button>
<el-button :disabled="isCanApply === false" type="primary" @click="doSave">保存</el-button>
<el-button :disabled="isCanApply === false" type="primary" @click="doSubmit">提交</el-button>
<el-button :disabled="isCanApply === false" type="primary" plain @click="onSave">保存</el-button>
<el-button :disabled="isCanApply === false" type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
<el-button :disabled="isCanApply === false" type="primary" @click="onFinishTask" v-else>提交</el-button>
</el-row>
</el-card>
@@ -105,7 +105,8 @@ layout("/layouts/platform.html"){
mixins: [initTableMixins],
data() {
return {
id: GetQueryString("id"),
id: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formRules: {
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
},
@@ -122,20 +123,15 @@ layout("/layouts/platform.html"){
},
components: {},
methods: {
doBack() {
if (GetQueryString("id") !== "") {
location.href = '/platform/club/evaluate/mine'
}
},
doSave() {
this.$axios.post("/platform/club/evaluate/apply/doSave", { evaluate: JSON.stringify(this.formData) }).then((res) => {
onSave() {
this.$axios.post("/platform/club/evaluate/apply/save", { data: JSON.stringify(this.formData) }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
location.href = '/platform/club/evaluate/mine'
}
})
},
async doSubmit() {
async onSubmit() {
const valid = await this.$refs["form"].validate()
if (valid) {
const confirm = await this.$confirm("确定要提交此申请吗?", "提示", {
@@ -148,8 +144,8 @@ layout("/layouts/platform.html"){
if (data.files) {
data.files = JSON.stringify(data.files)
}
const resp = await this.$axios.post("/platform/club/evaluate/apply/doSubmit", {
evaluate: JSON.stringify(data)
const resp = await this.$axios.post("/platform/club/evaluate/apply/submit", {
data: JSON.stringify(data)
})
if (resp.code === 0) {
this.$message.success(resp.msg)
@@ -160,6 +156,23 @@ layout("/layouts/platform.html"){
}
}
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/club/evaluate/apply/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
window.location.href = '/platform/club/evaluate/mine'
}
})
})
},
async initData() {
this.$set(this.formData, "applyStartYear", new Date().getFullYear() - 1 + "")
this.$set(this.formData, "applyEndYear", new Date().getFullYear() + "")
@@ -114,7 +114,7 @@ layout("/layouts/platform.html"){
})
},
onEdit(row) {
location.href = '/platform/club/evaluate/apply?id=' + row.id
window.location.href = '/platform/club/evaluate/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
},
async onDelete(id) {
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
@@ -23,7 +23,7 @@ layout("/layouts/platform.html"){
<el-form v-show="registerTypeName === 0" :model="formData" ref="addForm1" :rules="formRules"
label-width="150px"
style="margin-top: 50px">
no-auto-enhance style="margin-top: 50px">
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item prop="year" label="填报年度"
@@ -120,7 +120,7 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="操作" width="80">
<template slot="header" v-slot="scope">
<template slot="header" slot-scope="scope">
<el-button size="mini" type="primary" icon="el-icon-plus"
@click="formData.yearActivityList.push({})"></el-button>
</template>
@@ -184,7 +184,7 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="操作" width="80">
<template slot="header" v-slot="scope">
<template slot="header" slot-scope="scope">
<el-button size="mini" type="primary" icon="el-icon-plus"
@click="formData.plans.push({})"></el-button>
</template>
@@ -217,8 +217,7 @@ layout("/layouts/platform.html"){
</el-form>
<el-form v-show="registerTypeName===1" :model="cwsz" ref="addForm2" :rules="rules"
label-width="120px"
style="margin: 50px 0 0 0">
no-auto-enhance label-width="120px" style="margin: 50px 0 0 0">
<div>
<el-table :data="cwsz.incomeDetailed" max-height="600">
<el-table-column label="序号" type="index" width="50"></el-table-column>
@@ -229,7 +228,7 @@ layout("/layouts/platform.html"){
label-width="0">
<el-date-picker
style="width: 100%"
placeholder="选择日期"
placeholder="选择日期"
type="date"
v-model="row.date"
value-format="yyyy-MM-dd">
@@ -302,15 +301,10 @@ layout("/layouts/platform.html"){
<el-form v-show="registerTypeName===2" ref="addForm3" :rules="rules"
label-width="120px"
style="margin: 50px 0px 0px 0px">
no-auto-enhance style="margin: 50px 0px 0px 0px">
<el-table :data="jgUser" max-height="300">
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="职务" prop="roleName">
<template slot-scope="scope">
<span v-if="scope.row.roleName">{{scope.row.roleName.replace('协会', '')}}</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="职务" prop="roleName"></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="unitName"></el-table-column>
@@ -320,9 +314,7 @@ layout("/layouts/platform.html"){
</el-form>
<el-row v-if="isRegister === false" class="mt10" justify="end" type="flex">
<el-button @click="doSave" type="primary">
保存
</el-button>
<el-button type="primary" plain @click="onSave">保存</el-button>
<el-button type="primary"
@click="registerTypeName=registerTypeName-1"
v-show="registerTypeName!==0">上一步
@@ -330,9 +322,10 @@ layout("/layouts/platform.html"){
<el-button type="primary" @click="next"
v-show="registerTypeName!=2">下一步
</el-button>
<el-button @click="doSubmit" type="primary"
v-show="registerTypeName===2">提交
</el-button>
<template v-show="registerTypeName===2">
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
</template>
</el-row>
</el-card>
@@ -346,7 +339,8 @@ layout("/layouts/platform.html"){
mixins: [initTableMixins],
data() {
return {
id: GetQueryString("id"),
id: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
jcClubId: "",
isRegister: false,
allocate: 0,
@@ -374,11 +368,8 @@ layout("/layouts/platform.html"){
const resp = await this.$axios.post("/platform/club/examine/apply/getClubsByRole")
return resp.data
},
doBack() {
this.$store.dispatch("pjaxRoute", "/platform/club/examine/mine")
},
async doSave() {
this.$axios.post("/platform/club/examine/apply/doSave", {
async onSave() {
this.$axios.post("/platform/club/examine/apply/save", {
data: JSON.stringify(this.formData),
incomeDetailed: JSON.stringify(this.cwsz.incomeDetailed),
incomeCensus: JSON.stringify(this.cwsz.incomeCensus)
@@ -389,14 +380,14 @@ layout("/layouts/platform.html"){
}
})
},
async doSubmit() {
async onSubmit() {
const confirm = await this.$confirm("确定要提交此申请吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
})
if ("confirm" === confirm) {
const resp = await this.$axios.post("/platform/club/examine/apply/doSubmit", {
const resp = await this.$axios.post("/platform/club/examine/apply/submit", {
data: JSON.stringify(this.formData),
incomeDetailed: JSON.stringify(this.cwsz.incomeDetailed),
incomeCensus: JSON.stringify(this.cwsz.incomeCensus)
@@ -409,6 +400,25 @@ layout("/layouts/platform.html"){
}
}
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/club/examine/apply/submitAgain', {
data: JSON.stringify(this.formData),
incomeDetailed: JSON.stringify(this.cwsz.incomeDetailed),
incomeCensus: JSON.stringify(this.cwsz.incomeCensus),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
window.location.href = '/platform/club/examine/mine'
}
})
})
},
async next() {
let a = true
let b = true
@@ -437,7 +447,7 @@ layout("/layouts/platform.html"){
}
this.registerTypeName++
} else {
this.$message.warning("请把信息填写完整")
//this.$message.warning("请把信息填写完整")
}
},
setIncomeDetailed() {
@@ -51,20 +51,9 @@ layout("/layouts/platform.html"){
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
<el-button v-else-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
<!--<el-button
@click="doExport(row)"
v-if="row.processInstState === $processConstant.INSTANCE_STATE.FINISHED"
size="mini"
type="primary"
>
导出
</el-button>-->
</template>
</el-table-column>
</el-table>
@@ -117,7 +106,7 @@ layout("/layouts/platform.html"){
})
},
onEdit(row) {
location.href = '/platform/club/examine/apply?id=' + row.id
window.location.href = '/platform/club/examine/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
},
async onDelete(id) {
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
@@ -0,0 +1,177 @@
<!--#
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"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</search-item>
<search-item label="协会名称:">
<el-input
@keyup.enter.native="doSearch"
clearable
placeholder="请输入内容"
clearable
style="width: 100%"
v-model="pageForm.clubName"
></el-input>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<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">
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="变更用户" prop="changeUserName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="旧身份" prop="oldRoleName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="新身份" prop="nowRoleName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<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="300px">
<template scope="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="onAudit(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>
<info ref="infoRef">
<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="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row>
</div>
</info>
</template>
</guava>
</div>
<script>
<!--#include("../change/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"info": clubManagerInfo,
},
data() {
return {
pageForm: {
approval: false
},
formData: {},
showApprovalForm: false
}
},
methods: {
onView(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
onAudit(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
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()
}
})
})
},
async pageData() {
const resp = await this.$axios.post("/platform/club/infoManage/auditManager/pageData", this.pageForm)
if (resp.code === 0) {
this.tableData = resp.data.list
this.pageForm.totalCount = resp.data.totalCount
} else {
this.$message.warning(resp.msg)
}
}
},
async created() {
await this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,256 @@
<!--#
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"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</search-item>
<search-item label="协会名称:">
<el-input
@keyup.enter.native="doSearch"
clearable
placeholder="请输入内容"
clearable
style="width: 100%"
v-model="pageForm.clubName"
></el-input>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="申请列表">
<el-button type="primary" size="small" @click="openAdd">
<i class="ti-plus"></i>
变更成员
</el-button>
</table-tool>
<el-table :data="tableData">
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="变更用户" prop="changeUserName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="旧身份" prop="oldRoleName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="新身份" prop="nowRoleName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<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="300">
<template v-slot="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules">
<el-form-item label="协会名称" prop="clubId">
<el-select v-model="formData.clubId" @change="clubChange" placeholder="请选择协会" filterable clearable style="width: 100%">
<el-option v-for="item in clubList" :key="item.id" :label="item.clubName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="协会成员" prop="userId">
<el-select v-model="formData.userId" @change="userChange" placeholder="请选择协会成员" filterable clearable style="width: 100%">
<el-option v-for="item in userList" :key="item.userId" :label="item.userName" :value="item.userId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="身份" prop="nowRoleCode">
<el-checkbox-group v-model="formData.nowRoleCode">
<el-checkbox label="CLUB_PRESIDENT">协会会长</el-checkbox>
<el-checkbox label="CLUB_VICE_PRESIDENT">协会副会长</el-checkbox>
<el-checkbox label="CLUB_SECRETARY">协会秘书长</el-checkbox>
<el-checkbox label="CLUB_VICE_SECRETARY">协会副秘书长</el-checkbox>
<el-checkbox label="CLUB_OPERATOR">协会操作员</el-checkbox>
<el-checkbox label="CLUB_MEMBER">协会会员</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提 交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提 交</el-button>
</div>
</template>
<template #view>
<info ref="infoRef"></info>
</template>
</guava>
</div>
<script>
<!--#include("info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"info": clubManagerInfo
},
data() {
return {
id: '',
taskId: '',
clubList: [],
userList: [],
formData: {
nowRoleCode: [],
},
formRules: {
clubId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
userId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
nowRoleCode: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
},
viewData: {},
}
},
methods: {
clubChange(key) {
if(!key) {
this.$set(this.formData, 'userId', '')
this.$set(this.formData, 'nowRoleCode', '')
}
this.$axios.post("/platform/club/infoManage/change/queryClubUsers", {clubId: this.formData.clubId}).then((res) => {
if (res.code === 0) {
this.userList = res.data
}
})
},
userChange(key) {
const user = this.userList.find(o => o.userId === key)
this.$set(this.formData, 'nowRoleCode', user?.roleCode)
this.$set(this.formData, 'changeUserId', key)
this.$set(this.formData, 'changeUserName', user?.userName)
},
openAdd() {
this.id = ''
this.taskId = ''
this.$refs.guava.edit(() => {
this.formData = {nowRoleCode: []}
})
},
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.pageData()
}
})
})
},
onDelete(id) {
this.$confirm("您确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/club/infoManage/change/delete", { id: id }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
},
onEdit(row) {
this.id = row.id
this.taskId = row.taskId
this.formData = clone(row)
this.$refs.guava.edit(() => {})
},
async onSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/club/infoManage/change/submit', {
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
this.$refs.guava.index()
}
})
})
}
})
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/club/infoManage/change/submitAgain', {
data: JSON.stringify(this.formData),
taskId: this.taskId
}).then(res => {
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
this.$refs.guava.index()
}
})
})
},
onView(row) {
this.$refs.guava.view(() =>{
this.$refs.infoRef.onOpen(row)
})
},
async getMyClub() {
const resp = await this.$axios.post("/platform/club/examine/apply/getClubsByRole")
this.clubList = resp.data
},
async pageData() {
const resp = await this.$axios.post("/platform/club/infoManage/change/pageData", this.pageForm)
if (resp.code === 0) {
this.tableData = resp.data.list
this.pageForm.totalCount = resp.data.totalCount
} else {
this.$message.warning(resp.msg)
}
}
},
async created() {
await this.getMyClub()
await this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,94 @@
const clubManagerInfo = {
template: /*language=HTML*/ `
<div>
<div class="process-title">
申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<el-descriptions :column="3" border>
<el-descriptions-item label="所属协会">{{ viewData.clubName }}</el-descriptions-item>
<el-descriptions-item label="申请人">{{ viewData.userName }}</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ viewData.creatTime }}</el-descriptions-item>
<el-descriptions-item label="变更用户">{{ viewData.changeUserName }}</el-descriptions-item>
<el-descriptions-item label="旧身份">{{ viewData.oldRoleName }}</el-descriptions-item>
<el-descriptions-item label="新身份">{{ viewData.nowRoleName }}</el-descriptions-item>
</el-descriptions>
<template v-for="task in doneTasks">
<div class="mt10">
<div class="process-title">{{ 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">{{
task.taskFormData.opinion }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
store,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
visible: false,
viewData: {},
doneTasks: [],
row: null
}
},
methods: {
onOpen(row) {
this.row = row
this.visible = true
this.getInfo()
this.getDoneTasks()
},
getInfo() {
this.viewData = clone(this.row)
},
// 获取已办任务审批记录
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)
}
},
style: /*language=CSS*/ `
.el-descriptions-item__label {
width: 200px;
min-width: 200px;
max-width: 200px;
}
.el-tabs__header {
margin: 0;
}
`
}
@@ -1,149 +0,0 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style></style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="协会名称:">
<el-select filterable placeholder="请选择协会" style="width: 100%" v-model="pageForm.clubId">
<el-option :label="item.clubName" :value="item.id" v-for="item in clubList"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="理事机构审核">
<el-button @click="doReview(false)" size="small" type="danger">批量不通过</el-button>
<el-button @click="doReview(true)" size="small" type="primary">批量通过</el-button>
</table-tool>
<el-table :data="tableData" @selection-change="handleSelectionChange" ref="table" :row-key="()=>{new Date().getTime()}">
<el-table-column :reserve-selection="true" type="selection" width="40"></el-table-column>
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会编码" prop="clubCode" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="成员" prop="userName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="职务" prop="roleCode" sortable show-overflow-tooltip>
<template slot-scope="scope">
<span>{{getRoleName(scope.row.roleCode)}}</span>
</template>
</el-table-column>
<el-table-column label="职务变更" prop="changeRoleCode" sortable show-overflow-tooltip>
<template slot-scope="scope">
<div v-if="scope.row.changeRoleCode">
<span>{{getRoleName(scope.row.changeRoleCode)}}</span>
</div>
<span v-else>暂无变更</span>
</template>
</el-table-column>
<el-table-column label="变更时间" prop="roleCodeChangeTime" sortable show-overflow-tooltip>
<template slot-scope="{row}">
<span v-if="row.changeRoleCode !== undefined">{{ $moment(row.roleCodeChangeTime).format('YYYY-MM-DD') }}</span>
<span v-else>暂无变更</span>
</template>
</el-table-column>
<el-table-column label="状态" prop="state" sortable show-overflow-tooltip>
<template v-if="row.state === 1 || row.status === 3" slot-scope="{row}">
<span>待校工会审核</span>
</template>
<template v-else slot-scope="scope">暂无状态</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
</div>
<script>
<!--#include("../../common/clubRoleConstant.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
components: {},
data() {
return {
clubList: [],
multipleSelection: []
}
},
methods: {
getRoleName(roleCode) {
return CLUB_ROLE_CONSTANT.getRoleName(roleCode)
},
showFiles(row) {
if (row.replaceReport && row.replaceReport.length > 0) {
let res = row.replaceReport[0]
let fileId = res?.response?.data.substring(res?.response?.data.lastIndexOf("=") + 1)
let fileName = res?.name
window.open(
"/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent("/platform/sys/file/convertPDF?id=" + fileId),
fileName
)
}
},
getFileName(row) {
if (row.replaceReport && row.replaceReport.length > 0) {
return row.replaceReport[0].name
} else {
return ""
}
},
async doReview(flag) {
if (this.multipleSelection.length === 0) {
this.$message.warning("请先在多选框中选择")
return
}
const str = flag ? "通过" : "不通过"
const confirm = await this.$confirm("您确定要批量审核" + str + "吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
if (confirm === "confirm") {
const array = this.multipleSelection.map((o) => o.id)
const resp = await this.$axios.post("/platform/club/infoManage/clubManagePersonAudit/doAudit", {
ids: JSON.stringify(array),
isPass: flag
})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.$refs.table.clearSelection()
await this.pageData()
} else {
this.$message.warning(resp.msg)
}
}
},
handleSelectionChange(val) {
this.multipleSelection = val
},
async pageData() {
const resp = await this.$axios.post("/platform/club/infoManage/clubManagePersonAudit/pageData", this.pageForm)
if (resp.code === 0) {
this.tableData = resp.data.list
this.pageForm.totalCount = resp.data.totalCount
} else {
this.$message.warning(resp.msg)
}
},
async getAllClub() {
const resp = await this.$axios.post("/platform/club/infoManage/clubManagePersonAudit/getAllClub")
if (resp.code === 0) {
this.clubList = resp.data
}
}
},
async created() {
await this.getAllClub()
await this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -17,10 +17,12 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
<el-card shadow="never" class="mt10">
<table-tool label="会员信息">
<el-button size="small" type="primary" icon="el-icon-download" @click="exportRegistrationDoc">导出登记表</el-button>
<el-button @click="openImport" size="small" type="primary">导入成员</el-button>
<el-button size="small" type="primary" @click="openUserAdd(true)">录入成员</el-button>
<el-button size="small" type="primary" @click="openUserAdd(false)">设置理事机构</el-button>
<template v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
<el-button size="small" type="primary" icon="el-icon-download" @click="exportRegistrationDoc">导出登记表</el-button>
<el-button @click="openImport" size="small" type="primary">导入成员</el-button>
<el-button size="small" type="primary" @click="openUserAdd(true)">录入成员</el-button>
<el-button size="small" type="primary" @click="openUserAdd(false)">设置理事机构</el-button>
</template>
<el-radio-group @change="doSearch" style="margin-left: 10px" v-model="pageForm.radioType" size="small">
<el-radio-button label="3">全部</el-radio-button>
<el-radio-button label="2">协会成员</el-radio-button>
@@ -43,26 +45,9 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<template>
<el-dropdown-item v-if="row.roleCode !== 'CLUB_PRESIDENT'" @click.native="updateRoleCode(row, 'CLUB_PRESIDENT', '会长')" class="text-primary">
设置会长
</el-dropdown-item>
<el-dropdown-item v-if="row.roleCode !== 'CLUB_VICE_PRESIDENT'" @click.native="updateRoleCode(row, 'CLUB_VICE_PRESIDENT', '副会长')" class="text-primary">
设置副会长
</el-dropdown-item>
<el-dropdown-item v-if="row.roleCode !== 'CLUB_SECRETARY'" @click.native="updateRoleCode(row, 'CLUB_SECRETARY', '秘书长')" class="text-primary">
设置秘书长
</el-dropdown-item>
<el-dropdown-item v-if="row.roleCode !== 'CLUB_VICE_SECRETARY'" @click.native="updateRoleCode(row, 'CLUB_VICE_SECRETARY', '副秘书长')" class="text-primary">
设置副秘书长
</el-dropdown-item>
<el-dropdown-item v-if="row.roleCode !== 'CLUB_OPERATOR'" @click.native="updateRoleCode(row, 'CLUB_OPERATOR', '操作员')" class="text-primary">
设置操作员
</el-dropdown-item>
<el-dropdown-item v-if="row.roleCode !== 'CLUB_MEMBER'" @click.native="updateRoleCode(row, 'CLUB_MEMBER', '会员')" class="text-primary">
设置会员
</el-dropdown-item>
</template>
<el-dropdown-item @click.native="updateRoleCode(row)" class="text-primary">
设置身份
</el-dropdown-item>
<!--<el-dropdown-item @click.native="viewInfo(row)">查看注册信息</el-dropdown-item>
<el-dropdown-item @click.native="exportInfo(row)">导出登记表</el-dropdown-item>-->
<el-dropdown-item @click.native="userDelete(row)">删除</el-dropdown-item>
@@ -90,6 +75,7 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
<el-form :model="formData" ref="userForm" :rules="userFormRules" label-width="80px">
<el-form-item label="成员" prop="users">
<el-select v-model="formData.users" style="width: 100%" multiple filterable
placeholder="请根据姓名或工号选择"
remote reserve-keyword :remote-method="selectUser">
<el-option
v-for="item in userOptions"
@@ -119,7 +105,7 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
</span>
</el-dialog>
<el-dialog
<el-dialog
:close-on-click-modal="false"
:visible.sync="importDialog"
title="导入成员"
@@ -130,6 +116,31 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
@flush="successImport" :business_id="parentNode.currentTreeData.id"
></file-import>
</el-dialog>
<el-dialog title="设置身份" :visible.sync="roleCodeDialogVisible" :close-on-click-modal="false" width="46%">
<el-form :model="roleCodeFormData" ref="roleCodeForm" :rules="roleCodeFormRules" label-width="60px">
<el-form-item prop="userName" label="姓名">
<el-input disabled placeholder="请输入姓名" v-model="roleCodeFormData.userName"></el-input>
</el-form-item>
<el-form-item prop="loginName" label="工号">
<el-input disabled placeholder="请输入工号" v-model="roleCodeFormData.loginName"></el-input>
</el-form-item>
<el-form-item prop="roleCode" label="身份">
<el-checkbox-group v-model="roleCodeFormData.roleCode">
<el-checkbox label="CLUB_PRESIDENT">协会会长</el-checkbox>
<el-checkbox label="CLUB_VICE_PRESIDENT">协会副会长</el-checkbox>
<el-checkbox label="CLUB_SECRETARY">协会秘书长</el-checkbox>
<el-checkbox label="CLUB_VICE_SECRETARY">协会副秘书长</el-checkbox>
<el-checkbox label="CLUB_OPERATOR">协会操作员</el-checkbox>
<el-checkbox label="CLUB_MEMBER">协会会员</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="roleCodeDialogVisible = false">取消</el-button>
<el-button type="primary" @click="onRoleCode">确定</el-button>
</span>
</el-dialog>
</div>
`,
mixins: [initTableMixins],
@@ -141,13 +152,20 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
},
data() {
return {
roleCodeFormData: {},
roleCodeFormRules: {
userName: [{ required: true, message: "必填", trigger: ["blur"] }],
loginName: [{ required: true, message: "必填", trigger: ["blur"] }],
roleCode: [{ required: true, message: "必填", trigger: ["blur"] }],
},
roleCodeDialogVisible: false,
userOptions: [],
addMember: false,
addDialogVisible: false,
userFormRules: {
users: [{ required: true, message: "必", trigger: ["blur"] }],
payed: [{ required: true, message: "必", trigger: ["blur", "change"] }],
roleCode: [{ required: true, message: "必", trigger: ["blur", "change"] }]
users: [{ required: true, message: "必", trigger: ["blur"] }],
payed: [{ required: true, message: "必", trigger: ["blur", "change"] }],
roleCode: [{ required: true, message: "必", trigger: ["blur", "change"] }]
},
formData: {
users: []
@@ -245,25 +263,34 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
}
}
},
async updateRoleCode(row, roleCode, roleName) {
const confirm = await this.$confirm("确定要设置为" + roleName + "吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
if (confirm === "confirm") {
const resp = await this.$axios.post("/platform/club/infoManage/manage/updateRoleCode", {
id: row.id,
clubId: row.clubId,
roleCode: roleCode
})
if (resp.code === 0) {
this.$message.success(resp.msg)
await this.pageData()
} else {
this.$message.warning(resp.msg)
updateRoleCode(row) {
this.roleCodeFormData = clone(row)
this.roleCodeDialogVisible = true
},
onRoleCode() {
this.$refs.roleCodeForm.validate(async (valid) => {
if (valid) {
const confirm = await this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
if (confirm === "confirm") {
const resp = await this.$axios.post("/platform/club/infoManage/manage/updateRoleCode", {
id: this.roleCodeFormData.id,
roleCodes: JSON.stringify(this.roleCodeFormData.roleCode),
clubId: this.roleCodeFormData.clubId
})
if (resp.code === 0) {
this.$message.success(resp.msg)
await this.pageData()
this.roleCodeDialogVisible = false
} else {
this.$message.warning(resp.msg)
}
}
}
}
})
},
async userDelete(row) {
const confirm = await this.$confirm("删除后年度统计时将不会纳入年度减少人数,确定要将" + row.userName + "删除吗?", "提示", {
@@ -31,41 +31,31 @@ layout("/layouts/platform.html"){
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="申请列表">
<el-button type="primary" size="small" @click="openAdd">
<i class="ti-plus"></i>
上传报告
</el-button>
</table-tool>
<el-table :data="tableData">
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="createTime" sortable show-overflow-tooltip>
<template slot-scope="{row}">
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<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="成立时间" prop="foundTime" sortable show-overflow-tooltip>
<template slot-scope="{row}">
<span>{{ $moment(row.foundTime).format('YYYY-MM-DD') }}</span>
</template>
</el-table-column>
<el-table-column label="联系人" prop="concatPersonName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="换届报告" prop="replaceReport" sortable show-overflow-tooltip>
<template scope="scope">
<span style="color: #0e78c5; text-decoration: underline; cursor: pointer" @click="showFiles(scope.row)">
{{getFileName(scope.row)}}
</span>
</template>
</el-table-column>
<el-table-column label="审核状态" prop="reportState" sortable show-overflow-tooltip>
<template scope="scope">
<span v-if="scope.row.reportState === 1">待校工会审核</span>
<span v-if="scope.row.reportState === 2">校工会审核不通过</span>
<span v-if="scope.row.reportState === 3">审核通过</span>
</template>
</el-table-column>
<el-table-column label="操作" width="300px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="uploadRefreshReport(row)" size="mini" type="primary">上传换届报告</el-button>
<el-table-column label="操作" width="300">
<template v-slot="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
</template>
</el-table-column>
</el-table>
@@ -73,92 +63,149 @@ layout("/layouts/platform.html"){
</el-card>
</template>
<template #edit>
<el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules">
<el-form-item label="协会名称" prop="clubId">
<el-select v-model="formData.clubId" placeholder="请选择协会" filterable clearable style="width: 100%">
<el-option v-for="item in clubList" :key="item.id" :label="item.clubName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="换届报告" prop="files">
<file-upload
:value.sync="formData.files"
:upload_number="1"
upload_result_category="array"
complete_result
upload_mode="drag"
accept=".doc,.docx,.pdf"
></file-upload>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提 交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提 交</el-button>
</div>
</template>
<template #view>
<club-info ref="info"></club-info>
<info ref="infoRef"></info>
</template>
</guava>
<el-dialog width="40%" :visible.sync="refreshDialogVisible" title="上传换届报告">
<file-upload
:value.sync="replaceReport"
:upload_number="1"
upload_result_category="array"
complete_result
upload_mode="drag"
accept=".doc,.docx,.pdf"
></file-upload>
<span slot="footer" class="dialog-footer">
<el-button @click="refreshDialogVisible = false">取消</el-button>
<el-button type="primary" @click="refreshDo">确定</el-button>
</span>
</el-dialog>
</div>
<script>
<!--#include("../../common/clubInfoComponent.js"){}#-->
<!--#include("info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"club-info": REGISTER_INFO_COMPONENT
"info": clubRefreshInfo,
},
data() {
return {
refreshDialogVisible: false,
replaceReport: [],
clickRow: {}
id: '',
taskId: '',
clubList: [],
formData: {},
formRules: {
clubId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
},
viewData: {},
}
},
methods: {
showFiles(row) {
if (row.replaceReport && row.replaceReport.length > 0) {
let res = row.replaceReport[0]
let fileId = res?.response?.data.substring(res?.response?.data.lastIndexOf("=") + 1)
let fileName = res?.name
window.open(
"/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent("/platform/sys/file/convertPDF?id=" + fileId),
fileName
)
}
openAdd() {
this.id = ''
this.taskId = ''
this.$refs.guava.edit(() => {
this.formData = {}
})
},
getFileName(row) {
if (row.replaceReport && row.replaceReport.length > 0) {
return row.replaceReport[0].name
} else {
return ""
}
},
async refreshDo() {
const confirm = await this.$confirm("您确定要上传换届报告吗?", "提示", {
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
if (confirm === "confirm") {
const resp = await this.$axios.post("/platform/club/infoManage/refreshReport/refreshDo", {
id: this.clickRow.id,
replaceReport: JSON.stringify(this.replaceReport)
}).then(() => {
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.refreshDialogVisible = false
this.doSearch()
} else {
this.$message.warning(resp.msg)
}
}
},
uploadRefreshReport(row) {
this.clickRow = row
this.replaceReport = []
this.refreshDialogVisible = true
},
openView(row) {
this.$refs.guava.view(() => {
this.$refs.info.onOpen(row.id)
})
},
onDelete(id) {
this.$confirm("您确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/club/infoManage/refreshReport/delete", { id: id }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
},
onEdit(row) {
this.id = row.id
this.taskId = row.taskId
this.formData = clone(row)
this.formData.files = JSON.parse(this.formData.files)
this.$refs.guava.edit(() => {})
},
async onSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/club/infoManage/refreshReport/submit', {
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
this.$refs.guava.index()
}
})
})
}
})
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/club/infoManage/refreshReport/submitAgain', {
data: JSON.stringify(this.formData),
taskId: this.taskId
}).then(res => {
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
this.$refs.guava.index()
}
})
})
},
onView(row) {
this.$refs.guava.view(() =>{
this.$refs.infoRef.onOpen(row)
})
},
async getMyClub() {
const resp = await this.$axios.post("/platform/club/examine/apply/getClubsByRole")
this.clubList = resp.data
},
async pageData() {
const resp = await this.$axios.post("/platform/club/infoManage/refreshReport/pageData", this.pageForm)
if (resp.code === 0) {
@@ -170,6 +217,7 @@ layout("/layouts/platform.html"){
}
},
async created() {
await this.getMyClub()
await this.pageData()
}
})
@@ -0,0 +1,103 @@
const clubRefreshInfo = {
template: /*language=HTML*/ `
<div>
<div class="process-title">
申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<el-descriptions :column="3" border>
<el-descriptions-item label="所属协会">{{ viewData.clubName }}</el-descriptions-item>
<el-descriptions-item label="申请人">{{ viewData.userName }}</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ viewData.creatTime }}</el-descriptions-item>
<el-descriptions-item label="上一次换届报告" :span="3">
<file-preview v-if="viewData.lastFiles && viewData.lastFiles.length > 0" :files="viewData.lastFiles" complete_result></file-preview>
<span v-else>暂无附件</span>
</el-descriptions-item>
<el-descriptions-item label="换届报告" :span="3">
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files" complete_result></file-preview>
<span v-else>暂无附件</span>
</el-descriptions-item>
</el-descriptions>
<template v-for="task in doneTasks">
<div class="mt10">
<div class="process-title">{{ 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">{{
task.taskFormData.opinion }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
store,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
visible: false,
viewData: {},
doneTasks: [],
row: null
}
},
methods: {
onOpen(row) {
this.row = row
this.visible = true
this.getInfo()
this.getDoneTasks()
},
getInfo() {
this.viewData = clone(this.row)
this.viewData.files = JSON.parse(this.viewData.files)
if(this.viewData.lastFiles) {
this.viewData.lastFiles = JSON.parse(this.viewData.lastFiles)
}
},
// 获取已办任务审批记录
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)
}
},
style: /*language=CSS*/ `
.el-descriptions-item__label {
width: 200px;
min-width: 200px;
max-width: 200px;
}
.el-tabs__header {
margin: 0;
}
`
}
@@ -31,42 +31,31 @@ layout("/layouts/platform.html"){
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="申请列表">
<el-button type="primary" size="small" @click="openAdd">
<i class="ti-plus"></i>
章程修订
</el-button>
</table-tool>
<el-table :data="tableData">
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="createTime" sortable show-overflow-tooltip>
<template slot-scope="{row}">
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<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="成立时间" prop="foundTime" sortable show-overflow-tooltip>
<template slot-scope="{row}">
<span>{{ $moment(row.foundTime).format('YYYY-MM-DD') }}</span>
</template>
</el-table-column>
<el-table-column label="联系人" prop="concatPersonName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会章程" prop="afterRulesFile" sortable show-overflow-tooltip>
<template scope="scope">
<span style="color: #0e78c5; text-decoration: underline; cursor: pointer" @click="showFiles(scope.row)">
{{getFileName(scope.row)}}
</span>
</template>
</el-table-column>
<el-table-column label="审核状态" prop="ruleState" sortable show-overflow-tooltip>
<template scope="scope">
<span v-if="scope.row.ruleState === 1">待校工会审核</span>
<span v-if="scope.row.ruleState === 2">校工会审核不通过</span>
<span v-if="scope.row.ruleState === 3">审核通过</span>
</template>
</el-table-column>
<el-table-column label="操作" width="200px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="uploadRule(row)" size="mini" type="primary">章程修订</el-button>
<el-table-column label="操作" width="300">
<template v-slot="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
</template>
</el-table-column>
</el-table>
@@ -74,96 +63,149 @@ layout("/layouts/platform.html"){
</el-card>
</template>
<template #edit>
<el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules">
<el-form-item label="协会名称" prop="clubId">
<el-select v-model="formData.clubId" placeholder="请选择协会" filterable clearable style="width: 100%">
<el-option v-for="item in clubList" :key="item.id" :label="item.clubName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="协会章程" prop="files">
<file-upload
:value.sync="formData.files"
:upload_number="1"
upload_result_category="array"
complete_result
upload_mode="drag"
accept=".doc,.docx,.pdf"
></file-upload>
</el-form-item>
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="ruleDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="onSubmit" v-if="!taskId">提 交</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提 交</el-button>
</div>
</template>
<template #view>
<club-info ref="info"></club-info>
<info ref="infoRef"></info>
</template>
</guava>
<el-dialog width="40%" :visible.sync="ruleDialogVisible" title="章程修订">
<file-upload
:value.sync="ruleReport"
:upload_number="1"
upload_result_category="array"
complete_result
upload_mode="drag"
accept=".doc,.docx,.pdf"
></file-upload>
<span slot="footer" class="dialog-footer">
<el-button @click="ruleDialogVisible = false">取消</el-button>
<el-button type="primary" @click="ruleDo">确定</el-button>
</span>
</el-dialog>
</div>
<script>
<!--#include("../../common/clubInfoComponent.js"){}#-->
<!--#include("info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"club-info": REGISTER_INFO_COMPONENT
"info": clubRuleInfo,
},
data() {
return {
ruleDialogVisible: false,
ruleReport: [],
clickRow: {}
id: '',
taskId: '',
clubList: [],
formData: {},
formRules: {
clubId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
},
viewData: {},
}
},
methods: {
showFiles(row) {
if (row.afterRulesFile && row.afterRulesFile.length > 0) {
let res = row.afterRulesFile[0]
let fileId = res?.response?.data.substring(res?.response?.data.lastIndexOf("=") + 1)
let fileName = res?.name
window.open(
"/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent("/platform/sys/file/convertPDF?id=" + fileId),
fileName
)
}
openAdd() {
this.id = ''
this.taskId = ''
this.$refs.guava.edit(() => {
this.formData = {}
})
},
getFileName(row) {
if (row.afterRulesFile && row.afterRulesFile.length > 0) {
return row.afterRulesFile[0].name
} else {
return ""
}
},
async ruleDo() {
const confirm = await this.$confirm("您确定要修订章程吗?", "提示", {
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
if (confirm === "confirm") {
const resp = await this.$axios.post("/platform/club/infoManage/ruleUpdate/ruleDo", {
id: this.clickRow.id,
afterRulesFile: JSON.stringify(this.ruleReport)
}).then(() => {
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.ruleDialogVisible = false
this.doSearch()
} else {
this.$message.warning(resp.msg)
}
}
},
uploadRule(row) {
/*if(row.afterRulesFile && row.ruleState === 1) {
this.$message.warning('您已上传新的协会章程,待校工会审核')
return
}*/
this.clickRow = row
this.ruleReport = []
this.ruleDialogVisible = true
},
openView(row) {
this.$refs.guava.view(() => {
this.$refs.info.onOpen(row.id)
})
},
onDelete(id) {
this.$confirm("您确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/club/infoManage/ruleUpdate/delete", { id: id }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
},
onEdit(row) {
this.id = row.id
this.taskId = row.taskId
this.formData = clone(row)
this.formData.files = JSON.parse(this.formData.files)
this.$refs.guava.edit(() => {})
},
async onSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/club/infoManage/ruleUpdate/submit', {
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
this.$refs.guava.index()
}
})
})
}
})
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/club/infoManage/ruleUpdate/submitAgain', {
data: JSON.stringify(this.formData),
taskId: this.taskId
}).then(res => {
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
this.$refs.guava.index()
}
})
})
},
onView(row) {
this.$refs.guava.view(() =>{
this.$refs.infoRef.onOpen(row)
})
},
async getMyClub() {
const resp = await this.$axios.post("/platform/club/examine/apply/getClubsByRole")
this.clubList = resp.data
},
async pageData() {
const resp = await this.$axios.post("/platform/club/infoManage/ruleUpdate/pageData", this.pageForm)
if (resp.code === 0) {
@@ -175,6 +217,7 @@ layout("/layouts/platform.html"){
}
},
async created() {
await this.getMyClub()
await this.pageData()
}
})
@@ -0,0 +1,103 @@
const clubRuleInfo = {
template: /*language=HTML*/ `
<div>
<div class="process-title">
申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<el-descriptions :column="3" border>
<el-descriptions-item label="所属协会">{{ viewData.clubName }}</el-descriptions-item>
<el-descriptions-item label="申请人">{{ viewData.userName }}</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ viewData.creatTime }}</el-descriptions-item>
<el-descriptions-item label="上一次协会章程" :span="3">
<file-preview v-if="viewData.lastFiles && viewData.lastFiles.length > 0" :files="viewData.lastFiles" complete_result></file-preview>
<span v-else>暂无附件</span>
</el-descriptions-item>
<el-descriptions-item label="协会章程" :span="3">
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files" complete_result></file-preview>
<span v-else>暂无附件</span>
</el-descriptions-item>
</el-descriptions>
<template v-for="task in doneTasks">
<div class="mt10">
<div class="process-title">{{ 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">{{
task.taskFormData.opinion }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
store,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
visible: false,
viewData: {},
doneTasks: [],
row: null
}
},
methods: {
onOpen(row) {
this.row = row
this.visible = true
this.getInfo()
this.getDoneTasks()
},
getInfo() {
this.viewData = clone(this.row)
this.viewData.files = JSON.parse(this.viewData.files)
if(this.viewData.lastFiles) {
this.viewData.lastFiles = JSON.parse(this.viewData.lastFiles)
}
},
// 获取已办任务审批记录
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)
}
},
style: /*language=CSS*/ `
.el-descriptions-item__label {
width: 200px;
min-width: 200px;
max-width: 200px;
}
.el-tabs__header {
margin: 0;
}
`
}
@@ -31,40 +31,28 @@ layout("/layouts/platform.html"){
</el-card>
<el-card class="mt10" shadow="never">
<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">
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="createTime" sortable show-overflow-tooltip>
<template slot-scope="{row}">
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<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="成立时间" prop="foundTime" sortable show-overflow-tooltip>
<template slot-scope="{row}">
<span>{{ $moment(row.foundTime).format('YYYY-MM-DD') }}</span>
</template>
</el-table-column>
<el-table-column label="联系人" prop="concatPersonName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="换届报告" prop="replaceReport" sortable show-overflow-tooltip>
<template scope="scope">
<span style="color: #0e78c5; text-decoration: underline; cursor: pointer" @click="showFiles(scope.row)">
{{getFileName(scope.row)}}
</span>
</template>
</el-table-column>
<el-table-column label="审核状态" prop="ruleState" sortable show-overflow-tooltip>
<template scope="scope">
<span v-if="scope.row.reportState === 1">待校工会审核</span>
<span v-if="scope.row.reportState === 2">校工会审核不通过</span>
<span v-if="scope.row.reportState === 3">审核通过</span>
</template>
</el-table-column>
<el-table-column label="操作" width="200px">
<el-table-column label="操作" width="300px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="audit(row)" size="mini" type="primary">审核</el-button>
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="onAudit(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>
@@ -72,88 +60,97 @@ layout("/layouts/platform.html"){
</el-card>
</template>
<template #view>
<club-info ref="info"></club-info>
<template #edit>
<info ref="infoRef">
<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="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row>
</div>
</info>
</template>
</guava>
<el-dialog width="40%" :visible.sync="dialogVisible" title="校工会审核">
<el-descriptions :column="2" border class="table_fixed">
<el-descriptions-item label="换届报告">
<file-preview :files="clickRow.replaceReport" complete_result></file-preview>
</el-descriptions-item>
</el-descriptions>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button @click="auditDo(false)" type="primary">不通过</el-button>
<el-button type="primary" @click="auditDo(true)">通过</el-button>
</span>
</el-dialog>
</div>
<script>
<!--#include("../../common/clubInfoComponent.js"){}#-->
<!--#include("../refreshReport/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"club-info": REGISTER_INFO_COMPONENT
"info": clubRefreshInfo,
},
data() {
return {
dialogVisible: false,
clickRow: {},
clubId: ""
pageForm: {
approval: false
},
formData: {},
showApprovalForm: false
}
},
methods: {
showFiles(row) {
if (row.replaceReport && row.replaceReport.length > 0) {
let res = row.replaceReport[0]
let fileId = res?.response?.data.substring(res?.response?.data.lastIndexOf("=") + 1)
let fileName = res?.name
window.open(
"/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent("/platform/sys/file/convertPDF?id=" + fileId),
fileName
)
}
onView(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
getFileName(row) {
if (row.replaceReport && row.replaceReport.length > 0) {
return row.replaceReport[0].name
} else {
return ""
}
onAudit(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.infoRef.onOpen(row)
})
},
async auditDo(pass) {
const str = pass ? "通过" : "不通过"
const confirm = await this.$confirm("您确定要审核" + str + "吗?", "提示", {
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
if (confirm === "confirm") {
const resp = await this.$axios.post("/platform/club/infoManage/schoolAuditReport/auditDo", {
id: this.clickRow.id,
pass: pass
}).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()
}
})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.dialogVisible = false
this.doSearch()
} else {
this.$message.warning(resp.msg)
}
}
})
},
audit(row) {
this.clickRow = clone(row)
this.dialogVisible = true
},
openView(row) {
this.$refs.guava.view(() => {
this.$refs.info.onOpen(row.id)
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()
}
})
})
},
async pageData() {
@@ -31,40 +31,28 @@ layout("/layouts/platform.html"){
</el-card>
<el-card class="mt10" shadow="never">
<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">
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会类型" prop="typeName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="createTime" sortable show-overflow-tooltip>
<template slot-scope="{row}">
<span>{{ $moment(row.createTime).format('YYYY-MM-DD') }}</span>
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="申请时间" prop="creatTime" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
<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="成立时间" prop="foundTime" sortable show-overflow-tooltip>
<template slot-scope="{row}">
<span>{{ $moment(row.foundTime).format('YYYY-MM-DD') }}</span>
</template>
</el-table-column>
<el-table-column label="联系人" prop="concatPersonName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="发起人" prop="sponsorName" sortable show-overflow-tooltip></el-table-column>
<el-table-column label="协会章程" prop="afterRulesFile" sortable show-overflow-tooltip>
<template scope="scope">
<span style="color: #0e78c5; text-decoration: underline; cursor: pointer" @click="showFiles(scope.row)">
{{getFileName(scope.row)}}
</span>
</template>
</el-table-column>
<el-table-column label="审核状态" prop="ruleState" sortable show-overflow-tooltip>
<template scope="scope">
<span v-if="scope.row.ruleState === 1">待校工会审核</span>
<span v-if="scope.row.ruleState === 2">校工会审核不通过</span>
<span v-if="scope.row.ruleState === 3">审核通过</span>
</template>
</el-table-column>
<el-table-column label="操作" width="200px">
<el-table-column label="操作" width="300px">
<template scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="audit(row)" size="mini" type="primary">审核</el-button>
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="onAudit(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>
@@ -72,91 +60,97 @@ layout("/layouts/platform.html"){
</el-card>
</template>
<template #view>
<club-info ref="info"></club-info>
<template #edit>
<info ref="infoRef">
<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="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row>
</div>
</info>
</template>
</guava>
<el-dialog width="40%" :visible.sync="dialogVisible" title="校工会审核">
<el-descriptions :column="2" border class="table_fixed">
<el-descriptions-item :span="2" label="旧协会章程">
<file-preview :files="clickRow.rulesFile" complete_result></file-preview>
</el-descriptions-item>
<el-descriptions-item label="新协会章程">
<file-preview :files="clickRow.afterRulesFile" complete_result></file-preview>
</el-descriptions-item>
</el-descriptions>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button @click="auditDo(false)" type="primary">不通过</el-button>
<el-button type="primary" @click="auditDo(true)">通过</el-button>
</span>
</el-dialog>
</div>
<script>
<!--#include("../../common/clubInfoComponent.js"){}#-->
<!--#include("../ruleUpdate/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"club-info": REGISTER_INFO_COMPONENT
"info": clubRuleInfo,
},
data() {
return {
dialogVisible: false,
clickRow: {},
clubId: ""
pageForm: {
approval: false
},
formData: {},
showApprovalForm: false
}
},
methods: {
showFiles(row) {
if (row.afterRulesFile && row.afterRulesFile.length > 0) {
let res = row.afterRulesFile[0]
let fileId = res?.response?.data.substring(res?.response?.data.lastIndexOf("=") + 1)
let fileName = res?.name
window.open(
"/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent("/platform/sys/file/convertPDF?id=" + fileId),
fileName
)
}
onView(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
getFileName(row) {
if (row.afterRulesFile && row.afterRulesFile.length > 0) {
return row.afterRulesFile[0].name
} else {
return ""
}
onAudit(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.infoRef.onOpen(row)
})
},
async auditDo(pass) {
const str = pass ? "通过" : "不通过"
const confirm = await this.$confirm("您确定要审核" + str + "吗?", "提示", {
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
if (confirm === "confirm") {
const resp = await this.$axios.post("/platform/club/infoManage/schoolAuditRule/auditDo", {
id: this.clickRow.id,
pass: pass
}).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()
}
})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.dialogVisible = false
this.doSearch()
} else {
this.$message.warning(resp.msg)
}
}
})
},
audit(row) {
this.clickRow = clone(row)
this.dialogVisible = true
},
openView(row) {
this.$refs.guava.view(() => {
this.$refs.info.onOpen(row.id)
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()
}
})
})
},
async pageData() {
@@ -119,8 +119,9 @@ layout("/layouts/platform.html"){
<el-checkbox v-model="isAgree">注:本人已仔细阅读并愿意遵守所参加本校教职工文体协会的章程和规定,自愿加入所报名协会。</el-checkbox>
</el-row>
<el-row type="flex" justify="end" class="mt10">
<!-- <el-button type="primary" plain @click="doSave">保存草稿</el-button>-->
<el-button type="primary" @click="doSubmit">提交申请</el-button>
<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>
@@ -131,6 +132,8 @@ layout("/layouts/platform.html"){
store,
data() {
return {
id: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: {},
formRules: {
clubId: [{ required: true, message: "请选择", trigger: ["blur", "change"] }],
@@ -153,7 +156,21 @@ layout("/layouts/platform.html"){
}
},
methods: {
doSubmit() {
onSave() {
this.$confirm("您确定保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/club/join/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
location.href = '/platform/club/join/mine'
}
})
})
},
onSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
if (!this.isAgree) {
@@ -171,6 +188,27 @@ layout("/layouts/platform.html"){
}
})
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
if (!this.isAgree) {
this.$message.warning("请先阅读并同意协议")
return
}
this.$axios.post('/platform/club/join/apply/submit/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
location.href = '/platform/club/join/mine'
}
})
})
},
checkApplyClub(val) {
this.$axios.post("/platform/club/join/apply/checkApplyClub", { clubId: val }).then((res) => {
if (res.code === 0) {
@@ -172,12 +172,12 @@ const CLUB_FORM_TEMPLATE = {
},
computed: {},
methods: {
concatPersonChange(id) {
/*concatPersonChange(id) {
const user = this.$refs.userSelectRef.options.find((user) => user.id === id)
this.$set(this.formData, "concatPersonUnitName", user.unitName)
this.$set(this.formData, "concatPersonMobile", user.mobile)
this.$set(this.formData, "concatPersonEmail", user.email)
}
}*/
},
created() {}
}
@@ -4,15 +4,15 @@ const CLUB_MANAGER_TEMPLATE = {
<el-table-column label="是否必填" prop="roleCode" width="130px">
<template slot-scope="scope">
<span class="text-danger"
v-if="scope.row.roleCode === 'CLUB_PRESIDENT'
|| scope.row.roleCode === 'CLUB_SECRETARY'">必填</span>
v-if="scope.row.roleCode.includes('CLUB_PRESIDENT')
|| scope.row.roleCode.includes('CLUB_SECRETARY')">必填</span>
<span v-else>非必填</span>
</template>
</el-table-column>
<el-table-column label="职务" prop="roleCode">
<template slot-scope="scope">
<el-select @change="(val) => {roleCodeChange(val, scope.row, scope.$index)}"
placeholder="请选择职务" v-model="scope.row.roleCode">
placeholder="请选择职务" v-model="scope.row.roleCode" multiple>
<el-option v-for="item in roleList"
:key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
@@ -28,13 +28,14 @@ layout("/layouts/platform.html"){
</div>
<el-row class="mt20" justify="end" type="flex">
<el-button v-if="id !== '' || from !== ''" @click="doBack">返回</el-button>
<el-button v-if="activeName === 1" type="primary" @click="activeName = 0">上一步</el-button>
<el-button v-if="activeName === 2" type="primary" @click="activeName = 1">上一步</el-button>
<el-button v-if="activeName === 0" type="primary" @click="nextStep">下一步</el-button>
<el-button v-if="activeName === 1" type="primary" @click="activeName = 2">下一步</el-button>
<el-button type="primary" @click="doSave">保存</el-button>
<el-button type="primary" @click="doSubmit">提交</el-button>
<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>
@@ -56,19 +57,12 @@ layout("/layouts/platform.html"){
data() {
return {
activeName: 0,
id: GetQueryString("id"),
id: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
from: GetQueryString("from")
}
},
methods: {
doBack() {
if (this.id !== "" && this.from === "") {
location.href = '/platform/club/clubMyApply'
}
if (this.from !== "") {
location.href = '/platform/sys/club/clubInfoManage'
}
},
nextStep() {
let valid = true
this.$refs.clubFormRef.$refs.form.validateField(
@@ -82,7 +76,7 @@ layout("/layouts/platform.html"){
if (valid) return
this.activeName = 1
},
async doSave() {
async onSave() {
let valid = true
this.$refs.clubFormRef.$refs.form.validateField("clubName", (errMsg) => {
if (errMsg) {
@@ -90,11 +84,18 @@ layout("/layouts/platform.html"){
}
})
if (!valid) return
await this.doHandle("doSave")
await this.doHandle("onSave")
},
async doSubmit() {
onSubmit() {
this.$refs.clubFormRef.$refs.form.validate().then(() => {
this.doHandle("doSubmit")
this.doHandle("onSubmit")
}).catch(() => {
this.$message.warning({ title: "警告", message: "存在必填项未填写!" })
})
},
onFinishTask() {
this.$refs.clubFormRef.$refs.form.validate().then(() => {
this.doHandle("onFinishTask")
}).catch(() => {
this.$message.warning({ title: "警告", message: "存在必填项未填写!" })
})
@@ -115,7 +116,7 @@ layout("/layouts/platform.html"){
formData.sponsor = this.$refs.clubSponsorRef.sponsorData
.filter((o) => o.userId !== "" && o.userId !== undefined)
.map((o) => o.userId)
if (type === "doSubmit" && formData.sponsor && formData.sponsor.length < 3) {
if (['onFinishTask', 'onSubmit'].includes(type) && formData.sponsor && formData.sponsor.length < 3) {
this.$message.warning({ title: "警告", message: "发起人要求不少于3人" })
return
}
@@ -126,7 +127,7 @@ layout("/layouts/platform.html"){
break
}
}
if (type === "doSubmit" && (this.$refs.clubManagerRef.managePerson.length === 0 || manageValid)) {
if (['onFinishTask', 'onSubmit'].includes(type) && (this.$refs.clubManagerRef.managePerson.length === 0 || manageValid)) {
this.$message.warning({ title: "警告", message: "请填写理事机构信息" })
return
}
@@ -140,12 +141,19 @@ layout("/layouts/platform.html"){
})
}
cloneData.sponsors = array
const url =
type === "doSave" ? "/platform/club/register/clubRegisterApply/doSave" : "/platform/club/register/clubRegisterApply/doSubmit"
let url = '';
if(type === 'onSave') {
url = '/platform/club/register/clubRegisterApply/save'
} else if(type === 'onSubmit') {
url = '/platform/club/register/clubRegisterApply/submit'
} else if(type === 'onFinishTask') {
url = '/platform/club/register/clubRegisterApply/submitAgain'
}
const resp = await this.$axios.post(url, {
club: JSON.stringify(cloneData),
managePerson: this.$refs.clubManagerRef.managePerson,
deleteIds: JSON.stringify(this.deleteIds)
deleteIds: JSON.stringify(this.deleteIds),
taskId: GetQueryString("taskId")
})
if (resp.code === 0) {
this.$message.success(resp.msg)
@@ -198,13 +206,13 @@ layout("/layouts/platform.html"){
this.$refs.clubSponsorRef.sponsorData.push(row)
})
this.$refs.clubFormRef.formData = formData
await this.$refs.clubFormRef.concatPersonChange(resp.data.concatPerson)
//await this.$refs.clubFormRef.concatPersonChange(resp.data.concatPerson)
}
} else {
this.$axios.post("/platform/club/register/clubRegisterApply/createCode").then((res) => {
if (res.code === 0) {
if (this.$refs.clubFormRef) {
this.$refs.clubFormRef.formData.clubCode = res.data
this.$set(this.$refs.clubFormRef.formData, 'clubCode', res.data)
}
}
})
@@ -78,7 +78,6 @@ layout("/layouts/platform.html"){
<script>
<!--#include("../../common/clubInfoComponent.js"){}#-->
<!--#include("../../common/clubRoleConstant.js"){}#-->
new Vue({
el: "#app",
store,
@@ -114,7 +113,7 @@ layout("/layouts/platform.html"){
})
},
onEdit(row) {
location.href = '/platform/club/register/clubRegisterApply?id=' + row.id
window.location.href = '/platform/club/register/clubRegisterApply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
},
async onDelete(id) {
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
@@ -0,0 +1,92 @@
const apply = {
template: /*language=HTML*/ `
<div>
<el-row :gutter="20">
<el-col :span="12" :offset="6" style="text-align: center">
<div style="font-size: large;color: #303133">
您正在预约【<span style="color: #409EFF">{{ row.name }}</span>】活动场地
</div>
</el-col>
</el-row>
<el-calendar v-model="applyTime">
<template slot="dateCell" slot-scope="{date, data}">
<div :class="getDayClass(data)" @click="pushDay(data)">
<p :style="selectDayList.includes(data.day) ? 'color: #246fb4' : ''">
{{ data.day.split('-').slice(1).join('-') }} {{ selectDayList.includes(data.day) ? '✔️' : ''}}
</p>
</div>
</template>
</el-calendar>
<div style="text-align: right">
<el-button @click="openAdd" type="primary">下一步</el-button>
</div>
</div>
`,
data() {
return {
row: {},
applyTime: '',
allowDayList: [],
selectDayList: [],
}
},
methods: {
onOpen(row) {
this.row = row
},
openAdd() {},
async pushDay(data) {
this.$nextTick(async () => {
await this.queryAllowTime(this.$moment(data.day).year(), this.$moment(data.day).month() + 1)
})
if (this.allowDayList.length > 0 && !this.allowDayList.includes(data.day)) {
this.$message.warning(data.day + "不能预约")
return
}
if (data.day < this.$moment(new Date()).format('YYYY-MM-DD')) {
this.$message.warning('你选择的日期已过')
return
}
if (this.selectDayList.includes(data.day)) {
this.selectDayList.splice(this.selectDayList.indexOf(data.day), 1)
} else {
this.selectDayList = []
this.selectDayList.push(data.day)
this.selectDayList.sort()
}
},
// 查询哪些天是开放的
async queryAllowTime(year = null, month = null) {
const titleText = $('.el-calendar__title').text().trim().replaceAll(' ', '')
const m = this.$moment(titleText, "YYYY年M月")
const {data} = await this.$axios.post("/platform/site/apply/queryAllowTime", {
siteId: this.row.id,
year: year != null ? year : m.year(),
month: month != null ? month : m.month() + 1,
})
this.allowDayList = data
},
getDayClass(data) {
let classStr = 'div-Calendar'
if(this.allowDayList.length > 0 && !this.allowDayList.includes(data.day)) {
classStr += ' not-allow-day';
}
if(this.$moment(data.day).isBefore(this.$moment().startOf('day'))) {
classStr += ' not-allow-day';
}
return classStr
},
},
style: /*language=CSS*/ `
.div-Calendar {
box-sizing: border-box;
height: 100%;
}
.div-Calendar p {
margin: 0;
}
.el-calendar-day:has(.not-allow-day) {
background-color: #F5F5F5;
}
`
}
@@ -0,0 +1,132 @@
<!--#
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" v-model="pageForm.year"
@change="doSearch" 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-item label="场地类型">
<el-select v-model="pageForm.type" clearable filterable placeholder="请选择场地类型" @change="doSearch">
<el-option
v-for="item in typeOptions"
: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="场地列表"></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="180">
<template v-slot="{ row }">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="onApply(row)" size="mini" type="primary">预约</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<site-apply ref="applyRef"></site-apply>
</template>
<template #view>
<info ref="infoRef"></info>
</template>
</guava>
</div>
<script>
<!--#include('../manage/info.js'){}#-->
<!--#include('apply.js'){}#-->
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"info": siteInfo,
"site-apply": apply,
},
data() {
return {
typeOptions: [],
tableColumns: [
{prop: 'name', label: '场地名称'},
{prop: 'sortNum', label: '排序编号'},
{prop: 'address', label: '场地地址'},
{prop: 'contactName', label: '联系人'},
{prop: 'contactPhone', label: '联系方式'},
],
}
},
methods: {
refresh() {
this.doSearch()
this.$refs.guava.index()
},
onApply(row) {
this.$refs.guava.edit(() => {
this.$refs.applyRef.onOpen(row)
})
},
onView(row) {
this.$refs.guava.view(() => {
this.$refs.infoRef.onOpen(row)
})
},
querySiteType() {
this.$axios.post("/platform/site/type/querySiteType").then((res) => {
this.typeOptions = res.data
})
},
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.querySiteType()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,405 @@
const basicForm = {
template: /*language=HTML*/ `
<div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left">
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item label="创建人" prop="createUserName">
<el-input disabled type="text" v-model="formData.createUserName" maxlength="20" placeholder="请输入创建人"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建时间" prop="createTime">
<el-input disabled type="text" v-model="formData.createTime" maxlength="20" placeholder="请输入创建时间"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item label="场地名称" prop="name">
<el-input type="text" v-model="formData.name" maxlength="50" placeholder="请输入场地名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="场地地址" prop="address">
<el-input type="text" v-model="formData.address" maxlength="100" placeholder="请输入场地地址"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item label="联系人" prop="contactName">
<el-input type="text" v-model="formData.contactName" maxlength="20" placeholder="请输入联系人"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="contactPhone">
<el-input type="text" v-model="formData.contactPhone" maxlength="20" placeholder="请输入联系电话"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item prop="sortNum" label="排序编号">
<el-input v-model="formData.sortNum" placeholder="请输入排序编号" type="number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="容纳人数" prop="maxNum">
<el-input v-model="formData.maxNum" placeholder="请输入容纳人数" type="number"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item label="场地类型" prop="typeId">
<el-select v-model="formData.typeId" clearable filterable placeholder="请选择场地类型" style="width: 100%">
<el-option
v-for="item in typeList"
:label="item.name"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="reserveTarget" label="面向对象">
<el-radio-group v-model="formData.reserveTarget" size="medium">
<el-radio-button :label="1">面向分工会</el-radio-button>
<el-radio-button :label="2">面向个人</el-radio-button>
<el-radio-button :label="3">面向集体</el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item prop="sexLimit" label="性别限制">
<el-radio-group v-model="formData.sexLimit" size="medium">
<el-radio-button :label="0">不限制</el-radio-button>
<el-radio-button :label="1">男</el-radio-button>
<el-radio-button :label="2">女</el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="state" label="开启状态">
<el-radio-group v-model="formData.state" size="medium">
<el-radio-button :label="true">开启</el-radio-button>
<el-radio-button :label="false">禁用</el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item prop="filterHolidays" label="排除节假日">
<el-radio-group v-model="formData.filterHolidays" size="medium">
<el-radio-button :label="true">是</el-radio-button>
<el-radio-button :label="false">否</el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="禁用时间">
<el-button type="primary" @click="openSetUpTime" size="small">点击设置禁用时间</el-button>
<span style="color: #c64120">您已设置{{ formData.notApplyTimeList ? formData.notApplyTimeList.length : 0 }}个禁用时间</span>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="场地介绍">
<text-editor v-model="formData.introduce"></text-editor>
</el-form-item>
<div class="left-span-label">添加场次(温馨提醒:如果设置了预约时间单位,那么系统会在开始时间至结束时间范围内,按照设置的单位来拆分成多个时间段,如果未设置或者为0,则表示开始时间至结束时间是一个时间段)</div>
<el-table :data="formData.openHours" border size="mini">
<el-table-column prop="weekNum" label="星期" align="center" header-align="center">
<template v-slot="{ row }">
<el-select style="width: 100%" v-model="row.weekNum" filterable placeholder="请选择星期">
<el-option label="周一" :value="1"></el-option>
<el-option label="周二" :value="2"></el-option>
<el-option label="周三" :value="3"></el-option>
<el-option label="周四" :value="4"></el-option>
<el-option label="周五" :value="5"></el-option>
<el-option label="周六" :value="6"></el-option>
<el-option label="周日" :value="0"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="startTime" label="开始时间" align="center" header-align="center">
<template v-slot="{ row }">
<el-time-select
style="width: 100%"
placeholder="开始时间"
v-model="row.startTime"
:picker-options="{ start: '00:00',step: '00:30',end: '24:00'}">
</el-time-select>
</template>
</el-table-column>
<el-table-column prop="endTime" label="结束时间" align="center" header-align="center">
<template v-slot="{ row }">
<el-time-select
style="width: 100%"
placeholder="结束时间"
v-model="row.endTime"
:picker-options="{start: '00:00',step: '00:30',end: '24:00',minTime: row.start_time }">
</el-time-select>
</template>
</el-table-column>
<el-table-column prop="timeUnit" label="预约时间单位(小时)" align="center" header-align="center">
<template v-slot="{ row }">
<el-input-number style="width: 100%" v-model="row.timeUnit" placeholder="请输入预约时间单位" :step="0.5"></el-input-number>
</template>
</el-table-column>
<el-table-column label="操作" align="center" header-align="center" width="100px">
<template slot="header">
<el-button size="mini" type="primary" icon="el-icon-plus"
@click="formData.openHours.push({})"></el-button>
</template>
<template v-slot="{ row }">
<el-button type="danger" icon="el-icon-delete"
:disabled="formData.openHours.length==0" size="mini"
@click="formData.openHours.splice(scope.$index, 1)"></el-button>
</template>
</el-table-column>
</el-table>
</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>
<el-dialog append-to-body :close-on-click-modal="false" :visible.sync="setUpTimeDialog" title="设置时间">
<div class="left-span-label">选择日期</div>
<el-date-picker
@change="setUpDateChange"
placeholder="请选择一个或多个日期"
style="width: 100%"
type="dates"
v-model="formData.setUpDate"
value-format="yyyy-MM-dd">
</el-date-picker>
<div class="left-span-label mt20">设置禁用时间</div>
<el-row>
<el-time-select
:picker-options="{
start: '08:30',
step: '00:05',
end: '23:30'
}"
placeholder="开始时间"
v-model="timeOneKeySet.startTime">
</el-time-select>
<el-time-select
:picker-options="{
start: '08:30',
step: '00:05',
end: '23:30'
}"
placeholder="结束时间"
v-model="timeOneKeySet.endTime">
</el-time-select>
<el-button @click="oneKeySetStartEndTime" type="primary">一键设置开始/结束时间</el-button>
</el-row>
<el-table :data="formData.notApplyTimeList" class="mt10" max-height="520px" size="mini" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="日期" width="200">
<template v-slot="{row}">
<i class="el-icon-time"></i>
{{$moment(row.date).format('YYYY-MM-DD')}}
</template>
</el-table-column>
<el-table-column label="开始时间">
<template v-slot="{row}">
<el-time-select
size="mini"
:picker-options="{
start: '08:30',
step: '00:05',
end: '23:30'
}"
v-model="row.startTime">
</el-time-select>
</template>
</el-table-column>
<el-table-column label="结束时间">
<template v-slot="{row}">
<el-time-select
size="mini"
:picker-options="{
start: '08:30',
step: '00:05',
end: '23:30'
}"
v-model="row.endTime">
</el-time-select>
</template>
</el-table-column>
<el-table-column label="操作" width="200">
<template v-slot="{row, $index}">
<el-button
size="mini"
@click="formData.notApplyTimeList.splice($index,0,{date:row.date,startTime:'',endTime:''})"
type="primary">
新增同天时段
</el-button>
<el-button size="mini" @click="removeSetUpTableRow(row,$index)" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="mt20" justify="end" type="flex">
<el-button @click="setUpTimeDialog = false">取消</el-button>
<el-button @click="doConfirmSetUpCourse" type="primary">确定</el-button>
</el-row>
</el-dialog>
</div>
`,
props: {
typeList: {
type: Array,
required: false,
default: [],
}
},
store,
data() {
return {
formData: {
state: true,
notApplyTimeList: [],
reserveTarget: 2,
sexLimit: 0,
filterHolidays: false,
createUserName: this.$store.state.user.username,
createUserId: this.$store.state.user.id,
createTime: this.$moment().format('YYYY-MM-DD'),
openHours: [],
},
formRules: {
createUserName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
creatTime: [{required: true, message: '必填', trigger: ['blur', 'change']}],
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
address: [{required: true, message: '必填', trigger: ['blur', 'change']}],
contactName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
contactPhone: [{required: true, message: '必填', trigger: ['blur', 'change']}],
sortNum: [{required: true, message: '必填', trigger: ['blur', 'change']}],
maxNum: [{required: true, message: '必填', trigger: ['blur', 'change']}],
typeId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
reserveTarget: [{required: true, message: '必填', trigger: ['blur', 'change']}],
sexLimit: [{required: true, message: '必填', trigger: ['blur', 'change']}],
state: [{required: true, message: '必填', trigger: ['blur', 'change']}],
filterHolidays: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
setUpTimeDialog: false,
timeOneKeySet: {
startTime: "",
endTime: ""
},
multipleSelection: [],
}
},
methods: {
doConfirmSetUpCourse() {
const courseTableData = this.formData.notApplyTimeList
if (courseTableData && courseTableData.length > 0) {
const valid = courseTableData.every(v => v.startTime && v.endTime && (v.startTime < v.endTime))
if (!valid) {
this.$message.warning("时间不完整或者有误")
return
}
this.setUpTimeDialog = false
}
},
removeSetUpTableRow(row, index) {
this.formData.notApplyTimeList.splice(index, 1)
const courseDateArray = this.formData.notApplyTimeList.map(v => this.$moment(v.date).format("YYYY-MM-DD"))
const scdList = this.formData.setUpDate
this.formData.setUpDate = scdList.filter(v => {
return courseDateArray.includes(this.$moment(v).format("YYYY-MM-DD"))
})
},
handleSelectionChange(val) {
this.multipleSelection = val
},
oneKeySetStartEndTime() {
if(this.multipleSelection.length === 0) {
this.$message.warning('请选择需要一键设置的时间')
return
}
const { startTime, endTime } = this.timeOneKeySet
this.formData.notApplyTimeList.forEach(v => {
const o = this.multipleSelection.find(o => o.date === v.date && o.startTime === v.startTime && o.endTime === v.endTime)
if(o) {
this.$set(v, "startTime", startTime)
this.$set(v, "endTime", endTime)
}
})
this.$forceUpdate()
},
setUpDateChange(val) {
if (!val) {
this.formData.notApplyTimeList = []
return
}
if (this.formData.notApplyTimeList === undefined) {
this.$set(this.formData, "notApplyTimeList", [])
}
const ctList = new Set(this.formData.notApplyTimeList.map(v => this.$moment(v.date).format("YYYY-MM-DD")))
val.forEach(v => {
if (!ctList.has(v)) {
this.formData.notApplyTimeList.push({
date: v, time: null
})
}
})
this.formData.notApplyTimeList = this.formData.notApplyTimeList.filter(v => {
return val.includes(this.$moment(v.date).format("YYYY-MM-DD"))
})
this.formData.notApplyTimeList.sort((a, b) => {
return Date.parse(a["date"]) - Date.parse(b["date"])
})
},
openSetUpTime() {
if(this.formData.notApplyTimeList) {
this.$set(this.formData, 'setUpDate', this.formData.notApplyTimeList.map(o => o.date))
}
this.setUpTimeDialog = true
},
onOpen(row) {
if(row && row.id) {
this.formData = clone(row)
}
},
onSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
const resp = await this.$axios.post("/platform/site/manage/submit", {data: JSON.stringify(this.formData)})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.$emit('refresh')
} else {
this.$message.warning(resp.msg)
}
})
}
})
},
},
style: /*language=CSS*/ `
`
}
@@ -0,0 +1,175 @@
<!--#
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" v-model="pageForm.year"
@change="doSearch" 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-item label="场地类型">
<el-select v-model="pageForm.type" clearable filterable placeholder="请选择场地类型" @change="doSearch">
<el-option
v-for="item in typeOptions"
: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 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 === 'state'">
<el-switch
@change="switchChange(row)"
v-model="row.state"
active-color="#13ce66"
inactive-color="#ff4949">
</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 :type-list="typeOptions" ref="basicFormRef" @refresh="refresh"></basic-form>
</template>
<template #view>
<info ref="infoRef"></info>
</template>
</guava>
</div>
<script>
<!--#include('basicForm.js'){}#-->
<!--#include('info.js'){}#-->
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"basic-form": basicForm,
"info": siteInfo,
},
data() {
return {
typeOptions: [],
tableColumns: [
{prop: 'name', label: '场地名称'},
{prop: 'sortNum', label: '排序编号'},
{prop: 'address', label: '场地地址'},
{prop: 'contactName', label: '联系人'},
{prop: 'contactPhone', label: '联系方式'},
{prop: 'state', label: '开启状态'},
],
}
},
methods: {
refresh() {
this.doSearch()
this.$refs.guava.index()
},
onAdd() {
this.$refs.guava.edit(() => {
this.$refs.basicFormRef.onOpen()
})
},
onEdit(row) {
this.$refs.guava.edit(() => {
this.$refs.basicFormRef.onOpen(row)
})
},
onView(row) {
this.$refs.guava.view(() => {
this.$refs.infoRef.onOpen(row)
})
},
onDelete(row) {
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$axios.post("/platform/site/manage/delete", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
.catch(() => {})
},
switchChange(row) {
this.$axios.post("/platform/site/manage/submit", row).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
},
querySiteType() {
this.$axios.post("/platform/site/type/querySiteType").then((res) => {
this.typeOptions = res.data
})
},
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.querySiteType()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,88 @@
const siteInfo = {
template: /*language=HTML*/ `
<div>
<el-descriptions :column="2" border>
<el-descriptions-item label="创建人">{{ viewData.createUserName }}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{ viewData.createTime }}</el-descriptions-item>
<el-descriptions-item label="场地名称">{{ viewData.name }}</el-descriptions-item>
<el-descriptions-item label="场地地址">{{ viewData.address }}</el-descriptions-item>
<el-descriptions-item label="联系人">{{ viewData.contactName }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.contactPhone }}</el-descriptions-item>
<el-descriptions-item label="排序编号">{{ viewData.sortNum }}</el-descriptions-item>
<el-descriptions-item label="容纳人数">{{ viewData.maxNum }}</el-descriptions-item>
<el-descriptions-item label="场地类型">{{ viewData.typeName }}</el-descriptions-item>
<el-descriptions-item label="面向对象">
<span v-if="viewData.reserveTarget === 1">面向分工会</span>
<span v-if="viewData.reserveTarget === 2">面向个人</span>
<span v-if="viewData.reserveTarget === 3">面向集体</span>
</el-descriptions-item>
<el-descriptions-item label="性别限制">
<span v-if="viewData.sexLimit === 0">不限制</span>
<span v-if="viewData.sexLimit === 1">男</span>
<span v-if="viewData.sexLimit === 2">女</span>
</el-descriptions-item>
<el-descriptions-item label="开启状态">
<span v-if="viewData.state">开启</span>
<span v-else>禁用</span>
</el-descriptions-item>
<el-descriptions-item label="排除节假日" :span="2">
<span v-if="viewData.state">是</span>
<span v-else>否</span>
</el-descriptions-item>
<el-descriptions-item label="场地介绍" :span="2">
<div v-if="viewData.introduce" v-html="viewData.introduce"></div>
<div v-else>暂无场地介绍</div>
</el-descriptions-item>
<el-descriptions-item label="禁用时间" :span="2">
<el-table v-if="viewData.notApplyTimeList && viewData.notApplyTimeList.length > 0"
:data="viewData.notApplyTimeList" max-height="300" size="mini">
<el-table-column prop="date" label="日期"></el-table-column>
<el-table-column prop="startTime" label="开始时间"></el-table-column>
<el-table-column prop="endTime" label="结束时间"></el-table-column>
</el-table>
<span v-else>暂无禁用时间</span>
</el-descriptions-item>
<el-descriptions-item label="场次" :span="2">
<el-table v-if="viewData.openHours && viewData.openHours.length > 0"
:data="viewData.openHours" max-height="300" size="mini">
<el-table-column prop="weekNum" label="星期">
<template v-slot="{ row }">
<span v-if="row.weekNum === 1">周一</span>
<span v-if="row.weekNum === 2">周二</span>
<span v-if="row.weekNum === 3">周三</span>
<span v-if="row.weekNum === 4">周四</span>
<span v-if="row.weekNum === 5">周五</span>
<span v-if="row.weekNum === 6">周六</span>
<span v-if="row.weekNum === 0">周日</span>
</template>
</el-table-column>
<el-table-column prop="startTime" label="开始时间"></el-table-column>
<el-table-column prop="endTime" label="结束时间"></el-table-column>
<el-table-column prop="timeUnit" label="预约时间单位(小时)"></el-table-column>
</el-table>
<span v-else>暂无场次</span>
</el-descriptions-item>
</el-descriptions>
</div>
`,
data() {
return {
viewData: {},
}
},
methods: {
onOpen(row) {
this.viewData = row
},
},
style: /*language=CSS*/ `
.el-descriptions-item__label {
width: 200px;
min-width: 200px;
max-width: 200px;
}
.el-tabs__header {
margin: 0;
}
`
}
@@ -0,0 +1,68 @@
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="code">
<el-input type="text" v-model="formData.code" maxlength="50"
placeholder="请输入类型编码"></el-input>
</el-form-item>
<el-form-item label="类型名称" prop="name">
<el-input type="text" v-model="formData.name" maxlength="50"
placeholder="请输入类型名称"></el-input>
</el-form-item>
<el-form-item label="是否启用" prop="enable">
<el-switch
v-model="formData.enable"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</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: {
enable: true
},
formRules: {
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
code: [{required: true, message: '必填', trigger: ['blur', 'change']}],
enable: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
}
},
methods: {
onOpen(row) {
if(row && row.id) {
this.formData = clone(row)
}
},
onSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
const resp = await this.$axios.post("/platform/site/type/submit", this.formData)
if (resp.code === 0) {
this.$message.success(resp.msg)
this.$emit('refresh')
} else {
this.$message.warning(resp.msg)
}
})
}
})
},
},
style: /*language=CSS*/ `
`
}
@@ -0,0 +1,139 @@
<!--#
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-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="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 === 'enable'">
<el-switch
@change="switchChange(row)"
v-model="row.enable"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" width="230">
<template v-slot="{ row }">
<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>
</guava>
</div>
<script>
<!--#include('basicForm.js'){}#-->
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"basic-form": basicForm,
},
data() {
return {
tableColumns: [
{prop: 'code', label: '类型编码'},
{prop: 'name', label: '类型名称'},
{prop: 'enable', label: '是否启用'},
],
}
},
methods: {
refresh() {
this.doSearch()
this.$refs.guava.index()
},
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/site/type/delete", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
.catch(() => {})
},
switchChange(row) {
this.$axios.post("/platform/site/type/submit", row).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
},
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>
<!--#
}
#-->
@@ -188,7 +188,7 @@ layout("/layouts/platform.html"){
<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>提交1</el-button>
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
</el-row>
</el-card>
</div>
@@ -289,8 +289,7 @@ layout("/layouts/platform.html"){
type: "warning"
}).then(() => {
this.$axios.post('/platform/condolence/apply/submit', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
@@ -307,11 +306,9 @@ layout("/layouts/platform.html"){
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/flow/common/executeTask', {
data: JSON.stringify({
processTaskId: GetQueryString("taskId"),
submitType: 5
})
this.$axios.post('/platform/condolence/apply/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
@@ -62,10 +62,7 @@ layout("/layouts/platform.html"){
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
<el-button v-else-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
</template>
@@ -74,9 +74,12 @@ layout("/layouts/platform.html"){
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="100">
<el-table-column label="操作" fixed="right" width="180">
<template slot-scope="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
</template>
</el-table-column>
</el-table>
@@ -116,6 +119,20 @@ layout("/layouts/platform.html"){
}
},
methods: {
onDelete(id) {
this.$confirm("您确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/condolence/mine/delete", { id }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
},
onExport() {
this.$downLoad(loc() + '/onExport', this.pageForm)
},