申诉管理模块: 页面优化;
This commit is contained in:
+39
@@ -30,6 +30,45 @@ public class AppealCommonController {
|
|||||||
return Result.success(appealTypeService.query(Cnd.where("enabled", "=", true).asc("sort").desc("createdAt")));
|
return Result.success(appealTypeService.query(Cnd.where("enabled", "=", true).asc("sort").desc("createdAt")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckLogin
|
||||||
|
public Result queryTypeOptions() {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
type_data.*
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
atype.id,
|
||||||
|
atype.`name`,
|
||||||
|
atype.enabled,
|
||||||
|
atype.sort
|
||||||
|
FROM
|
||||||
|
appeal_type atype
|
||||||
|
WHERE
|
||||||
|
atype.enabled = 1
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
info.appealTypeId AS id,
|
||||||
|
COALESCE(MAX(atype.`name`), MAX(info.appealTypeName)) AS `name`,
|
||||||
|
COALESCE(MAX(atype.enabled), 0) AS enabled,
|
||||||
|
COALESCE(MAX(atype.sort), 999999) AS sort
|
||||||
|
FROM
|
||||||
|
appeal_info info
|
||||||
|
LEFT JOIN appeal_type atype ON atype.id = info.appealTypeId
|
||||||
|
WHERE
|
||||||
|
info.appealTypeId IS NOT NULL
|
||||||
|
AND info.appealTypeId != ''
|
||||||
|
GROUP BY
|
||||||
|
info.appealTypeId
|
||||||
|
) type_data
|
||||||
|
ORDER BY
|
||||||
|
type_data.sort ASC,
|
||||||
|
type_data.`name` ASC
|
||||||
|
""");
|
||||||
|
return Result.success(appealTypeService.listMap(sql));
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckLogin
|
@SaCheckLogin
|
||||||
public Result unitOptions(String unionId) {
|
public Result unitOptions(String unionId) {
|
||||||
|
|||||||
-16
@@ -4,21 +4,17 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.flow.engine.FlowEngine;
|
|
||||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealInfoService;
|
import com.budwk.app.zhgh.democratic.appeal.service.AppealInfoService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
import org.nutz.ioc.aop.Aop;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
|
||||||
|
|
||||||
@IocBean
|
@IocBean
|
||||||
@At("/platform/appeal/query")
|
@At("/platform/appeal/query")
|
||||||
@@ -26,8 +22,6 @@ import org.nutz.mvc.annotation.Param;
|
|||||||
@Api("申诉管理-查询统计")
|
@Api("申诉管理-查询统计")
|
||||||
public class AppealQueryController {
|
public class AppealQueryController {
|
||||||
|
|
||||||
@Inject
|
|
||||||
private FlowEngine flowEngine;
|
|
||||||
@Inject
|
@Inject
|
||||||
private AppealInfoService appealInfoService;
|
private AppealInfoService appealInfoService;
|
||||||
|
|
||||||
@@ -80,16 +74,6 @@ public class AppealQueryController {
|
|||||||
return Result.success(data);
|
return Result.success(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
|
||||||
@SaCheckPermission("appeal.query")
|
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
|
||||||
@ApiOperation("删除申诉")
|
|
||||||
public Result delete(@Param("id") String id) {
|
|
||||||
appealInfoService.delete(id);
|
|
||||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
private Cnd buildCondition(String searchKeyword, String appealTypeId, String state, String unitId,
|
private Cnd buildCondition(String searchKeyword, String appealTypeId, String state, String unitId,
|
||||||
String defendantUnitId, Integer year) {
|
String defendantUnitId, Integer year) {
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
|||||||
+15
@@ -6,10 +6,12 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.budwk.app.base.annotation.SLog;
|
import com.budwk.app.base.annotation.SLog;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
|
import com.budwk.app.zhgh.democratic.appeal.models.AppealInfo;
|
||||||
import com.budwk.app.zhgh.democratic.appeal.models.AppealType;
|
import com.budwk.app.zhgh.democratic.appeal.models.AppealType;
|
||||||
import com.budwk.app.zhgh.democratic.appeal.service.AppealTypeService;
|
import com.budwk.app.zhgh.democratic.appeal.service.AppealTypeService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.nutz.dao.Chain;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
@@ -59,11 +61,24 @@ public class AppealTypeController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("appeal.type")
|
||||||
|
@ApiOperation("修改申诉类型启用状态")
|
||||||
|
@SLog(tag = "申诉管理-类型维护", msg = "修改申诉类型启用状态")
|
||||||
|
public Result statusChange(String id, Boolean enabled) {
|
||||||
|
appealTypeService.update(Chain.make("enabled", enabled), Cnd.where("id", "=", id));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@SaCheckPermission("appeal.type")
|
@SaCheckPermission("appeal.type")
|
||||||
@ApiOperation("删除申诉类型")
|
@ApiOperation("删除申诉类型")
|
||||||
@SLog(tag = "申诉管理-类型维护", msg = "删除申诉类型")
|
@SLog(tag = "申诉管理-类型维护", msg = "删除申诉类型")
|
||||||
public Result delete(@Param("id") String id) {
|
public Result delete(@Param("id") String id) {
|
||||||
|
int count = appealTypeService.dao().count(AppealInfo.class, Cnd.where("appealTypeId", "=", id));
|
||||||
|
if (count > 0) {
|
||||||
|
return Result.error("该类型有关联的申诉,无法删除!");
|
||||||
|
}
|
||||||
appealTypeService.delete(id);
|
appealTypeService.delete(id);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ layout("/layouts/platform.html"){
|
|||||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="200">
|
<el-table-column label="操作" fixed="right" width="210">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button size="mini" type="primary" @click="onOpen(row)">查看</el-button>
|
<el-button size="mini" type="primary" @click="onOpen(row)">查看</el-button>
|
||||||
<el-button size="mini" type="primary" v-if="row.taskState === 10" @click="onDeal(row)">审核</el-button>
|
<el-button size="mini" type="primary" v-if="row.taskState === 10" @click="onDeal(row)">审核</el-button>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ layout("/layouts/platform.html"){
|
|||||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="200">
|
<el-table-column label="操作" fixed="right" width="210">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button size="mini" type="primary" @click="onOpen(row)">查看</el-button>
|
<el-button size="mini" type="primary" @click="onOpen(row)">查看</el-button>
|
||||||
<el-button size="mini" type="primary" v-if="row.taskState === 10" @click="onDeal(row)">审核</el-button>
|
<el-button size="mini" type="primary" v-if="row.taskState === 10" @click="onDeal(row)">审核</el-button>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="taskName" label="当前节点" width="120"></el-table-column>
|
<el-table-column prop="taskName" label="当前节点" width="120"></el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="260">
|
<el-table-column label="操作" fixed="right" width="200">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button size="mini" type="primary" @click="onOpen(row)">查看</el-button>
|
<el-button size="mini" type="primary" @click="onOpen(row)">查看</el-button>
|
||||||
<el-button size="mini" type="primary" v-if="canEdit(row)" @click="onEdit(row)">修改</el-button>
|
<el-button size="mini" type="primary" v-if="canEdit(row)" @click="onEdit(row)">修改</el-button>
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ layout("/layouts/platform.html"){
|
|||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="申诉类型">
|
<search-item label="申诉类型">
|
||||||
<el-select v-model="pageForm.appealTypeId" filterable clearable style="width: 100%" placeholder="请选择申诉类型">
|
<el-select v-model="pageForm.appealTypeId" filterable clearable style="width: 100%" placeholder="请选择申诉类型">
|
||||||
<el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in typeOptions" :key="item.id" :label="typeOptionLabel(item)" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label="申诉标题">
|
<search-item label="申诉标题">
|
||||||
@@ -130,7 +130,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-row :gutter="12" class="stat-row">
|
<el-row :gutter="12" class="stat-row">
|
||||||
<el-col v-for="item in statCards" :key="item.prop" :xs="24" :sm="12" :md="8" :lg="4">
|
<el-col v-for="item in statCards" :key="item.prop" :xs="24" :sm="12" :md="6" :lg="6">
|
||||||
<el-card shadow="never" class="stat-card" :class="item.className">
|
<el-card shadow="never" class="stat-card" :class="item.className">
|
||||||
<div class="stat-card-content">
|
<div class="stat-card-content">
|
||||||
<div>
|
<div>
|
||||||
@@ -172,10 +172,9 @@ layout("/layouts/platform.html"){
|
|||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="150">
|
<el-table-column label="操作" fixed="right" width="90">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button size="mini" type="primary" @click="onOpen(row)">查看</el-button>
|
<el-button size="mini" type="primary" @click="onOpen(row)">查看</el-button>
|
||||||
<el-button size="mini" type="danger" @click="onDelete(row)">删除</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -209,8 +208,8 @@ layout("/layouts/platform.html"){
|
|||||||
{title: "待受理", prop: "waitAcceptCount", tip: "委员会待审核", icon: "el-icon-time", className: "stat-wait"},
|
{title: "待受理", prop: "waitAcceptCount", tip: "委员会待审核", icon: "el-icon-time", className: "stat-wait"},
|
||||||
{title: "待执行", prop: "waitExecuteCount", tip: "单位待反馈", icon: "el-icon-s-operation", className: "stat-execute"},
|
{title: "待执行", prop: "waitExecuteCount", tip: "单位待反馈", icon: "el-icon-s-operation", className: "stat-execute"},
|
||||||
{title: "已办结", prop: "finishCount", tip: "流程已结束", icon: "el-icon-finished", className: "stat-finish"},
|
{title: "已办结", prop: "finishCount", tip: "流程已结束", icon: "el-icon-finished", className: "stat-finish"},
|
||||||
{title: "维持决定", prop: "maintainCount", tip: "维持原处理", icon: "el-icon-circle-check", className: "stat-maintain"},
|
/*{title: "维持决定", prop: "maintainCount", tip: "维持原处理", icon: "el-icon-circle-check", className: "stat-maintain"},
|
||||||
{title: "重新处理", prop: "reprocessCount", tip: "需重新处理", icon: "el-icon-refresh", className: "stat-reprocess"}
|
{title: "重新处理", prop: "reprocessCount", tip: "需重新处理", icon: "el-icon-refresh", className: "stat-reprocess"}*/
|
||||||
],
|
],
|
||||||
statistics: {}
|
statistics: {}
|
||||||
}
|
}
|
||||||
@@ -219,6 +218,9 @@ layout("/layouts/platform.html"){
|
|||||||
statisticValue(prop) {
|
statisticValue(prop) {
|
||||||
return (this.statistics && this.statistics[prop]) || 0
|
return (this.statistics && this.statistics[prop]) || 0
|
||||||
},
|
},
|
||||||
|
typeOptionLabel(item) {
|
||||||
|
return item.enabled === false || item.enabled === 0 ? item.name + "(已停用)" : item.name
|
||||||
|
},
|
||||||
stateTagType(state) {
|
stateTagType(state) {
|
||||||
const map = {
|
const map = {
|
||||||
"待受理": "warning",
|
"待受理": "warning",
|
||||||
@@ -247,19 +249,8 @@ layout("/layouts/platform.html"){
|
|||||||
this.pageData()
|
this.pageData()
|
||||||
this.loadStatistics()
|
this.loadStatistics()
|
||||||
},
|
},
|
||||||
onDelete(row) {
|
|
||||||
this.$confirm("您确定删除该申诉吗?", "提示", {type: "warning"}).then(() => {
|
|
||||||
this.$axios.post("/platform/appeal/query/delete", {id: row.id}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.pageData()
|
|
||||||
this.loadStatistics()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
loadOptions() {
|
loadOptions() {
|
||||||
this.$axios.post("/platform/appeal/common/typeOptions").then((res) => {
|
this.$axios.post("/platform/appeal/common/queryTypeOptions").then((res) => {
|
||||||
if (res.code === 0) this.typeOptions = res.data || []
|
if (res.code === 0) this.typeOptions = res.data || []
|
||||||
})
|
})
|
||||||
this.$businessTool.listUnit().then((res) => {
|
this.$businessTool.listUnit().then((res) => {
|
||||||
|
|||||||
@@ -22,11 +22,16 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column prop="sort" label="排序" width="100"></el-table-column>
|
<el-table-column prop="sort" label="排序" width="100"></el-table-column>
|
||||||
<el-table-column prop="enabled" label="是否启用" width="120">
|
<el-table-column prop="enabled" label="是否启用" width="120">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-tag size="mini" v-if="row.enabled" type="success">是</el-tag>
|
<el-switch
|
||||||
<el-tag size="mini" v-else type="info">否</el-tag>
|
v-model="row.enabled"
|
||||||
|
:disabled="row.enabledLoading"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
@change="(val)=>{onEnabledChange(row, val)}">
|
||||||
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="160">
|
<el-table-column label="操作" fixed="right" width="165">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button size="mini" type="primary" @click="onEdit(row)">编辑</el-button>
|
<el-button size="mini" type="primary" @click="onEdit(row)">编辑</el-button>
|
||||||
<el-button size="mini" type="danger" @click="onDelete(row)">删除</el-button>
|
<el-button size="mini" type="danger" @click="onDelete(row)">删除</el-button>
|
||||||
@@ -89,12 +94,36 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onEnabledChange(row, enabled) {
|
||||||
|
const oldEnabled = !enabled
|
||||||
|
const actionName = enabled ? "启用" : "禁用"
|
||||||
|
this.$confirm("您确定要" + actionName + "申诉类型“" + row.name + "”吗?", "提示", {type: "warning"}).then(() => {
|
||||||
|
this.$set(row, "enabledLoading", true)
|
||||||
|
this.$axios.post("/platform/appeal/type/statusChange", {id: row.id, enabled: enabled}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.pageData()
|
||||||
|
} else {
|
||||||
|
row.enabled = oldEnabled
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
}
|
||||||
|
this.$set(row, "enabledLoading", false)
|
||||||
|
}).catch(() => {
|
||||||
|
row.enabled = oldEnabled
|
||||||
|
this.$set(row, "enabledLoading", false)
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
row.enabled = oldEnabled
|
||||||
|
})
|
||||||
|
},
|
||||||
onDelete(row) {
|
onDelete(row) {
|
||||||
this.$confirm("您确定删除该申诉类型吗?", "提示", {type: "warning"}).then(() => {
|
this.$confirm("您确定删除申诉类型“" + row.name + "”吗?", "提示", {type: "warning"}).then(() => {
|
||||||
this.$axios.post("/platform/appeal/type/delete", {id: row.id}).then((res) => {
|
this.$axios.post("/platform/appeal/type/delete", {id: row.id}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.pageData()
|
this.pageData()
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user