Merge remote-tracking branch 'origin/main'
# Conflicts: # src/main/resources/static/assets/platform/css/h5.css
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
<template>
|
||||
<div>
|
||||
<template v-for="item in options">
|
||||
<el-tag :key="item[value_key]" v-if="item[value_key] === value" v-bind="$attrs"
|
||||
:type="item.type"
|
||||
>{{ item[label_key] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</div>
|
||||
<div>
|
||||
<template v-if="mode === 'pc'" v-for="item in options">
|
||||
<el-tag :key="item[value_key]" v-if="item[value_key] === value" v-bind="$attrs"
|
||||
:type="item.type"
|
||||
>{{ item[label_key] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
<template v-if="mode === 'h5'" v-for="item in options">
|
||||
<van-tag :key="item[value_key]" v-if="item[value_key] === value" v-bind="$attrs"
|
||||
:type="item.type">
|
||||
{{ item[label_key] }}
|
||||
</van-tag>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -15,73 +22,80 @@ const enumCache = {}
|
||||
const requestPromises = {}
|
||||
|
||||
module.exports = {
|
||||
name: "DictTag",
|
||||
props: {
|
||||
value: {type: String | Number},
|
||||
name: {type: String},
|
||||
value_key: {
|
||||
type: String,
|
||||
default: "code"
|
||||
name: "DictTag",
|
||||
props: {
|
||||
value: { type: String | Number },
|
||||
name: { type: String },
|
||||
value_key: {
|
||||
type: String,
|
||||
default: "code"
|
||||
},
|
||||
label_key: {
|
||||
type: String,
|
||||
default: "name"
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: "pc"
|
||||
}
|
||||
},
|
||||
label_key: {
|
||||
type: String,
|
||||
default: "name"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
code: {
|
||||
handler(val) {
|
||||
this.getEnumOptions()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getEnumOptions() {
|
||||
// // 检查数据缓存
|
||||
// if (enumCache[this.name]) {
|
||||
// this.options = enumCache[this.name]
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// // 检查是否已有相同请求在进行中
|
||||
// if (requestPromises[this.name]) {
|
||||
// requestPromises[this.name].then(data => {
|
||||
// this.options = data
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
data() {
|
||||
return {
|
||||
options: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
code: {
|
||||
handler(val) {
|
||||
this.getEnumOptions()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getEnumOptions() {
|
||||
// // 检查数据缓存
|
||||
// if (enumCache[this.name]) {
|
||||
// this.options = enumCache[this.name]
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// // 检查是否已有相同请求在进行中
|
||||
// if (requestPromises[this.name]) {
|
||||
// requestPromises[this.name].then(data => {
|
||||
// this.options = data
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
// 创建请求Promise并缓存
|
||||
requestPromises[this.name] = $.get("/open/common/dictEnumOptions", {name: this.name})
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
// 存入数据缓存
|
||||
enumCache[this.name] = res.data
|
||||
// 清除请求Promise缓存
|
||||
delete requestPromises[this.name]
|
||||
return res.data
|
||||
}
|
||||
})
|
||||
// 创建请求Promise并缓存
|
||||
requestPromises[this.name] = $.get("/open/common/dictEnumOptions", { name: this.name })
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
// 存入数据缓存
|
||||
enumCache[this.name] = res.data
|
||||
// 清除请求Promise缓存
|
||||
delete requestPromises[this.name]
|
||||
return res.data
|
||||
}
|
||||
})
|
||||
|
||||
requestPromises[this.name].then(data => {
|
||||
this.options = data
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
requestPromises[this.name].then(data => {
|
||||
this.options = data
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-tag + .el-tag {
|
||||
margin-left: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.van-tag {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -105,6 +105,7 @@ module.exports = {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
val = JSON.parse(val)
|
||||
this.fileList = val.map((v) => {
|
||||
return {
|
||||
...v,
|
||||
|
||||
@@ -364,6 +364,7 @@
|
||||
Vue.component("svg-icon", httpVueLoader("/components/plugins/sysSvgIcon/index.vue?v=" + new Date().getTime()))
|
||||
Vue.component("year-van-dropdown-item", httpVueLoader("/components/plugins/vantMore/yearVanDropDownItem.vue?v=" + new Date().getTime()))
|
||||
Vue.component("van-text-dialog", httpVueLoader("/components/plugins/vantMore/vantTextDialog.vue?v=" + new Date().getTime()))
|
||||
Vue.component("enum-tag", httpVueLoader("/components/plugins/sysEnum/EnumTag.vue?v=" + new Date().getTime()))
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -45,7 +45,6 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
<el-form-item label="是否用于报名" prop="isEnrollSystem">
|
||||
<el-radio-group v-model="formData.isEnrollSystem" size="small">
|
||||
<el-radio border :label="true">活动报名</el-radio>
|
||||
<el-radio border :label="false">活动管理</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -529,8 +528,9 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
|
||||
bizId: "",
|
||||
taskId: "",
|
||||
activeName: "1",
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + ""
|
||||
@@ -613,7 +613,7 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
formData.plannedDate = null
|
||||
}
|
||||
|
||||
this.$axios.post('/platform/activity/culture/applyActivity/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
this.$axios.post('/platform/activity/culture/applyActivity/save', {data: JSON.stringify(formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("保存成功")
|
||||
if (this.activity_type === 40002) {
|
||||
@@ -627,6 +627,89 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提交
|
||||
onSubmit() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
formData.activity_type = this.activity_type
|
||||
const {time, applyTime2, plannedDate} = formData
|
||||
if (applyTime2 && applyTime2.length) {
|
||||
formData.applyStartTime = applyTime2[0]
|
||||
formData.applyEndTime = applyTime2[1]
|
||||
formData.applyTime2 = null
|
||||
}
|
||||
if (time && time.length) {
|
||||
formData.startTime = formData.time[0]
|
||||
formData.endTime = formData.time[1]
|
||||
formData.time = null
|
||||
}
|
||||
if (plannedDate && plannedDate.length) {
|
||||
formData.startPlannedDate = formData.plannedDate[0]
|
||||
formData.endPlannedDate = formData.plannedDate[1]
|
||||
formData.plannedDate = null
|
||||
}
|
||||
this.$axios.post('/platform/activity/culture/applyActivity/submit', {
|
||||
data: JSON.stringify(formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
if (this.activity_type === 40002) {
|
||||
window.location.href = "/platform/activity/culture/infoManage/union"
|
||||
} else if (this.activity_type === 40003) {
|
||||
window.location.href = "/platform/activity/culture/infoManage/club"
|
||||
} else {
|
||||
window.location.href = "/platform/activity/culture/infoManage/school"
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 再次提交
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
formData.activity_type = this.activity_type
|
||||
const {time, applyTime2, plannedDate} = formData
|
||||
if (applyTime2 && applyTime2.length) {
|
||||
formData.applyStartTime = applyTime2[0]
|
||||
formData.applyEndTime = applyTime2[1]
|
||||
formData.applyTime2 = null
|
||||
}
|
||||
if (time && time.length) {
|
||||
formData.startTime = formData.time[0]
|
||||
formData.endTime = formData.time[1]
|
||||
formData.time = null
|
||||
}
|
||||
if (plannedDate && plannedDate.length) {
|
||||
formData.startPlannedDate = formData.plannedDate[0]
|
||||
formData.endPlannedDate = formData.plannedDate[1]
|
||||
formData.plannedDate = null
|
||||
}
|
||||
this.$axios.post('/platform/activity/culture/applyActivity/submitAgain', {
|
||||
data: JSON.stringify(formData),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
if (this.activity_type === 40002) {
|
||||
window.location.href = "/platform/activity/culture/infoManage/union"
|
||||
} else if (this.activity_type === 40003) {
|
||||
window.location.href = "/platform/activity/culture/infoManage/club"
|
||||
} else {
|
||||
window.location.href = "/platform/activity/culture/infoManage/school"
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async remoteMethod(query) {
|
||||
if (query) {
|
||||
this.selectLoading = true
|
||||
@@ -832,9 +915,11 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
}
|
||||
}
|
||||
},
|
||||
openEdit(id) {
|
||||
openEdit(row) {
|
||||
this.taskId=row.startTaskId
|
||||
this.bizId=row.id
|
||||
this.activeName = "1"
|
||||
this.init(id)
|
||||
this.init(row.id)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
|
||||
@@ -17,7 +17,7 @@ const ACTIVITY_CULTURE_APPLY_USER = {
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="活动时间">
|
||||
<search-item label="活动名称">
|
||||
<el-input clearable placeholder="请输入活动名称"
|
||||
v-model="pageForm.name"></el-input>
|
||||
</search-item>
|
||||
@@ -132,7 +132,7 @@ const ACTIVITY_CULTURE_APPLY_USER = {
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoActivity.findOne(row.id)
|
||||
this.$refs.infoActivity.onOpen(row)
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
|
||||
@@ -38,7 +38,7 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="活动列表">
|
||||
<el-radio-group @change="doSearch" size="small" v-model="pageForm.state">
|
||||
<el-radio-group @change="doSearch" size="small" v-model="pageForm.approval">
|
||||
<el-radio-button :key="i.code" :label="i.code" v-for="i in auditList">{{i.name}}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
@@ -70,89 +70,62 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
{{row.projectTypeName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='tussueName'">
|
||||
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40001">校工会</span>
|
||||
<template scope="{row}" v-else-if="column.prop=='curTaskName'">
|
||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||
{{row.curTaskName}}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='state'">
|
||||
{{row.state===1?'未审核':row.state===2?'审核不通过':'审核通过'}}
|
||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作"
|
||||
prop="userOnline" width="150px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button :loading="row.loading" @click="openView(row)" size="mini">
|
||||
<el-button :loading="row.loading" @click="onView(row)" size="mini">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button :loading="row.loading" @click="openAudit(row)" size="mini"
|
||||
type="primary"
|
||||
v-if="row.state===1">
|
||||
审核
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
<template #edit>
|
||||
<activity-culture-info-activity handle label="校工会审核" ref="editInfo">
|
||||
<template #handle>
|
||||
<el-form :model="formData" label-position="right"
|
||||
label-width="120px"
|
||||
style="padding: 20px 0">
|
||||
<el-form-item class="view-header" label="审核信息" label-width="135px">
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见" prop="idea">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见"
|
||||
rows="4" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button :disabled="subDis" @click="doReview(false)"
|
||||
type="danger">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button :disabled="subDis" @click="doReview(true)"
|
||||
type="success">通
|
||||
过
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<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>
|
||||
</activity-culture-info-activity>
|
||||
</template>
|
||||
<template #view>
|
||||
<activity-culture-info-activity ref="infoActivity"></activity-culture-info-activity>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
`,
|
||||
props: {
|
||||
@@ -166,12 +139,13 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
return {
|
||||
subDis: false,
|
||||
unionList: [],
|
||||
showApprovalForm: false,
|
||||
auditList: [
|
||||
{ code: true, name: "已审核" },
|
||||
{ code: false, name: "未审核" }
|
||||
],
|
||||
pageForm: {
|
||||
state: false,
|
||||
approval: false,
|
||||
year: new Date().getFullYear() + ""
|
||||
},
|
||||
tableColumns: [
|
||||
@@ -181,7 +155,6 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
{ prop: "tussueName", label: "举办单位" },
|
||||
{ prop: "time", label: "活动日期" },
|
||||
{ prop: "applyTime", label: "创建时间", sortable: true },
|
||||
{ prop: "state", label: "审核状态", sortable: true }
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -189,39 +162,23 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
"activity-culture-info-activity": ACTIVITY_CULTURE_INFO_ACTIVITY
|
||||
},
|
||||
methods: {
|
||||
async doReview(flag) {
|
||||
const confirm = await this.$confirm("确定要审核" + (flag ? "通过" : "拒绝") + "吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
this.formData.flag = flag
|
||||
this.subDis = true
|
||||
flag ? (this.subLoading2 = true) : (this.subLoading1 = true)
|
||||
const resp = await $.post("/platform/activity/culture/auditActivity/doReview", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.editInfo.findOne(row.id)
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
username: this.$store.state.user.username,
|
||||
auditTime: this.$moment().format("YYYY-MM-DD")
|
||||
}
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.editInfo.onOpen(row)
|
||||
})
|
||||
|
||||
},
|
||||
openView(row) {
|
||||
const { id } = row
|
||||
this.$refs.guava.view()
|
||||
this.$refs.infoActivity.findOne(id)
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.editInfo.onOpen(row)
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
@@ -233,9 +190,50 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
}
|
||||
})
|
||||
this.tableLoading = false
|
||||
},
|
||||
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 created() {
|
||||
// 根据 activity_type 动态添加流程相关列
|
||||
if (this.activity_type === 40002 || this.activity_type === 40003) {
|
||||
this.tableColumns.push(
|
||||
{prop: "curTaskName", label: "当前节点"},
|
||||
{prop: "instanceState", label: "流程状态"}
|
||||
);
|
||||
}
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.pageData()
|
||||
}
|
||||
|
||||
@@ -1,123 +1,129 @@
|
||||
const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-tabs tab-position="top" v-loading="loading" v-model="activeName">
|
||||
<el-tab-pane label="活动基础信息" name="1">
|
||||
<el-descriptions :column="3" border class="margin-top" style="margin: 10px" title="">
|
||||
<el-descriptions-item label="活动名称" span="3">
|
||||
<span class="item-center"> {{ viewData.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<el-descriptions :column="3" border class="margin-top" style="margin: 10px" title="">
|
||||
<el-descriptions-item label="活动名称" span="3">
|
||||
<span class="item-center"> {{ viewData.name }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
<span v-if="viewData.username">
|
||||
{{ viewData.username }}
|
||||
({{ viewData.loginname }})</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
{{ viewData.mobile }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动编号">
|
||||
{{ viewData.activityCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动项目类型">
|
||||
{{ viewData.projectTypeName }}({{ viewData.projectTypeCode }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动类型" :span="2">
|
||||
{{ viewData.activity_type === 40001 ? '校工会活动' : viewData.activity_type === 40002 ? '分工会活动'
|
||||
:
|
||||
'协会/社团活动' }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="活动计划时间">-->
|
||||
<!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="活动时间">
|
||||
{{ viewData.startTime + ' - ' + viewData.endTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名时间" v-if="viewData.applyStartTime">
|
||||
{{ viewData.applyStartTime + ' - ' + viewData.applyEndTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动人数">
|
||||
{{ viewData.peopleNum || '暂无' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动地点">
|
||||
{{ viewData.address }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名方式">
|
||||
<span v-if="viewData.signUpMethod===1">个人报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===2">组队报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===3">分工会报名</span>
|
||||
<span v-else-if="!viewData.signUpMethod">无需报名</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否用于报名">
|
||||
<span v-if="viewData.isEnrollSystem">活动报名</span>
|
||||
<span v-else>活动管理</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名人数限制" span="3" v-if="viewData.signUpMethod!=null">
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
{{ viewData.mobile }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动编号">
|
||||
{{ viewData.activityCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动项目类型">
|
||||
{{ viewData.projectTypeName }}({{ viewData.projectTypeCode }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动类型" :span="2">
|
||||
{{ viewData.activity_type === 40001 ? '校工会活动' : viewData.activity_type === 40002 ?
|
||||
'分工会活动'
|
||||
:
|
||||
'协会/社团活动' }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="活动计划时间">-->
|
||||
<!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="活动时间">
|
||||
{{ viewData.startTime + ' - ' + viewData.endTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名时间" v-if="viewData.applyStartTime">
|
||||
{{ viewData.applyStartTime + ' - ' + viewData.applyEndTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动人数">
|
||||
{{ viewData.peopleNum || '暂无' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动地点">
|
||||
{{ viewData.address }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名方式">
|
||||
<span v-if="viewData.signUpMethod===1">个人报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===2">组队报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===3">分工会报名</span>
|
||||
<span v-else-if="!viewData.signUpMethod">无需报名</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否用于报名">
|
||||
<span v-if="viewData.isEnrollSystem">活动报名</span>
|
||||
<span v-else>活动管理</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名人数限制" span="3" v-if="viewData.signUpMethod!=null">
|
||||
<span v-if="viewData.userNumberLimit===1">总人数限制({{
|
||||
viewData.totalUserNumberLimit
|
||||
}}人)</span>
|
||||
<span v-else-if="viewData.userNumberLimit===2">分工会人数限制</span>
|
||||
<span v-else-if="!viewData.userNumberLimit">不限制</span>
|
||||
</el-descriptions-item>
|
||||
<span v-else-if="viewData.userNumberLimit===2">分工会人数限制</span>
|
||||
<span v-else-if="!viewData.userNumberLimit">不限制</span>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="分工会限制名额" span="3" v-if="viewData.userNumberLimit===2">
|
||||
<el-table :data="viewData.unionUserNumberLimit" border height="500" size="small"
|
||||
stripe>
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
type="index"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="分工会名称" prop="unionname"></el-table-column>
|
||||
<el-table-column label="分工会人数" prop="teacherCount"></el-table-column>
|
||||
<el-table-column label="限制人数" prop="limitNum"></el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="分工会限制名额" span="3" v-if="viewData.userNumberLimit===2">
|
||||
<el-table :data="viewData.unionUserNumberLimit" border height="500" size="small"
|
||||
stripe>
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
type="index"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="分工会名称" prop="unionname"></el-table-column>
|
||||
<el-table-column label="分工会人数" prop="teacherCount"></el-table-column>
|
||||
<el-table-column label="限制人数" prop="limitNum"></el-table-column>
|
||||
</el-table>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="封面图" span="3">
|
||||
<img :src="viewData.cover"
|
||||
class="avatar"
|
||||
style="height: 200px;width: auto" v-if="viewData.cover">
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="封面图" span="3">
|
||||
<img :src="viewData.cover"
|
||||
class="avatar"
|
||||
style="height: 200px;width: auto" v-if="viewData.cover">
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="活动内容" span="3">
|
||||
<div v-html="viewData.activityContent"></div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="活动费用" name="2" v-if="!viewData.isEnrollSystem">
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="活动总结" name="3" v-if="!viewData.isEnrollSystem">
|
||||
<el-form label-width="120px" ref="form">
|
||||
<el-form-item label="活动总结" prop="activitySummary">
|
||||
{{ viewData.activitySummary }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="审核信息" name="4" v-if="viewData.auditId">
|
||||
<el-form label-width="120px" ref="form">
|
||||
<el-descriptions-item label="活动内容" span="3">
|
||||
<div v-html="viewData.activityContent"></div>
|
||||
</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-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.audit.username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.audit.auditTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见:">
|
||||
{{ viewData.audit.auditOpinion }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="label" name="999" v-if="handle">
|
||||
<slot name="handle"></slot>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<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"],
|
||||
styles: [
|
||||
`
|
||||
.item-center {
|
||||
@@ -127,20 +133,13 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
}
|
||||
`
|
||||
],
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: "审核"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
userData: [],
|
||||
viewData: {},
|
||||
row: null,
|
||||
doneTasks: [],
|
||||
loading: true,
|
||||
search: "",
|
||||
tableKey: "",
|
||||
@@ -148,15 +147,9 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
hasPane(name) {
|
||||
if (!this.handle) {
|
||||
return true
|
||||
}
|
||||
return this.panes.includes(name)
|
||||
},
|
||||
async findOne(id) {
|
||||
async findOne() {
|
||||
this.loading = true
|
||||
const { data } = await this.$axios.post("/platform/activity/culture/infoManage/findOne", { id })
|
||||
const { data } = await this.$axios.post("/platform/activity/culture/infoManage/findOne", { id: this.row.id })
|
||||
this.loading = false
|
||||
if (data) {
|
||||
data.billFiles = JSON.parse(data.billFiles)
|
||||
@@ -172,8 +165,28 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
this.viewData = {}
|
||||
this.$notify.error({ title: "错误", message: "获取信息失败" })
|
||||
}
|
||||
},
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row;
|
||||
this.visible = true;
|
||||
this.findOne();
|
||||
this.getDoneTasks();
|
||||
},
|
||||
// 获取已办任务审批记录
|
||||
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>
|
||||
|
||||
@@ -66,18 +66,23 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
</el-switch>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='tussueName'">
|
||||
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
||||
<span v-if="row.activity_type==40001">校工会</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='state'">
|
||||
{{row.state===1?'未审核':row.state===2?'审核不通过':'审核通过'}}
|
||||
<template scope="{row}" v-else-if="column.prop=='taskName'">
|
||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||
{{row.taskName}}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
||||
<span v-if="row.activity_type==40002 || row.activity_type==40003">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作"
|
||||
prop="userOnline" width="150px">
|
||||
<template slot-scope="{row}">
|
||||
@@ -92,10 +97,17 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="{type:'edit',row}"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
:disabled="row.projectTypeCode==50004">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',row}">
|
||||
<el-dropdown-item
|
||||
v-if="row.canRevoke" :command="{type:'Revoke',row}">
|
||||
撤回
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="{type:'delete',row}"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId" >
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'openCode',row}">
|
||||
@@ -155,9 +167,7 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
{prop: "time2", label: "报名日期", width: "300"},
|
||||
{prop: "applyTime", label: "创建时间", sortable: true},
|
||||
{prop: "isUnseal", label: "是否开启"},
|
||||
{prop: "state", label: "审核状态", sortable: true}
|
||||
|
||||
],
|
||||
],
|
||||
url: ""
|
||||
}
|
||||
},
|
||||
@@ -182,9 +192,11 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === "view") {
|
||||
this.openView(row)
|
||||
this.onView(row)
|
||||
} else if (type === "edit") {
|
||||
this.openEdit(row)
|
||||
}else if (type === "Revoke") {
|
||||
this.onRevoke(row)
|
||||
} else if (type === "delete") {
|
||||
this.doDelete(row)
|
||||
} else if (type === "openCode") {
|
||||
@@ -200,12 +212,12 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.applyActivity.openEdit(row.id)
|
||||
this.$refs.applyActivity.openEdit(row)
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoActivity.findOne(row.id)
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.infoActivity.onOpen(row)
|
||||
})
|
||||
},
|
||||
doDelete(row) {
|
||||
@@ -222,6 +234,20 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
this.$set(row, "loading", false)
|
||||
})
|
||||
},
|
||||
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()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
this.pageForm.activity_type = this.activity_type
|
||||
@@ -235,6 +261,13 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
// 根据 activity_type 动态添加流程相关列
|
||||
if (this.activity_type === 40002 || this.activity_type === 40003) {
|
||||
this.tableColumns.push(
|
||||
{prop: "taskName", label: "当前节点"},
|
||||
{prop: "instanceState", label: "流程状态"}
|
||||
);
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,47 +8,6 @@ layout("/layouts/platform_h5.html"){
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
padding: 0 16px;
|
||||
font-family: "PingFang SC", sans-serif;
|
||||
}
|
||||
|
||||
/* 分段标题样式 */
|
||||
.form-section {
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 协会选择字段样式 */
|
||||
.club-field .van-field__label {
|
||||
width: 90px !important;
|
||||
}
|
||||
.club-field .van-cell__value {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* 弹出选择器样式 */
|
||||
.picker-style {
|
||||
background-color: #f5f5f5;
|
||||
border-top-left-radius: 12px;
|
||||
border-top-right-radius: 12px;
|
||||
}
|
||||
|
||||
/* 输入文本区域样式 */
|
||||
.van-field__control {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
.van-field__control input,
|
||||
.van-field__control textarea {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
border-radius: 6px;
|
||||
padding: 8px 12px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
/* 同意条款样式 */
|
||||
.agree-section {
|
||||
padding: 16px;
|
||||
@@ -61,28 +20,6 @@ layout("/layouts/platform_h5.html"){
|
||||
line-height: 1.5;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* 提交按钮样式 */
|
||||
.submit-btn {
|
||||
margin: 20px 16px 30px;
|
||||
background: linear-gradient(to right, #4a90e2, #5ab1ef);
|
||||
border-radius: 24px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.submit-btn .van-button {
|
||||
height: 48px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.van-cell-group__title {
|
||||
font-weight: bold;
|
||||
}
|
||||
.more-text .van-field__label{
|
||||
width: 100%;
|
||||
}
|
||||
.more-text {
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
@@ -90,7 +27,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-nav-bar title="文体协会会员申请" left-text="返回" left-arrow @click-left="historyBack"></van-nav-bar>
|
||||
|
||||
<!-- 表单容器 -->
|
||||
<van-form @submit="doSubmit" ref="formRef" class="form-container">
|
||||
<van-form ref="formRef" class="form-container">
|
||||
<!-- 协会信息 -->
|
||||
<van-cell-group title="协会信息" class="form-section">
|
||||
<van-field
|
||||
@@ -101,8 +38,8 @@ layout("/layouts/platform_h5.html"){
|
||||
required
|
||||
is-link
|
||||
readonly
|
||||
name="clubName"
|
||||
@click="showClubPopup = true"
|
||||
class="club-field"
|
||||
></van-field>
|
||||
<van-popup v-model:show="showClubPopup" position="bottom">
|
||||
<van-picker
|
||||
@@ -191,8 +128,10 @@ layout("/layouts/platform_h5.html"){
|
||||
</van-cell-group>
|
||||
|
||||
<!-- 提交按钮 -->
|
||||
<div class="submit-btn">
|
||||
<van-button round block type="info">提交申请</van-button>
|
||||
<div class="submit-many-btn">
|
||||
<van-button native-type="button" @click="onSave" round type="info">保存申请</van-button>
|
||||
<van-button native-type="submit" @click="onSubmit" round type="info" v-if="!taskId">提交申请</van-button>
|
||||
<van-button native-type="submit" @click="onFinishTask" round type="info" v-else>提交申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
@@ -204,6 +143,8 @@ layout("/layouts/platform_h5.html"){
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {
|
||||
clubId: "",
|
||||
clubName: "",
|
||||
@@ -230,13 +171,55 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClubConfirm(value, index) {
|
||||
this.formData.clubId = this.clubOptions[index].id;
|
||||
this.formData.clubName = value;
|
||||
this.showClubPopup = false;
|
||||
|
||||
// 检查是否已申请该协会
|
||||
this.checkApplyClub(this.formData.clubId);
|
||||
onSave() {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定保存吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/club/join/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg);
|
||||
this.$pjaxReplace("/platform/h5/club/mine")
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async onSubmit() {
|
||||
if (!this.isAgree) {
|
||||
this.$toast.fail("请先阅读并同意协议");
|
||||
return;
|
||||
}
|
||||
await this.$refs.formRef.validate()
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交申请吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/club/join/apply/submit", this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg);
|
||||
this.$pjaxReplace("/platform/h5/club/mine")
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.isAgree) {
|
||||
this.$message.warning("请先阅读并同意协议")
|
||||
return
|
||||
}
|
||||
this.$axios.post('/platform/club/join/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg);
|
||||
this.$pjaxReplace("/platform/h5/club/mine")
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
checkApplyClub(clubId) {
|
||||
this.$axios.post("/platform/club/join/apply/checkApplyClub", { clubId }).then(res => {
|
||||
@@ -247,6 +230,14 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
});
|
||||
},
|
||||
onClubConfirm(value, index) {
|
||||
this.formData.clubId = this.clubOptions[index].id;
|
||||
this.formData.clubName = value;
|
||||
this.showClubPopup = false;
|
||||
|
||||
// 检查是否已申请该协会
|
||||
this.checkApplyClub(this.formData.clubId);
|
||||
},
|
||||
listClub() {
|
||||
this.$axios.post("/platform/club/common/listClub").then(res => {
|
||||
if (res.code === 0) {
|
||||
@@ -255,34 +246,36 @@ layout("/layouts/platform_h5.html"){
|
||||
});
|
||||
},
|
||||
init() {
|
||||
const user = this.$store.state.user;
|
||||
this.formData.userId = user.id;
|
||||
this.formData.userName = user.username;
|
||||
this.formData.loginName = user.loginname;
|
||||
this.formData.unitName = user.unit ? user.unit.name : null;
|
||||
this.formData.unionName = user.union ? user.union.name : null;
|
||||
this.formData.sex = user.sex;
|
||||
this.formData.education = user.education;
|
||||
this.formData.technicalTitle = user.technicalTitle;
|
||||
this.formData.governmentPosition = user.governmentPosition;
|
||||
},
|
||||
doSubmit() {
|
||||
if (!this.isAgree) {
|
||||
this.$toast.fail("请先阅读并同意协议");
|
||||
return;
|
||||
this.bizId = GetQueryString("bizId")
|
||||
if (GetQueryString("clubId")) {
|
||||
this.$set(this.formData, "clubId", GetQueryString("clubId"))
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交申请吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/club/join/apply/submit", this.formData).then(res => {
|
||||
if (this.bizId) {
|
||||
this.$axios.post("/platform/club/join/apply/info", { id: this.bizId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg);
|
||||
this.$pjaxReplace("/platform/club/join/mine")
|
||||
this.formData = res.data
|
||||
this.isAgree = true
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const user = this.$store.state.user
|
||||
this.$set(this.formData, "userId", user.id)
|
||||
this.$set(this.formData, "userName", user.username)
|
||||
this.$set(this.formData, "loginName", user.loginname)
|
||||
this.$set(this.formData, "unitId", user.unit ? user.unit.id : null)
|
||||
this.$set(this.formData, "unitName", user.unit ? user.unit.name : null)
|
||||
this.$set(this.formData, "unionId", user.union ? user.union.id : null)
|
||||
this.$set(this.formData, "unionName", user.union ? user.union.name : null)
|
||||
this.$set(this.formData, "sex", user.sex)
|
||||
this.$set(this.formData, "birthday", "${@auth.getPrincipalProperty('birthday'),'yyyy-MM-dd'}")
|
||||
this.$set(this.formData, "nation", user.nation)
|
||||
this.$set(this.formData, "political", user.political)
|
||||
this.$set(this.formData, "education", user.education)
|
||||
this.$set(this.formData, "technicalTitle", user.technicalTitle)
|
||||
this.$set(this.formData, "position", user.position)
|
||||
this.$set(this.formData, "academicDegree", user.academicDegree)
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.listClub();
|
||||
|
||||
@@ -39,8 +39,8 @@ const clubUserJoin = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(id) {
|
||||
this.$axios.post("/platform/club/join/common/info", { id }).then((res) => {
|
||||
onOpen(row) {
|
||||
this.$axios.post("/platform/club/join/mine/info", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
<div id="app">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="我的申请" left-text="返回" left-arrow @click-left="$pjaxReplace('/platform/h5/home')"></van-nav-bar>
|
||||
<van-nav-bar title="我的申请" left-text="返回" left-arrow @click-left="historyBack"></van-nav-bar>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
@@ -18,30 +18,26 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
<div>
|
||||
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
|
||||
<div class="table-list">
|
||||
<div class="table-card" v-for="row in tableData" :key="row.id">
|
||||
<div class="list-card" v-for="row in tableData" :key="row.id">
|
||||
<div class="list-card-body">
|
||||
<van-cell title="姓名" :value="row.userName"></van-cell>
|
||||
<van-cell title="工号" :value="row.loginName"></van-cell>
|
||||
<van-cell title="协会名称" :value="row.clubName"></van-cell>
|
||||
<van-cell title="申请模式" :value="row.mode ? '加入' : '退出'"></van-cell>
|
||||
<van-cell title="申请时间" :value="row.applyDate"></van-cell>
|
||||
<van-cell title="当前节点" :value="row.processInstanceNodeName"></van-cell>
|
||||
<van-cell class="table-card-footer">
|
||||
<van-button type="info" size="small" @click="onOpen(row)">查看</van-button>
|
||||
<van-button @click="openEdit(row)" v-if="[10,40,70].includes(row.processInstanceNodeCode)" size="small">编辑</van-button>
|
||||
<van-button
|
||||
@click="openRevoke(row)"
|
||||
v-if="[20].includes(row.processInstanceNodeCode) && !row.nextTaskIsComplete"
|
||||
size="small"
|
||||
type="danger"
|
||||
>
|
||||
撤销
|
||||
</van-button>
|
||||
<van-button v-if="[10].includes(row.processInstanceNodeCode)" @click="doDelete(row.id)" size="small" type="danger">
|
||||
删除
|
||||
</van-button>
|
||||
<van-cell title="当前节点" :value="row.taskName"></van-cell>
|
||||
<van-cell title="流程状态">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" mode="h5" label_key="message" size="small"></enum-tag>
|
||||
</van-cell>
|
||||
</div>
|
||||
<div class="list-card-footer">
|
||||
<van-button type="info" size="small" @click="openView(row)">查看</van-button>
|
||||
<van-button type="info" v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="small">编辑</van-button>
|
||||
<van-button type="danger" v-if="row.canRevoke" @click="openRevoke(row)" size="small">撤销</van-button>
|
||||
<van-button type="danger" v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="small" >
|
||||
删除
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据"></van-empty>
|
||||
@@ -59,7 +55,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
<script>
|
||||
<!--#include('../common/clubUserJoin.js'){}#-->
|
||||
const vue = new Vue({
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
@@ -81,36 +77,29 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg);
|
||||
this.pageData()
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
openView(row) {
|
||||
this.viewShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
onEdit(row) {
|
||||
this.$pjaxReplace('/platform/h5/club/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
openRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/club/join/mine/revokeApply", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
doDelete(row) {
|
||||
onDelete(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "确定要删除此申请吗?"
|
||||
@@ -127,6 +116,12 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
this.$axios.post("/platform/club/join/mine/pageData", this.pageForm).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user