commit
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
package io.v.nutz.sys.controllers.platform.sys;
|
package io.v.nutz.sys.controllers.platform.sys;
|
||||||
|
|
||||||
|
import io.v.nutz.base.enums.Env;
|
||||||
import io.v.nutz.base.result.Result;
|
import io.v.nutz.base.result.Result;
|
||||||
import io.v.nutz.base.utils.LoginUtil;
|
import io.v.nutz.base.utils.LoginUtil;
|
||||||
import io.v.nutz.base.enums.Env;
|
|
||||||
import io.v.nutz.sys.models.Sys_log;
|
import io.v.nutz.sys.models.Sys_log;
|
||||||
import io.v.nutz.sys.models.Sys_role;
|
import io.v.nutz.sys.models.Sys_role;
|
||||||
import io.v.nutz.sys.models.Sys_unit;
|
import io.v.nutz.sys.models.Sys_unit;
|
||||||
@@ -24,7 +24,10 @@ import io.v.nutz.web.commons.utils.ShiroUtil;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.authc.*;
|
import org.apache.shiro.authc.AuthenticationException;
|
||||||
|
import org.apache.shiro.authc.AuthenticationToken;
|
||||||
|
import org.apache.shiro.authc.LockedAccountException;
|
||||||
|
import org.apache.shiro.authc.UnknownAccountException;
|
||||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||||
import org.apache.shiro.crypto.hash.Sha256Hash;
|
import org.apache.shiro.crypto.hash.Sha256Hash;
|
||||||
import org.apache.shiro.session.SessionException;
|
import org.apache.shiro.session.SessionException;
|
||||||
@@ -189,11 +192,7 @@ public class SysLoginController {
|
|||||||
public Object doLogin(@Attr("platformLoginToken") AuthenticationToken token,String loginType, HttpServletRequest req, HttpSession session) {
|
public Object doLogin(@Attr("platformLoginToken") AuthenticationToken token,String loginType, HttpServletRequest req, HttpSession session) {
|
||||||
int errCount = NumberUtils.toInt(Strings.sNull(SecurityUtils.getSubject().getSession(true).getAttribute("platformErrCount")));
|
int errCount = NumberUtils.toInt(Strings.sNull(SecurityUtils.getSubject().getSession(true).getAttribute("platformErrCount")));
|
||||||
try {
|
try {
|
||||||
if ("SMS_CODE".equals(loginType)){
|
|
||||||
loginUtil.doLogin(token, req, session, LoginUtil.LoginOrigin.SMS_CODE);
|
|
||||||
} else {
|
|
||||||
loginUtil.doLogin(token, req, session, LoginUtil.LoginOrigin.WEB);
|
loginUtil.doLogin(token, req, session, LoginUtil.LoginOrigin.WEB);
|
||||||
}
|
|
||||||
return Result.success("login.success");
|
return Result.success("login.success");
|
||||||
} catch (CaptchaIncorrectException e) {
|
} catch (CaptchaIncorrectException e) {
|
||||||
return Result.error(1, "login.error.captcha");
|
return Result.error(1, "login.error.captcha");
|
||||||
@@ -208,7 +207,7 @@ public class SysLoginController {
|
|||||||
} catch (AuthenticationException e) {
|
} catch (AuthenticationException e) {
|
||||||
errCount++;
|
errCount++;
|
||||||
SecurityUtils.getSubject().getSession(true).setAttribute("platformErrCount", errCount);
|
SecurityUtils.getSubject().getSession(true).setAttribute("platformErrCount", errCount);
|
||||||
return Result.error(5, e.getMessage());
|
return Result.error(5, "login.error.user");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
errCount++;
|
errCount++;
|
||||||
SecurityUtils.getSubject().getSession(true).setAttribute("platformErrCount", errCount);
|
SecurityUtils.getSubject().getSession(true).setAttribute("platformErrCount", errCount);
|
||||||
|
|||||||
@@ -2,17 +2,17 @@ package io.v.nutz.sys.controllers.platform.sys;
|
|||||||
|
|
||||||
import cn.wizzer.framework.base.Result;
|
import cn.wizzer.framework.base.Result;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.utils.Roles;
|
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.zhgh.proposal.models.ProposalConfig;
|
|
||||||
import io.v.nutz.zhgh.proposal.models.ProposalUndertake;
|
|
||||||
import io.v.nutz.base.service.AsyncService;
|
import io.v.nutz.base.service.AsyncService;
|
||||||
import io.v.nutz.base.service.ViService;
|
import io.v.nutz.base.service.ViService;
|
||||||
|
import io.v.nutz.base.utils.Roles;
|
||||||
import io.v.nutz.sys.models.Sys_unit;
|
import io.v.nutz.sys.models.Sys_unit;
|
||||||
import io.v.nutz.sys.models.Sys_user_role;
|
import io.v.nutz.sys.models.Sys_user_role;
|
||||||
import io.v.nutz.sys.services.SysUnitClassService;
|
import io.v.nutz.sys.services.SysUnitClassService;
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
|
import io.v.nutz.zhgh.proposal.models.ProposalConfig;
|
||||||
|
import io.v.nutz.zhgh.proposal.models.ProposalUndertake;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
@@ -195,7 +195,7 @@ public class SysUnitMangeController {
|
|||||||
try {
|
try {
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
|
|
||||||
Sys_unit school = sysUnitService.fetch("1");
|
Sys_unit school = sysUnitService.fetch("100");
|
||||||
school.setChild(child(school.getId()));
|
school.setChild(child(school.getId()));
|
||||||
|
|
||||||
list.add(school);
|
list.add(school);
|
||||||
|
|||||||
@@ -326,7 +326,7 @@
|
|||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<h3 style="text-align: center; letter-spacing: 6px">工会会员登记表</h3>
|
<h3 style="text-align: center; letter-spacing: 6px">工会会员登记表</h3>
|
||||||
<div style="text-align: right; letter-spacing: 2px">填表日期:{{ moment(formData.applyTime).format("YYYY年MM月DD日") }}</div>
|
<!-- <div style="text-align: right; letter-spacing: 2px">填表日期:{{ moment(formData.applyTime).format("YYYY年MM月DD日") }}</div>-->
|
||||||
|
|
||||||
<el-descriptions :column="3" border class="descriptions-form">
|
<el-descriptions :column="3" border class="descriptions-form">
|
||||||
<el-descriptions-item label="姓名">{{ formData.username }}</el-descriptions-item>
|
<el-descriptions-item label="姓名">{{ formData.username }}</el-descriptions-item>
|
||||||
|
|||||||
@@ -7,11 +7,8 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
|
|
||||||
<guava ref="guava">
|
<guava ref="guava">
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
@@ -20,19 +17,24 @@ layout("/layouts/platform.html"){
|
|||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
placeholder="选择年度"
|
placeholder="选择年度"
|
||||||
type="year" style="width: 100%"
|
type="year"
|
||||||
|
style="width: 100%"
|
||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
value-format="yyyy">
|
value-format="yyyy"
|
||||||
</el-date-picker>
|
></el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-item-label">社团名称:</div>
|
<div class="search-item-label">社团名称:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
<el-input
|
||||||
|
@keyup.enter.native="doSearch"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%" v-model="pageForm.name">
|
placeholder="请输入内容"
|
||||||
</el-input>
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="pageForm.name"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-query">
|
<div class="search-query">
|
||||||
@@ -47,25 +49,53 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" :size="tableSize">
|
<el-table :data="tableData" :size="tableSize">
|
||||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
<el-table-column
|
||||||
width="80px"></el-table-column>
|
:index="indexMethod"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
label="序号"
|
||||||
|
type="index"
|
||||||
|
width="80px"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column label="社团名称" prop="name" sortable align="center" header-align="center"
|
<el-table-column
|
||||||
show-overflow-tooltip></el-table-column>
|
label="社团名称"
|
||||||
<el-table-column label="社团类型" prop="typeName" sortable align="center" header-align="center"
|
prop="name"
|
||||||
show-overflow-tooltip></el-table-column>
|
sortable
|
||||||
<el-table-column label="申请时间" prop="create_time" sortable align="center" header-align="center"
|
align="center"
|
||||||
show-overflow-tooltip>
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="社团类型"
|
||||||
|
prop="typeName"
|
||||||
|
sortable
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="申请时间" prop="create_time" sortable align="center" header-align="center" show-overflow-tooltip>
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<span>{{ moment(row.create_time).format('YYYY-MM-DD') }}</span>
|
<span>{{ moment(row.create_time).format('YYYY-MM-DD') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="联系人" prop="fzrName" sortable align="center" header-align="center"
|
<el-table-column
|
||||||
show-overflow-tooltip></el-table-column>
|
label="联系人"
|
||||||
<el-table-column label="发起人" prop="sponsorName" sortable align="center" header-align="center"
|
prop="fzrName"
|
||||||
show-overflow-tooltip></el-table-column>
|
sortable
|
||||||
<el-table-column label="状态" prop="stateName" sortable align="center" header-align="center"
|
align="center"
|
||||||
show-overflow-tooltip>
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="发起人"
|
||||||
|
prop="sponsorName"
|
||||||
|
sortable
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="状态" prop="stateName" sortable align="center" header-align="center" show-overflow-tooltip>
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<span :style="'color: ' + row.stateColor">{{ row.stateName }}</span>
|
<span :style="'color: ' + row.stateColor">{{ row.stateName }}</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -74,10 +104,19 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column label="操作" width="300px">
|
<el-table-column label="操作" width="300px">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||||
<el-button :disabled="![800,820,850,880].includes(row.state)" @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
<!-- <el-button :disabled="![800,820,850,880].includes(row.state)" @click="openEdit(row)" size="mini" type="primary">编辑</el-button>-->
|
||||||
<el-button v-if="${@shiro.hasRole('sysadmin')} || ${@shiro.hasRole('A06')} || ${@shiro.hasRole('xxhgly')}"
|
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||||
@click="deleteDo(row)" size="mini" type="danger">删除</el-button>
|
<el-button
|
||||||
<el-button v-else :disabled="![800,820,850,880].includes(row.state)" @click="deleteDo(row)" size="mini" type="danger">删除</el-button>
|
v-if="${@shiro.hasRole('sysadmin')} || ${@shiro.hasRole('A06')} || ${@shiro.hasRole('xxhgly')}"
|
||||||
|
@click="deleteDo(row)"
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
<el-button v-else :disabled="![800,820,850,880].includes(row.state)" @click="deleteDo(row)" size="mini" type="danger">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -88,26 +127,23 @@ layout("/layouts/platform.html"){
|
|||||||
<template #view>
|
<template #view>
|
||||||
<club-regist-info ref="info"></club-regist-info>
|
<club-regist-info ref="info"></club-regist-info>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
const vue = new Vue({
|
const vue = new Vue({
|
||||||
el: '#app',
|
el: "#app",
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
components: {
|
components: {
|
||||||
'club-regist-info': httpVueLoader('/components/club/clubRegistInfo.vue'),
|
"club-regist-info": httpVueLoader("/components/club/clubRegistInfo.vue")
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageForm: {
|
pageForm: {
|
||||||
name: ''
|
name: ""
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
schoolAudit: false,
|
schoolAudit: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -116,42 +152,42 @@ layout("/layouts/platform.html"){
|
|||||||
this.pageData()
|
this.pageData()
|
||||||
},
|
},
|
||||||
openAdd() {
|
openAdd() {
|
||||||
sublime.jumpPagePjax('/platform/sys/club/clubRegistApply')
|
sublime.jumpPagePjax("/platform/sys/club/clubRegistApply")
|
||||||
},
|
},
|
||||||
openView(row) {
|
openView(row) {
|
||||||
const {id} = row
|
const { id } = row
|
||||||
this.$refs.guava.view()
|
this.$refs.guava.view()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.info.getInfo(id)
|
this.$refs.info.getInfo(id)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openEdit(row) {
|
openEdit(row) {
|
||||||
sublime.jumpPagePjax('/platform/sys/club/clubRegistApply?id=' + row.id)
|
sublime.jumpPagePjax("/platform/sys/club/clubRegistApply?id=" + row.id)
|
||||||
},
|
},
|
||||||
async deleteDo(row) {
|
async deleteDo(row) {
|
||||||
const confirm = await this.$confirm('此操作将永久删除, 是否继续?', '提示', {
|
const confirm = await this.$confirm("此操作将永久删除, 是否继续?", "提示", {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: "取消",
|
||||||
type: 'warning'
|
type: "warning"
|
||||||
})
|
})
|
||||||
if (confirm === "confirm") {
|
if (confirm === "confirm") {
|
||||||
const resp = await $.post('/platform/sys/club/clubMyApply/doDelete', {id: row.id})
|
const resp = await $.post("/platform/sys/club/clubMyApply/doDelete", { id: row.id })
|
||||||
this.notifySuccess("删除成功")
|
this.notifySuccess("删除成功")
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async pageData() {
|
async pageData() {
|
||||||
const resp = await $.post("/platform/sys/club/clubMyApply/pageData", this.pageForm);
|
const resp = await $.post("/platform/sys/club/clubMyApply/pageData", this.pageForm)
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.tableData = resp.data.list;
|
this.tableData = resp.data.list
|
||||||
this.pageForm.totalCount = resp.data.totalCount;
|
this.pageForm.totalCount = resp.data.totalCount
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: resp.msg,
|
message: resp.msg,
|
||||||
type: 'error'
|
type: "error"
|
||||||
});
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
await this.pageData()
|
await this.pageData()
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user