增加校文体部负责人权限
This commit is contained in:
+2
-2
@@ -235,7 +235,7 @@ public class ActivityBasicScopeController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,H06,H10")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,H06,H10,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
if (ShiroUtil.hasAnyRoles(new String[]{"H04", "club01"})) {
|
||||
cnd.and("creator", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
}
|
||||
@@ -284,7 +284,7 @@ public class ActivityBasicScopeController {
|
||||
addv("is_H04", ShiroUtil.hasRole("H04"));
|
||||
addv("is_H02", ShiroUtil.hasRole("club01"));
|
||||
addv("is_H03", ShiroUtil.hasRole("SchoolUnionMemberAdmin"));
|
||||
addv("is_sysadmin", ShiroUtil.hasRole("sysadmin"));
|
||||
addv("is_sysadmin", ShiroUtil.hasRole("sysadmin,SCHOOL_UNION_SPORTS_ADMIN"));
|
||||
addv("unionid", Vi.getUnionId());
|
||||
}};
|
||||
}
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ public class ActivityBasicUserController {
|
||||
cnd.andEX("u.unitid", "=", unitId);
|
||||
cnd.andEX("u.personType", "=", personType);
|
||||
cnd.andEX("u.userState", "=", userState);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
cnd.andEX("aus.creator", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
}
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ public class ActivityUnionController {
|
||||
if (Strings.isNotBlank(searchName) && Strings.isNotBlank(searchKeyword)) {
|
||||
cnd.and(searchName, "like", "%" + searchKeyword + "%");
|
||||
}
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
cnd.and("gh.id", "=", basicUnit.getUnionid());
|
||||
}
|
||||
if (Strings.isNotBlank(pageOrderName) && Strings.isNotBlank(pageOrderBy)) {
|
||||
@@ -233,7 +233,7 @@ public class ActivityUnionController {
|
||||
try {
|
||||
union.setSource("activity");
|
||||
sysUnionService.insert(union);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin.H04")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin.H04,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
sysUnitService.dao().update(ActivityBasicUnit.class, Chain.make("unionid", union.getId()), Cnd.where("id", "=", Vi.getUnit().getId()));
|
||||
}
|
||||
return Result.success();
|
||||
|
||||
+2
-2
@@ -187,7 +187,7 @@ public class ActivityApplyController {
|
||||
// cnd.and(new Static("now() > school.applyEndTime"));
|
||||
// }
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("H04,sysadmin")) {
|
||||
if (!ShiroUtil.hasAnyRoles("H04,sysadmin,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
cnd.and(new Static("JSON_CONTAINS(school.applyWay,JSON_ARRAY( 1))>0"));
|
||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(ShiroUtil.getUserId())));
|
||||
}
|
||||
@@ -664,7 +664,7 @@ public class ActivityApplyController {
|
||||
""").setParam("unionId", getUnionId()).setParam("userId", ShiroUtil.getUserId());
|
||||
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("H04,sysadmin")) {
|
||||
if (!ShiroUtil.hasAnyRoles("H04,sysadmin,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
cnd.where().andLike("school.applyWay ", "1");
|
||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(ShiroUtil.getUserId())));
|
||||
}
|
||||
|
||||
+2
-2
@@ -232,7 +232,7 @@ public class ActivityCommonController {
|
||||
app.sex
|
||||
""").setParam("id", id);
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06") && ShiroUtil.hasRole("H04")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN") && ShiroUtil.hasRole("H04")) {
|
||||
sql1.setVar("union", " AND app.unionId = '" + unionid + "' ");
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ public class ActivityCommonController {
|
||||
|
||||
Cnd unionCnd = Cnd.NEW();
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06") && ShiroUtil.hasRole("H04")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN") && ShiroUtil.hasRole("H04")) {
|
||||
unionCnd.and("id", "=", unionid);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ public class ActivityInfoManageController {
|
||||
} else if ("four".equals(query)) {
|
||||
cnd.and(new Static("now() > school.endTime"));
|
||||
}
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
if (ShiroUtil.hasRole("H04")) {
|
||||
cnd.and("school.belongUnionId", "=", Vi.getUnionId());
|
||||
}
|
||||
|
||||
+4
-4
@@ -88,7 +88,7 @@ public class ActivityReadingController {
|
||||
cnd.and("close", "!=", true);
|
||||
cnd.and("YEAR(startTime)", "=", year);
|
||||
cnd.and("activityLevel", "=", activityLevel);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
if (activityLevel.equals("40002")) {
|
||||
cnd.and("belongUnionId", "=", getUnionId());
|
||||
}
|
||||
@@ -135,7 +135,7 @@ public class ActivityReadingController {
|
||||
cnd.and("app.activityId", "=", id);
|
||||
// cnd.and("YEAR(app.applyDate)", "=", year);
|
||||
sql.setCondition(cnd);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
if (ShiroUtil.hasRole("H04") && activityLevel.equals("40002")) {
|
||||
cnd.and("app.activityUnionId", "=", basicUnit.getUnionid());
|
||||
cnd.and("school.belongUnionId", "=", basicUnit.getUnionid());
|
||||
@@ -150,7 +150,7 @@ public class ActivityReadingController {
|
||||
List<NutMap> apply = new ArrayList();
|
||||
|
||||
Cnd unionCnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
if (ShiroUtil.hasRole("H04")) {
|
||||
unionCnd.and("id", "=", basicUnit.getUnionid());
|
||||
}
|
||||
@@ -353,7 +353,7 @@ public class ActivityReadingController {
|
||||
}
|
||||
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,H10")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,H10,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
if (!user.getUnionid().equals(getUnionId())) {
|
||||
setObj(v.getLoginName() + "此用户不是本工会人员");
|
||||
throw new RuntimeException(v.getLoginName() + "此用户不是本工会人员");
|
||||
|
||||
+1
-1
@@ -214,7 +214,7 @@ public class ActivityRemindController {
|
||||
@ViReturn
|
||||
public Object getActivitys() {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
if (ShiroUtil.hasRole("H04")) {
|
||||
cnd.and("belongUnionId", "=", Vi.getUnionId());
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class SiteRecordController {
|
||||
cnd.and("asr.isRetire","=",isRetire);
|
||||
}
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
cnd.and("asr.reserve_person_unionid", "=", Vi.getUnionId());
|
||||
}
|
||||
if (Strings.isNotBlank(time)) {
|
||||
|
||||
@@ -100,7 +100,7 @@ public class SiteReserveController {
|
||||
if (StrUtil.isNotBlank(isRetire)) {
|
||||
cnd.and("asr.isRetire","=",isRetire);
|
||||
}
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
cnd.and("reserve_person_id", "=", ShiroUtil.getPrincipalProperty("id"));
|
||||
}
|
||||
if (Strings.isNotBlank(time)) {
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ public class SiteUnionProcessController {
|
||||
CndPlus cnd = CndPlus.create();
|
||||
cnd.and("asr.reserve_state", "true".equals(isAudit) ? ">" : "false".equals(isAudit) ? "=" : ">=", 6098);
|
||||
cnd.and("asr.isRetire","=",0);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
cnd.and("reserve_person_unionid", "=", Vi.getUnionId());
|
||||
}
|
||||
if (Strings.isNotBlank(time)) {
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ public class ActivityUnionApplyUserController {
|
||||
cnd.where().andLike("tissue.name", name);
|
||||
}
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("A06,sysadmin")) {
|
||||
if (!ShiroUtil.hasAnyRoles("A06,sysadmin,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=tissue.groupId AND userId='%s') >0".formatted(ShiroUtil.getUserId())));
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -124,7 +124,7 @@ public class ActivityUnionManageController {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT id userId,username userName,loginname loginName,sex,mobile,unitname unitName,unionname unionName FROM `user` $condition
|
||||
""");
|
||||
if (!ShiroUtil.hasRole("sysadmin")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
if (activity_type == 40002) {
|
||||
cnd.and("unionId", "=", Vi.getUnionId());
|
||||
} else if (activity_type == 40003) {
|
||||
@@ -158,7 +158,7 @@ public class ActivityUnionManageController {
|
||||
tissue.setUserId(ShiroUtil.getUserId());
|
||||
}
|
||||
tissue.setApplyTime(DateUtil.getDate());
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
tissue.setState(1);
|
||||
} else {
|
||||
tissue.setState(3);
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ public class ActivityUnionUserStatisticsController {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("atp.tissueId", "=", activityId);
|
||||
cnd.andEX("u.unionId", "=", unionId);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
if (!tissue.getUserId().equals(ShiroUtil.getUserId())) {
|
||||
if (type == 40002) {
|
||||
cnd.and("unionId", "=", Vi.getUnionId());
|
||||
|
||||
+2
-2
@@ -110,13 +110,13 @@ public class ActivityUnionYearSummaryController {
|
||||
str += " left join `user` u on su.userId = u.id";
|
||||
if ("2".equals(summaryFrom)) {
|
||||
str += " left join sys_union un on su.tissueId = un.id";
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06"})) {
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06", "SCHOOL_UNION_SPORTS_ADMIN"})) {
|
||||
cnd.and("su.tissueId", "=", Vi.getUnionId());
|
||||
}
|
||||
}
|
||||
if ("3".equals(summaryFrom)) {
|
||||
str += " left join sys_club club on su.tissueId = club.id";
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06"})) {
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06", "SCHOOL_UNION_SPORTS_ADMIN"})) {
|
||||
cnd.and("su.tissueId", "=", vi.getClubId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ActivityPlanServiceImpl extends ViServiceImpl<ActivityPlan> impleme
|
||||
cnd.where().andLike("ap.name", name);
|
||||
}
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,H10,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,H10,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
if (ShiroUtil.hasRole("H04")) {
|
||||
cnd.and("tissueId", "in", vi.getMangeUnionStr());
|
||||
} else if (ShiroUtil.hasRole("club01")) {
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ActivityTissueServiceImpl extends ViServiceImpl<ActivityTissue> imp
|
||||
cnd.where().andLike("tissue.name", name);
|
||||
}
|
||||
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,H10,A06")) {
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,H10,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
|
||||
cnd.and("tissue.userId", "=", ShiroUtil.getUserId());
|
||||
/* if (ShiroUtil.hasRole("H04")) {
|
||||
cnd.and("tissue.unionId", "in", vi.getMangeUnionStr());
|
||||
|
||||
@@ -4,7 +4,6 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<style>
|
||||
.query-row {
|
||||
|
||||
}
|
||||
|
||||
.query-title {
|
||||
@@ -14,16 +13,12 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
|
||||
.query-content {
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<user-data-scope
|
||||
ref="userDataScope"
|
||||
:group_id.sync="formData.activityGroupId"
|
||||
></user-data-scope>
|
||||
<user-data-scope ref="userDataScope" :group_id.sync="formData.activityGroupId"></user-data-scope>
|
||||
</guava>
|
||||
<!--<guava>
|
||||
<el-card shadow="never">
|
||||
@@ -179,19 +174,19 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'user-data-scope': httpVueLoader('/components/plugins/UserDataScope.vue'),
|
||||
"dict-select": httpVueLoader("/components/plugins/DictSelect.vue?v=1.0.0"),
|
||||
"user-data-scope": httpVueLoader("/components/plugins/UserDataScope.vue")
|
||||
},
|
||||
computed: {
|
||||
currentGroupName() {
|
||||
if (this.pageForm.groupId) {
|
||||
const group = this.activityGroupList.find(v => v.groupId === this.pageForm.groupId)
|
||||
return group.groupName + '人员'
|
||||
const group = this.activityGroupList.find((v) => v.groupId === this.pageForm.groupId)
|
||||
return group.groupName + "人员"
|
||||
}
|
||||
return '全部人员'
|
||||
return "全部人员"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -208,33 +203,33 @@ layout("/layouts/platform.html"){
|
||||
personTypes: [],
|
||||
userStates: [],
|
||||
memberStatus: [],
|
||||
year: moment().format('YYYY')
|
||||
year: moment().format("YYYY")
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'birthday', label: '出生年月'},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'personType', label: '人员类型', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'activityUnionName', label: '活动工会', sortable: true},
|
||||
{prop: 'groupName', label: '所属分组', sortable: true},
|
||||
],
|
||||
{ prop: "loginName", label: "工号" },
|
||||
{ prop: "userName", label: "姓名" },
|
||||
{ prop: "sex", label: "性别" },
|
||||
{ prop: "birthday", label: "出生年月" },
|
||||
{ prop: "mobile", label: "联系电话" },
|
||||
{ prop: "personType", label: "人员类型", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "activityUnionName", label: "活动工会", sortable: true },
|
||||
{ prop: "groupName", label: "所属分组", sortable: true }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doDelete(id, groupId) {
|
||||
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
const confirm = await this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
if (confirm === "confirm") {
|
||||
this.pageForm.id = id
|
||||
const resp = await $.post(loc() + '/doDelete', this.pageForm)
|
||||
const resp = await $.post(loc() + "/doDelete", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
@@ -243,7 +238,10 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
if (
|
||||
"${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')||@shiro.hasRole('SCHOOL_UNION_SPORTS_ADMIN')}" ===
|
||||
"true"
|
||||
) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
this.ActivityUnits = await getActivityUnits(this.pageForm.activityUnionId)
|
||||
} else {
|
||||
@@ -252,7 +250,7 @@ layout("/layouts/platform.html"){
|
||||
this.doSearch()
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const resp = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||
const resp = await $.get("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||
this.activityGroupList = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
||||
@@ -265,7 +263,6 @@ layout("/layouts/platform.html"){
|
||||
this.unions = await getUnions(null)
|
||||
this.ActivityUnions = await getActivityUnions()
|
||||
this.flushUnits()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/jqFullCalendar/css/fullcalendar.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/jqFullCalendar/css/fullcalendar.css" />
|
||||
<script src="${base!}/assets/platform/plugins/jqFullCalendar/js/fullcalendar.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jqFullCalendar/js/moment.min.js"></script>
|
||||
|
||||
@@ -25,9 +25,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
|
||||
.other {
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
@@ -39,24 +37,26 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item-label">月份:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-input
|
||||
placeholder="请输入内容"
|
||||
clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch"
|
||||
>
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 80px">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
@@ -67,11 +67,14 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName">
|
||||
</el-input>
|
||||
<el-input
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable
|
||||
clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName"
|
||||
></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -94,8 +97,7 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never" class="mt20">
|
||||
<vi-title2 title="预约列表">
|
||||
<template #func>
|
||||
<el-button size="small" type="primary" class="el-icon-date" @click="openCalendar">预约日历
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" class="el-icon-date" @click="openCalendar">预约日历</el-button>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isRetire">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="1">离退休</el-radio-button>
|
||||
@@ -103,31 +105,32 @@ layout("/layouts/platform.html"){
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" align="center" header-align="center">
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
|
||||
<template scope="{row}" v-if="column.prop==='state_name'">
|
||||
<!--<span :style="'color:'+row.state_color">{{row.state_name}}</span>-->
|
||||
<span v-if="[0].includes(row.stateaudittype)"
|
||||
style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="[0].includes(row.stateaudittype)" style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==3" style="color: #67c23a">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==1" style="color: #f56c6c">{{row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="200px">
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
</template>
|
||||
@@ -148,9 +151,7 @@ layout("/layouts/platform.html"){
|
||||
<el-dialog title="预约详情" :visible.sync="siteInfoDialog" width="60%">
|
||||
<reserve-info ref="reserveDialogInfo"></reserve-info>
|
||||
</el-dialog>
|
||||
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -158,12 +159,12 @@ layout("/layouts/platform.html"){
|
||||
const activityUtil = new typeUtil()
|
||||
let calendar = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
userid: "${@shiro.getPrincipalProperty('id')}",
|
||||
role: "${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}",
|
||||
role: "${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')||@shiro.hasRole('SCHOOL_UNION_SPORTS_ADMIN')}",
|
||||
activityTypeList: [],
|
||||
siteList: [],
|
||||
pageForm: {
|
||||
@@ -171,19 +172,19 @@ layout("/layouts/platform.html"){
|
||||
searchKeyword: "",
|
||||
isAudit: false,
|
||||
time: "",
|
||||
isRetire: '0'
|
||||
isRetire: "0"
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '场地名称', prop: 'site_name', sortable: true},
|
||||
{label: '预约人姓名', prop: 'reserve_person_username', sortable: true},
|
||||
{label: '预约人部门', prop: 'reserve_person_unitname', sortable: true},
|
||||
{ label: "场地名称", prop: "site_name", sortable: true },
|
||||
{ label: "预约人姓名", prop: "reserve_person_username", sortable: true },
|
||||
{ label: "预约人部门", prop: "reserve_person_unitname", sortable: true },
|
||||
// {label: '开始时间', prop: 'reserve_start_time', sortable: true},
|
||||
// {label: '结束时间', prop: 'reserve_end_time', sortable: true},
|
||||
{label: '预约时间范围', prop: 'reservationtimestr'},
|
||||
{label: '联系电话', prop: 'reserve_person_phone'},
|
||||
{ label: "预约时间范围", prop: "reservationtimestr" },
|
||||
{ label: "联系电话", prop: "reserve_person_phone" },
|
||||
// {label: '活动名称', prop: 'reserve_activity'},
|
||||
{label: '预约事由', prop: 'reserve_cause'},
|
||||
{label: '预约状态', prop: 'state_name'},
|
||||
{ label: "预约事由", prop: "reserve_cause" },
|
||||
{ label: "预约状态", prop: "state_name" }
|
||||
],
|
||||
sites: [],
|
||||
events: [],
|
||||
@@ -192,7 +193,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'reserve-info': httpVueLoader('/components/activity/site/ReserveInfo.vue?v=' + new Date().getTime()),
|
||||
"reserve-info": httpVueLoader("/components/activity/site/ReserveInfo.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
@@ -200,13 +201,13 @@ layout("/layouts/platform.html"){
|
||||
this.$refs.reserve.openView(row.id)
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm("您确定要删除此预约吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
const confirm = await this.$confirm("您确定要删除此预约吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
const resp = await $.post('/platform/activity/site/reserve/doDelete', {id, op: 1})
|
||||
if (confirm !== "confirm") return
|
||||
const resp = await $.post("/platform/activity/site/reserve/doDelete", { id, op: 1 })
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
@@ -215,7 +216,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
async getSites() {
|
||||
const {data} = await $.get(loc() + '/getSites')
|
||||
const { data } = await $.get(loc() + "/getSites")
|
||||
this.sites = data
|
||||
},
|
||||
|
||||
@@ -224,60 +225,63 @@ layout("/layouts/platform.html"){
|
||||
if (calendar) {
|
||||
return
|
||||
}
|
||||
calendar = $('#site-calendar').fullCalendar({
|
||||
header: { //设置日历头部信息,false,则不显示头部信息。包括left,center,right左中右三个位置
|
||||
left: 'prev,next, today', //上一个、下一个、今天
|
||||
center: 'title', //标题
|
||||
right: 'month,agendaWeek,agendaDay' //月、周、日、日程列表
|
||||
calendar = $("#site-calendar").fullCalendar({
|
||||
header: {
|
||||
//设置日历头部信息,false,则不显示头部信息。包括left,center,right左中右三个位置
|
||||
left: "prev,next, today", //上一个、下一个、今天
|
||||
center: "title", //标题
|
||||
right: "month,agendaWeek,agendaDay" //月、周、日、日程列表
|
||||
},
|
||||
locale: 'zh-cn', //?没用?
|
||||
timeFormat: 'HH:mm', //日程事件的时间格式
|
||||
buttonText: { //各按钮的显示文本信息
|
||||
today: '今天',
|
||||
month: '月',
|
||||
agendaWeek: '周',
|
||||
agendaDay: '日',
|
||||
listMonth: '日程',
|
||||
locale: "zh-cn", //?没用?
|
||||
timeFormat: "HH:mm", //日程事件的时间格式
|
||||
buttonText: {
|
||||
//各按钮的显示文本信息
|
||||
today: "今天",
|
||||
month: "月",
|
||||
agendaWeek: "周",
|
||||
agendaDay: "日",
|
||||
listMonth: "日程"
|
||||
},
|
||||
monthNames: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], //月份全称
|
||||
monthNames: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], //月份全称
|
||||
monthNamesShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], //月份简写
|
||||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], //周全称
|
||||
dayNamesShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], //周简写
|
||||
noEventsMessage: "当月无数据", //listview视图下,无数据提示
|
||||
allDayText: "全天", //自定义全天视图的名称
|
||||
allDaySlot: false, //是否在周日历上方显示全天
|
||||
allDayDefault: false, //是否为全天日程事件,显示这一天中所做的事情
|
||||
slotDuration: "00:30:00", //一格时间槽代表多长时间,默认00:30:00(30分钟)
|
||||
slotLabelFormat: "H(:mm)a", //日期视图左边那一列显示的每一格日期时间格式
|
||||
slotLabelInterval: "01:00:00", //日期视图左边那一列多长间隔显示一条日期文字(默认跟着slotDuration走的,可自定义)
|
||||
snapDuration: "01:00:00", //其实就是动态创建一个日程时,默认创建多长的时间块
|
||||
firstDay: 1, //一周中显示的第一天是哪天,周日是0,周一是1,类推
|
||||
hiddenDays: [], //隐藏一周中的某一天或某几天,数组形式,如隐藏周二和周五:[2,5],默认不隐藏,除非weekends设置为false。
|
||||
weekends: true, //是否显示周六和周日,设为false则不显示周六和周日。默认值为true
|
||||
weekMode: 'fixed', //月视图里显示周的模式,因每月周数不同月视图高度不定。fixed:固定显示6周高,日历高度保持不变liquid:不固定周数,高度随周数变化variable:不固定周数,但高度固定
|
||||
weekNumbers: false, //是否在日历中显示周次(一年中的第几周),如果设置为true,则会在月视图的左侧、周视图和日视图的左上角显示周数。
|
||||
weekNumberCalculation: 'iso', //周次的显示格式。
|
||||
height: that.calendarHeight, //设置日历的高度,包括header日历头部,默认未设置,高度根据aspectRatio值自适应。
|
||||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], //周全称
|
||||
dayNamesShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], //周简写
|
||||
noEventsMessage: "当月无数据", //listview视图下,无数据提示
|
||||
allDayText: "全天", //自定义全天视图的名称
|
||||
allDaySlot: false, //是否在周日历上方显示全天
|
||||
allDayDefault: false, //是否为全天日程事件,显示这一天中所做的事情
|
||||
slotDuration: "00:30:00", //一格时间槽代表多长时间,默认00:30:00(30分钟)
|
||||
slotLabelFormat: "H(:mm)a", //日期视图左边那一列显示的每一格日期时间格式
|
||||
slotLabelInterval: "01:00:00", //日期视图左边那一列多长间隔显示一条日期文字(默认跟着slotDuration走的,可自定义)
|
||||
snapDuration: "01:00:00", //其实就是动态创建一个日程时,默认创建多长的时间块
|
||||
firstDay: 1, //一周中显示的第一天是哪天,周日是0,周一是1,类推
|
||||
hiddenDays: [], //隐藏一周中的某一天或某几天,数组形式,如隐藏周二和周五:[2,5],默认不隐藏,除非weekends设置为false。
|
||||
weekends: true, //是否显示周六和周日,设为false则不显示周六和周日。默认值为true
|
||||
weekMode: "fixed", //月视图里显示周的模式,因每月周数不同月视图高度不定。fixed:固定显示6周高,日历高度保持不变liquid:不固定周数,高度随周数变化variable:不固定周数,但高度固定
|
||||
weekNumbers: false, //是否在日历中显示周次(一年中的第几周),如果设置为true,则会在月视图的左侧、周视图和日视图的左上角显示周数。
|
||||
weekNumberCalculation: "iso", //周次的显示格式。
|
||||
height: that.calendarHeight, //设置日历的高度,包括header日历头部,默认未设置,高度根据aspectRatio值自适应。
|
||||
// contentHeight: 600, //设置日历主体内容的高度,不包括header部分,默认未设置,高度根据aspectRatio值自适应。
|
||||
handleWindowResize: true, //是否随浏览器窗口大小变化而自动变化。
|
||||
defaultView: 'agendaWeek', //初始化时默认视图,默认是月month,agendaWeek是周,agendaDay是当天
|
||||
slotEventOverlap: false, //事件是否可以重叠覆盖
|
||||
defaultDate: moment().format('YYYY-MM-DD'), //默认显示那一天的日期视图getDates(true)2020-05-10
|
||||
nowIndicator: false, //周/日视图中显示今天当前时间点(以红线标记),默认false不显示
|
||||
eventLimit: 2, //数据条数太多时,限制显示条数(多余的以“+2more”格式显示),默认false不限制,支持输入数字设定固定的显示条数
|
||||
eventLimitText: "更多", //当一块区域内容太多以"+2 more"格式显示时,这个more的名称自定义(应该与eventLimit: true一并用)
|
||||
dayPopoverFormat: "YYYY年M月d日预约信息", //点开"+2 more"弹出的小窗口标题,与eventLimitClick可以结合用
|
||||
render: (view) => { //method,绑定日历到id上。$('#id').fullCalendar('render');
|
||||
handleWindowResize: true, //是否随浏览器窗口大小变化而自动变化。
|
||||
defaultView: "agendaWeek", //初始化时默认视图,默认是月month,agendaWeek是周,agendaDay是当天
|
||||
slotEventOverlap: false, //事件是否可以重叠覆盖
|
||||
defaultDate: moment().format("YYYY-MM-DD"), //默认显示那一天的日期视图getDates(true)2020-05-10
|
||||
nowIndicator: false, //周/日视图中显示今天当前时间点(以红线标记),默认false不显示
|
||||
eventLimit: 2, //数据条数太多时,限制显示条数(多余的以“+2more”格式显示),默认false不限制,支持输入数字设定固定的显示条数
|
||||
eventLimitText: "更多", //当一块区域内容太多以"+2 more"格式显示时,这个more的名称自定义(应该与eventLimit: true一并用)
|
||||
dayPopoverFormat: "YYYY年M月d日预约信息", //点开"+2 more"弹出的小窗口标题,与eventLimitClick可以结合用
|
||||
render: (view) => {
|
||||
//method,绑定日历到id上。$('#id').fullCalendar('render');
|
||||
},
|
||||
viewRender: (view) => {
|
||||
that.getCalendarData()
|
||||
},
|
||||
eventRender: (info, element) => {
|
||||
console.log(info)
|
||||
element.find('.fc-title').append("<br/>申请人:" + info.reserve_person_username)
|
||||
element.find('.fc-title').append("<br/>联系电话:" + info.reserve_person_phone)
|
||||
element.find('.fc-title').append("<br/>预约事由:" + info.reserve_cause)
|
||||
element.find('.fc-title').append("<br/>审核状态:" + info.state_name)
|
||||
element.find(".fc-title").append("<br/>申请人:" + info.reserve_person_username)
|
||||
element.find(".fc-title").append("<br/>联系电话:" + info.reserve_person_phone)
|
||||
element.find(".fc-title").append("<br/>预约事由:" + info.reserve_cause)
|
||||
element.find(".fc-title").append("<br/>审核状态:" + info.state_name)
|
||||
// $(info.el).html(info.event.title);
|
||||
},
|
||||
//日历数据源
|
||||
@@ -289,7 +293,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
setTimeout(async () => {
|
||||
// that.siteInfoDialog = true
|
||||
await httpVueLoader('/components/activity/site/ReserveInfo.vue?v=' + new Date().getTime())()
|
||||
await httpVueLoader("/components/activity/site/ReserveInfo.vue?v=" + new Date().getTime())()
|
||||
// that.$refs.reserveDialogInfo.openView(event.id)
|
||||
}, 1000)
|
||||
|
||||
@@ -319,44 +323,44 @@ layout("/layouts/platform.html"){
|
||||
// that.$set(that.formData, 'appointmentAskTypeValue', this.askTypeArray[0].code)
|
||||
// }
|
||||
},
|
||||
selectable: false, //是否允许通过单击或拖动选择日历中的对象,包括天和时间
|
||||
selectMirror: true, //镜像
|
||||
lazyFetching: false, //是否启用懒加载技术--即只取当前条件下的视图数据,其它数据在切换时触发,默认true只取当前视图的,false是取全视图的
|
||||
defaultTimedEventDuration: "01:00:00", //在Event Object中如果没有end参数时使用,如start=7:00pm,则该日程对象时间范围就是7:00~9:00
|
||||
defaultAllDayEventDuration: {days: 1}, //默认1天是多长,(有的是采用工作时间模式,所以支持自定义)
|
||||
});
|
||||
selectable: false, //是否允许通过单击或拖动选择日历中的对象,包括天和时间
|
||||
selectMirror: true, //镜像
|
||||
lazyFetching: false, //是否启用懒加载技术--即只取当前条件下的视图数据,其它数据在切换时触发,默认true只取当前视图的,false是取全视图的
|
||||
defaultTimedEventDuration: "01:00:00", //在Event Object中如果没有end参数时使用,如start=7:00pm,则该日程对象时间范围就是7:00~9:00
|
||||
defaultAllDayEventDuration: { days: 1 } //默认1天是多长,(有的是采用工作时间模式,所以支持自定义)
|
||||
})
|
||||
},
|
||||
async getCalendarData() {
|
||||
if (!calendar) {
|
||||
return
|
||||
}
|
||||
const view = calendar.fullCalendar('getView')
|
||||
const view = calendar.fullCalendar("getView")
|
||||
//这里取时间戳
|
||||
const startTimeTs = view.start.format('YYYY-MM-DD HH:mm:ss')
|
||||
const endTimeTs = view.end.format('YYYY-MM-DD HH:mm:ss')
|
||||
const {data} = await $.get(loc() + '/getCalendarData', {
|
||||
const startTimeTs = view.start.format("YYYY-MM-DD HH:mm:ss")
|
||||
const endTimeTs = view.end.format("YYYY-MM-DD HH:mm:ss")
|
||||
const { data } = await $.get(loc() + "/getCalendarData", {
|
||||
siteId: this.pageForm.siteId,
|
||||
startTimeTs,
|
||||
endTimeTs
|
||||
})
|
||||
if (data && data.length > 0) {
|
||||
data.map(x => {
|
||||
data.map((x) => {
|
||||
console.log(x)
|
||||
if (x.site_id === '83dfd7d780f448aea307d2ce967b51fe') {
|
||||
x.className = 'yantaoshi'
|
||||
} else if (x.site_id === 'd6ebd7e454a24e3495b0d18438fb6a59') {
|
||||
x.className = 'duogongnengting'
|
||||
} else if (x.site_id === 'a6486481018b479ab137bac53936f15e') {
|
||||
x.className = 'dangyuanzhijia'
|
||||
if (x.site_id === "83dfd7d780f448aea307d2ce967b51fe") {
|
||||
x.className = "yantaoshi"
|
||||
} else if (x.site_id === "d6ebd7e454a24e3495b0d18438fb6a59") {
|
||||
x.className = "duogongnengting"
|
||||
} else if (x.site_id === "a6486481018b479ab137bac53936f15e") {
|
||||
x.className = "dangyuanzhijia"
|
||||
} else {
|
||||
x.className = 'other'
|
||||
x.className = "other"
|
||||
}
|
||||
})
|
||||
let events = data
|
||||
calendar.fullCalendar('removeEvents', () => true)
|
||||
calendar.fullCalendar('addEventSource', events, true);
|
||||
calendar.fullCalendar("removeEvents", () => true)
|
||||
calendar.fullCalendar("addEventSource", events, true)
|
||||
} else {
|
||||
calendar.fullCalendar('removeEvents', () => true)
|
||||
calendar.fullCalendar("removeEvents", () => true)
|
||||
}
|
||||
},
|
||||
openCalendar() {
|
||||
@@ -367,9 +371,9 @@ layout("/layouts/platform.html"){
|
||||
}, 500)
|
||||
},
|
||||
async findAllOpenSite() {
|
||||
const {data} = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
const { data } = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
return data
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
@@ -381,7 +385,7 @@ layout("/layouts/platform.html"){
|
||||
this.siteList = await this.findAllOpenSite()
|
||||
this.pageData()
|
||||
this.getSites()
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
|
||||
@@ -10,24 +10,26 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item-label">月份:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-input
|
||||
placeholder="请输入内容"
|
||||
clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch"
|
||||
>
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 80px">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
@@ -38,36 +40,39 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName">
|
||||
</el-input>
|
||||
<el-input
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable
|
||||
clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName"
|
||||
></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="search-item">-->
|
||||
<!-- <div class="search-item-label">场地类型:</div>-->
|
||||
<!-- <div class="search-item-option">-->
|
||||
<!-- <el-select v-model="pageForm.siteType" placeholder="场地类型"-->
|
||||
<!-- clearable filterable style="width: 100%">-->
|
||||
<!-- <el-option v-for="item in activityTypeList" :label="item.text"-->
|
||||
<!-- :value="item.value"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="search-item">-->
|
||||
<!-- <div class="search-item-label">场地类型:</div>-->
|
||||
<!-- <div class="search-item-option">-->
|
||||
<!-- <el-select v-model="pageForm.siteType" placeholder="场地类型"-->
|
||||
<!-- clearable filterable style="width: 100%">-->
|
||||
<!-- <el-option v-for="item in activityTypeList" :label="item.text"-->
|
||||
<!-- :value="item.value"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="预约列表">
|
||||
<template #func>
|
||||
<el-button @click="location.href='/platform/activity/site/apply'"
|
||||
class="mr10" size="small" type="primary">我要预约</el-button>
|
||||
<el-button @click="location.href='/platform/activity/site/apply'" class="mr10" size="small" type="primary">
|
||||
我要预约
|
||||
</el-button>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isRetire">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="1">离退休</el-radio-button>
|
||||
@@ -75,31 +80,32 @@ layout("/layouts/platform.html"){
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" align="center" header-align="center">
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
|
||||
<template scope="{row}" v-if="column.prop==='state_name'">
|
||||
<!--<span :style="'color:'+row.state_color">{{row.state_name}}</span>-->
|
||||
<span v-if="[0].includes(row.stateaudittype)"
|
||||
style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="[0].includes(row.stateaudittype)" style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==3" style="color: #67c23a">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==1" style="color: #f56c6c">{{row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="200px">
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="200px">
|
||||
<template scope="scope">
|
||||
<!--<el-button @click="() => {dropdownCommand({type:'view',data:scope.row})}" size="mini">查看</el-button>
|
||||
<el-button type="danger" @click="() => {dropdownCommand({type:'delete',data:scope.row})}" size="mini">删除</el-button>-->
|
||||
@@ -109,19 +115,15 @@ layout("/layouts/platform.html"){
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">查看</el-dropdown-item>
|
||||
<!--# if(@shiro.hasRole('sysadmin')){ #-->
|
||||
<el-dropdown-item
|
||||
:command="{type:'delete',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:scope.row}">删除</el-dropdown-item>
|
||||
<!--# } #-->
|
||||
<el-dropdown-item
|
||||
v-if="scope.row.reserve_person_id === '${@shiro.getPrincipalProperty('id')}'
|
||||
v-if="scope.row.reserve_person_id === '${@shiro.getPrincipalProperty('id')}'
|
||||
&& (scope.row.reserve_person_union_process == null || scope.row.reserve_person_union_process == '')"
|
||||
:command="{type:'cancel',data:scope.row}">
|
||||
:command="{type:'cancel',data:scope.row}"
|
||||
>
|
||||
撤销预约
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -143,14 +145,14 @@ layout("/layouts/platform.html"){
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const activityUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
activityTypeList: [],
|
||||
siteList: [],
|
||||
tableData: [],
|
||||
userid: '',
|
||||
userid: "",
|
||||
pageForm: {
|
||||
searchName: "u.username",
|
||||
searchKeyword: "",
|
||||
@@ -159,106 +161,118 @@ layout("/layouts/platform.html"){
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
time: '',
|
||||
isRetire: '0'
|
||||
time: "",
|
||||
isRetire: "0"
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '场地名称', prop: 'site_name', sortable: true},
|
||||
{label: '预约人姓名', prop: 'reserve_person_username', sortable: true},
|
||||
{label: '预约人部门', prop: 'reserve_person_unitname', sortable: true},
|
||||
{ label: "场地名称", prop: "site_name", sortable: true },
|
||||
{ label: "预约人姓名", prop: "reserve_person_username", sortable: true },
|
||||
{ label: "预约人部门", prop: "reserve_person_unitname", sortable: true },
|
||||
// {label: '开始时间', prop: 'reserve_start_time', sortable: true},
|
||||
// {label: '结束时间', prop: 'reserve_end_time', sortable: true},
|
||||
{label: '预约时间范围', prop: 'reservationtimestr'},
|
||||
{label: '联系电话', prop: 'reserve_person_phone'},
|
||||
{ label: "预约时间范围", prop: "reservationtimestr" },
|
||||
{ label: "联系电话", prop: "reserve_person_phone" },
|
||||
// {label: '活动名称', prop: 'reserve_activity'},
|
||||
{label: '预约事由', prop: 'reserve_cause'},
|
||||
{label: '预约状态', prop: 'state_name'},
|
||||
],
|
||||
{ label: "预约事由", prop: "reserve_cause" },
|
||||
{ label: "预约状态", prop: "state_name" }
|
||||
]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'reserve-info': httpVueLoader('/components/activity/site/ReserveInfo.vue?v=' + new Date().getTime()),
|
||||
guava: httpVueLoader("/components/plugins/Guava.vue"),
|
||||
"reserve-info": httpVueLoader("/components/activity/site/ReserveInfo.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'view') {
|
||||
this.userid = data.reserve_person_id;
|
||||
const { type, data } = command
|
||||
if (type === "view") {
|
||||
this.userid = data.reserve_person_id
|
||||
this.openView(data)
|
||||
} else if (type === 'delete') {
|
||||
} else if (type === "delete") {
|
||||
this.doClean(data.id)
|
||||
} else if (type === 'cancel') {
|
||||
} else if (type === "cancel") {
|
||||
this.doRevoke(data.id)
|
||||
}
|
||||
},
|
||||
backOption(row) {
|
||||
this.$prompt('请填写反馈意见', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$prompt("请填写反馈意见", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
inputValidator: (value) => {
|
||||
if (value === null) {
|
||||
return '反馈意见不能为空'
|
||||
return "反馈意见不能为空"
|
||||
}
|
||||
}
|
||||
}).then(async ({value}) => {
|
||||
const res = await $.post('/mobile/activity/site/info/backOption', {
|
||||
id: row.id,
|
||||
option: value
|
||||
})
|
||||
.then(async ({ value }) => {
|
||||
const res = await $.post("/mobile/activity/site/info/backOption", {
|
||||
id: row.id,
|
||||
option: value
|
||||
})
|
||||
if (res.code === 0) {
|
||||
await this.doSearch()
|
||||
this.$notify.success({ title: "提示", message: "操作成功!" })
|
||||
} else {
|
||||
this.$notify.warning({ title: "警告", message: "操作失败!" })
|
||||
}
|
||||
})
|
||||
if (res.code === 0) {
|
||||
await this.doSearch()
|
||||
this.$notify.success({title: '提示', message: '操作成功!'});
|
||||
} else {
|
||||
this.$notify.warning({title: '警告', message: '操作失败!'});
|
||||
}
|
||||
}).catch(() => {
|
||||
});
|
||||
.catch(() => {})
|
||||
},
|
||||
async doClean(id) {
|
||||
this.$confirm("您确定要删除此预约吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
this.$confirm("您确定要删除此预约吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
callback: (a, b) => {
|
||||
if ("confirm" === a) {
|
||||
$.post("/platform/activity/site/apply/doClean", {id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.$message.success(data.msg)
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$message.warning(data.msg)
|
||||
}
|
||||
}, "json");
|
||||
$.post(
|
||||
"/platform/activity/site/apply/doClean",
|
||||
{ id },
|
||||
(data) => {
|
||||
if (data.code === 0) {
|
||||
this.$message.success(data.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(data.msg)
|
||||
}
|
||||
},
|
||||
"json"
|
||||
)
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
async doRevoke(id) {
|
||||
this.$confirm("您确定要撤销此预约吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
this.$confirm("您确定要撤销此预约吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
callback: (a, b) => {
|
||||
if ("confirm" === a) {
|
||||
$.post("/platform/activity/site/apply/revoke", {id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.$message.success(data.msg)
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$message.warning(data.msg)
|
||||
}
|
||||
}, "json");
|
||||
$.post(
|
||||
"/platform/activity/site/apply/revoke",
|
||||
{ id },
|
||||
(data) => {
|
||||
if (data.code === 0) {
|
||||
this.$message.success(data.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(data.msg)
|
||||
}
|
||||
},
|
||||
"json"
|
||||
)
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
const role = "${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
const role =
|
||||
"${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')||@shiro.hasRole('SCHOOL_UNION_SPORTS_ADMIN')}"
|
||||
this.$refs.reserve.role = role
|
||||
const backOptionShow = "${@shiro.getPrincipalProperty('id')}" === this.userid
|
||||
this.$refs.reserve.backOptionShow = (role || backOptionShow)
|
||||
this.$refs.reserve.backOptionShow = role || backOptionShow
|
||||
this.$refs.reserve.openView(row.id)
|
||||
},
|
||||
async doSearch() {
|
||||
@@ -267,14 +281,14 @@ layout("/layouts/platform.html"){
|
||||
this.siteList = await this.findAllOpenSite()
|
||||
},
|
||||
async findAllOpenSite() {
|
||||
const {data} = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
const { data } = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
return data
|
||||
},
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.activityTypeList = await activityUtil.getAllType()
|
||||
this.siteList = await this.findAllOpenSite()
|
||||
this.pageData();
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -10,24 +10,26 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item-label">月份:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-input
|
||||
placeholder="请输入内容"
|
||||
clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch"
|
||||
>
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 80px">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
@@ -38,11 +40,14 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName">
|
||||
</el-input>
|
||||
<el-input
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable
|
||||
clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName"
|
||||
></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -71,36 +76,35 @@ layout("/layouts/platform.html"){
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" align="center" header-align="center">
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
|
||||
<template scope="{row}" v-if="column.prop==='state_name'">
|
||||
<!--<span :style="'color:'+row.state_color">{{row.state_name}}</span>-->
|
||||
<span v-if="[0].includes(row.stateaudittype)"
|
||||
style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="[0].includes(row.stateaudittype)" style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==3" style="color: #67c23a">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==1" style="color: #f56c6c">{{row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="200px">
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.reserve_state == 6090" @click="doProcess(row)" size="mini"
|
||||
type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.reserve_state == 6090" @click="doProcess(row)" size="mini" type="primary">审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -112,23 +116,17 @@ layout("/layouts/platform.html"){
|
||||
<reserve-info ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="离退休工作处审核" name="retire">
|
||||
<el-form :model="formData" label-suffix=":" label-width="100px" ref="auditForm"
|
||||
:rules="formRules">
|
||||
<el-form-item label="审核人">
|
||||
${@shiro.getPrincipalProperty('username')}
|
||||
</el-form-item>
|
||||
<el-form-item label="审核时间">
|
||||
{{moment().format('YYYY-MM-DD')}}
|
||||
</el-form-item>
|
||||
<el-form :model="formData" label-suffix=":" label-width="100px" ref="auditForm" :rules="formRules">
|
||||
<el-form-item label="审核人">${@shiro.getPrincipalProperty('username')}</el-form-item>
|
||||
<el-form-item label="审核时间">{{moment().format('YYYY-MM-DD')}}</el-form-item>
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="300" rows="5" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
<el-input maxlength="300" rows="5" type="textarea" v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="签字" prop="auditSign">
|
||||
<sign :qz.sync="formData.auditSign" prefix="activitySite"></sign>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-row style="margin: 40px 0; text-align: right">
|
||||
<el-button type="danger" @click="doReview(false)">拒绝</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通过</el-button>
|
||||
</el-row>
|
||||
@@ -146,7 +144,7 @@ layout("/layouts/platform.html"){
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const activityUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
@@ -157,53 +155,54 @@ layout("/layouts/platform.html"){
|
||||
searchName: "u.username",
|
||||
searchKeyword: "",
|
||||
isAudit: false,
|
||||
time: "",
|
||||
time: ""
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '场地名称', prop: 'site_name', sortable: true},
|
||||
{label: '预约人姓名', prop: 'reserve_person_username', sortable: true},
|
||||
{label: '预约人部门', prop: 'reserve_person_unitname', sortable: true},
|
||||
{ label: "场地名称", prop: "site_name", sortable: true },
|
||||
{ label: "预约人姓名", prop: "reserve_person_username", sortable: true },
|
||||
{ label: "预约人部门", prop: "reserve_person_unitname", sortable: true },
|
||||
// {label: '开始时间', prop: 'reserve_start_time', sortable: true},
|
||||
// {label: '结束时间', prop: 'reserve_end_time', sortable: true},
|
||||
{label: '预约时间范围', prop: 'reservationtimestr'},
|
||||
{label: '联系电话', prop: 'reserve_person_phone'},
|
||||
{ label: "预约时间范围", prop: "reservationtimestr" },
|
||||
{ label: "联系电话", prop: "reserve_person_phone" },
|
||||
// {label: '活动名称', prop: 'reserve_activity'},
|
||||
{label: '预约事由', prop: 'reserve_cause'},
|
||||
{label: '预约状态', prop: 'state_name'},
|
||||
{ label: "预约事由", prop: "reserve_cause" },
|
||||
{ label: "预约状态", prop: "state_name" }
|
||||
],
|
||||
formRules: {
|
||||
auditOpinion: [{required: true, message: '请签字', trigger: ['change', 'blur']}],
|
||||
auditSign: [{required: true, message: '请签字', trigger: ['change', 'blur']}],
|
||||
},
|
||||
auditOpinion: [{ required: true, message: "请签字", trigger: ["change", "blur"] }],
|
||||
auditSign: [{ required: true, message: "请签字", trigger: ["change", "blur"] }]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'reserve-info': httpVueLoader('/components/activity/site/ReserveInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0'),
|
||||
guava: httpVueLoader("/components/plugins/Guava.vue"),
|
||||
"reserve-info": httpVueLoader("/components/activity/site/ReserveInfo.vue?v=" + new Date().getTime()),
|
||||
sign: httpVueLoader("/components/sign/sign.vue?v=2.0.0")
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
const role = "${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
const role =
|
||||
"${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')||@shiro.hasRole('SCHOOL_UNION_SPORTS_ADMIN')}"
|
||||
this.$refs.reserve.role = role
|
||||
const backOptionShow = "${@shiro.getPrincipalProperty('id')}" === row.reserve_person_id
|
||||
this.$refs.reserve.backOptionShow = (role || backOptionShow)
|
||||
this.$refs.reserve.backOptionShow = role || backOptionShow
|
||||
this.$refs.reserve.openView(row.id)
|
||||
},
|
||||
doProcess(row) {
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.openView(row.id, 'retire')
|
||||
this.$refs.auditInfo.openView(row.id, "retire")
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
auditOpinion: null,
|
||||
auditOpinion: null
|
||||
}
|
||||
},
|
||||
async doReview(row) {
|
||||
const valid = await this.$refs['auditForm'].validate()
|
||||
const valid = await this.$refs["auditForm"].validate()
|
||||
if (!valid) return
|
||||
this.formData.auditPass = row
|
||||
const resp = await $.post('/platform/activity/site/retireProcess/doProcess', {
|
||||
const resp = await $.post("/platform/activity/site/retireProcess/doProcess", {
|
||||
id: this.formData.id,
|
||||
audit: JSON.stringify(this.formData)
|
||||
})
|
||||
@@ -214,14 +213,14 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
async findAllOpenSite() {
|
||||
const {data} = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
const { data } = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
return data
|
||||
},
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.activityTypeList = await activityUtil.getAllType()
|
||||
this.siteList = await this.findAllOpenSite()
|
||||
this.pageData();
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -10,24 +10,26 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item-label">月份:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-input
|
||||
placeholder="请输入内容"
|
||||
clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch"
|
||||
>
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 80px">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
@@ -38,11 +40,14 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName">
|
||||
</el-input>
|
||||
<el-input
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable
|
||||
clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName"
|
||||
></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -76,31 +81,32 @@ layout("/layouts/platform.html"){
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" align="center" header-align="center">
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
|
||||
<template scope="{row}" v-if="column.prop==='state_name'">
|
||||
<!--<span :style="'color:'+row.state_color">{{row.state_name}}</span>-->
|
||||
<span v-if="[0].includes(row.stateaudittype)"
|
||||
style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="[0].includes(row.stateaudittype)" style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==3" style="color: #67c23a">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==1" style="color: #f56c6c">{{row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="200px">
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.reserve_state == 6118" @click="doProcess(row)" size="mini" type="primary">审核</el-button>
|
||||
@@ -116,21 +122,16 @@ layout("/layouts/platform.html"){
|
||||
<template #handle>
|
||||
<el-tab-pane label="校工会审核" name="xghsh">
|
||||
<el-form :model="formData" label-suffix=":" label-width="100px" ref="auditForm" :rules="formRules">
|
||||
<el-form-item label="审核人">
|
||||
${@shiro.getPrincipalProperty('username')}
|
||||
</el-form-item>
|
||||
<el-form-item label="审核时间">
|
||||
{{moment().format('YYYY-MM-DD')}}
|
||||
</el-form-item>
|
||||
<el-form-item label="审核人">${@shiro.getPrincipalProperty('username')}</el-form-item>
|
||||
<el-form-item label="审核时间">{{moment().format('YYYY-MM-DD')}}</el-form-item>
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="300" rows="5" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
<el-input maxlength="300" rows="5" type="textarea" v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="签字" prop="auditSign">-->
|
||||
<!-- <sign :qz.sync="formData.auditSign" prefix="activitySite"></sign>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="签字" prop="auditSign">-->
|
||||
<!-- <sign :qz.sync="formData.auditSign" prefix="activitySite"></sign>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-row style="margin: 40px 0; text-align: right">
|
||||
<el-button type="danger" @click="doReview(false)">拒绝</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通过</el-button>
|
||||
</el-row>
|
||||
@@ -143,74 +144,74 @@ layout("/layouts/platform.html"){
|
||||
<reserve-info ref="reserve"></reserve-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const activityUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
id:null,
|
||||
activityTypeList:[],
|
||||
siteList:[],
|
||||
id: null,
|
||||
activityTypeList: [],
|
||||
siteList: [],
|
||||
pageForm: {
|
||||
searchName: "u.username",
|
||||
searchKeyword: "",
|
||||
isAudit: false,
|
||||
time: "",
|
||||
isRetire: '0'
|
||||
isRetire: "0"
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '场地名称', prop: 'site_name', sortable: true},
|
||||
{label: '预约人姓名', prop: 'reserve_person_username', sortable: true},
|
||||
{label: '预约人部门', prop: 'reserve_person_unitname', sortable: true},
|
||||
{ label: "场地名称", prop: "site_name", sortable: true },
|
||||
{ label: "预约人姓名", prop: "reserve_person_username", sortable: true },
|
||||
{ label: "预约人部门", prop: "reserve_person_unitname", sortable: true },
|
||||
// {label: '开始时间', prop: 'reserve_start_time', sortable: true},
|
||||
// {label: '结束时间', prop: 'reserve_end_time', sortable: true},
|
||||
{label: '预约时间范围', prop: 'reservationtimestr'},
|
||||
{label: '联系电话', prop: 'reserve_person_phone'},
|
||||
{ label: "预约时间范围", prop: "reservationtimestr" },
|
||||
{ label: "联系电话", prop: "reserve_person_phone" },
|
||||
// {label: '活动项目', prop: 'reserve_activity'},
|
||||
{label: '预约事由', prop: 'reserve_cause'},
|
||||
{label: '预约状态', prop: 'state_name'},
|
||||
{ label: "预约事由", prop: "reserve_cause" },
|
||||
{ label: "预约状态", prop: "state_name" }
|
||||
],
|
||||
formRules:{
|
||||
auditOpinion: [{required: true, message: '请签字', trigger: ['change', 'blur']}],
|
||||
auditSign: [{required: true, message: '请签字', trigger: ['change', 'blur']}],
|
||||
},
|
||||
formRules: {
|
||||
auditOpinion: [{ required: true, message: "请签字", trigger: ["change", "blur"] }],
|
||||
auditSign: [{ required: true, message: "请签字", trigger: ["change", "blur"] }]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'reserve-info': httpVueLoader('/components/activity/site/ReserveInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0'),
|
||||
guava: httpVueLoader("/components/plugins/Guava.vue"),
|
||||
"reserve-info": httpVueLoader("/components/activity/site/ReserveInfo.vue?v=" + new Date().getTime()),
|
||||
sign: httpVueLoader("/components/sign/sign.vue?v=2.0.0")
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
const role = "${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
const role =
|
||||
"${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')||@shiro.hasRole('SCHOOL_UNION_SPORTS_ADMIN')}"
|
||||
this.$refs.reserve.role = role
|
||||
const backOptionShow = "${@shiro.getPrincipalProperty('id')}" === row.reserve_person_id
|
||||
this.$refs.reserve.backOptionShow = (role || backOptionShow)
|
||||
this.$refs.reserve.backOptionShow = role || backOptionShow
|
||||
this.$refs.reserve.openView(row.id)
|
||||
},
|
||||
doProcess(row){
|
||||
doProcess(row) {
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.openView(row.id, 'xghsh')
|
||||
this.formData={
|
||||
this.$refs.auditInfo.openView(row.id, "xghsh")
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
schoolOption: null,
|
||||
schoolOption: null
|
||||
}
|
||||
},
|
||||
async doReview(row){
|
||||
const valid = await this.$refs['auditForm'].validate()
|
||||
async doReview(row) {
|
||||
const valid = await this.$refs["auditForm"].validate()
|
||||
if (!valid) return
|
||||
this.formData.auditPass = row
|
||||
const resp = await $.post('/platform/activity/site/review/doProcess', {
|
||||
id:this.formData.id,
|
||||
audit:JSON.stringify(this.formData)
|
||||
const resp = await $.post("/platform/activity/site/review/doProcess", {
|
||||
id: this.formData.id,
|
||||
audit: JSON.stringify(this.formData)
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
@@ -219,24 +220,29 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
doInstructions() {
|
||||
$.post(location.href + "/doReview", this.formData, (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData();
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
}, "json");
|
||||
$.post(
|
||||
location.href + "/doReview",
|
||||
this.formData,
|
||||
(res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
},
|
||||
"json"
|
||||
)
|
||||
},
|
||||
async findAllOpenSite() {
|
||||
const {data} = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
const { data } = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
return data
|
||||
},
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.activityTypeList = await activityUtil.getAllType()
|
||||
this.siteList = await this.findAllOpenSite()
|
||||
this.pageData();
|
||||
},
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
|
||||
@@ -183,7 +183,8 @@ layout("/layouts/platform.html"){
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
const role = "${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
const role =
|
||||
"${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')||@shiro.hasRole('SCHOOL_UNION_SPORTS_ADMIN')}"
|
||||
this.$refs.reserve.role = role
|
||||
const backOptionShow = "${@shiro.getPrincipalProperty('id')}" === row.reserve_person_id
|
||||
this.$refs.reserve.backOptionShow = role || backOptionShow
|
||||
|
||||
Reference in New Issue
Block a user