This commit is contained in:
@jyuhsin
2025-08-27 17:21:42 +08:00
parent 3171c30d43
commit 3dcf833e7a
34 changed files with 1745 additions and 124 deletions
@@ -156,22 +156,25 @@ 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 onFinishTask() {
const valid = await this.$refs["form"].validate()
if (valid) {
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 + "")
@@ -208,21 +208,25 @@ layout("/layouts/platform.html"){
})
},
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()
}
})
this.$refs.formRef.validate((valid) => {
if (valid) {
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) {
@@ -180,21 +180,25 @@ layout("/layouts/platform.html"){
})
},
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()
this.$refs.formRef.validate((valid) => {
if (valid) {
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) {
@@ -180,21 +180,25 @@ layout("/layouts/platform.html"){
})
},
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()
this.$refs.formRef.validate((valid) => {
if (valid) {
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) {
@@ -189,24 +189,22 @@ 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'
this.$refs.formRef.validate((valid) => {
if (valid) {
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) {
@@ -10,7 +10,7 @@ const apply = {
</el-row>
<el-calendar v-model="applyTime">
<template slot="dateCell" slot-scope="{date, data}">
<div :class="getDayClass(data)" @click="pushDay(data)">
<div :data-day="data.day" :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>
@@ -20,25 +20,203 @@ const apply = {
<div style="text-align: right">
<el-button @click="openAdd" type="primary">下一步</el-button>
</div>
<el-dialog title="新增场地预约" append-to-body :close-on-click-modal="false" :visible.sync="dialogVisible" width="50%">
<el-alert
class="mt10 mb10"
:title="'您已选择的预约日期为:'+ selectDayList.toString()"
type="warning">
</el-alert>
<el-form :model="formData" ref="formRef" :rules="formRules" label-position="left" label-width="100px">
<el-form-item label="预约人" prop="applyUserName">
<el-input readonly v-model="formData.applyUserName" maxlength="100" placeholder="请输入预约人"></el-input>
</el-form-item>
<el-form-item label="性别" prop="sex">
<el-input readonly v-model="formData.sex" maxlength="100" placeholder="请输入性别"></el-input>
</el-form-item>
<el-form-item label="工号" prop="applyLoginName">
<el-input readonly v-model="formData.applyLoginName" maxlength="100" placeholder="请输入工号"></el-input>
</el-form-item>
<el-form-item label="所属单位" prop="applyUnitName">
<el-input readonly v-model="formData.applyUnitName" maxlength="100" placeholder="请输入所属单位"></el-input>
</el-form-item>
<el-form-item label="联系电话" prop="applyMobile">
<el-input maxlength="11" placeholder="请输入联系电话" v-model="formData.applyMobile"></el-input>
</el-form-item>
<el-form-item label="预约时间" prop="applyTime">
<el-select v-model="formData.applyTime" style="width: 100%" filterable @change="timeChange" placeholder="请选择预约时间">
<el-option v-for="item,index in allowTimeList"
:disabled="item.disabled === true"
:key="index"
:value="item.startTime + '-' + item.endTime">
<template #default>
<span v-if="item.disabled === true">
{{ item.startTime + ' - ' + item.endTime + '' + item.tooltip + '' }}
</span>
<span v-else>{{ item.startTime + ' - ' + item.endTime }}</span>
</template>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="预约人数" prop="joinCount">
<el-input-number
:disabled="row.reserveTarget === 1 || row.reserveTarget === 3"
v-model="formData.joinCount"
:min="1" :max="9999"
label="请输入预约人数"
style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item label="预约事由" prop="applyCause">
<el-input maxlength="1000" placeholder="请输入预约事由" autosize v-model="formData.applyCause"
type="textarea" :autosize="{ minRows: 4, maxRows: 6}"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<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>
</span>
</el-dialog>
</div>
`,
store,
data() {
return {
row: {},
applyTime: '',
allowDayList: [],
allowTimeList: [],
selectDayList: [],
dialogVisible: false,
formData: {},
formRules: {
applyUserId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
applyUserName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
applyUnitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
applyMobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
applyTime: [{required: true, message: '必填', trigger: ['blur', 'change']}],
joinCount: [{required: true, message: '必填', trigger: ['blur', 'change']}],
applyCause: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
taskId: '',
bizId: '',
}
},
methods: {
onOpen(row) {
this.row = row
},
openAdd() {},
async pushDay(data) {
watch: {
applyTime() {
this.$nextTick(async () => {
await this.queryAllowTime(this.$moment(data.day).year(), this.$moment(data.day).month() + 1)
await this.queryAllowTime()
})
},
},
methods: {
timeChange(val) {
this.$set(this.formData, "startTime", val.split('-')[0])
this.$set(this.formData, "endTime", val.split('-')[1])
},
onSubmit() {
if (!this.formData.applyTime) {
this.$message.warning('未选择预约时间')
return
}
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
const resp = await this.$axios.post("/platform/site/apply/submit", {
data: JSON.stringify(this.formData),
days: JSON.stringify(this.selectDayList)
})
if (resp.code === 0) {
this.$message.success(resp.msg)
this.dialogVisible = false
location.href = '/platform/site/mine'
} else {
this.$message.warning(resp.msg)
}
})
}
})
},
onFinishTask() {
if (!this.formData.applyTime) {
this.$message.warning('未选择预约时间')
return
}
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post('/platform/site/apply/submitAgain', {
data: JSON.stringify(this.formData),
days: JSON.stringify(this.selectDayList),
taskId: this.taskId
}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
this.dialogVisible = false
this.$emit('refresh')
}
})
})
}
})
},
async onOpen(row, applyRow = {}) {
this.row = row
await this.queryAllowTime()
if(applyRow) {
this.taskId = applyRow.taskId
this.bizId = applyRow.bizId
this.applyTime = applyRow.applyDay
this.selectDayList.push(applyRow.applyDay)
this.dialogVisible = true
this.formData = clone(applyRow)
this.$set(this.formData, 'applyTime', this.formData.startTime + '-' + this.formData.endTime)
await this.queryTimesByDay()
}
},
async openAdd() {
if (this.selectDayList && this.selectDayList.length === 0) {
this.$message.warning('请选择预约日期')
return
}
this.$set(this.formData, "applyUserId", this.$store.state.user.id)
this.$set(this.formData, "applyUserName", this.$store.state.user.username)
this.$set(this.formData, "applyLoginName", this.$store.state.user.loginname,)
this.$set(this.formData, "applyUnitId", this.$store.state.user?.unit?.id)
this.$set(this.formData, "applyUnitName", this.$store.state.user?.unit?.name)
this.$set(this.formData, "applyUnionId", this.$store.state.user?.union?.id)
this.$set(this.formData, "applyUnionName", this.$store.state.user?.union?.name)
this.$set(this.formData, "applyMobile", this.$store.state.user.mobile)
this.$set(this.formData, "sex", this.$store.state.user.sex)
this.$set(this.formData, "siteId", this.row.id)
if (this.$refs['formRef']) this.$refs['formRef'].resetFields()
if (this.row.reserveTarget === 1 || this.row.reserveTarget === 3) {
this.$set(this.formData, "joinCount", this.row.maxNum)
} else {
this.$set(this.formData, "joinCount", 1)
}
await this.queryTimesByDay()
this.dialogVisible = true
},
async queryTimesByDay() {
const {data} = await this.$axios.post("/platform/site/apply/queryTimesByDay", {
siteId: this.row.id,
day: this.$moment(this.applyTime).format('YYYY-MM-DD'),
})
this.allowTimeList = data
},
async pushDay(data) {
if (this.allowDayList.length > 0 && !this.allowDayList.includes(data.day)) {
this.$message.warning(data.day + "不能预约")
return
@@ -56,13 +234,14 @@ const apply = {
}
},
// 查询哪些天是开放的
async queryAllowTime(year = null, month = null) {
const titleText = $('.el-calendar__title').text().trim().replaceAll(' ', '')
const m = this.$moment(titleText, "YYYY年M月")
async queryAllowTime() {
const days = Array.from(document.querySelectorAll('.div-Calendar'))
.map(el => el.getAttribute('data-day'))
.sort()
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,
startTime: days[0],
endTime: days[days.length - 1],
})
this.allowDayList = data
},
@@ -88,5 +267,8 @@ const apply = {
.el-calendar-day:has(.not-allow-day) {
background-color: #F5F5F5;
}
.el-dialog__body {
padding-top: 0;
}
`
}
@@ -12,7 +12,7 @@ layout("/layouts/platform.html"){
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker placeholder="按年度查询" type="year" v-model="pageForm.year"
<el-date-picker placeholder="请选择年度" type="year" v-model="pageForm.year"
@change="doSearch" value-format="yyyy">
</el-date-picker>
</search-item>
@@ -82,6 +82,8 @@ layout("/layouts/platform.html"){
},
data() {
return {
id: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
typeOptions: [],
tableColumns: [
{prop: 'name', label: '场地名称'},
@@ -98,6 +100,17 @@ layout("/layouts/platform.html"){
this.$refs.guava.index()
},
onApply(row) {
if(row.reserveTarget === 1 && !this.$auth.hasRoleOr('BRANCH_UNION_ADMIN, BRANCH_UNION_CHAIRMAN') && !this.$auth.hasRole('SYSADMIN')) {
this.$message.warning('该场地只能分工会预约')
return
}
if (row.sexLimit === 1 || row.sexLimit === 2) {
const sex = row.sexLimit === 1 ? '男' : '女'
if(!this.$store.state.user.sex.includes(sex)) {
this.$message.warning('抱歉,该场地仅限' + sex + '性会员预约')
return
}
}
this.$refs.guava.edit(() => {
this.$refs.applyRef.onOpen(row)
})
@@ -119,7 +132,7 @@ layout("/layouts/platform.html"){
this.pageForm.totalCount = res.data.totalCount
}
})
},
}
},
async created() {
this.querySiteType()
@@ -0,0 +1,94 @@
const applyInfo = {
template: /*language=HTML*/ `
<div>
<div class="process-title">
申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<el-descriptions :column="2" border>
<el-descriptions-item label="预约场地">{{ viewData.siteName }}</el-descriptions-item>
<el-descriptions-item label="预约人">{{ viewData.applyUserName }}</el-descriptions-item>
<el-descriptions-item label="预约人工号">{{ viewData.applyLoginName }}</el-descriptions-item>
<el-descriptions-item label="所属单位">{{ viewData.applyUnitName }}</el-descriptions-item>
<el-descriptions-item label="预约日期">{{ viewData.applyDay }}</el-descriptions-item>
<el-descriptions-item label="开始时间">{{ viewData.startTime }}</el-descriptions-item>
<el-descriptions-item label="结束时间">{{ viewData.endTime }}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{ viewData.applyMobile }}</el-descriptions-item>
<el-descriptions-item label="预约人数">{{ viewData.joinCount }}</el-descriptions-item>
<el-descriptions-item label="预约事由">{{ viewData.applyCause }}</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.viewData = row
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: /*language=CSS*/ `
.el-descriptions-item__label {
width: 200px;
min-width: 200px;
max-width: 200px;
}
.el-tabs__header {
margin: 0;
}
`
}
@@ -12,7 +12,7 @@ layout("/layouts/platform.html"){
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker placeholder="按年度查询" type="year" v-model="pageForm.year"
<el-date-picker placeholder="请选择年度" type="year" v-model="pageForm.year"
@change="doSearch" value-format="yyyy">
</el-date-picker>
</search-item>
@@ -0,0 +1,184 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="请选择年度"
style="width: 100%"
@change="doSearch"
></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.siteId" @change="doSearch" style="width: 100%"
placeholder="请选择活动场地" filterable clearable>
<el-option v-for="item in siteOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
<search-item label="场地类型">
<el-select v-model="pageForm.siteType" @change="doSearch" style="width: 100%"
placeholder="请选择慰问类型" filterable clearable>
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="申请列表"></table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></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 === 'instanceState'">
<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="300">
<template slot-scope="{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 #edit>
<site-apply ref="applyRef" @refresh="refresh"></site-apply>
</template>
<template #view>
<info ref="infoRef"></info>
</template>
</guava>
</div>
<script>
<!--#include('../common/applyInfo.js'){}#-->
<!--#include('../apply/apply.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"info": applyInfo,
"site-apply": apply,
},
data() {
return {
typeOptions: [],
siteOptions: [],
tableColumns: [
{prop: 'siteName', label: '场地名称'},
{prop: 'applyUserName', label: '预约人'},
{prop: 'applyUnitName', label: '所属单位'},
{prop: 'applyDay', label: '预约日期'},
{prop: 'startTime', label: '开始时间'},
{prop: 'endTime', label: '结束时间'},
{prop: 'applyMobile', label: '联系方式'},
{prop: 'taskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
}
},
methods: {
refresh() {
this.pageData()
this.$refs.guava.index()
},
onView(row) {
this.$refs.guava.view(()=>{
this.$refs.infoRef.onOpen(row)
})
},
async onEdit(row) {
const res = await this.$axios.post('/platform/site/manage/info', { id: row.siteId })
this.$refs.guava.edit(() => {
this.$refs.applyRef.onOpen(res.data, row)
})
},
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/site/mine/delete", { id }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
},
querySiteType() {
this.$axios.post('/platform/site/type/querySiteType')
.then((resp) => {
this.typeOptions = resp.data
})
},
querySites() {
this.$axios.post('/platform/site/manage/querySites')
.then((resp) => {
this.siteOptions = resp.data
})
},
},
created() {
this.querySiteType()
this.querySites()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,153 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="请选择年度"
style="width: 100%"
@change="doSearch"
></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.siteId" @change="doSearch" style="width: 100%"
placeholder="请选择活动场地" filterable clearable>
<el-option v-for="item in siteOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
<search-item label="场地类型">
<el-select v-model="pageForm.siteType" @change="doSearch" style="width: 100%"
placeholder="请选择慰问类型" filterable clearable>
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="申请列表"></table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></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 === 'instanceState'">
<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="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>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef"></info>
</template>
</guava>
</div>
<script>
<!--#include('../common/applyInfo.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"info": applyInfo,
},
data() {
return {
typeOptions: [],
siteOptions: [],
tableColumns: [
{prop: 'siteName', label: '场地名称'},
{prop: 'applyUserName', label: '预约人'},
{prop: 'applyUnitName', label: '所属单位'},
{prop: 'applyDay', label: '预约日期'},
{prop: 'startTime', label: '开始时间'},
{prop: 'endTime', label: '结束时间'},
{prop: 'applyMobile', label: '联系方式'},
{prop: 'taskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
}
},
methods: {
onDelete(id) {
this.$confirm("您确定要删除吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/site/mine/delete", { id }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
},
onView(row) {
this.$refs.guava.edit(()=>{
this.$refs.infoRef.onOpen(row)
})
},
querySiteType() {
this.$axios.post('/platform/site/type/querySiteType')
.then((resp) => {
this.typeOptions = resp.data
})
},
querySites() {
this.$axios.post('/platform/site/manage/querySites')
.then((resp) => {
this.siteOptions = resp.data
})
},
},
async created() {
this.querySiteType()
this.querySites()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,214 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="请选择年度"
style="width: 100%"
@change="doSearch"
></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.siteId" @change="doSearch" style="width: 100%"
placeholder="请选择活动场地" filterable clearable>
<el-option v-for="item in siteOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
<search-item label="场地类型">
<el-select v-model="pageForm.siteType" @change="doSearch" style="width: 100%"
placeholder="请选择慰问类型" filterable clearable>
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card 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" @sort-change="pageOrder" style="width: 100%">
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></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 === 'instanceState'">
<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="300px">
<template slot-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 #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('../common/applyInfo.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"info": applyInfo,
},
data() {
return {
pageForm: {
approval: false
},
tableColumns: [
{prop: 'siteName', label: '场地名称'},
{prop: 'applyUserName', label: '预约人'},
{prop: 'applyUnitName', label: '所属单位'},
{prop: 'applyDay', label: '预约日期'},
{prop: 'startTime', label: '开始时间'},
{prop: 'endTime', label: '结束时间'},
{prop: 'applyMobile', label: '联系方式'},
{prop: 'taskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
typeOptions: [],
siteOptions: [],
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()
}
})
})
},
querySiteType() {
this.$axios.post('/platform/site/type/querySiteType')
.then((resp) => {
this.typeOptions = resp.data
})
},
querySites() {
this.$axios.post('/platform/site/manage/querySites')
.then((resp) => {
this.siteOptions = resp.data
})
},
},
async created() {
this.querySiteType()
this.querySites()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -301,21 +301,25 @@ layout("/layouts/platform.html"){
})
},
onFinishTask() {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
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)
window.location.href = '/platform/condolence/mine'
}
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
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)
window.location.href = '/platform/condolence/mine'
}
})
})
}
})
})
},
init() {
if (this.id) {
@@ -11,7 +11,7 @@ layout("/layouts/platform.html"){
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="年度"
placeholder="请选择年度"
style="width: 100%"
@change="doSearch"
></el-date-picker>
@@ -23,7 +23,7 @@ layout("/layouts/platform.html"){
</search-item>
<search-item label="慰问类型">
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
placeholder="请选择慰问类型">
placeholder="请选择慰问类型" filterable clearable>
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
@@ -10,7 +10,7 @@ layout("/layouts/platform.html"){
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="年度"
placeholder="请选择年度"
style="width: 100%"
@change="doSearch"
></el-date-picker>
@@ -22,7 +22,7 @@ layout("/layouts/platform.html"){
</search-item>
<search-item label="慰问类型">
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
placeholder="请选择慰问类型">
placeholder="请选择慰问类型" filterable clearable>
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
@@ -11,7 +11,7 @@ layout("/layouts/platform.html"){
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="年度"
placeholder="请选择年度"
style="width: 100%"
@change="doSearch"
></el-date-picker>
@@ -23,7 +23,7 @@ layout("/layouts/platform.html"){
</search-item>
<search-item label="慰问类型">
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
placeholder="请选择慰问类型">
placeholder="请选择慰问类型" filterable clearable>
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
@@ -12,7 +12,7 @@ layout("/layouts/platform.html"){
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="年度"
placeholder="请选择年度"
style="width: 100%"
@change="doSearch"
></el-date-picker>
@@ -24,7 +24,7 @@ layout("/layouts/platform.html"){
</search-item>
<search-item label="慰问类型">
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
placeholder="请选择慰问类型">
placeholder="请选择慰问类型" filterable clearable>
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"