Merge remote-tracking branch 'refs/remotes/origin/feature_主分支合并UI优化' into feature_教代会代表证
# Conflicts: # src/main/java/com/budwk/app/sys/controller/SysConfController.java
This commit is contained in:
@@ -1,18 +1,54 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
/* 系统参数页面固定占满平台内容区,避免页面主体产生纵向滚动条。 */
|
||||
#app .sys-conf-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: calc(100vh - 82px);
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .sys-conf-query-card {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
/* 列表卡片占用剩余空间,数据超出时仅由 Element 表格内部滚动。 */
|
||||
#app .sys-conf-list-card {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .sys-conf-list-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .sys-conf-list-card .ele-table-tool,
|
||||
#app .sys-conf-list-card .el-pagination-container {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="openAdd" size="medium" type="primary">
|
||||
<i class="ti-plus"></i>
|
||||
添加配置项
|
||||
</el-button>
|
||||
</el-row>
|
||||
<div class="sys-conf-layout">
|
||||
<el-card class="sys-conf-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="参数名">
|
||||
<el-input v-model="pageForm.configKey" clearable placeholder="请输入参数名"
|
||||
@keyup.enter.native="doSearch"></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" style="width: 100%">
|
||||
<el-card class="mt10 sys-conf-list-card" shadow="never">
|
||||
<table-tool label="系统参数">
|
||||
<el-button @click="openAdd" size="small" type="primary" icon="el-icon-plus">新增</el-button>
|
||||
</table-tool>
|
||||
<el-table v-loading="tableLoading" :data="tableData" :height="tableHeight"
|
||||
@sort-change="pageOrder" header-align="center" ref="tableRef" style="width: 100%">
|
||||
<el-table-column header-align="center" label="参数名" prop="configKey" sortable
|
||||
width="200"></el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" header-align="center" label="参数值" prop="configValue"
|
||||
@@ -40,6 +76,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="新增参数" :visible.sync="addDialogVisible" :close-on-click-modal="false" width="40%">
|
||||
@@ -195,13 +232,18 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
addDialogVisible: false,
|
||||
editDialogVisible: false,
|
||||
tableLoading: false,
|
||||
tableHeight: 300,
|
||||
tableResizeObserver: null,
|
||||
pageRequestSequence: 0,
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
pageSize: 10,
|
||||
pageNumber: 1,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
totalCount: 0
|
||||
totalCount: 0,
|
||||
configKey: ""
|
||||
},
|
||||
formData: {
|
||||
configKey: "",
|
||||
@@ -215,6 +257,10 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch: function () {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
openAdd: function () {
|
||||
this.addDialogVisible = true
|
||||
this.formData = {} //打开新增窗口,表单先清空
|
||||
@@ -329,24 +375,60 @@ layout("/layouts/platform.html"){
|
||||
this.pageData()
|
||||
},
|
||||
pageData: function () {
|
||||
//加载分页数据
|
||||
// 查询期间清空旧页并显示加载状态,快速连续查询时仅接收最后一次响应。
|
||||
var self = this
|
||||
$.post(
|
||||
base + "/platform/sys/conf/data",
|
||||
self.pageForm,
|
||||
function (data) {
|
||||
if (data.code == 0) {
|
||||
self.tableData = data.data.list
|
||||
self.pageForm.totalCount = data.data.totalCount
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "error"
|
||||
})
|
||||
var requestSequence = ++self.pageRequestSequence
|
||||
self.tableData = []
|
||||
self.tableLoading = true
|
||||
$.post(base + "/platform/sys/conf/data", self.pageForm).then(function (data) {
|
||||
if (requestSequence != self.pageRequestSequence) {
|
||||
return
|
||||
}
|
||||
if (data.code == 0) {
|
||||
self.tableData = data.data.list || []
|
||||
self.pageForm.totalCount = data.data.totalCount || 0
|
||||
self.updateTableHeight()
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: "error"
|
||||
})
|
||||
}
|
||||
}).always(function () {
|
||||
if (requestSequence == self.pageRequestSequence) {
|
||||
self.tableLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
updateTableHeight: function () {
|
||||
var self = this
|
||||
this.$nextTick(function () {
|
||||
var cardBody = self.$el.querySelector(".sys-conf-list-card > .el-card__body")
|
||||
if (!cardBody || cardBody.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
var getOuterHeight = function (element) {
|
||||
if (!element) {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
"json"
|
||||
)
|
||||
var style = window.getComputedStyle(element)
|
||||
return element.offsetHeight
|
||||
+ (parseFloat(style.marginTop) || 0)
|
||||
+ (parseFloat(style.marginBottom) || 0)
|
||||
}
|
||||
var bodyStyle = window.getComputedStyle(cardBody)
|
||||
var bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
|
||||
+ (parseFloat(bodyStyle.paddingBottom) || 0)
|
||||
var tableTool = cardBody.querySelector(".ele-table-tool")
|
||||
var pagination = cardBody.querySelector(".el-pagination-container")
|
||||
var reservedHeight = bodyPadding + getOuterHeight(tableTool) + getOuterHeight(pagination)
|
||||
self.tableHeight = Math.max(1, Math.floor(cardBody.clientHeight - reservedHeight))
|
||||
self.$nextTick(function () {
|
||||
if (self.$refs.tableRef) {
|
||||
self.$refs.tableRef.doLayout()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
dropdownCommand: function (command) {
|
||||
//监听下拉框事件
|
||||
@@ -404,6 +486,29 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
created: function () {
|
||||
this.pageData()
|
||||
},
|
||||
mounted: function () {
|
||||
var self = this
|
||||
this.updateTableHeight()
|
||||
if (window.ResizeObserver) {
|
||||
this.tableResizeObserver = new ResizeObserver(function () {
|
||||
self.updateTableHeight()
|
||||
})
|
||||
this.tableResizeObserver.observe(this.$el)
|
||||
} else {
|
||||
this.resizeHandler = function () {
|
||||
self.updateTableHeight()
|
||||
}
|
||||
window.addEventListener("resize", this.resizeHandler)
|
||||
}
|
||||
},
|
||||
beforeDestroy: function () {
|
||||
if (this.tableResizeObserver) {
|
||||
this.tableResizeObserver.disconnect()
|
||||
}
|
||||
if (this.resizeHandler) {
|
||||
window.removeEventListener("resize", this.resizeHandler)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -3,10 +3,18 @@ const SYS_MENU_RECOMMEND_SETTING_COMPONENT = {
|
||||
<el-dialog title="推荐配置" :visible.sync="dialogVisible" width="50%">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-input
|
||||
v-model="menuKeyword"
|
||||
clearable
|
||||
prefix-icon="el-icon-search"
|
||||
placeholder="请输入菜单名称搜索"
|
||||
style="margin-bottom: 10px">
|
||||
</el-input>
|
||||
<el-tree ref="menuTree"
|
||||
style="max-height: 500px;overflow-y: auto"
|
||||
:data="menuData"
|
||||
style="max-height: 450px;overflow-y: auto"
|
||||
:data="menuData"
|
||||
:check-on-click-node="true"
|
||||
:filter-node-method="filterMenuNode"
|
||||
node-key="id"
|
||||
show-checkbox
|
||||
@check-change="checkChange"
|
||||
@@ -40,6 +48,7 @@ const SYS_MENU_RECOMMEND_SETTING_COMPONENT = {
|
||||
platform: null,
|
||||
dialogVisible: false,
|
||||
menuData: [],
|
||||
menuKeyword: '',
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
@@ -51,15 +60,31 @@ const SYS_MENU_RECOMMEND_SETTING_COMPONENT = {
|
||||
type: '',
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
menuKeyword(value) {
|
||||
if (this.$refs.menuTree) {
|
||||
this.$refs.menuTree.filter(value)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(platform, type) {
|
||||
this.platform = platform
|
||||
this.type = type
|
||||
this.checkedKeys = []
|
||||
this.$set(this, 'menuKeyword', '')
|
||||
this.dialogVisible = true
|
||||
this.listTree()
|
||||
},
|
||||
|
||||
// 仅过滤左侧菜单树的显示,不修改节点勾选状态,保证搜索前的选择仍能提交。
|
||||
filterMenuNode(value, data) {
|
||||
if (!value) {
|
||||
return true
|
||||
}
|
||||
return (data.label || data.name || '').indexOf(value) !== -1
|
||||
},
|
||||
|
||||
listTree() {
|
||||
this.$axios.post("/platform/sys/menu/menuAll", { platform: this.platform }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
@@ -101,9 +126,13 @@ const SYS_MENU_RECOMMEND_SETTING_COMPONENT = {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
// 提交时从完整菜单树读取选中节点,搜索隐藏的已选节点也必须保留。
|
||||
const selectedNodes = this.$refs.menuTree
|
||||
? this.$refs.menuTree.getCheckedNodes(true, false)
|
||||
: this.checkedNodes
|
||||
this.$axios
|
||||
.post("/platform/sys/menu/updateRecommendSetting", {
|
||||
menuIds: JSON.stringify(this.checkedNodes.map((item) => item.id)),
|
||||
menuIds: JSON.stringify(selectedNodes.map((item) => item.id)),
|
||||
platform: this.platform,
|
||||
type: this.type
|
||||
})
|
||||
|
||||
@@ -9,10 +9,124 @@ layout("/layouts/platform.html"){
|
||||
padding: 1px 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* 关联用户弹窗固定占用可视区域,数据过多时仅表格内部滚动。 */
|
||||
.role-user-dialog {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 90vh;
|
||||
margin-bottom: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.role-user-dialog .el-dialog__header {
|
||||
flex: 0 0 auto;
|
||||
padding: 22px 30px 18px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
.role-user-dialog .el-dialog__title {
|
||||
color: #1f2d3d;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.role-user-dialog .el-dialog__body {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
padding: 8px 30px 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.role-user-dialog .el-dialog__footer {
|
||||
flex: 0 0 auto;
|
||||
padding: 14px 30px 18px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
}
|
||||
.role-user-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.role-user-tip {
|
||||
flex: 0 0 auto;
|
||||
padding: 13px 16px;
|
||||
color: #1677ff;
|
||||
background: #f0f7ff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.role-user-tip i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
.role-user-toolbar {
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin: 16px 0;
|
||||
}
|
||||
.role-user-add-area,
|
||||
.role-user-search-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.role-user-remove-button {
|
||||
margin-left: auto;
|
||||
}
|
||||
.role-user-table-wrap {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.role-user-pagination {
|
||||
flex: 0 0 auto;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.role-user-status-dot {
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin-right: 7px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.role-user-status-dot.is-success {
|
||||
background: #21c77a;
|
||||
}
|
||||
.role-user-status-dot.is-danger {
|
||||
background: #f56c6c;
|
||||
}
|
||||
|
||||
/* 角色管理列表固定占满平台内容区,避免页面主体出现纵向滚动条。 */
|
||||
#app .role-manage-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100vh - 82px);
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .role-manage-query-card {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
#app .role-manage-list-card {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .role-manage-list-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .role-manage-list-card .el-pagination-container {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<div class="role-manage-page">
|
||||
<el-card class="role-manage-query-card" shadow="never">
|
||||
<el-row type="flex" style="column-gap: 10px">
|
||||
<el-select v-model="pageForm.moduleId" style="width: 180px" filterable clearable
|
||||
placeholder="请选择所属模块">
|
||||
@@ -61,9 +175,11 @@ layout("/layouts/platform.html"){
|
||||
<!-- </el-button>-->
|
||||
<!-- </div>-->
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-card shadow="never" class="mt10 role-manage-list-card">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
ref="roleTableRef"
|
||||
:height="roleTableHeight"
|
||||
@sort-change="pageOrder"
|
||||
header-align="center"
|
||||
:default-sort="{prop: 'serialNumber', order: 'ascending'}"
|
||||
@@ -123,6 +239,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-dialog append-to-body title="新建角色" :visible.sync="addDialogVisible" :close-on-click-modal="false"
|
||||
width="70%">
|
||||
@@ -274,71 +391,89 @@ layout("/layouts/platform.html"){
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog append-to-body :title="userDialogTitle" :visible.sync="userDialogVisible" :close-on-click-modal="false"
|
||||
width="70%">
|
||||
<div class="block mb10">
|
||||
<el-select
|
||||
size="small"
|
||||
style="width: 60%"
|
||||
class="span_n"
|
||||
v-model="selUsers"
|
||||
multiple
|
||||
filterable
|
||||
remote
|
||||
default-first-option
|
||||
reserve-keyword
|
||||
:remote-method="remoteMethod"
|
||||
:loading="loading"
|
||||
placeholder="请输入用户名或姓名"
|
||||
>
|
||||
<el-option v-for="item in dbUsers" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
<el-button size="small" @click="userAddRole">将用户加入角色</el-button>
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button size="small" type="danger" @click="userDelRole">从角色中移除</el-button>
|
||||
custom-class="role-user-dialog" top="5vh" width="82%" @opened="updateUserTableHeight">
|
||||
<div class="role-user-layout">
|
||||
<div class="role-user-toolbar">
|
||||
<div class="role-user-add-area">
|
||||
<el-select
|
||||
size="small"
|
||||
style="width: 360px"
|
||||
v-model="selUsers"
|
||||
multiple
|
||||
filterable
|
||||
remote
|
||||
default-first-option
|
||||
reserve-keyword
|
||||
:remote-method="remoteMethod"
|
||||
:loading="loading"
|
||||
placeholder="请输入用户工号或姓名"
|
||||
>
|
||||
<el-option v-for="item in dbUsers" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
<el-button size="small" type="primary" plain icon="el-icon-circle-plus-outline"
|
||||
@click="userAddRole">将用户加入角色</el-button>
|
||||
</div>
|
||||
<div class="role-user-search-area">
|
||||
<el-input v-model="userForm.searchKeyword" clearable size="small" style="width: 280px"
|
||||
placeholder="请输入查询内容" @clear="doUserSearch"
|
||||
@keyup.enter.native="doUserSearch">
|
||||
<el-select v-model="userForm.searchName" slot="prepend" style="width: 100px">
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
<el-button size="small" type="primary" icon="el-icon-search" @click="doUserSearch">查询</el-button>
|
||||
</div>
|
||||
<el-button class="role-user-remove-button" size="small" type="danger" plain
|
||||
icon="el-icon-delete" @click="userDelRole">从角色中移除</el-button>
|
||||
</div>
|
||||
<div class="role-user-table-wrap">
|
||||
<el-table
|
||||
ref="userTableRef"
|
||||
:data="userTableData"
|
||||
:height="userTableHeight"
|
||||
@sort-change="userPageOrder"
|
||||
size="small"
|
||||
border
|
||||
header-align="center"
|
||||
style="width: 100%"
|
||||
@selection-change="userSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center"></el-table-column>
|
||||
<el-table-column sortable prop="loginname" label="用户工号" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="username" label="姓名" header-align="center" align="center"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column prop="unitname" label="所属单位" header-align="center" align="center"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column sortable prop="disabled" label="账号状态" header-align="center" align="center"
|
||||
:show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span class="role-user-status-dot" :class="scope.row.disabled ? 'is-danger' : 'is-success'"></span>
|
||||
<span>{{ scope.row.disabled ? '禁用' : '正常' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="useronline" label="在线状态" header-align="center" align="center"
|
||||
:show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span :class="scope.row.useronline ? 'text-success' : 'text-danger'">
|
||||
{{ scope.row.useronline ? '在线' : '离线' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-pagination
|
||||
class="role-user-pagination"
|
||||
@size-change="userPageSizeChange"
|
||||
@current-change="userPageNumberChange"
|
||||
:current-page="userForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="userForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="userForm.totalCount"
|
||||
></el-pagination>
|
||||
</div>
|
||||
<el-table
|
||||
:data="userTableData"
|
||||
@sort-change="userPageOrder"
|
||||
size="small"
|
||||
header-align="center"
|
||||
style="width: 100%"
|
||||
@selection-change="userSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="35"></el-table-column>
|
||||
<el-table-column sortable prop="loginname" label="用户名" header-align="center"></el-table-column>
|
||||
<el-table-column prop="username" label="姓名" header-align="center"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column prop="unitname" label="所属单位" header-align="center" align="center"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column sortable prop="disabled" label="帐号状态" header-align="center" align="center"
|
||||
:show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<i v-if="scope.row.disabled" class="fa fa-circle text-danger ml5"></i>
|
||||
<i v-if="!scope.row.disabled" class="fa fa-circle text-success ml5"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="useronline" label="在线状态" header-align="center" align="center"
|
||||
:show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<i v-if="scope.row.useronline" class="text-success ml5">在线</i>
|
||||
<i v-if="!scope.row.useronline" class="text-danger ml5">离线</i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@size-change="userPageSizeChange"
|
||||
@current-change="userPageNumberChange"
|
||||
:current-page="userForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="userForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="userForm.totalCount"
|
||||
></el-pagination>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="userDialogVisible = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<sort ref="sortRef" @refresh="doSearch"></sort>
|
||||
@@ -388,6 +523,9 @@ layout("/layouts/platform.html"){
|
||||
isLeaf: "leaf"
|
||||
},
|
||||
tableData: [],
|
||||
roleTableHeight: 300,
|
||||
roleTableResizeObserver: null,
|
||||
roleTableResizeHandler: null,
|
||||
moduleOptions: [],
|
||||
options: [],
|
||||
parentUnit: [],
|
||||
@@ -447,6 +585,8 @@ layout("/layouts/platform.html"){
|
||||
doCmsForm: {},
|
||||
userForm: {
|
||||
roleId: "",
|
||||
searchName: "loginname",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
@@ -454,6 +594,7 @@ layout("/layouts/platform.html"){
|
||||
pageOrderBy: ""
|
||||
},
|
||||
userTableData: [],
|
||||
userTableHeight: 360,
|
||||
loading: false,
|
||||
dbUsers: [], //分配用户
|
||||
selUsers: [], //分配选中的用户
|
||||
@@ -575,6 +716,31 @@ layout("/layouts/platform.html"){
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
// 根据角色列表卡片的剩余空间设置表格高度,分页区域始终保持可见。
|
||||
updateRoleTableHeight() {
|
||||
this.$nextTick(() => {
|
||||
const cardBody = this.$el.querySelector('.role-manage-list-card > .el-card__body')
|
||||
if (!cardBody || cardBody.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
const pagination = cardBody.querySelector('.el-pagination-container')
|
||||
const bodyStyle = window.getComputedStyle(cardBody)
|
||||
const bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
|
||||
+ (parseFloat(bodyStyle.paddingBottom) || 0)
|
||||
const paginationStyle = pagination ? window.getComputedStyle(pagination) : null
|
||||
const paginationHeight = pagination
|
||||
? pagination.offsetHeight
|
||||
+ (parseFloat(paginationStyle.marginTop) || 0)
|
||||
+ (parseFloat(paginationStyle.marginBottom) || 0)
|
||||
: 0
|
||||
this.roleTableHeight = Math.max(1, Math.floor(cardBody.clientHeight - bodyPadding - paginationHeight))
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.roleTableRef) {
|
||||
this.$refs.roleTableRef.doLayout()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 加载可选 PC 模块,创建、编辑和列表筛选共用同一数据源。
|
||||
loadModuleOptions() {
|
||||
this.$axios.post("/platform/sys/role/listModule").then((res) => {
|
||||
@@ -624,6 +790,26 @@ layout("/layouts/platform.html"){
|
||||
this.userForm.pageSize = val
|
||||
this.doUserLoad()
|
||||
},
|
||||
// 查询当前角色已关联用户,查询时从第一页重新加载。
|
||||
doUserSearch() {
|
||||
this.userForm.pageNumber = 1
|
||||
this.doUserLoad()
|
||||
},
|
||||
// 根据弹窗内表格容器的剩余空间计算高度,确保仅表格内部产生滚动条。
|
||||
updateUserTableHeight() {
|
||||
this.$nextTick(() => {
|
||||
const tableWrap = document.querySelector('.role-user-dialog .role-user-table-wrap')
|
||||
if (!tableWrap || tableWrap.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
this.userTableHeight = Math.max(180, Math.floor(tableWrap.clientHeight))
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.userTableRef) {
|
||||
this.$refs.userTableRef.doLayout()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== "") {
|
||||
this.loading = true
|
||||
@@ -763,6 +949,7 @@ layout("/layouts/platform.html"){
|
||||
this.userDialogVisible = true
|
||||
this.roleId = command.id
|
||||
this.userForm.roleId = command.id
|
||||
this.userForm.pageNumber = 1
|
||||
this.doUserLoad()
|
||||
}
|
||||
if ("enable" === command.type || "disable" === command.type) {
|
||||
@@ -903,6 +1090,31 @@ layout("/layouts/platform.html"){
|
||||
this.loadModuleOptions()
|
||||
this.pageData()
|
||||
// await this.getMenuOptions()
|
||||
},
|
||||
mounted() {
|
||||
this.updateRoleTableHeight()
|
||||
window.addEventListener("resize", this.updateUserTableHeight)
|
||||
const page = this.$el.querySelector('.role-manage-page')
|
||||
if (window.ResizeObserver && page) {
|
||||
this.roleTableResizeObserver = new ResizeObserver(() => {
|
||||
this.updateRoleTableHeight()
|
||||
})
|
||||
this.roleTableResizeObserver.observe(page)
|
||||
} else {
|
||||
this.roleTableResizeHandler = () => {
|
||||
this.updateRoleTableHeight()
|
||||
}
|
||||
window.addEventListener("resize", this.roleTableResizeHandler)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener("resize", this.updateUserTableHeight)
|
||||
if (this.roleTableResizeObserver) {
|
||||
this.roleTableResizeObserver.disconnect()
|
||||
}
|
||||
if (this.roleTableResizeHandler) {
|
||||
window.removeEventListener("resize", this.roleTableResizeHandler)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -6,7 +6,7 @@ const branchUnionManage = {
|
||||
<el-input placeholder="请输入分工会名称" clearable size="small" style="width: 300px" v-model="pageForm.searchKeyword"></el-input>
|
||||
|
||||
<el-button type="primary" class="ml5" size="small" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
<el-button @click="openAudit" icon="el-icon-s-check" type="primary" style="margin-left: auto" size="small">基层干部审核</el-button>
|
||||
<el-button @click="openAudit" icon="el-icon-s-check" type="primary" style="margin-left: auto" size="small" v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN'])">基层干部审核</el-button>
|
||||
<el-button @click="openAdd" icon="ti-plus" type="primary" size="small" v-if="$auth.hasPermission('sys.manager.union.add')">新建分工会</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
@@ -16,11 +16,12 @@ const branchUnionPartUnitManage = {
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter); margin-top: 10px">
|
||||
<el-table :data="tableData" :height="table_height ? Math.max(200, table_height - 40) : null" border>
|
||||
<el-table-column type="index" width="50" label="序号"></el-table-column>
|
||||
<el-table :data="tableData" :height="table_height ? Math.max(200, table_height - 90) : null" border>
|
||||
<el-table-column type="index" width="50" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="unitcode" label="单位编码"></el-table-column>
|
||||
<el-table-column prop="name" label="单位名称"></el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<el-dialog title="设置组成单位" :visible.sync="dialogFormVisible" width="1000px" :close-on-click-modal="false">
|
||||
@@ -101,7 +102,8 @@ const branchUnionPartUnitManage = {
|
||||
pageData() {
|
||||
$.get("/platform/sys/union/branchUnionPartUnitPageData", { ...this.pageForm, unionId: this.union_id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -198,7 +198,8 @@ const branchUnionUserManage = {
|
||||
initJSearch() {
|
||||
const optionTask = this.jOptions.length ? $.Deferred().resolve().promise() : this.loadJOptions()
|
||||
$.when(optionTask, this.loadUsedJCodes()).then(() => {
|
||||
this.pageForm.j = this.getHighestUsedJ()
|
||||
// 页面初始化时不限定届次,默认展示该分工会所有届次的干部。
|
||||
this.pageForm.j = ""
|
||||
this.pageData()
|
||||
})
|
||||
},
|
||||
@@ -225,6 +226,8 @@ const branchUnionUserManage = {
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this, "partySecretaryUnitOptions", res.data || [])
|
||||
// 新增二级党委书记时,默认授权当前分工会下的全部二级单位。
|
||||
this.$set(this.formData, "unitIds", this.partySecretaryUnitOptions.map(item => item.id))
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -681,6 +681,7 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
data.taskId = null
|
||||
data.startTaskId = null
|
||||
data.isTemplate = false
|
||||
data.templateStatus = 0
|
||||
data.createdBy = null
|
||||
data.createdAt = null
|
||||
data.updatedBy = null
|
||||
|
||||
@@ -122,10 +122,10 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</activity-culture-info-activity>
|
||||
|
||||
@@ -5,7 +5,8 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
template: /*language=HTML*/`
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="culture-info-manage-layout">
|
||||
<el-card class="culture-info-query-card" shadow="never">
|
||||
|
||||
<search @search="doSearch">
|
||||
<search-item label="活动时间">
|
||||
@@ -26,12 +27,17 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="活动列表">
|
||||
<el-card class="mt10 culture-info-list-card" shadow="never">
|
||||
<el-tabs v-if="canManageTemplate" v-model="activeTab" @tab-click="tabChange">
|
||||
<el-tab-pane label="活动列表" name="activity"></el-tab-pane>
|
||||
<el-tab-pane label="活动模板列表" name="template"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<table-tool :label="canManageTemplate && activeTab === 'template' ? '活动模板列表' : '活动列表'">
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
class="vi-table" row-key="id" style="width: 100%;margin-bottom: 20px"
|
||||
<el-table :data="tableData" :height="isTemplateManagedActivity ? tableHeight : null" :size="tableSize" @sort-change="pageOrder"
|
||||
class="vi-table" ref="activityTableRef" row-key="id"
|
||||
:style="{width: '100%', marginBottom: isTemplateManagedActivity ? '0' : '20px'}"
|
||||
v-loading="tableLoading">
|
||||
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
@@ -113,12 +119,12 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item
|
||||
v-if="activity_type === 40001 && $auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN']) && !row.isTemplate"
|
||||
v-if="canManageTemplate && !row.isTemplate"
|
||||
:command="{type:'setTemplate',row}">
|
||||
设为模板
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="activity_type === 40001 && $auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN']) && row.isTemplate"
|
||||
v-if="canManageTemplate && row.isTemplate"
|
||||
:command="{type:'cancelTemplate',row}">
|
||||
取消模板
|
||||
</el-dropdown-item>
|
||||
@@ -139,6 +145,7 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
@@ -162,6 +169,7 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
<el-button @click="codeDialogVisible = false" type="primary">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<slot></slot>
|
||||
</guava>
|
||||
`,
|
||||
props: {
|
||||
@@ -172,6 +180,9 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
activeTab: "activity",
|
||||
tableHeight: 300,
|
||||
tableResizeObserver: null,
|
||||
codeDialogVisible: false,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + ""
|
||||
@@ -188,23 +199,33 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
url: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 当前双页签及满高列表仅用于校工会、分工会文化活动,社团页面保持原样。
|
||||
isTemplateManagedActivity() {
|
||||
return this.activity_type === 40001 || this.activity_type === 40002
|
||||
},
|
||||
// 文化活动页签沿用“设为模板”按钮的角色范围,不新增权限标识。
|
||||
canManageTemplate() {
|
||||
return this.isTemplateManagedActivity && this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"activity-culture-apply-activity": ACTIVITY_CULTURE_APPLY_ACTIVITY,
|
||||
"activity-culture-info-activity": ACTIVITY_CULTURE_INFO_ACTIVITY
|
||||
},
|
||||
methods: {
|
||||
async activityStatusChange(id, isUnseal) {
|
||||
|
||||
const resp = await this.$axios.post("/platform/activity/culture/infoManage/activityStatusChange", {
|
||||
activityStatusChange(id, isUnseal) {
|
||||
this.$axios.post("/platform/activity/culture/infoManage/activityStatusChange", {
|
||||
id: id,
|
||||
isUnseal: isUnseal
|
||||
}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
},
|
||||
isUnsealDisabled(row) {
|
||||
// 流程类活动只有在流程结束后才允许开启或关闭,非流程类活动保持原有开关逻辑。
|
||||
@@ -231,6 +252,52 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
commonUtil.pjaxPush("/platform/activity/info/mange/export?id=" + row.id)
|
||||
}
|
||||
},
|
||||
// 切换页签时按活动表中的模板状态重新查询,并重置分页位置。
|
||||
tabChange() {
|
||||
this.$set(this.pageForm, "templateStatus", this.activeTab === "template" ? 1 : 0)
|
||||
this.doSearch()
|
||||
this.updateTableHeight()
|
||||
},
|
||||
// 根据列表卡片可用空间固定表格高度,使大量数据只在表格内部滚动。
|
||||
updateTableHeight() {
|
||||
if (!this.isTemplateManagedActivity) {
|
||||
return
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const cardBody = this.$el.querySelector(".culture-info-list-card > .el-card__body")
|
||||
if (!cardBody || cardBody.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
const getOuterHeight = (element) => {
|
||||
if (!element) {
|
||||
return 0
|
||||
}
|
||||
const style = window.getComputedStyle(element)
|
||||
return element.offsetHeight
|
||||
+ (parseFloat(style.marginTop) || 0)
|
||||
+ (parseFloat(style.marginBottom) || 0)
|
||||
}
|
||||
const bodyStyle = window.getComputedStyle(cardBody)
|
||||
const bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
|
||||
+ (parseFloat(bodyStyle.paddingBottom) || 0)
|
||||
const tabs = this.canManageTemplate ? cardBody.querySelector(".el-tabs") : null
|
||||
const tableTool = cardBody.querySelector(".ele-table-tool")
|
||||
const pagination = cardBody.querySelector(".el-pagination-container")
|
||||
const reservedHeight = bodyPadding
|
||||
+ getOuterHeight(tabs)
|
||||
+ getOuterHeight(tableTool)
|
||||
+ getOuterHeight(pagination)
|
||||
const nextHeight = Math.max(1, Math.floor(cardBody.clientHeight - reservedHeight))
|
||||
if (this.tableHeight !== nextHeight) {
|
||||
this.tableHeight = nextHeight
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.activityTableRef) {
|
||||
this.$refs.activityTableRef.doLayout()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
@@ -251,16 +318,17 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
return
|
||||
}
|
||||
const {id} = row
|
||||
this.$confirm("确定要删除该活动吗?", "提示", {type: "warning"}).then(async () => {
|
||||
this.$confirm("确定要删除该活动吗?", "提示", {type: "warning"}).then(() => {
|
||||
this.$set(row, "loading", true)
|
||||
const resp = await this.$axios.post("/platform/activity/culture/infoManage/doDelete", {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
this.$set(row, "loading", false)
|
||||
this.$axios.post("/platform/activity/culture/infoManage/doDelete", {id: id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
this.$set(row, "loading", false)
|
||||
})
|
||||
})
|
||||
},
|
||||
setTemplate(row) {
|
||||
@@ -268,16 +336,17 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
}).then(() => {
|
||||
this.$set(row, "loading", true)
|
||||
const resp = await this.$axios.post("/platform/activity/culture/infoManage/setTemplate", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
this.$set(row, "loading", false)
|
||||
this.$axios.post("/platform/activity/culture/infoManage/setTemplate", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
this.$set(row, "loading", false)
|
||||
})
|
||||
})
|
||||
},
|
||||
cancelTemplate(row) {
|
||||
@@ -285,16 +354,17 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
}).then(() => {
|
||||
this.$set(row, "loading", true)
|
||||
const resp = await this.$axios.post("/platform/activity/culture/infoManage/cancelTemplate", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
this.$set(row, "loading", false)
|
||||
this.$axios.post("/platform/activity/culture/infoManage/cancelTemplate", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
this.$set(row, "loading", false)
|
||||
})
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
@@ -319,12 +389,12 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
this.tableLoading = false
|
||||
})
|
||||
this.tableLoading = false
|
||||
},
|
||||
|
||||
},
|
||||
async created() {
|
||||
created() {
|
||||
// 根据 activity_type 动态添加流程相关列
|
||||
if (this.activity_type === 40002 || this.activity_type === 40003) {
|
||||
this.tableColumns.push(
|
||||
@@ -332,6 +402,30 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
{prop: "instanceState", label: "流程状态"}
|
||||
);
|
||||
}
|
||||
if (this.canManageTemplate) {
|
||||
// 有模板管理角色时默认进入活动列表,只展示未设置模板的校工会活动。
|
||||
this.$set(this.pageForm, "templateStatus", 0)
|
||||
}
|
||||
this.pageData()
|
||||
},
|
||||
mounted() {
|
||||
if (!this.isTemplateManagedActivity) {
|
||||
return
|
||||
}
|
||||
const listCardBody = this.$el.querySelector(".culture-info-list-card > .el-card__body")
|
||||
if (listCardBody && window.ResizeObserver) {
|
||||
// 查询区换行、页签权限或窗口变化时同步调整表格内部滚动区域。
|
||||
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
|
||||
this.tableResizeObserver.observe(listCardBody)
|
||||
}
|
||||
this.updateTableHeight()
|
||||
window.addEventListener("resize", this.updateTableHeight)
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.tableResizeObserver) {
|
||||
this.tableResizeObserver.disconnect()
|
||||
this.tableResizeObserver = null
|
||||
}
|
||||
window.removeEventListener("resize", this.updateTableHeight)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,39 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
/* 校工会文化活动列表占满平台内容区,页面本身不产生纵向滚动条。 */
|
||||
#app .culture-info-manage-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: calc(100vh - 82px);
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .culture-info-query-card {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
/* 列表卡片填充剩余高度,表格高度由组件根据固定区域动态计算。 */
|
||||
#app .culture-info-list-card {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .culture-info-list-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .culture-info-list-card .el-tabs,
|
||||
#app .culture-info-list-card .ele-table-tool,
|
||||
#app .culture-info-list-card .el-pagination-container {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<activity-culture-info-manage :activity_type="activityType"></activity-culture-info-manage>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,39 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
/* 分工会文化活动列表占满平台内容区,页面本身不产生纵向滚动条。 */
|
||||
#app .culture-info-manage-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: calc(100vh - 82px);
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .culture-info-query-card {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
/* 列表卡片填充剩余高度,表格高度由组件根据固定区域动态计算。 */
|
||||
#app .culture-info-list-card {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .culture-info-list-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .culture-info-list-card .el-tabs,
|
||||
#app .culture-info-list-card .ele-table-tool,
|
||||
#app .culture-info-list-card .el-pagination-container {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<activity-culture-info-manage :activity_type="activityType"></activity-culture-info-manage>
|
||||
</div>
|
||||
|
||||
+3
-3
@@ -106,10 +106,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -93,10 +93,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -113,10 +113,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -113,10 +113,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -126,10 +126,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -117,10 +117,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -130,10 +130,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -130,10 +130,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -131,10 +131,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -129,10 +129,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
@@ -514,6 +514,7 @@ const basicForm = {
|
||||
}
|
||||
data.id = null
|
||||
data.isTemplate = false
|
||||
data.templateStatus = 0
|
||||
data.createdBy = null
|
||||
data.createdAt = null
|
||||
data.updatedBy = null
|
||||
|
||||
@@ -15,12 +15,43 @@ layout("/layouts/platform.html"){
|
||||
.el-row--flex {
|
||||
align-items: center;
|
||||
}
|
||||
/* 亲子活动管理占满平台内容区,页面本身不产生纵向滚动条。 */
|
||||
#app .family-activity-manage-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: calc(100vh - 82px);
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .family-activity-query-card {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
/* 列表卡片填充剩余高度,超出数据仅在表格内部滚动。 */
|
||||
#app .family-activity-list-card {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .family-activity-list-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .family-activity-list-card .el-tabs,
|
||||
#app .family-activity-list-card .ele-table-tool,
|
||||
#app .family-activity-list-card .el-pagination-container {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<el-card shadow="never">
|
||||
<template>
|
||||
<div class="family-activity-manage-layout">
|
||||
<el-card class="family-activity-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -44,13 +75,21 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="活动列表">
|
||||
<el-button @click="openAdd" size="small" type="primary">
|
||||
<el-card class="mt10 family-activity-list-card" shadow="never">
|
||||
<el-tabs v-if="canManageTemplate" v-model="activeTab" @tab-click="tabChange">
|
||||
<el-tab-pane label="活动列表" name="activity"></el-tab-pane>
|
||||
<el-tab-pane label="活动模板列表" name="template"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<table-tool :label="canManageTemplate && activeTab === 'template' ? '活动模板列表' : '活动列表'">
|
||||
<el-button
|
||||
@click="openAdd"
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="!canManageTemplate || activeTab === 'activity'">
|
||||
<i class="ti-plus"></i>新建活动
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize">
|
||||
<el-table :data="tableData" :height="tableHeight" :size="tableSize" ref="activityTableRef">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
@@ -93,12 +132,12 @@ layout("/layouts/platform.html"){
|
||||
<el-dropdown-item @click.native="onView(row)">查看</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="openEdit(row)">编辑</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN']) && !row.isTemplate"
|
||||
v-if="canManageTemplate && row.templateStatus !== 1"
|
||||
@click.native="setTemplate(row)">设为模板</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN']) && row.isTemplate"
|
||||
v-if="canManageTemplate && row.templateStatus === 1"
|
||||
@click.native="cancelTemplate(row)">取消模板</el-dropdown-item>
|
||||
<el-dropdown-item :disabled="!!row.isTemplate" @click.native="onDelete(row)">删除</el-dropdown-item>
|
||||
<el-dropdown-item :disabled="row.templateStatus === 1" @click.native="onDelete(row)">删除</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@@ -106,6 +145,8 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<basic-form ref="formRef" @back="back" @refresh="doSearch"></basic-form>
|
||||
@@ -148,6 +189,9 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeTab: "activity",
|
||||
tableHeight: 300,
|
||||
tableResizeObserver: null,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
@@ -161,7 +205,56 @@ layout("/layouts/platform.html"){
|
||||
activityUrl: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 页签沿用“设为模板”按钮的角色范围,不新增权限标识。
|
||||
canManageTemplate() {
|
||||
return this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 切换页签时按亲子活动表中的模板状态查询,并重置分页位置。
|
||||
tabChange() {
|
||||
this.$set(this.pageForm, "templateStatus", this.activeTab === "template" ? 1 : 0)
|
||||
this.doSearch()
|
||||
this.updateTableHeight()
|
||||
},
|
||||
// 根据列表卡片可用空间固定表格高度,使大量数据只在表格内部滚动。
|
||||
updateTableHeight() {
|
||||
this.$nextTick(() => {
|
||||
const cardBody = this.$el.querySelector(".family-activity-list-card > .el-card__body")
|
||||
if (!cardBody || cardBody.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
const getOuterHeight = (element) => {
|
||||
if (!element) {
|
||||
return 0
|
||||
}
|
||||
const style = window.getComputedStyle(element)
|
||||
return element.offsetHeight
|
||||
+ (parseFloat(style.marginTop) || 0)
|
||||
+ (parseFloat(style.marginBottom) || 0)
|
||||
}
|
||||
const bodyStyle = window.getComputedStyle(cardBody)
|
||||
const bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
|
||||
+ (parseFloat(bodyStyle.paddingBottom) || 0)
|
||||
const tabs = this.canManageTemplate ? cardBody.querySelector(".el-tabs") : null
|
||||
const tableTool = cardBody.querySelector(".ele-table-tool")
|
||||
const pagination = cardBody.querySelector(".el-pagination-container")
|
||||
const reservedHeight = bodyPadding
|
||||
+ getOuterHeight(tabs)
|
||||
+ getOuterHeight(tableTool)
|
||||
+ getOuterHeight(pagination)
|
||||
const nextHeight = Math.max(1, Math.floor(cardBody.clientHeight - reservedHeight))
|
||||
if (this.tableHeight !== nextHeight) {
|
||||
this.tableHeight = nextHeight
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.activityTableRef) {
|
||||
this.$refs.activityTableRef.doLayout()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
back() {
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
@@ -187,16 +280,17 @@ layout("/layouts/platform.html"){
|
||||
makeCode(row) {
|
||||
this.$refs.codeRef.initData(row)
|
||||
},
|
||||
async activityStatusChange(notice, val, id) {
|
||||
const resp = await this.$axios.post(loc() + "/activityStatusChange", { notice: notice, isDisabled: val, id })
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
activityStatusChange(notice, val, id) {
|
||||
this.$axios.post(loc() + "/activityStatusChange", { notice: notice, isDisabled: val, id: id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async onDelete(row) {
|
||||
if (row.isTemplate) {
|
||||
onDelete(row) {
|
||||
if (row.templateStatus === 1) {
|
||||
this.$message.warning("该活动已设为模板,请先取消模板后再删除")
|
||||
return
|
||||
}
|
||||
@@ -204,49 +298,73 @@ layout("/layouts/platform.html"){
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post(loc() + "/onDelete", { id: row.id })
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/onDelete", { id: row.id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
async setTemplate(row) {
|
||||
setTemplate(row) {
|
||||
this.$confirm("确定将该活动设为工作模板吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post(loc() + "/setTemplate", { id: row.id })
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/setTemplate", { id: row.id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
async cancelTemplate(row) {
|
||||
cancelTemplate(row) {
|
||||
this.$confirm("确定取消该活动的工作模板吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post(loc() + "/cancelTemplate", { id: row.id })
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/cancelTemplate", { id: row.id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
created() {
|
||||
if (this.canManageTemplate) {
|
||||
// 有模板管理角色时默认进入活动列表,只展示未设置模板的活动。
|
||||
this.$set(this.pageForm, "templateStatus", 0)
|
||||
}
|
||||
this.pageData()
|
||||
},
|
||||
mounted() {
|
||||
const listCardBody = this.$el.querySelector(".family-activity-list-card > .el-card__body")
|
||||
if (listCardBody && window.ResizeObserver) {
|
||||
// 查询区换行、页签权限或窗口变化时同步调整表格内部滚动区域。
|
||||
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
|
||||
this.tableResizeObserver.observe(listCardBody)
|
||||
}
|
||||
this.updateTableHeight()
|
||||
window.addEventListener("resize", this.updateTableHeight)
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.tableResizeObserver) {
|
||||
this.tableResizeObserver.disconnect()
|
||||
this.tableResizeObserver = null
|
||||
}
|
||||
window.removeEventListener("resize", this.updateTableHeight)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+3
-3
@@ -73,10 +73,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -73,10 +73,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
@@ -5,36 +5,50 @@ layout("/layouts/platform.html"){
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<div class="sports-info-manage-layout">
|
||||
<el-card class="sports-info-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="活动名称">
|
||||
<el-input clearable placeholder="请输入活动名称" v-model="pageForm.name"></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<search-item label="活动名称">
|
||||
<el-input clearable placeholder="请输入活动名称" v-model="pageForm.name"></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="活动列表">
|
||||
<el-button @click="openAdd" icon="el-icon-edit-outline" size="small" type="primary">创建活动</el-button>
|
||||
<el-card class="mt10 sports-info-list-card" shadow="never">
|
||||
<el-tabs v-if="canManageTemplate" v-model="activeTab" @tab-click="tabChange">
|
||||
<el-tab-pane label="活动列表" name="activity"></el-tab-pane>
|
||||
<el-tab-pane label="活动模板列表" name="template"></el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<table-tool :label="canManageTemplate && activeTab === 'template' ? '活动模板列表' : '活动列表'">
|
||||
<el-button
|
||||
@click="openAdd"
|
||||
icon="el-icon-edit-outline"
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="!canManageTemplate || activeTab === 'activity'"
|
||||
>创建活动</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table
|
||||
:height="tableHeight"
|
||||
:data="tableData"
|
||||
:size="tableSize"
|
||||
@sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
ref="activityTableRef"
|
||||
row-key="id"
|
||||
style="width: 100%; margin-bottom: 20px"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
@@ -100,8 +114,9 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
@@ -126,6 +141,43 @@ layout("/layouts/platform.html"){
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* 活动列表页占满平台内容区,页面本身不产生纵向滚动条。 */
|
||||
#app .sports-info-manage-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: calc(100vh - 82px);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#app .sports-info-query-card {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
/* 列表卡片填充剩余高度,表格高度由脚本根据内部固定区域动态计算。 */
|
||||
#app .sports-info-list-card {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#app .sports-info-list-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#app .sports-info-list-card .el-tabs,
|
||||
#app .sports-info-list-card .ele-table-tool,
|
||||
#app .sports-info-list-card .el-pagination-container {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("info.js"){}#-->
|
||||
@@ -137,6 +189,9 @@ layout("/layouts/platform.html"){
|
||||
data() {
|
||||
return {
|
||||
user: null,
|
||||
activeTab: "activity",
|
||||
tableHeight: 300,
|
||||
tableResizeObserver: null,
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY") + ""
|
||||
},
|
||||
@@ -153,6 +208,12 @@ layout("/layouts/platform.html"){
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 页签沿用“设为模板”按钮的角色范围,不新增权限标识。
|
||||
canManageTemplate() {
|
||||
return this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info-manage-info": ACTIVITY_SPORTS_INFO,
|
||||
"add-activity": ACTIVITY_SPORTS_ADD_ACTIVITY
|
||||
@@ -174,6 +235,49 @@ layout("/layouts/platform.html"){
|
||||
window.open("/platform/activity/sports/info/mange/exportXlsx?id=" + row.id)
|
||||
}
|
||||
},
|
||||
// 切换页签时按活动表中的模板设置状态重新查询,并重置分页位置。
|
||||
tabChange() {
|
||||
this.$set(this.pageForm, "templateStatus", this.activeTab === "template" ? 1 : 0)
|
||||
this.doSearch()
|
||||
this.updateTableHeight()
|
||||
},
|
||||
// 根据列表卡片的实际可用空间设置 Element Table 高度,使数据只在表格内部滚动。
|
||||
updateTableHeight() {
|
||||
this.$nextTick(() => {
|
||||
const cardBody = this.$el.querySelector(".sports-info-list-card > .el-card__body")
|
||||
if (!cardBody || cardBody.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
const getOuterHeight = (element) => {
|
||||
if (!element) {
|
||||
return 0
|
||||
}
|
||||
const style = window.getComputedStyle(element)
|
||||
return element.offsetHeight
|
||||
+ (parseFloat(style.marginTop) || 0)
|
||||
+ (parseFloat(style.marginBottom) || 0)
|
||||
}
|
||||
const bodyStyle = window.getComputedStyle(cardBody)
|
||||
const bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
|
||||
+ (parseFloat(bodyStyle.paddingBottom) || 0)
|
||||
const tabs = this.canManageTemplate ? cardBody.querySelector(".el-tabs") : null
|
||||
const tableTool = cardBody.querySelector(".ele-table-tool")
|
||||
const pagination = cardBody.querySelector(".el-pagination-container")
|
||||
const reservedHeight = bodyPadding
|
||||
+ getOuterHeight(tabs)
|
||||
+ getOuterHeight(tableTool)
|
||||
+ getOuterHeight(pagination)
|
||||
const nextHeight = Math.max(1, Math.floor(cardBody.clientHeight - reservedHeight))
|
||||
if (this.tableHeight !== nextHeight) {
|
||||
this.tableHeight = nextHeight
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.activityTableRef) {
|
||||
this.$refs.activityTableRef.doLayout()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
const { id } = row
|
||||
this.$refs.guava.view(() => {
|
||||
@@ -275,7 +379,28 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
async created() {
|
||||
this.user = this.$store.state.user
|
||||
if (this.canManageTemplate) {
|
||||
// 有模板管理角色时默认进入活动列表,只展示未设置模板的活动。
|
||||
this.$set(this.pageForm, "templateStatus", 0)
|
||||
}
|
||||
this.pageData()
|
||||
},
|
||||
mounted() {
|
||||
const listCardBody = this.$el.querySelector(".sports-info-list-card > .el-card__body")
|
||||
if (listCardBody && window.ResizeObserver) {
|
||||
// 查询区换行、页签权限或窗口尺寸变化时同步调整表格内部滚动区域。
|
||||
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
|
||||
this.tableResizeObserver.observe(listCardBody)
|
||||
}
|
||||
this.updateTableHeight()
|
||||
window.addEventListener("resize", this.updateTableHeight)
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.tableResizeObserver) {
|
||||
this.tableResizeObserver.disconnect()
|
||||
this.tableResizeObserver = null
|
||||
}
|
||||
window.removeEventListener("resize", this.updateTableHeight)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -15,12 +15,43 @@ layout("/layouts/platform.html"){
|
||||
.courseTimeButton {
|
||||
padding: 0 !important;
|
||||
}
|
||||
/* 品牌活动管理占满平台内容区,页面本身不产生纵向滚动条。 */
|
||||
#app .train-sign-up-manage-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: calc(100vh - 82px);
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .train-sign-up-query-card {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
/* 列表卡片填充剩余高度,超出数据仅在表格内部滚动。 */
|
||||
#app .train-sign-up-list-card {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .train-sign-up-list-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .train-sign-up-list-card .el-tabs,
|
||||
#app .train-sign-up-list-card .ele-table-tool,
|
||||
#app .train-sign-up-list-card .el-pagination-container {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<el-card shadow="never">
|
||||
<template>
|
||||
<div class="train-sign-up-manage-layout">
|
||||
<el-card class="train-sign-up-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -44,13 +75,21 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="活动列表">
|
||||
<el-button @click="openAdd" size="small" type="primary">
|
||||
<el-card class="mt10 train-sign-up-list-card" shadow="never">
|
||||
<el-tabs v-if="canManageTemplate" v-model="activeTab" @tab-click="tabChange">
|
||||
<el-tab-pane label="活动列表" name="activity"></el-tab-pane>
|
||||
<el-tab-pane label="活动模板列表" name="template"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<table-tool :label="canManageTemplate && activeTab === 'template' ? '活动模板列表' : '活动列表'">
|
||||
<el-button
|
||||
@click="openAdd"
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="!canManageTemplate || activeTab === 'activity'">
|
||||
<i class="ti-plus"></i>新建活动
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize">
|
||||
<el-table :data="tableData" :height="tableHeight" :size="tableSize" ref="activityTableRef">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
@@ -93,12 +132,12 @@ layout("/layouts/platform.html"){
|
||||
<el-dropdown-item @click.native="onView(row)">查看</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="openEdit(row)">编辑</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN']) && !row.isTemplate"
|
||||
v-if="canManageTemplate && row.templateStatus !== 1"
|
||||
@click.native="setTemplate(row)">设为模板</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN']) && row.isTemplate"
|
||||
v-if="canManageTemplate && row.templateStatus === 1"
|
||||
@click.native="cancelTemplate(row)">取消模板</el-dropdown-item>
|
||||
<el-dropdown-item :disabled="!!row.isTemplate" @click.native="onDelete(row)">删除</el-dropdown-item>
|
||||
<el-dropdown-item :disabled="row.templateStatus === 1" @click.native="onDelete(row)">删除</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@@ -106,6 +145,8 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<basic-form ref="formRef" @back="back" @refresh="doSearch"></basic-form>
|
||||
@@ -149,6 +190,9 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeTab: "activity",
|
||||
tableHeight: 300,
|
||||
tableResizeObserver: null,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
@@ -163,6 +207,12 @@ layout("/layouts/platform.html"){
|
||||
urlEditInitialized: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 页签沿用“设为模板”按钮的角色范围,不新增权限标识。
|
||||
canManageTemplate() {
|
||||
return this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pageData(data = null) {
|
||||
const address = this.pageDataUrl ? this.pageDataUrl : loc() + "/pageData"
|
||||
@@ -179,6 +229,49 @@ layout("/layouts/platform.html"){
|
||||
return res
|
||||
})
|
||||
},
|
||||
// 切换页签时按活动表中的模板状态查询,并重置到第一页。
|
||||
tabChange() {
|
||||
this.$set(this.pageForm, "templateStatus", this.activeTab === "template" ? 1 : 0)
|
||||
this.doSearch()
|
||||
this.updateTableHeight()
|
||||
},
|
||||
// 根据列表卡片的可用空间固定表格高度,使大量数据只在表格内部滚动。
|
||||
updateTableHeight() {
|
||||
this.$nextTick(() => {
|
||||
const cardBody = this.$el.querySelector(".train-sign-up-list-card > .el-card__body")
|
||||
if (!cardBody || cardBody.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
const getOuterHeight = (element) => {
|
||||
if (!element) {
|
||||
return 0
|
||||
}
|
||||
const style = window.getComputedStyle(element)
|
||||
return element.offsetHeight
|
||||
+ (parseFloat(style.marginTop) || 0)
|
||||
+ (parseFloat(style.marginBottom) || 0)
|
||||
}
|
||||
const bodyStyle = window.getComputedStyle(cardBody)
|
||||
const bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
|
||||
+ (parseFloat(bodyStyle.paddingBottom) || 0)
|
||||
const tabs = this.canManageTemplate ? cardBody.querySelector(".el-tabs") : null
|
||||
const tableTool = cardBody.querySelector(".ele-table-tool")
|
||||
const pagination = cardBody.querySelector(".el-pagination-container")
|
||||
const reservedHeight = bodyPadding
|
||||
+ getOuterHeight(tabs)
|
||||
+ getOuterHeight(tableTool)
|
||||
+ getOuterHeight(pagination)
|
||||
const nextHeight = Math.max(1, Math.floor(cardBody.clientHeight - reservedHeight))
|
||||
if (this.tableHeight !== nextHeight) {
|
||||
this.tableHeight = nextHeight
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.activityTableRef) {
|
||||
this.$refs.activityTableRef.doLayout()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
back() {
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
@@ -223,16 +316,17 @@ layout("/layouts/platform.html"){
|
||||
makeCode(row) {
|
||||
this.$refs.codeRef.initData(row)
|
||||
},
|
||||
async activityStatusChange(notice, val, id) {
|
||||
const resp = await this.$axios.post(loc() + "/activityStatusChange", { notice: notice, isDisabled: val, id })
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
activityStatusChange(notice, val, id) {
|
||||
this.$axios.post(loc() + "/activityStatusChange", { notice: notice, isDisabled: val, id: id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async onDelete(row) {
|
||||
if (row.isTemplate) {
|
||||
onDelete(row) {
|
||||
if (row.templateStatus === 1) {
|
||||
this.$message.warning("该活动已设为模板,请先取消模板后再删除")
|
||||
return
|
||||
}
|
||||
@@ -240,49 +334,71 @@ layout("/layouts/platform.html"){
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post(loc() + "/onDelete", { id: row.id })
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/onDelete", { id: row.id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
async setTemplate(row) {
|
||||
setTemplate(row) {
|
||||
this.$confirm("确定将该活动设为工作模板吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post(loc() + "/setTemplate", { id: row.id })
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/setTemplate", { id: row.id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
async cancelTemplate(row) {
|
||||
cancelTemplate(row) {
|
||||
this.$confirm("确定取消该活动的工作模板吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post(loc() + "/cancelTemplate", { id: row.id })
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/cancelTemplate", { id: row.id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (this.canManageTemplate) {
|
||||
// 有模板管理角色时默认进入活动列表,只展示未设置模板的活动。
|
||||
this.$set(this.pageForm, "templateStatus", 0)
|
||||
}
|
||||
this.pageData()
|
||||
const listCardBody = this.$el.querySelector(".train-sign-up-list-card > .el-card__body")
|
||||
if (listCardBody && window.ResizeObserver) {
|
||||
// 查询区换行、页签权限或窗口变化时同步调整表格内部滚动区域。
|
||||
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
|
||||
this.tableResizeObserver.observe(listCardBody)
|
||||
}
|
||||
this.updateTableHeight()
|
||||
window.addEventListener("resize", this.updateTableHeight)
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.tableResizeObserver) {
|
||||
this.tableResizeObserver.disconnect()
|
||||
this.tableResizeObserver = null
|
||||
}
|
||||
window.removeEventListener("resize", this.updateTableHeight)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+151
-36
@@ -2,12 +2,44 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style></style>
|
||||
<style>
|
||||
/* 作品征集活动管理占满平台内容区,页面本身不产生纵向滚动条。 */
|
||||
#app .works-collection-manage-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: calc(100vh - 82px);
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .works-collection-query-card {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
/* 列表卡片填充剩余高度,超出数据仅在表格内部滚动。 */
|
||||
#app .works-collection-list-card {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .works-collection-list-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .works-collection-list-card .el-tabs,
|
||||
#app .works-collection-list-card .ele-table-tool,
|
||||
#app .works-collection-list-card .el-pagination-container {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="works-collection-manage-layout">
|
||||
<el-card class="works-collection-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker placeholder="请选择年度" type="year" v-model="pageForm.year"
|
||||
@@ -19,12 +51,21 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="活动列表">
|
||||
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openAdd">创建活动</el-button>
|
||||
<el-card class="mt10 works-collection-list-card" shadow="never">
|
||||
<el-tabs v-if="canManageTemplate" v-model="activeTab" @tab-click="tabChange">
|
||||
<el-tab-pane label="活动列表" name="activity"></el-tab-pane>
|
||||
<el-tab-pane label="活动模板列表" name="template"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<table-tool :label="canManageTemplate && activeTab === 'template' ? '活动模板列表' : '活动列表'">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="openAdd"
|
||||
v-if="!canManageTemplate || activeTab === 'activity'">创建活动</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%" row-key="id">
|
||||
<el-table :data="tableData" :height="tableHeight" @sort-change="pageOrder" ref="activityTableRef" style="width: 100%" row-key="id">
|
||||
<el-table-column label="序号" type="index" width="60px" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="主题" prop="name"></el-table-column>
|
||||
<el-table-column label="创建人" prop="userName"></el-table-column>
|
||||
@@ -74,6 +115,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
@@ -361,6 +403,9 @@ layout("/layouts/platform.html"){
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
activeTab: "activity",
|
||||
tableHeight: 300,
|
||||
tableResizeObserver: null,
|
||||
activityGroupList: [],
|
||||
dialogFormVisible: false,
|
||||
formRules: {
|
||||
@@ -388,6 +433,12 @@ layout("/layouts/platform.html"){
|
||||
clubOptions: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 页签沿用“设为模板”按钮的角色范围,不新增权限标识。
|
||||
canManageTemplate() {
|
||||
return this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"drawer-user-scope": httpVueLoader("/components/module/activity/DrawerUserScope.vue")
|
||||
},
|
||||
@@ -426,9 +477,8 @@ layout("/layouts/platform.html"){
|
||||
this.openAdd()
|
||||
}
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const {data} = await this.$axios.post("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||
return data
|
||||
getActivityGroup() {
|
||||
return this.$axios.post("/platform/activity/basic/scope/getActivityUserScopeGroup").then((res) => res.data)
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
@@ -444,6 +494,49 @@ layout("/layouts/platform.html"){
|
||||
this.doDelete(row.id)
|
||||
}
|
||||
},
|
||||
// 切换页签时按作品征集活动表中的模板状态查询,并重置分页位置。
|
||||
tabChange() {
|
||||
this.$set(this.pageForm, "templateStatus", this.activeTab === "template" ? 1 : 0)
|
||||
this.doSearch()
|
||||
this.updateTableHeight()
|
||||
},
|
||||
// 根据列表卡片可用空间固定表格高度,使大量数据只在表格内部滚动。
|
||||
updateTableHeight() {
|
||||
this.$nextTick(() => {
|
||||
const cardBody = this.$el.querySelector(".works-collection-list-card > .el-card__body")
|
||||
if (!cardBody || cardBody.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
const getOuterHeight = (element) => {
|
||||
if (!element) {
|
||||
return 0
|
||||
}
|
||||
const style = window.getComputedStyle(element)
|
||||
return element.offsetHeight
|
||||
+ (parseFloat(style.marginTop) || 0)
|
||||
+ (parseFloat(style.marginBottom) || 0)
|
||||
}
|
||||
const bodyStyle = window.getComputedStyle(cardBody)
|
||||
const bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
|
||||
+ (parseFloat(bodyStyle.paddingBottom) || 0)
|
||||
const tabs = this.canManageTemplate ? cardBody.querySelector(".el-tabs") : null
|
||||
const tableTool = cardBody.querySelector(".ele-table-tool")
|
||||
const pagination = cardBody.querySelector(".el-pagination-container")
|
||||
const reservedHeight = bodyPadding
|
||||
+ getOuterHeight(tabs)
|
||||
+ getOuterHeight(tableTool)
|
||||
+ getOuterHeight(pagination)
|
||||
const nextHeight = Math.max(1, Math.floor(cardBody.clientHeight - reservedHeight))
|
||||
if (this.tableHeight !== nextHeight) {
|
||||
this.tableHeight = nextHeight
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.activityTableRef) {
|
||||
this.$refs.activityTableRef.doLayout()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async loadFormOptions() {
|
||||
if (this.formOptionsLoaded) {
|
||||
return
|
||||
@@ -518,6 +611,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
data.id = null
|
||||
data.isTemplate = false
|
||||
data.templateStatus = 0
|
||||
data.createdBy = null
|
||||
data.createdAt = null
|
||||
data.updatedBy = null
|
||||
@@ -669,31 +763,29 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
})
|
||||
},
|
||||
async setTemplate(row) {
|
||||
try {
|
||||
await this.$confirm("确定将该活动设为工作模板吗?", "提示", {type: "warning"})
|
||||
const resp = await this.$axios.post(loc() + "/setTemplate", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
setTemplate(row) {
|
||||
this.$confirm("确定将该活动设为工作模板吗?", "提示", {type: "warning"}).then(() => {
|
||||
this.$axios.post(loc() + "/setTemplate", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
async cancelTemplate(row) {
|
||||
try {
|
||||
await this.$confirm("确定取消该工作模板吗?", "提示", {type: "warning"})
|
||||
const resp = await this.$axios.post(loc() + "/cancelTemplate", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
cancelTemplate(row) {
|
||||
this.$confirm("确定取消该工作模板吗?", "提示", {type: "warning"}).then(() => {
|
||||
this.$axios.post(loc() + "/cancelTemplate", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
|
||||
enableChange(enable, id) {
|
||||
@@ -727,12 +819,15 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
})
|
||||
},
|
||||
async getClubsByRole() {
|
||||
const resp = await this.$axios.post("/platform/club/examine/apply/getClubsByRole")
|
||||
return resp.data
|
||||
getClubsByRole() {
|
||||
return this.$axios.post("/platform/club/examine/apply/getClubsByRole").then((resp) => resp.data)
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
if (!this.isNewPage() && this.canManageTemplate) {
|
||||
// 有模板管理角色时默认进入活动列表,只展示未设置模板的活动。
|
||||
this.$set(this.pageForm, "templateStatus", 0)
|
||||
}
|
||||
if (this.isNewPage()) {
|
||||
await this.loadFormOptions()
|
||||
this.$nextTick(() => {
|
||||
@@ -742,6 +837,26 @@ layout("/layouts/platform.html"){
|
||||
this.pageData()
|
||||
this.loadFormOptions()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.isNewPage()) {
|
||||
return
|
||||
}
|
||||
const listCardBody = this.$el.querySelector(".works-collection-list-card > .el-card__body")
|
||||
if (listCardBody && window.ResizeObserver) {
|
||||
// 查询区换行、页签权限或窗口变化时同步调整表格内部滚动区域。
|
||||
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
|
||||
this.tableResizeObserver.observe(listCardBody)
|
||||
}
|
||||
this.updateTableHeight()
|
||||
window.addEventListener("resize", this.updateTableHeight)
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.tableResizeObserver) {
|
||||
this.tableResizeObserver.disconnect()
|
||||
this.tableResizeObserver = null
|
||||
}
|
||||
window.removeEventListener("resize", this.updateTableHeight)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -7,12 +7,21 @@ layout("/layouts/platform.html"){
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<search-item label="申报开始年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
placeholder="请选择申报开始年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
v-model="pageForm.applyStartYear"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="申报结束年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择申报结束年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.applyEndYear"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
@@ -41,11 +50,8 @@ layout("/layouts/platform.html"){
|
||||
<span>{{ row.foundTime ? $moment(row.foundTime).format('YYYY-MM-DD') : '无' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="年度" prop="applyYear" sortable show-overflow-tooltip>
|
||||
<template slot-scope="{row}">
|
||||
<span>{{ $moment(row.applyTime).format('YYYY') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申报开始年度" prop="applyStartYear" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申报结束年度" prop="applyEndYear" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申请时间" prop="applyTime" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="审核时间" prop="finishTime" show-overflow-tooltip>
|
||||
@@ -83,10 +89,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</evaluate-info>
|
||||
@@ -104,7 +110,8 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
pageForm: {
|
||||
clubId: "",
|
||||
year: this.$moment().format("YYYY"),
|
||||
applyStartYear: "",
|
||||
applyEndYear: "",
|
||||
audit: false
|
||||
},
|
||||
viewData: {},
|
||||
|
||||
@@ -8,12 +8,21 @@ layout("/layouts/platform.html"){
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<search-item label="申报开始年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
placeholder="请选择申报开始年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
v-model="pageForm.applyStartYear"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="申报结束年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择申报结束年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.applyEndYear"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
@@ -39,11 +48,8 @@ layout("/layouts/platform.html"){
|
||||
<span>{{ row.foundTime ? $moment(row.foundTime).format('YYYY-MM-DD') : '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="年度" prop="applyTime" sortable show-overflow-tooltip>
|
||||
<template slot-scope="{row}">
|
||||
<span>{{ $moment(row.applyTime).format('YYYY') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申报开始年度" prop="applyStartYear" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申报结束年度" prop="applyEndYear" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申请时间" prop="applyTime" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="当前节点" prop="taskName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="流程状态" prop="instanceState" show-overflow-tooltip>
|
||||
@@ -88,7 +94,8 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
pageForm: {
|
||||
clubId: "",
|
||||
year: this.$moment().format("YYYY")
|
||||
applyStartYear: "",
|
||||
applyEndYear: ""
|
||||
},
|
||||
clubList: []
|
||||
}
|
||||
|
||||
@@ -7,12 +7,21 @@ layout("/layouts/platform.html"){
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<search-item label="申报开始年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
placeholder="请选择申报开始年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
v-model="pageForm.applyStartYear"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="申报结束年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择申报结束年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.applyEndYear"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
@@ -41,11 +50,8 @@ layout("/layouts/platform.html"){
|
||||
<span>{{ row.foundTime ? $moment(row.foundTime).format('YYYY-MM-DD') : '无' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="年度" prop="applyYear" sortable show-overflow-tooltip>
|
||||
<template slot-scope="{row}">
|
||||
<span>{{ $moment(row.applyTime).format('YYYY') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申报开始年度" prop="applyStartYear" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申报结束年度" prop="applyEndYear" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申请时间" prop="applyTime" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="审核时间" prop="finishTime" show-overflow-tooltip>
|
||||
@@ -83,10 +89,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</evaluate-info>
|
||||
@@ -104,7 +110,8 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
pageForm: {
|
||||
clubId: "",
|
||||
year: this.$moment().format("YYYY"),
|
||||
applyStartYear: "",
|
||||
applyEndYear: "",
|
||||
audit: false
|
||||
},
|
||||
viewData: {},
|
||||
|
||||
@@ -7,12 +7,21 @@ layout("/layouts/platform.html"){
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<search-item label="申报开始年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
placeholder="请选择申报开始年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
v-model="pageForm.applyStartYear"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="申报结束年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择申报结束年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.applyEndYear"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
@@ -41,11 +50,8 @@ layout("/layouts/platform.html"){
|
||||
<span>{{ row.foundTime ? $moment(row.foundTime).format('YYYY-MM-DD') : '无' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="年度" prop="applyYear" sortable show-overflow-tooltip>
|
||||
<template slot-scope="{row}">
|
||||
<span>{{ $moment(row.applyTime).format('YYYY') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申报开始年度" prop="applyStartYear" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申报结束年度" prop="applyEndYear" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申请时间" prop="applyTime" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="当前节点" prop="curTaskName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="审核时间" prop="finishTime" show-overflow-tooltip>
|
||||
@@ -83,10 +89,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</evaluate-info>
|
||||
@@ -104,7 +110,8 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
pageForm: {
|
||||
clubId: "",
|
||||
year: this.$moment().format("YYYY"),
|
||||
applyStartYear: "",
|
||||
applyEndYear: "",
|
||||
audit: false
|
||||
},
|
||||
viewData: {},
|
||||
|
||||
@@ -84,10 +84,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</examine-info>
|
||||
|
||||
@@ -105,8 +105,8 @@
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
<el-descriptions-item label="办理用户">{{ getTaskFormValue(task, "userName", "tf_userName")
|
||||
}}({{ getTaskFormValue(task, "loginName", "tf_loginName") }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
@@ -114,7 +114,7 @@
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
getTaskFormValue(task, "opinion", "tf_opinion") }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
@@ -125,7 +125,7 @@
|
||||
<el-descriptions border class="flow-task-form" :column="3">
|
||||
<el-descriptions-item label="办理用户">{{ record.userName }}({{ record.loginName }})</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ record.auditTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">{{ record.auditPass ? "审核通过" : "审核不通过" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">{{ getLegacyAuditResult(record) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" span="3">{{ record.auditOpinion }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
@@ -140,7 +140,14 @@
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
viewData: {
|
||||
changeUserNum: [],
|
||||
detailedList: [],
|
||||
incomeCensus: [],
|
||||
jgUser: [],
|
||||
plans: [],
|
||||
yearActivityList: []
|
||||
},
|
||||
activeName: "1",
|
||||
row: {},
|
||||
doneTasks: [],
|
||||
@@ -165,37 +172,78 @@
|
||||
getAuditDisplayName(displayName) {
|
||||
return displayName === "协会审核" ? "会长审核" : displayName
|
||||
},
|
||||
async onOpen(row) {
|
||||
this.row = row
|
||||
const resp = await this.$axios.post("/platform/club/examine/common/findOne", { id: row.id })
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.$set(this, "legacyAuditRecords", resp.data.legacyAuditRecords || [])
|
||||
await this.getClubUserNum(resp.data.clubId)
|
||||
await this.getJgUser(resp.data.clubId)
|
||||
}
|
||||
this.getDoneTasks()
|
||||
// 历史流程任务使用tf_前缀保存表单字段,正常流程继续优先读取标准字段。
|
||||
getTaskFormValue(task, fieldName, legacyFieldName) {
|
||||
const formData = task.taskFormData || {}
|
||||
return formData[fieldName] || formData[legacyFieldName] || "—"
|
||||
},
|
||||
async getClubUserNum(clubId) {
|
||||
const resp = await this.$axios.post("/platform/club/examine/apply/getClubUserNum", {
|
||||
clubId: clubId,
|
||||
year: this.row.year
|
||||
})
|
||||
this.$set(this.viewData, "changeUserNum", resp.data)
|
||||
// 旧审核表的auditPass可能为空,不能按false错误展示为审核不通过。
|
||||
getLegacyAuditResult(record) {
|
||||
if (record.auditPass === true || record.auditPass === 1) {
|
||||
return "审核通过"
|
||||
}
|
||||
if (record.auditPass === false || record.auditPass === 0) {
|
||||
return "审核不通过"
|
||||
}
|
||||
return "—"
|
||||
},
|
||||
async onOpen(row) {
|
||||
this.$set(this, "row", row)
|
||||
this.$set(this, "doneTasks", [])
|
||||
this.$set(this, "legacyAuditRecords", [])
|
||||
try {
|
||||
const resp = await this.$axios.post("/platform/club/examine/common/findOne", { id: row.id })
|
||||
if (resp.code !== 0) {
|
||||
this.$message.error(resp.msg || "查询年审详情失败")
|
||||
return
|
||||
}
|
||||
const viewData = resp.data || {}
|
||||
this.$set(this, "viewData", viewData)
|
||||
this.$set(this.viewData, "changeUserNum", viewData.changeUserNum || [])
|
||||
this.$set(this, "legacyAuditRecords", viewData.legacyAuditRecords || [])
|
||||
// 历史成员变化直接展示年审保存数据,成员和审核记录继续独立加载。
|
||||
await Promise.all([
|
||||
this.getJgUser(viewData.clubId),
|
||||
this.getDoneTasks()
|
||||
])
|
||||
} catch (error) {
|
||||
this.$message.error("查询年审详情失败")
|
||||
}
|
||||
},
|
||||
async getJgUser(clubId) {
|
||||
const respUser = await this.$axios.post("/platform/club/examine/apply/getJgUser", {
|
||||
clubId: clubId
|
||||
})
|
||||
this.$set(this.viewData, "jgUser", respUser.data)
|
||||
if (!clubId) {
|
||||
this.$set(this.viewData, "jgUser", [])
|
||||
return
|
||||
}
|
||||
try {
|
||||
const respUser = await this.$axios.post("/platform/club/examine/apply/getJgUser", {
|
||||
clubId: clubId
|
||||
})
|
||||
if (respUser.code === 0) {
|
||||
this.$set(this.viewData, "jgUser", respUser.data || [])
|
||||
} else {
|
||||
this.$set(this.viewData, "jgUser", [])
|
||||
this.$message.warning(respUser.msg || "查询社团成员失败")
|
||||
}
|
||||
} catch (error) {
|
||||
this.$set(this.viewData, "jgUser", [])
|
||||
this.$message.warning("查询社团成员失败")
|
||||
}
|
||||
},
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
async getDoneTasks() {
|
||||
try {
|
||||
const res = await this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id})
|
||||
if (res.code === 0) {
|
||||
this.$set(this, "doneTasks", res.data || [])
|
||||
} else {
|
||||
this.$set(this, "doneTasks", [])
|
||||
this.$message.warning(res.msg || "查询审核记录失败")
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
this.$set(this, "doneTasks", [])
|
||||
this.$message.warning("查询审核记录失败")
|
||||
}
|
||||
},
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
|
||||
@@ -80,10 +80,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</examine-info>
|
||||
|
||||
@@ -86,10 +86,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</examine-info>
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<style>
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="club-info-fixed-list-page">
|
||||
<el-card class="club-info-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -30,14 +33,14 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-card class="mt10 club-info-fixed-list-card" shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData">
|
||||
<el-table :data="tableData" :height="tableHeight" ref="tableRef">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="社团名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||
@@ -66,6 +69,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
@@ -82,10 +86,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
@@ -95,9 +99,10 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../change/info.js"){}#-->
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, CLUB_INFO_FIXED_LIST_MIXIN],
|
||||
components: {
|
||||
"info": clubManagerInfo,
|
||||
},
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<style>
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="club-info-fixed-list-page">
|
||||
<el-card class="club-info-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -30,14 +33,14 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-card class="mt10 club-info-fixed-list-card" shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<el-button type="primary" size="small" @click="openAdd">
|
||||
<i class="ti-plus"></i>
|
||||
变更成员
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData">
|
||||
<el-table :data="tableData" :height="tableHeight" ref="tableRef">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="社团名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||
@@ -64,6 +67,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
@@ -106,13 +110,13 @@ layout("/layouts/platform.html"){
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份" prop="nowRoleCode">
|
||||
<el-checkbox-group v-model="formData.nowRoleCode">
|
||||
<el-checkbox-group v-model="formData.nowRoleCode" @change="handleRoleChange">
|
||||
<el-checkbox label="CLUB_PRESIDENT">社团会长</el-checkbox>
|
||||
<el-checkbox label="CLUB_VICE_PRESIDENT">社团副会长</el-checkbox>
|
||||
<el-checkbox label="CLUB_SECRETARY">社团秘书长</el-checkbox>
|
||||
<el-checkbox label="CLUB_VICE_SECRETARY">社团副秘书长</el-checkbox>
|
||||
<el-checkbox label="CLUB_OPERATOR">社团操作员</el-checkbox>
|
||||
<el-checkbox label="CLUB_MEMBER">社团会员</el-checkbox>
|
||||
<el-checkbox label="CLUB_MEMBER" :disabled="memberRoleDisabled">社团会员</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -131,9 +135,10 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("info.js"){}#-->
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, CLUB_INFO_FIXED_LIST_MIXIN],
|
||||
components: {
|
||||
"info": clubManagerInfo
|
||||
},
|
||||
@@ -155,6 +160,13 @@ layout("/layouts/platform.html"){
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 选择任意理事机构身份后,社团会员身份不可再选,避免互斥身份同时提交。
|
||||
memberRoleDisabled() {
|
||||
const roleCodes = Array.isArray(this.formData.nowRoleCode) ? this.formData.nowRoleCode : []
|
||||
return roleCodes.some(roleCode => roleCode !== 'CLUB_MEMBER')
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
clubChange(key) {
|
||||
if(!key) {
|
||||
@@ -169,10 +181,20 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
userChange(key) {
|
||||
const user = this.userList.find(o => o.userId === key)
|
||||
this.$set(this.formData, 'nowRoleCode', user?.roleCode)
|
||||
const roleCodes = user && Array.isArray(user.roleCode) ? user.roleCode.slice() : []
|
||||
this.$set(this.formData, 'nowRoleCode', roleCodes)
|
||||
this.handleRoleChange(roleCodes)
|
||||
this.$set(this.formData, 'changeUserId', key)
|
||||
this.$set(this.formData, 'changeUserName', user?.userName)
|
||||
},
|
||||
// 身份发生变化时,只要存在非社团会员身份,就取消社团会员身份的选中状态。
|
||||
handleRoleChange(roleCodes) {
|
||||
const selectedRoleCodes = Array.isArray(roleCodes) ? roleCodes : []
|
||||
const hasNonMemberRole = selectedRoleCodes.some(roleCode => roleCode !== 'CLUB_MEMBER')
|
||||
if (hasNonMemberRole && selectedRoleCodes.includes('CLUB_MEMBER')) {
|
||||
this.$set(this.formData, 'nowRoleCode', selectedRoleCodes.filter(roleCode => roleCode !== 'CLUB_MEMBER'))
|
||||
}
|
||||
},
|
||||
openAdd() {
|
||||
this.id = ''
|
||||
this.taskId = ''
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<style>
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="club-info-fixed-list-page">
|
||||
<el-card class="club-info-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="所属社团">
|
||||
<el-select v-model="pageForm.clubId" placeholder="请选择社团" clearable filterable style="width: 100%">
|
||||
@@ -25,9 +28,9 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-card class="mt10 club-info-fixed-list-card" shadow="never">
|
||||
<table-tool label="退会人员列表"></table-tool>
|
||||
<el-table :data="tableData">
|
||||
<el-table :data="tableData" :height="tableHeight" ref="tableRef">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="70"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName" show-overflow-tooltip></el-table-column>
|
||||
@@ -53,6 +56,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
@@ -63,9 +67,10 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("info.js"){}#-->
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, CLUB_INFO_FIXED_LIST_MIXIN],
|
||||
components: {
|
||||
"info": clubExitInfo,
|
||||
},
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/* 社团信息维护列表页固定占满平台内容区,禁止页面主体产生纵向滚动条。 */
|
||||
#app .club-info-fixed-list-page {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100vh - 82px);
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#app .club-info-fixed-query-card {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
#app .club-info-fixed-list-card {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#app .club-info-fixed-list-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#app .club-info-fixed-list-card .ele-table-tool,
|
||||
#app .club-info-fixed-list-card .el-pagination-container {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 社团信息维护列表页共用高度计算逻辑。
|
||||
* 查询卡片保持原始高度,列表表格占用工具栏与分页之外的全部剩余空间。
|
||||
*/
|
||||
const CLUB_INFO_FIXED_LIST_MIXIN = {
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 300,
|
||||
clubInfoListResizeObserver: null,
|
||||
clubInfoListResizeHandler: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateClubInfoListTableHeight() {
|
||||
this.$nextTick(() => {
|
||||
const page = this.$el.querySelector('.club-info-fixed-list-page')
|
||||
const cardBody = this.$el.querySelector('.club-info-fixed-list-card > .el-card__body')
|
||||
if (!page || !cardBody || cardBody.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
const getOuterHeight = element => {
|
||||
if (!element) {
|
||||
return 0
|
||||
}
|
||||
const style = window.getComputedStyle(element)
|
||||
return element.offsetHeight
|
||||
+ (parseFloat(style.marginTop) || 0)
|
||||
+ (parseFloat(style.marginBottom) || 0)
|
||||
}
|
||||
const bodyStyle = window.getComputedStyle(cardBody)
|
||||
const bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
|
||||
+ (parseFloat(bodyStyle.paddingBottom) || 0)
|
||||
const tableTool = cardBody.querySelector('.ele-table-tool')
|
||||
const pagination = cardBody.querySelector('.el-pagination-container')
|
||||
const reservedHeight = bodyPadding + getOuterHeight(tableTool) + getOuterHeight(pagination)
|
||||
const nextHeight = Math.max(1, Math.floor(cardBody.clientHeight - reservedHeight))
|
||||
if (this.tableHeight !== nextHeight) {
|
||||
this.tableHeight = nextHeight
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.tableRef) {
|
||||
this.$refs.tableRef.doLayout()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.updateClubInfoListTableHeight()
|
||||
const page = this.$el.querySelector('.club-info-fixed-list-page')
|
||||
if (window.ResizeObserver && page) {
|
||||
this.clubInfoListResizeObserver = new ResizeObserver(() => {
|
||||
this.updateClubInfoListTableHeight()
|
||||
})
|
||||
this.clubInfoListResizeObserver.observe(page)
|
||||
} else {
|
||||
this.clubInfoListResizeHandler = () => {
|
||||
this.updateClubInfoListTableHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.clubInfoListResizeHandler)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.clubInfoListResizeObserver) {
|
||||
this.clubInfoListResizeObserver.disconnect()
|
||||
}
|
||||
if (this.clubInfoListResizeHandler) {
|
||||
window.removeEventListener('resize', this.clubInfoListResizeHandler)
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
const CLUB_INFO_MANAGE_TEMPLATE = {
|
||||
template: `
|
||||
<div>
|
||||
<el-card shadow="never">
|
||||
<div class="club-manage-panel">
|
||||
<el-card class="club-manage-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
@@ -15,7 +15,7 @@
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-card shadow="never" class="mt10 club-manage-list-card">
|
||||
<table-tool label="会员信息">
|
||||
<template v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">
|
||||
<el-button size="small" type="primary" icon="el-icon-download" @click="exportRegistrationDoc">导出登记表</el-button>
|
||||
@@ -29,7 +29,8 @@
|
||||
<el-radio-button label="1">理事机构</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" row-key="id" @sort-change='pageOrder'>
|
||||
<el-table v-loading="tableLoading" :data="tableData" :height="tableHeight"
|
||||
row-key="id" ref="tableRef" @sort-change='pageOrder'>
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="70"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName" show-overflow-tooltip sortable></el-table-column>
|
||||
@@ -147,7 +148,7 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, CLUB_FIXED_TABLE_MIXIN],
|
||||
props: {
|
||||
parentNode: {
|
||||
type: Object,
|
||||
@@ -339,20 +340,33 @@
|
||||
})
|
||||
},
|
||||
|
||||
async pageData() {
|
||||
pageData() {
|
||||
this.pageForm.clubId = this.parentNode.currentTreeData.id
|
||||
const resp = await this.$axios.post("/platform/club/infoManage/manage/userPageData", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
// 切换树节点或分页时清空旧数据,避免新请求完成前显示上一社团的成员。
|
||||
const requestSequence = ++this.pageRequestSequence
|
||||
this.tableData = []
|
||||
this.tableLoading = true
|
||||
return this.$axios.post("/platform/club/infoManage/manage/userPageData", this.pageForm).then((resp) => {
|
||||
if (requestSequence !== this.pageRequestSequence) {
|
||||
return
|
||||
}
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list || []
|
||||
this.pageForm.totalCount = resp.data.totalCount || 0
|
||||
this.updateFixedTableHeight()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}).finally(() => {
|
||||
if (requestSequence === this.pageRequestSequence) {
|
||||
this.tableLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
created() {
|
||||
this.$set(this.pageForm, "radioType", "3")
|
||||
await this.pageData()
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,74 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<style>
|
||||
/* 社团信息页面固定占满平台内容区,避免页面主体出现纵向滚动条。 */
|
||||
#app .club-manage-layout {
|
||||
height: calc(100vh - 82px);
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .club-tree-column,
|
||||
#app .club-content-column {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .club-tree-card {
|
||||
height: 100%;
|
||||
}
|
||||
#app .club-tree-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .club-tree-scroll {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
margin-top: 10px;
|
||||
overflow: auto;
|
||||
}
|
||||
/* 右侧查询卡片固定,列表卡片占满剩余空间。 */
|
||||
#app .club-manage-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .club-manage-query-card {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
#app .club-manage-list-card {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .club-manage-list-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#app .club-manage-list-card .ele-table-tool,
|
||||
#app .club-manage-list-card .el-pagination-container {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-row type="flex" :gutter="10" style="height: calc(100vh - 126px)">
|
||||
<el-col :span="4" style="height: 100%">
|
||||
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
||||
<el-row class="club-manage-layout" type="flex" :gutter="10">
|
||||
<el-col class="club-tree-column" :span="4">
|
||||
<el-card class="club-tree-card" shadow="never">
|
||||
<el-input placeholder="输入关键字进行查找" v-model="filterText" clearable></el-input>
|
||||
<div style="max-height: calc(100vh - 200px); overflow-y: auto">
|
||||
<div class="club-tree-scroll">
|
||||
<el-tree
|
||||
:data="treeData"
|
||||
ref="treeRef"
|
||||
@@ -32,7 +90,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="20" style="height: 100%">
|
||||
<el-col class="club-content-column" :span="20">
|
||||
<template v-if="currentTreeNode==null || currentTreeNode.level===1">
|
||||
<school-club-manage :parent-node="this"></school-club-manage>
|
||||
</template>
|
||||
@@ -57,6 +115,69 @@ layout("/layouts/platform.html"){
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
/* 右侧列表共享固定高度计算逻辑,工具栏和分页不参与数据滚动。 */
|
||||
const CLUB_FIXED_TABLE_MIXIN = {
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 300,
|
||||
tableResizeObserver: null,
|
||||
pageRequestSequence: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateFixedTableHeight() {
|
||||
this.$nextTick(() => {
|
||||
const cardBody = this.$el.querySelector(".club-manage-list-card > .el-card__body")
|
||||
if (!cardBody || cardBody.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
const getOuterHeight = (element) => {
|
||||
if (!element) {
|
||||
return 0
|
||||
}
|
||||
const style = window.getComputedStyle(element)
|
||||
return element.offsetHeight
|
||||
+ (parseFloat(style.marginTop) || 0)
|
||||
+ (parseFloat(style.marginBottom) || 0)
|
||||
}
|
||||
const bodyStyle = window.getComputedStyle(cardBody)
|
||||
const bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
|
||||
+ (parseFloat(bodyStyle.paddingBottom) || 0)
|
||||
const tableTool = cardBody.querySelector(".ele-table-tool")
|
||||
const pagination = cardBody.querySelector(".el-pagination-container")
|
||||
const reservedHeight = bodyPadding + getOuterHeight(tableTool) + getOuterHeight(pagination)
|
||||
this.tableHeight = Math.max(1, Math.floor(cardBody.clientHeight - reservedHeight))
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.tableRef) {
|
||||
this.$refs.tableRef.doLayout()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.updateFixedTableHeight()
|
||||
if (window.ResizeObserver) {
|
||||
this.tableResizeObserver = new ResizeObserver(() => {
|
||||
this.updateFixedTableHeight()
|
||||
})
|
||||
this.tableResizeObserver.observe(this.$el)
|
||||
} else {
|
||||
this.resizeHandler = () => {
|
||||
this.updateFixedTableHeight()
|
||||
}
|
||||
window.addEventListener("resize", this.resizeHandler)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.tableResizeObserver) {
|
||||
this.tableResizeObserver.disconnect()
|
||||
}
|
||||
if (this.resizeHandler) {
|
||||
window.removeEventListener("resize", this.resizeHandler)
|
||||
}
|
||||
}
|
||||
}
|
||||
<!--#include("../../register/apply/clubRegisterForm.js"){}#-->
|
||||
<!--#include("../../common/clubInfoComponent.js"){}#-->
|
||||
<!--#include("../../common/clubRoleConstant.js"){}#-->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const SCHOOL_CLUB_MANAGE_TEMPLATE = {
|
||||
template: `
|
||||
<div>
|
||||
<el-card shadow="never">
|
||||
<div class="club-manage-panel">
|
||||
<el-card class="club-manage-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="社团名称">
|
||||
<el-input
|
||||
@@ -19,13 +19,14 @@ const SCHOOL_CLUB_MANAGE_TEMPLATE = {
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-card shadow="never" class="mt10 club-manage-list-card">
|
||||
<table-tool label="社团列表">
|
||||
<template>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" row-key="id">
|
||||
<el-table v-loading="tableLoading" :data="tableData" :height="tableHeight"
|
||||
row-key="id" ref="tableRef">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="70"></el-table-column>
|
||||
<el-table-column label="社团编码" sortable prop="clubCode"></el-table-column>
|
||||
<el-table-column label="社团名称" prop="clubName" sortable></el-table-column>
|
||||
@@ -69,7 +70,7 @@ const SCHOOL_CLUB_MANAGE_TEMPLATE = {
|
||||
</el-card>
|
||||
</div>
|
||||
`,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, CLUB_FIXED_TABLE_MIXIN],
|
||||
props: {
|
||||
parentNode: {
|
||||
type: Object,
|
||||
@@ -118,17 +119,30 @@ const SCHOOL_CLUB_MANAGE_TEMPLATE = {
|
||||
}
|
||||
},
|
||||
openImport() {},
|
||||
async pageData() {
|
||||
const resp = await this.$axios.post("/platform/club/infoManage/manage/pageData", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
pageData() {
|
||||
// 查询期间清空旧页并显示加载状态,快速连续操作时只接收最后一次响应。
|
||||
const requestSequence = ++this.pageRequestSequence
|
||||
this.tableData = []
|
||||
this.tableLoading = true
|
||||
return this.$axios.post("/platform/club/infoManage/manage/pageData", this.pageForm).then((resp) => {
|
||||
if (requestSequence !== this.pageRequestSequence) {
|
||||
return
|
||||
}
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list || []
|
||||
this.pageForm.totalCount = resp.data.totalCount || 0
|
||||
this.updateFixedTableHeight()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}).finally(() => {
|
||||
if (requestSequence === this.pageRequestSequence) {
|
||||
this.tableLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.pageData()
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
.el-tooltip__popper {
|
||||
line-height: 20px;
|
||||
}
|
||||
@@ -13,7 +14,8 @@ layout("/layouts/platform.html"){
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="club-info-fixed-list-page">
|
||||
<el-card class="club-info-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -54,13 +56,13 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-card class="mt10 club-info-fixed-list-card" shadow="never">
|
||||
<table-tool label="缴费记录">
|
||||
<el-button @click="batchOperatePay" size="small" type="primary">
|
||||
批量设置
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" row-key="id" @selection-change="handleSelectionChange" ref="tableRef">
|
||||
<el-table :data="tableData" :height="tableHeight" row-key="id" @selection-change="handleSelectionChange" ref="tableRef">
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
@@ -122,6 +124,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
@@ -156,9 +159,10 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, CLUB_INFO_FIXED_LIST_MIXIN],
|
||||
components: {
|
||||
|
||||
},
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<style>
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="club-info-fixed-list-page">
|
||||
<el-card class="club-info-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -30,14 +33,14 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-card class="mt10 club-info-fixed-list-card" shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<el-button type="primary" size="small" @click="openAdd">
|
||||
<i class="ti-plus"></i>
|
||||
上传报告
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData">
|
||||
<el-table :data="tableData" :height="tableHeight" ref="tableRef">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="社团名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||
@@ -61,6 +64,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
@@ -141,9 +145,10 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("info.js"){}#-->
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, CLUB_INFO_FIXED_LIST_MIXIN],
|
||||
components: {
|
||||
"info": clubRefreshInfo,
|
||||
},
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<style>
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="club-info-fixed-list-page">
|
||||
<el-card class="club-info-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -30,14 +33,14 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-card class="mt10 club-info-fixed-list-card" shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<el-button type="primary" size="small" @click="openAdd">
|
||||
<i class="ti-plus"></i>
|
||||
章程修订
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData">
|
||||
<el-table :data="tableData" :height="tableHeight" ref="tableRef">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="社团名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||
@@ -61,6 +64,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
@@ -99,9 +103,10 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("info.js"){}#-->
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, CLUB_INFO_FIXED_LIST_MIXIN],
|
||||
components: {
|
||||
"info": clubRuleInfo,
|
||||
},
|
||||
|
||||
+17
-8
@@ -1,12 +1,15 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<style>
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="club-info-fixed-list-page">
|
||||
<el-card class="club-info-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -30,14 +33,15 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-card class="mt10 club-info-fixed-list-card" shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<el-button size="small" type="primary" @click="exportRefreshReportZip">导出换届报告Zip</el-button>
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData">
|
||||
<el-table :data="tableData" :height="tableHeight" ref="tableRef">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="社团名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||
@@ -63,6 +67,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
@@ -79,10 +84,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
@@ -92,9 +97,10 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../refreshReport/info.js"){}#-->
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, CLUB_INFO_FIXED_LIST_MIXIN],
|
||||
components: {
|
||||
"info": clubRefreshInfo,
|
||||
},
|
||||
@@ -158,6 +164,9 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
})
|
||||
},
|
||||
exportRefreshReportZip() {
|
||||
this.$downLoad("/platform/club/infoManage/schoolAuditReport/exportRefreshReportZip", this.pageForm)
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$axios.post("/platform/club/infoManage/schoolAuditReport/pageData", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
<style>
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="club-info-fixed-list-page">
|
||||
<el-card class="club-info-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -30,14 +33,14 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-card class="mt10 club-info-fixed-list-card" shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData">
|
||||
<el-table :data="tableData" :height="tableHeight" ref="tableRef">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="社团名称" prop="clubName" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="申请人" prop="userName" sortable show-overflow-tooltip></el-table-column>
|
||||
@@ -63,6 +66,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
@@ -79,10 +83,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
@@ -92,9 +96,10 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../ruleUpdate/info.js"){}#-->
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, CLUB_INFO_FIXED_LIST_MIXIN],
|
||||
components: {
|
||||
"info": clubRuleInfo,
|
||||
},
|
||||
|
||||
@@ -106,10 +106,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
@@ -90,10 +90,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
@@ -86,10 +86,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</register-info>
|
||||
|
||||
@@ -86,10 +86,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</register-info>
|
||||
|
||||
@@ -86,10 +86,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</register-info>
|
||||
|
||||
@@ -86,10 +86,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</register-info>
|
||||
|
||||
+3
-3
@@ -127,10 +127,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</tour-approval-info>
|
||||
|
||||
@@ -127,10 +127,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</tour-approval-info>
|
||||
|
||||
@@ -142,8 +142,13 @@ layout("/layouts/platform.html"){
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="分工会">
|
||||
<el-select :clearable="true" v-model="pageForm.department" placeholder="请选择分工会">
|
||||
<el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select :clearable="true" v-model="pageForm.unionId" placeholder="请选择分工会">
|
||||
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="社团">
|
||||
<el-select :clearable="true" v-model="pageForm.clubId" placeholder="请选择社团">
|
||||
<el-option v-for="item in clubOptions" :key="item.id" :label="item.clubName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -169,12 +174,15 @@ layout("/layouts/platform.html"){
|
||||
<div class="chart-card">
|
||||
<div class="chart-header">
|
||||
<span class="chart-title">分工会投稿分布</span>
|
||||
<el-tooltip content="数据更新时间:2024-02-24" placement="top">
|
||||
<i class="el-icon-info"></i>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div id="pieChart" class="chart"></div>
|
||||
</div>
|
||||
<div class="chart-card">
|
||||
<div class="chart-header">
|
||||
<span class="chart-title">社团投稿分布</span>
|
||||
</div>
|
||||
<div id="clubPieChart" class="chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 排行榜 -->
|
||||
@@ -208,7 +216,8 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
let trendChart,
|
||||
distributionChart = null
|
||||
distributionChart,
|
||||
clubDistributionChart = null
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
@@ -216,10 +225,11 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
statCards: [],
|
||||
pageForm: {
|
||||
dateRange: "",
|
||||
department: ""
|
||||
dateRange: [],
|
||||
unionId: "",
|
||||
clubId: ""
|
||||
},
|
||||
departments: [],
|
||||
unionOptions: [],
|
||||
clubOptions: [],
|
||||
trendType: "month",
|
||||
rankingTab: "person",
|
||||
@@ -249,15 +259,27 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {},
|
||||
resetSearch() {},
|
||||
doSearch() {
|
||||
this.initTrendChart()
|
||||
this.initDistributionChart()
|
||||
this.initClubDistributionChart()
|
||||
this.overview()
|
||||
},
|
||||
resetSearch() {
|
||||
this.$set(this.pageForm, "dateRange", [])
|
||||
this.$set(this.pageForm, "unionId", "")
|
||||
this.$set(this.pageForm, "clubId", "")
|
||||
this.doSearch()
|
||||
},
|
||||
initTrendChart() {
|
||||
// 趋势图数据
|
||||
this.$axios
|
||||
.post("/platform/article/analysis/trend", {
|
||||
type: this.trendType,
|
||||
startDate: this.pageForm.dateRange[0],
|
||||
endDate: this.pageForm.dateRange[1]
|
||||
endDate: this.pageForm.dateRange[1],
|
||||
unionId: this.pageForm.unionId,
|
||||
clubId: this.pageForm.clubId
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
@@ -312,7 +334,9 @@ layout("/layouts/platform.html"){
|
||||
this.$axios
|
||||
.post("/platform/article/analysis/distribution", {
|
||||
startDate: this.pageForm.dateRange[0],
|
||||
endDate: this.pageForm.dateRange[1]
|
||||
endDate: this.pageForm.dateRange[1],
|
||||
unionId: this.pageForm.unionId,
|
||||
clubId: this.pageForm.clubId
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
@@ -333,6 +357,32 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
|
||||
initClubDistributionChart() {
|
||||
this.$axios
|
||||
.post("/platform/article/analysis/clubDistribution", {
|
||||
startDate: this.pageForm.dateRange[0],
|
||||
endDate: this.pageForm.dateRange[1],
|
||||
unionId: this.pageForm.unionId,
|
||||
clubId: this.pageForm.clubId
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
clubDistributionChart && clubDistributionChart.destroy()
|
||||
clubDistributionChart = new G2Plot.Pie("clubPieChart", {
|
||||
data: res.data,
|
||||
angleField: "value",
|
||||
colorField: "type",
|
||||
radius: 0.8,
|
||||
label: {
|
||||
type: "outer",
|
||||
content: "{name} {percentage}"
|
||||
}
|
||||
})
|
||||
clubDistributionChart.render()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
loadRankingData() {
|
||||
this.rankingData =
|
||||
this.rankingTab === "person"
|
||||
@@ -361,7 +411,12 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
overview() {
|
||||
this.$axios.post("/platform/article/analysis/overview").then((res) => {
|
||||
this.$axios.post("/platform/article/analysis/overview", {
|
||||
startDate: this.pageForm.dateRange[0],
|
||||
endDate: this.pageForm.dateRange[1],
|
||||
unionId: this.pageForm.unionId,
|
||||
clubId: this.pageForm.clubId
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.statCards = res.data
|
||||
}
|
||||
@@ -371,12 +426,13 @@ layout("/layouts/platform.html"){
|
||||
mounted() {
|
||||
this.initTrendChart()
|
||||
this.initDistributionChart()
|
||||
this.initClubDistributionChart()
|
||||
this.loadRankingData()
|
||||
this.overview()
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listClub().then((res) => (this.clubOptions = res))
|
||||
this.$businessTool.listUnit().then((res) => (this.departments = res))
|
||||
this.$businessTool.listClub().then((res) => this.$set(this, "clubOptions", res))
|
||||
this.$businessTool.listUnion().then((res) => this.$set(this, "unionOptions", res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+3
-3
@@ -70,10 +70,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</article-info>
|
||||
|
||||
+3
-3
@@ -70,10 +70,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</article-info>
|
||||
|
||||
@@ -70,10 +70,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</article-info>
|
||||
|
||||
+3
-3
@@ -83,7 +83,8 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button type="primary" @click="doApproval('PASS')">通过</el-button>
|
||||
<!-- <el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button>-->
|
||||
<el-button type="danger" @click="doApproval('BACK_TO_START')">退回到投稿人</el-button>
|
||||
<el-button type="danger" @click="doApproval('BACK_TO_UNION')"
|
||||
v-if="currentRow.origin === 'ARTICLE_ORIGIN_UNION'">退回到分工会
|
||||
@@ -91,8 +92,7 @@ layout("/layouts/platform.html"){
|
||||
<el-button type="danger" @click="doApproval('BACK_TO_CLUB')"
|
||||
v-if="currentRow.origin === 'ARTICLE_ORIGIN_CLUB'">退回到社团
|
||||
</el-button>
|
||||
<!-- <el-button type="danger" @click="doApproval('REJECT')">拒绝</el-button>-->
|
||||
<el-button type="primary" @click="doApproval('PASS')">通过</el-button>
|
||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
+3
-3
@@ -70,10 +70,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</article-info>
|
||||
|
||||
@@ -34,6 +34,159 @@ layout("/layouts/platform.html"){
|
||||
<material-info ref="materialInfoRef"></material-info>
|
||||
</div>
|
||||
|
||||
<style nonce="${cspNonce!}">
|
||||
.material-write-dialog,
|
||||
.material-view-dialog {
|
||||
max-width: 1080px;
|
||||
margin-top: 7vh !important;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.material-write-dialog .el-dialog__header,
|
||||
.material-view-dialog .el-dialog__header {
|
||||
padding: 14px 16px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.material-write-dialog .el-dialog__title,
|
||||
.material-view-dialog .el-dialog__title {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.material-write-dialog .el-dialog__body,
|
||||
.material-view-dialog .el-dialog__body {
|
||||
max-height: calc(86vh - 112px);
|
||||
padding: 14px 16px 16px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.material-write-dialog .time-warning {
|
||||
margin: 0 0 12px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid #ffd8d8;
|
||||
border-left: 3px solid #f56c6c;
|
||||
border-radius: 3px;
|
||||
background: #fff7f7;
|
||||
color: #cf1322;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.material-write-dialog .upload-list,
|
||||
.material-view-dialog .upload-list {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.material-write-dialog .upload-item,
|
||||
.material-view-dialog .upload-item {
|
||||
margin-bottom: 12px;
|
||||
padding: 14px;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 6px;
|
||||
background: #ffffff;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.material-write-dialog .upload-item:first-child,
|
||||
.material-view-dialog .upload-item:first-child {
|
||||
border-color: #5b9ef4;
|
||||
}
|
||||
|
||||
.material-write-dialog .upload-item:hover,
|
||||
.material-view-dialog .upload-item:hover {
|
||||
border-color: #5b9ef4;
|
||||
box-shadow: 0 2px 8px rgba(64, 158, 255, 0.1);
|
||||
}
|
||||
|
||||
.material-write-dialog .upload-item-title,
|
||||
.material-view-dialog .upload-item-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
margin-bottom: 10px;
|
||||
color: #303133;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.material-write-dialog .upload-item-title i,
|
||||
.material-view-dialog .upload-item-title i {
|
||||
color: #1677c8;
|
||||
}
|
||||
|
||||
.material-write-dialog .upload-hint {
|
||||
margin-bottom: 10px;
|
||||
padding: 8px 10px;
|
||||
border-left: 2px solid #409eff;
|
||||
border-radius: 2px;
|
||||
background: #eff6ff;
|
||||
color: #5f6b7a;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.material-write-dialog .upload-hint a {
|
||||
color: #1677c8;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.material-write-dialog .upload-hint a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.material-write-dialog .el-upload__tip {
|
||||
margin-top: 7px;
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.material-write-dialog .notice-box {
|
||||
margin: 14px 0 0;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid #ffe3a0;
|
||||
border-left: 3px solid #e6a23c;
|
||||
border-radius: 3px;
|
||||
background: #fff9e8;
|
||||
color: #7a5a17;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.material-write-dialog .notice-box i {
|
||||
margin-right: 6px;
|
||||
color: #e6a23c;
|
||||
}
|
||||
|
||||
.material-write-dialog .el-dialog__footer {
|
||||
padding: 10px 16px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.material-write-dialog,
|
||||
.material-view-dialog {
|
||||
width: calc(100% - 24px) !important;
|
||||
margin-top: 12px !important;
|
||||
}
|
||||
|
||||
.material-write-dialog .el-dialog__body,
|
||||
.material-view-dialog .el-dialog__body {
|
||||
max-height: calc(100vh - 118px);
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.material-write-dialog .upload-item,
|
||||
.material-view-dialog .upload-item {
|
||||
padding: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("write.js"){}#-->
|
||||
<!--#include("./query/info.js"){}#-->
|
||||
|
||||
+5
-1
@@ -14,7 +14,7 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="数据列表">
|
||||
<el-button size="small" type="primary" icon="el-icon-download" @click="exportZip">导出汇总表</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-download" @click="exportZip">导出汇总表Zip</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
@@ -71,6 +71,10 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
exportZip(){
|
||||
if (!this.pageForm.actId) {
|
||||
this.$message.warning("请先选择评比事项")
|
||||
return
|
||||
}
|
||||
this.$downLoad('/platform/buildHome/material/query/exportZip', this.pageForm)
|
||||
}
|
||||
},
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog title="查看详情" :visible.sync="visible" width="50%">
|
||||
<el-dialog title="查看详情" :visible.sync="visible" width="80%" custom-class="material-view-dialog">
|
||||
<div class="upload-list">
|
||||
<div class="upload-item">
|
||||
<div class="upload-item-title">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const write = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog :title="dialogTitle" :visible.sync="visible" width="70%">
|
||||
<el-dialog :title="dialogTitle" :visible.sync="visible" width="80%" custom-class="material-write-dialog">
|
||||
|
||||
<div class="time-warning" v-if="activity && !isWithinTimeRange">
|
||||
当前时间不在提交时间范围内,无法提交材料。提交时间:
|
||||
@@ -94,8 +94,6 @@ const write = {
|
||||
<strong>重要提示:</strong>
|
||||
建家记录册、教职工之家建设考核评议自评表需由党委主要负责人签字盖章后扫描件上传
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" :disabled="!isWithinTimeRange">提交评比材料</el-button>
|
||||
|
||||
+3
-3
@@ -108,10 +108,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</cadre-training-info>
|
||||
|
||||
+16
-34
@@ -65,7 +65,7 @@ const signForm = {
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" @click="removeTeamUser(scope.$index)">删除
|
||||
<el-button v-if="!scope.row.id" type="danger" size="mini" @click="removeTeamUser(scope.$index)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -74,7 +74,7 @@ const signForm = {
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onConfirm" :loading="submitLoading"
|
||||
:disabled="teamUsers.length === 0 ">确认报名
|
||||
:disabled="pendingTeamUsers.length === 0 ">确认报名
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
@@ -88,7 +88,7 @@ const signForm = {
|
||||
dialogVisible: false,
|
||||
viewData: {},
|
||||
id: null,
|
||||
//表格用户(实际上只包含当前用户)
|
||||
// 表格同时展示已报名人员和本次新增人员
|
||||
teamUsers: [],
|
||||
quota: 0, // 报名名额限制
|
||||
signedUsers: [], // 已报名人员列表
|
||||
@@ -97,6 +97,10 @@ const signForm = {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 仅未保存的人员需要参与本次提交和名额校验。
|
||||
pendingTeamUsers() {
|
||||
return this.teamUsers.filter(user => !user.id)
|
||||
},
|
||||
remainingQuota() {
|
||||
// 如果 quota 为 null 或 undefined,显示"不限"
|
||||
if (this.quota == null || this.quota === 0) return "不限"
|
||||
@@ -143,7 +147,7 @@ const signForm = {
|
||||
this.$message.error("请勿重复添加")
|
||||
return
|
||||
}
|
||||
if (this.quota > 0 && (this.signedUsers.length + this.teamUsers.length) >= this.quota) {
|
||||
if (this.quota > 0 && (this.signedUsers.length + this.pendingTeamUsers.length) >= this.quota) {
|
||||
this.$message.error("已达到报名人数上限")
|
||||
return
|
||||
}
|
||||
@@ -164,28 +168,12 @@ const signForm = {
|
||||
if (signedResponse.code === 0) {
|
||||
this.signedUsers = Array.isArray(signedResponse.data) ? signedResponse.data : []
|
||||
|
||||
// 已报名人员必须回显,避免分工会主席无法查看已代报记录。
|
||||
this.teamUsers = this.signedUsers.slice()
|
||||
|
||||
// 检查当前用户是否已报名
|
||||
const currentUser = this.signedUsers.find(user => user.userId === this.$store.state.user.id)
|
||||
this.isSignUp = !!currentUser
|
||||
|
||||
// 显示当前用户信息
|
||||
if (currentUser) {
|
||||
this.teamUsers = this.signedUsers;
|
||||
} else {
|
||||
// 如果当前用户未报名,显示当前用户信息用于报名
|
||||
this.teamUsers = [{
|
||||
userId: this.$store.state.user.id,
|
||||
userName: this.$store.state.user.username,
|
||||
loginName: this.$store.state.user.loginname,
|
||||
unitId: this.$store.state.user?.unit?.id,
|
||||
unitName: this.$store.state.user?.unit?.name,
|
||||
unionId: this.$store.state.user?.union?.id,
|
||||
unionName: this.$store.state.user?.union?.name,
|
||||
sex: this.$store.state.user.sex,
|
||||
mobile: this.$store.state.user.mobile,
|
||||
remark: ''
|
||||
}]
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
this.$message.error("获取用户数据失败")
|
||||
@@ -215,20 +203,14 @@ const signForm = {
|
||||
|
||||
//提交报名
|
||||
async onConfirm() {
|
||||
// 检查是否已报名(仅当当前用户已报名时)
|
||||
if (this.isSignUp && this.teamUsers.some(user => user.userId === this.$store.state.user.id)) {
|
||||
this.$message.warning("您已报名该活动!")
|
||||
return
|
||||
}
|
||||
|
||||
// 检查是否有报名人员
|
||||
if (this.teamUsers.length === 0) {
|
||||
// 检查是否有新增报名人员
|
||||
if (this.pendingTeamUsers.length === 0) {
|
||||
this.$message.warning("请至少添加一名报名人员!")
|
||||
return
|
||||
}
|
||||
|
||||
// 检查名额是否足够
|
||||
if (this.quota > 0 && (this.signedUsers.length + this.teamUsers.length) > this.quota) {
|
||||
if (this.quota > 0 && (this.signedUsers.length + this.pendingTeamUsers.length) > this.quota) {
|
||||
// 添加空值检查
|
||||
const remaining = this.quota ? this.quota - this.signedUsers.length : 0;
|
||||
this.$message.warning('报名人数超过限额!当前还可报名' + remaining + '人');
|
||||
@@ -239,13 +221,13 @@ const signForm = {
|
||||
try {
|
||||
this.submitLoading = true;
|
||||
|
||||
this.$confirm('您确定要为' + this.teamUsers.length + '人报名吗?', "提示", { confirmButtonText: "确定",
|
||||
this.$confirm('您确定要为' + this.pendingTeamUsers.length + '人报名吗?', "提示", { confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
try {
|
||||
// 构造报名数据数组
|
||||
const signUpDataArray = this.teamUsers.map(user => {
|
||||
const signUpDataArray = this.pendingTeamUsers.map(user => {
|
||||
return {
|
||||
cadreTrainingActId: this.id,
|
||||
userId: user.userId,
|
||||
|
||||
+3
-3
@@ -107,10 +107,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</enrollment-registration-info>
|
||||
|
||||
+3
-3
@@ -91,10 +91,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</enrollment-registration-info>
|
||||
|
||||
+3
-3
@@ -82,10 +82,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -90,10 +90,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</info>
|
||||
|
||||
+3
-3
@@ -66,10 +66,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</fund-member-info>
|
||||
|
||||
+3
-3
@@ -77,10 +77,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</fund-member-info>
|
||||
|
||||
+11
-8
@@ -2,10 +2,12 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/meeting-list-layout.css">
|
||||
|
||||
<el-card shadow="never">
|
||||
<div id="app">
|
||||
<guava ref="guava" class="meeting-list-layout">
|
||||
|
||||
<el-card shadow="never" class="meeting-search-card">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -35,14 +37,15 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<el-card shadow="never" class="meeting-table-card">
|
||||
<table-tool label="申请列表">
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table class="meeting-main-table" height="100%" v-loading="tableLoading"
|
||||
:data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
@@ -87,10 +90,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</leave-info>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/meeting-list-layout.css">
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<guava ref="guava" class="meeting-list-layout">
|
||||
<el-card shadow="never" class="meeting-search-card">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -33,9 +35,10 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<el-card shadow="never" class="meeting-table-card">
|
||||
<table-tool label="申请列表"></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table class="meeting-main-table" height="100%" v-loading="tableLoading"
|
||||
:data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
|
||||
@@ -246,7 +246,7 @@ const basicForm = {
|
||||
// 民主管理模块才需要按教代会届次筛选人员。
|
||||
isDemocraticModule() {
|
||||
const module = this.moduleOptions.find((item) => item.id === this.pageForm.moduleId)
|
||||
return module && module.name === '民主管理'
|
||||
return module && module.name === '提案工作'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/meeting-list-layout.css">
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<guava ref="guava" class="meeting-list-layout">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-card shadow="never" class="meeting-search-card">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -30,14 +32,15 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-card shadow="never" class="meeting-table-card">
|
||||
<table-tool label="会议列表">
|
||||
<el-button type="primary" size="small" @click="onAdd">
|
||||
<i class="ti-plus"></i>
|
||||
新增会议
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||
<el-table class="meeting-main-table" height="100%" v-loading="tableLoading"
|
||||
:data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/meeting-list-layout.css">
|
||||
|
||||
<style>
|
||||
.timePeriod_card {
|
||||
border-top: 5px solid #106898;
|
||||
@@ -15,9 +17,9 @@ layout("/layouts/platform.html"){
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<guava ref="guava" class="meeting-list-layout">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-card shadow="never" class="meeting-search-card">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -47,9 +49,10 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-card shadow="never" class="meeting-table-card">
|
||||
<table-tool label="会议列表"></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize" ref="meetingTable">
|
||||
<el-table class="meeting-main-table" height="100%" v-loading="tableLoading"
|
||||
:data="tableData" @sort-change="pageOrder" :size="tableSize" ref="meetingTable">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="{ row }">
|
||||
<el-row :gutter="20" justify="start" style="flex-wrap: wrap" type="flex"
|
||||
@@ -62,9 +65,12 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item label="结束时间">{{tp.endTime}}</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="space-around" style="border-top: 1px solid #ebeef5;padding: 10px 0 0 0" type="flex">
|
||||
<el-button v-if="tp.joinStatus === true" @click="onLeave(tp)" size="medium" type="text">请假</el-button>
|
||||
<el-button v-if="tp.joinStatus === true" :disabled="isMeetingHandled(tp)"
|
||||
@click="onLeave(tp)" size="medium" type="text">请假</el-button>
|
||||
<el-button v-if="tp.joinStatus === false" size="medium" type="text" disabled>您已请假</el-button>
|
||||
<el-button v-if="tp.signStatus === false" :disabled="isSignDisabled(tp.startTime)" @click="onSign(tp)" size="medium" type="text">签到</el-button>
|
||||
<el-button v-if="tp.signStatus === false"
|
||||
:disabled="isMeetingHandled(tp) || isSignDisabled(tp.startTime)"
|
||||
@click="onSign(tp)" size="medium" type="text">签到</el-button>
|
||||
<el-button v-if="tp.signStatus === true" size="medium" type="text" disabled>您已签到</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -127,11 +133,19 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 已请假或已签到后同时禁用请假、签到按钮,避免继续发起互斥操作。
|
||||
isMeetingHandled(timePeriod) {
|
||||
return timePeriod.joinStatus === false || timePeriod.signStatus === true
|
||||
},
|
||||
// 场次开始前禁用签到,避免用户在会议开始前提交签到操作。
|
||||
isSignDisabled(startTime) {
|
||||
return this.$moment().isBefore(this.$moment(startTime))
|
||||
},
|
||||
onLeave(row) {
|
||||
if (this.isMeetingHandled(row)) {
|
||||
this.$message.warning(row.signStatus === true ? '您已签到,不能请假' : '您已请假,请勿重复操作')
|
||||
return
|
||||
}
|
||||
if(!row.canLeave) {
|
||||
this.$message.warning('该场次不能请假')
|
||||
return
|
||||
@@ -159,6 +173,10 @@ layout("/layouts/platform.html"){
|
||||
}).catch(() => {})
|
||||
},
|
||||
onSign(row) {
|
||||
if (this.isMeetingHandled(row)) {
|
||||
this.$message.warning(row.signStatus === true ? '您已签到,请勿重复操作' : '您已请假,不能签到')
|
||||
return
|
||||
}
|
||||
this.$confirm('您确定要签到吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/meeting-list-layout.css">
|
||||
|
||||
<style>
|
||||
.qrcode {
|
||||
min-width: 240px;
|
||||
@@ -70,9 +72,9 @@ layout("/layouts/platform.html"){
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<guava ref="guava" class="meeting-list-layout">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-card shadow="never" class="meeting-search-card">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -102,9 +104,10 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-card shadow="never" class="meeting-table-card">
|
||||
<table-tool label="会议列表"></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize" ref="meetingTable">
|
||||
<el-table class="meeting-main-table" height="100%" v-loading="tableLoading"
|
||||
:data="tableData" @sort-change="pageOrder" :size="tableSize" ref="meetingTable">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="{ row }">
|
||||
<el-row :gutter="20" justify="start" style="flex-wrap: wrap" type="flex"
|
||||
@@ -179,15 +182,20 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="userData" :max-height="signTableHeight" class="mt20" ref="signTable">
|
||||
<el-table :data="userData"
|
||||
:max-height="signTableHeight"
|
||||
:default-sort="{prop: 'signRank', order: 'descending'}"
|
||||
@sort-change="changeSignRankOrder"
|
||||
class="mt20"
|
||||
ref="signTable">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="签到时间" prop="signTime"></el-table-column>
|
||||
<el-table-column label="签到名次">
|
||||
<el-table-column label="签到名次" prop="signRank" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{userData.length - scope.$index}}
|
||||
{{scope.row.signRank}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -224,6 +232,7 @@ layout("/layouts/platform.html"){
|
||||
lastTimeData: [],
|
||||
realTimeData: [],
|
||||
userData: [],
|
||||
signRankOrder: 'descending',
|
||||
signTableHeight: 600
|
||||
}
|
||||
},
|
||||
@@ -261,22 +270,39 @@ layout("/layouts/platform.html"){
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getRealTimeData() {
|
||||
this.lastTimeData = clone(this.realTimeData)
|
||||
const resp = await this.$axios.post('/platform/meeting/online/getRealTimeData/' + this.timePeriodId)
|
||||
if (resp.code === 0) {
|
||||
this.lastTimeData = clone(this.realTimeData)
|
||||
this.$set(this, 'realTimeData', resp.data.countData)
|
||||
let ud = clone(this.userData)
|
||||
ud.unshift(...resp.data.userData)
|
||||
let uMap = new Map()
|
||||
for (let u of ud) {
|
||||
if (!uMap.has(u.loginName)) {
|
||||
uMap.set(u.loginName, u)
|
||||
}
|
||||
}
|
||||
this.$set(this, 'userData', [...uMap.values()])
|
||||
getRealTimeData() {
|
||||
// 表格初始化可能触发默认排序事件,尚未选择会议时段时不调用实时数据接口。
|
||||
if (!this.timePeriodId) {
|
||||
return
|
||||
}
|
||||
this.lastTimeData = clone(this.realTimeData)
|
||||
const requestOrder = this.signRankOrder
|
||||
this.$axios.post('/platform/meeting/online/getRealTimeData/' + this.timePeriodId, {
|
||||
signRankOrder: requestOrder
|
||||
}).then((resp) => {
|
||||
// 排序切换过程中可能存在尚未返回的轮询请求,旧排序结果不再覆盖当前列表。
|
||||
if (requestOrder !== this.signRankOrder) {
|
||||
return
|
||||
}
|
||||
if (resp.code === 0) {
|
||||
this.lastTimeData = clone(this.realTimeData)
|
||||
this.$set(this, 'realTimeData', resp.data.countData)
|
||||
const rankedUsers = resp.data.userData || []
|
||||
// 后台已按签到时间排序,此处只补充对应的固定签到名次用于页面展示。
|
||||
rankedUsers.forEach((user, index) => {
|
||||
user.signRank = requestOrder === 'ascending' ? index + 1 : rankedUsers.length - index
|
||||
})
|
||||
this.$set(this, 'userData', rankedUsers)
|
||||
}
|
||||
})
|
||||
},
|
||||
changeSignRankOrder({prop, order}) {
|
||||
if (prop !== 'signRank') {
|
||||
return
|
||||
}
|
||||
// Element清除排序时恢复默认的名次降序,并立即重新调用后台查询。
|
||||
this.signRankOrder = order || 'descending'
|
||||
this.getRealTimeData()
|
||||
},
|
||||
startPolling(func) {
|
||||
this.lastTimeData = []
|
||||
|
||||
+11
-8
@@ -2,10 +2,12 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/meeting-list-layout.css">
|
||||
|
||||
<el-card shadow="never">
|
||||
<div id="app">
|
||||
<guava ref="guava" class="meeting-list-layout">
|
||||
|
||||
<el-card shadow="never" class="meeting-search-card">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -35,14 +37,15 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<el-card shadow="never" class="meeting-table-card">
|
||||
<table-tool label="申请列表">
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table class="meeting-main-table" height="100%" v-loading="tableLoading"
|
||||
:data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
@@ -87,10 +90,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</leave-info>
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/meeting-list-layout.css">
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<guava ref="guava" class="meeting-list-layout">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-card shadow="never" class="meeting-search-card">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -39,9 +41,10 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-card shadow="never" class="meeting-table-card">
|
||||
<table-tool label="会议列表"></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize" ref="meetingTable">
|
||||
<el-table class="meeting-main-table" height="100%" v-loading="tableLoading"
|
||||
:data="tableData" @sort-change="pageOrder" :size="tableSize" ref="meetingTable">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
|
||||
+240
-84
@@ -1,86 +1,108 @@
|
||||
const periodsInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-alert title="可点击表格中的数字查看具体人员名单" type="info" effect="dark" class="mb20" :closable="false" show-icon></el-alert>
|
||||
<el-table ref="periodsTable" :data="periodsTableData" :size="tableSize" @cell-click="handleCellClick">
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
:class-name="column.className"
|
||||
v-if="!column.condition || column.condition.includes(typeOptions.find(o => o.id === selectRow.typeId)?.designId)"
|
||||
v-for="column in periodsTableColumns"
|
||||
>
|
||||
<template slot-scope="{ row }">
|
||||
<el-link v-if="column.className && column.className === 'export-column'"
|
||||
@click="onUser(row, column.prop)" type="primary">
|
||||
{{ row[column.prop] }}
|
||||
</el-link>
|
||||
<span v-else-if="column.prop === 'proportionNum'">
|
||||
{{ proportionNum(row.comeCount, row.totalCount) }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ row[column.prop] }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="160">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button @click="exportUser(row)" size="mini" type="primary">导出人员</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="meeting-statistics-detail">
|
||||
<section class="statistics-panel periods-panel">
|
||||
<table-tool label="会议列表"></table-tool>
|
||||
<div class="periods-tip">点击【**人数】可查看对应【人员名单】列表</div>
|
||||
<div class="periods-table-wrap">
|
||||
<el-table ref="periodsTable"
|
||||
:data="periodsTableData"
|
||||
:size="tableSize"
|
||||
height="100%"
|
||||
@cell-click="handleCellClick">
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
:class-name="column.className"
|
||||
v-if="!column.condition || column.condition.includes(typeOptions.find(o => o.id === selectRow.typeId)?.designId)"
|
||||
v-for="column in periodsTableColumns"
|
||||
>
|
||||
<template slot-scope="{ row }">
|
||||
<el-link v-if="column.className && column.className === 'export-column'"
|
||||
@click.stop="selectUserList(row, column.prop, column.label)" type="primary">
|
||||
{{ row[column.prop] }}
|
||||
</el-link>
|
||||
<span v-else-if="column.prop === 'proportionNum'">
|
||||
{{ proportionNum(row.comeCount, row.totalCount) }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ row[column.prop] }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="120">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button @click="exportUser(row)" size="mini" type="primary">导出人员</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-alert :title="tooltip + '人员名单'" type="info" effect="dark" class="mt20 mb20" :closable="false" show-icon></el-alert>
|
||||
<div style="padding: 20px; border-radius: 8px; border: 1px solid #ebeef5">
|
||||
<search @search="doSearch">
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||
@change="doSearch" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitList"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</div>
|
||||
<el-table :data="userTableData" :row-key="(row)=>{row.id}" :size="tableSize" class="mt20">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
<section class="statistics-panel users-panel">
|
||||
<table-tool :label="tooltip + '人员名单'"></table-tool>
|
||||
<div class="person-search">
|
||||
<search @search="doSearch">
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||
@change="doSearch" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitList"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</div>
|
||||
<div class="users-table-wrap">
|
||||
<el-table ref="userTable"
|
||||
:data="userTableData"
|
||||
:row-key="(row)=>{row.id}"
|
||||
:size="tableSize"
|
||||
v-loading="userTableLoading"
|
||||
element-loading-text="数据加载中"
|
||||
height="100%">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="users-pagination">
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</div>
|
||||
</section>
|
||||
<slot></slot>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
@@ -124,6 +146,8 @@ const periodsInfo = {
|
||||
{prop: 'proportionNum', label: '人数比例', width: 100},
|
||||
],
|
||||
userTableData: [],
|
||||
userTableLoading: false,
|
||||
userRequestSerial: 0,
|
||||
tooltip: '',
|
||||
|
||||
selectPeriodRow: {},
|
||||
@@ -135,11 +159,20 @@ const periodsInfo = {
|
||||
if (!cell.classList.contains('export-column')) {
|
||||
return; // 不是目标列,直接返回
|
||||
}
|
||||
this.onUser(row, column.property)
|
||||
this.tooltip = '【' + row.periodName + '-' + column.label + '】'
|
||||
this.selectUserList(row, column.property, column.label)
|
||||
},
|
||||
selectUserList(row, type, label) {
|
||||
// 人数链接阻止事件冒泡后统一从此处查询,避免链接点击与单元格点击重复请求人员接口。
|
||||
this.tooltip = '【' + row.periodName + '-' + label + '】'
|
||||
this.onUser(row, type)
|
||||
},
|
||||
onOpen(row) {
|
||||
this.selectRow = row
|
||||
// 打开新的会议统计详情时重置人员查询状态,避免残留上一次查看的数据。
|
||||
this.userRequestSerial++
|
||||
this.userTableLoading = false
|
||||
this.userTableData = []
|
||||
this.pageForm.totalCount = 0
|
||||
this.$axios.post(loc() + '/view', {meetingId: row.id})
|
||||
.then((res) => {
|
||||
this.periodsTableData = res.data
|
||||
@@ -150,6 +183,17 @@ const periodsInfo = {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.onUser()
|
||||
},
|
||||
pageNumberChange(pageNumber) {
|
||||
// 人员名单分页必须继续使用当前会议时段和人数类型查询,不能调用通用会议分页接口。
|
||||
this.pageForm.pageNumber = pageNumber
|
||||
this.onUser()
|
||||
},
|
||||
pageSizeChange(pageSize) {
|
||||
// 切换每页条数后从第一页重新查询,并复用人员表格的加载及防并发覆盖逻辑。
|
||||
this.pageForm.pageSize = pageSize
|
||||
this.pageForm.pageNumber = 1
|
||||
this.onUser()
|
||||
},
|
||||
onUser(row, type) {
|
||||
this.selectPeriodRow = row || this.selectPeriodRow
|
||||
this.selectUserType = type || this.selectUserType
|
||||
@@ -158,11 +202,25 @@ const periodsInfo = {
|
||||
this.$set(this.pageForm, 'meetingId', this.selectPeriodRow.meetingId)
|
||||
this.$set(this.pageForm, 'periodId', this.selectPeriodRow.id)
|
||||
|
||||
// 每次查询分配递增序号,快速切换人数类型时仅允许最后一次请求更新列表。
|
||||
const requestSerial = ++this.userRequestSerial
|
||||
this.userTableLoading = true
|
||||
this.userTableData = []
|
||||
this.pageForm.totalCount = 0
|
||||
this.$axios.post(loc() + "/queryUserTable", this.pageForm).then((res) => {
|
||||
if (requestSerial !== this.userRequestSerial) {
|
||||
return
|
||||
}
|
||||
if (res.code === 0) {
|
||||
this.userTableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
this.userTableLoading = false
|
||||
}, () => {
|
||||
// 接口异常时只关闭当前有效请求的加载状态,旧请求不影响新请求的转圈提示。
|
||||
if (requestSerial === this.userRequestSerial) {
|
||||
this.userTableLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
exportUser(row) {
|
||||
@@ -179,8 +237,106 @@ const periodsInfo = {
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.el-alert__icon {
|
||||
color: #006DB9;
|
||||
.meeting-statistics-detail {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .statistics-panel {
|
||||
min-height: 0;
|
||||
padding: 14px 16px;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .periods-panel {
|
||||
flex: 0 0 260px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .users-panel {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .ele-table-tool {
|
||||
flex: 0 0 38px;
|
||||
min-height: 38px;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .periods-tip {
|
||||
flex: 0 0 22px;
|
||||
color: #f56c6c;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .periods-table-wrap,
|
||||
.meeting-statistics-detail .users-table-wrap {
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .periods-table-wrap {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .person-search {
|
||||
flex: 0 0 auto;
|
||||
padding: 12px 16px;
|
||||
border: 1px solid #e4ebf5;
|
||||
border-radius: 6px;
|
||||
background: #f5f9ff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .person-search .search {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .users-table-wrap {
|
||||
flex: 1 1 0;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .users-pagination {
|
||||
flex: 0 0 64px;
|
||||
min-height: 64px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
overflow: visible;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .users-pagination .el-pagination-container {
|
||||
width: 100%;
|
||||
margin-top: 12px !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .el-table__body-wrapper {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@media (max-height: 760px) {
|
||||
.meeting-statistics-detail .periods-panel {
|
||||
flex-basis: 230px;
|
||||
}
|
||||
|
||||
.meeting-statistics-detail .statistics-panel {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/meeting-list-layout.css">
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<guava ref="guava" class="meeting-list-layout">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-card shadow="never" class="meeting-search-card">
|
||||
<search @search="doSearch">
|
||||
<search-item label="名称/编码">
|
||||
<el-input placeholder="请输入名称或编码" clearable v-model="pageForm.searchKeyword"
|
||||
@@ -19,14 +21,15 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-card shadow="never" class="meeting-table-card">
|
||||
<table-tool label="类型列表">
|
||||
<el-button type="primary" size="small" @click="onAdd">
|
||||
<i class="ti-plus"></i>
|
||||
新增类型
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||
<el-table class="meeting-main-table" height="100%" v-loading="tableLoading"
|
||||
:data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
|
||||
+3
-3
@@ -127,10 +127,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</activity-budget-info>
|
||||
|
||||
+3
-3
@@ -127,10 +127,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</activity-budget-info>
|
||||
|
||||
+14
-8
@@ -1,11 +1,15 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="outlay-union-fixed-list-page">
|
||||
<el-card class="outlay-union-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -38,7 +42,7 @@ layout("/layouts/platform.html"){
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-card class="outlay-union-fixed-list-card mt10" shadow="never">
|
||||
<table-tool label="预算分配">
|
||||
<el-button @click="showBatchAllocateDialog" size="small" type="primary" :loading="formLoading">一键分配
|
||||
</el-button>
|
||||
@@ -51,7 +55,7 @@ layout("/layouts/platform.html"){
|
||||
<el-button @click="deleteAllocateRecord" size="small" type="danger" :loading="formLoading">重置分配记录
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||
<el-table ref="tableRef" :data="tableData" :height="tableHeight" style="width: 100%" row-key="id"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
|
||||
<el-table-column type="index" :index="indexMethod" label="序号"
|
||||
@@ -100,6 +104,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-dialog title="一键分配所有工会额度" :visible.sync="batchAllocateDialogVisible" width="700px">
|
||||
<el-form :model="batchAllocateForm" label-width="120px">
|
||||
@@ -137,8 +142,8 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column type="index" label="序号" width="60"></el-table-column>
|
||||
<el-table-column prop="unionCode" label="工会编码" min-width="120"></el-table-column>
|
||||
<el-table-column prop="unionName" label="工会名称" min-width="160"></el-table-column>
|
||||
<el-table-column prop="allocateMoney" label="分配额度" min-width="120"></el-table-column>
|
||||
<el-table-column prop="errMsg" label="校验结果" min-width="180">
|
||||
<el-table-column prop="allocateMoney" label="年初数" min-width="120"></el-table-column>
|
||||
<el-table-column prop="errMsg" label="经费余额" min-width="180">
|
||||
<template slot-scope="{row}">
|
||||
<span class="text-danger" v-if="row.errMsg">{{row.errMsg}}</span>
|
||||
<span class="text-success" v-else>通过</span>
|
||||
@@ -193,10 +198,11 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, OUTLAY_UNION_FIXED_LIST_MIXIN],
|
||||
dicts: ["OUTLAY_QUARTERLY"],
|
||||
data() {
|
||||
return {
|
||||
@@ -208,8 +214,8 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'year', label: '年度'},
|
||||
{prop: 'quarterly', label: '分配项目'},
|
||||
{prop: 'unionName', label: '工会名称'},
|
||||
{prop: 'allocateHeadMoney', label: '分配前额度'},
|
||||
{prop: 'allocateMoney', label: '分配额度'},
|
||||
{prop: 'allocateHeadMoney', label: '年初数'},
|
||||
{prop: 'allocateMoney', label: '经费额度'},
|
||||
],
|
||||
periodList: [],
|
||||
batchAllocateDialogVisible: false,
|
||||
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 分工会预算列表页统一布局:页面固定占满平台内容区,
|
||||
* 查询区和工具栏保持原高度,超出的数据仅在表格内部滚动。
|
||||
*/
|
||||
#app .outlay-union-fixed-list-page {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100vh - 82px);
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#app .outlay-union-fixed-query-card {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
#app .outlay-union-fixed-list-card {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#app .outlay-union-fixed-list-card > .el-card__body {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#app .outlay-union-fixed-list-card .ele-table-tool,
|
||||
#app .outlay-union-fixed-list-card .el-pagination-container,
|
||||
#app .outlay-union-fixed-list-card .outlay-union-summary-table {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
#app .outlay-union-fixed-list-card .outlay-union-summary-table {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#app .outlay-union-fixed-list-card .outlay-union-summary-table .el-table__body-wrapper {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
/* 合计行单独展示时不显示单元格网格线,避免与上方数据表格的边框重复。 */
|
||||
#app .outlay-union-fixed-list-card .outlay-union-summary-table,
|
||||
#app .outlay-union-fixed-list-card .outlay-union-summary-table::before,
|
||||
#app .outlay-union-fixed-list-card .outlay-union-summary-table::after,
|
||||
#app .outlay-union-fixed-list-card .outlay-union-summary-table .el-table__body,
|
||||
#app .outlay-union-fixed-list-card .outlay-union-summary-table .el-table__body tr,
|
||||
#app .outlay-union-fixed-list-card .outlay-union-summary-table .el-table__body td {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* 合计标签单元格保留完整边框,突出汇总行的起始位置。 */
|
||||
#app .outlay-union-fixed-list-card .outlay-union-summary-table .el-table__body td:first-child {
|
||||
border: 1px solid #ebeef5 !important;
|
||||
}
|
||||
|
||||
#app .outlay-union-fixed-list-card .outlay-union-fixed-table {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 分工会预算列表页统一高度逻辑:表格高度按列表卡片剩余空间动态计算,
|
||||
* 窗口尺寸或平台内容区变化时重新布局,保证分页始终可见。
|
||||
*/
|
||||
const OUTLAY_UNION_FIXED_LIST_MIXIN = {
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 300,
|
||||
outlayUnionResizeObserver: null,
|
||||
outlayUnionResizeHandler: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateOutlayUnionTableHeight() {
|
||||
this.$nextTick(() => {
|
||||
const page = this.$el.querySelector('.outlay-union-fixed-list-page')
|
||||
const cardBody = this.$el.querySelector('.outlay-union-fixed-list-card > .el-card__body')
|
||||
if (!page || !cardBody || cardBody.clientHeight <= 0) {
|
||||
return
|
||||
}
|
||||
const getOuterHeight = (element) => {
|
||||
if (!element) {
|
||||
return 0
|
||||
}
|
||||
const style = window.getComputedStyle(element)
|
||||
return element.offsetHeight
|
||||
+ (parseFloat(style.marginTop) || 0)
|
||||
+ (parseFloat(style.marginBottom) || 0)
|
||||
}
|
||||
const bodyStyle = window.getComputedStyle(cardBody)
|
||||
const bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
|
||||
+ (parseFloat(bodyStyle.paddingBottom) || 0)
|
||||
const tableTool = cardBody.querySelector('.ele-table-tool')
|
||||
const summaryTable = cardBody.querySelector('.outlay-union-summary-table')
|
||||
const pagination = cardBody.querySelector('.el-pagination-container')
|
||||
const reservedHeight = bodyPadding
|
||||
+ getOuterHeight(tableTool)
|
||||
+ getOuterHeight(summaryTable)
|
||||
+ getOuterHeight(pagination)
|
||||
const nextHeight = Math.max(1, Math.floor(cardBody.clientHeight - reservedHeight))
|
||||
if (this.tableHeight !== nextHeight) {
|
||||
this.tableHeight = nextHeight
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.tableRef) {
|
||||
this.$refs.tableRef.doLayout()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.updateOutlayUnionTableHeight()
|
||||
const page = this.$el.querySelector('.outlay-union-fixed-list-page')
|
||||
if (window.ResizeObserver && page) {
|
||||
this.outlayUnionResizeObserver = new ResizeObserver(() => {
|
||||
this.updateOutlayUnionTableHeight()
|
||||
})
|
||||
this.outlayUnionResizeObserver.observe(page)
|
||||
} else {
|
||||
this.outlayUnionResizeHandler = () => {
|
||||
this.updateOutlayUnionTableHeight()
|
||||
}
|
||||
window.addEventListener('resize', this.outlayUnionResizeHandler)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.outlayUnionResizeObserver) {
|
||||
this.outlayUnionResizeObserver.disconnect()
|
||||
}
|
||||
if (this.outlayUnionResizeHandler) {
|
||||
window.removeEventListener('resize', this.outlayUnionResizeHandler)
|
||||
}
|
||||
},
|
||||
}
|
||||
+78
-5
@@ -1,12 +1,16 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
</style>
|
||||
|
||||
|
||||
<div class="platform" id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="outlay-union-fixed-list-page">
|
||||
<el-card class="outlay-union-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -33,11 +37,11 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-card class="outlay-union-fixed-list-card mt10" shadow="never">
|
||||
<table-tool label="经费收支使用情况表">
|
||||
<el-button size="mini" type="primary" @click="doExport">导出</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%" row-key="unionId"
|
||||
<el-table ref="tableRef" :data="tableData" :height="tableHeight" style="width: 100%" row-key="unionId"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table"
|
||||
border>
|
||||
<el-table-column
|
||||
@@ -120,27 +124,95 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
:data="[summaryData]"
|
||||
:show-header="false"
|
||||
v-loading="summaryLoading"
|
||||
class="vi-table outlay-union-summary-table"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="单位"
|
||||
prop="unionName"
|
||||
min-width="140">
|
||||
<template v-slot>合计</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="年初数" prop="beginMoney" min-width="120">
|
||||
<template v-slot="{row}">{{summaryValue('beginMoney', row)}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="1-4月会费" prop="feeJanApr" min-width="120">
|
||||
<template v-slot="{row}">{{summaryValue('feeJanApr', row)}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="5-8月会费" prop="feeMayAug" min-width="120">
|
||||
<template v-slot="{row}">{{summaryValue('feeMayAug', row)}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="9-12月会费" prop="feeSepDec" min-width="120">
|
||||
<template v-slot="{row}">{{summaryValue('feeSepDec', row)}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="评优奖励" prop="awardMoney" min-width="120">
|
||||
<template v-slot="{row}">{{summaryValue('awardMoney', row)}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="1-12月支出" prop="usedMoney" min-width="120">
|
||||
<template v-slot="{row}">{{summaryValue('usedMoney', row)}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="经费余额" prop="remainMoney" min-width="120">
|
||||
<template v-slot="{row}">{{summaryValue('remainMoney', row)}}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, OUTLAY_UNION_FIXED_LIST_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
unionId: ""
|
||||
},
|
||||
unions: []
|
||||
unions: [],
|
||||
summaryData: {},
|
||||
summaryLoading: false,
|
||||
summaryLoaded: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
this.querySummary()
|
||||
},
|
||||
querySummary() {
|
||||
this.summaryLoaded = false
|
||||
this.summaryLoading = true
|
||||
this.$axios.post(loc() + "/summary", {
|
||||
year: this.pageForm.year,
|
||||
unionId: this.pageForm.unionId || ""
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.summaryData = res.data || {}
|
||||
this.summaryLoaded = true
|
||||
}
|
||||
}).finally(() => {
|
||||
this.summaryLoading = false
|
||||
})
|
||||
},
|
||||
summaryValue(prop, row) {
|
||||
if (!this.summaryLoaded) {
|
||||
return ""
|
||||
}
|
||||
return this.formatMoney(row[prop])
|
||||
},
|
||||
formatMoney(value) {
|
||||
return Number(value || 0).toFixed(2)
|
||||
},
|
||||
@@ -154,6 +226,7 @@ layout("/layouts/platform.html"){
|
||||
this.unions = data
|
||||
})
|
||||
this.pageData()
|
||||
this.querySummary()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+8
-5
@@ -2,13 +2,14 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div class="platform" id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="outlay-union-fixed-list-page">
|
||||
<el-card class="outlay-union-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -34,7 +35,7 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-card class="outlay-union-fixed-list-card mt10" shadow="never">
|
||||
<table-tool label="预算分配">
|
||||
<template v-if="pageForm.year===$moment().format('YYYY')">
|
||||
<el-button @click="issuedOutlay" size="small" type="primary" v-if="!isAllocation">年度分配
|
||||
@@ -44,7 +45,7 @@ layout("/layouts/platform.html"){
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||
<el-table ref="tableRef" :data="tableData" :height="tableHeight" style="width: 100%" row-key="id"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
@@ -95,15 +96,17 @@ layout("/layouts/platform.html"){
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, OUTLAY_UNION_FIXED_LIST_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
|
||||
+71
-6
@@ -2,13 +2,14 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
<!--#include("../fixedListLayout.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div class="platform" id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="outlay-union-fixed-list-page">
|
||||
<el-card class="outlay-union-fixed-query-card" shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@@ -35,11 +36,11 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-card class="outlay-union-fixed-list-card mt10" shadow="never">
|
||||
<table-tool label="预算使用情况">
|
||||
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||
<el-table ref="tableRef" :data="tableData" :height="tableHeight" style="width: 100%" row-key="id"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
@@ -71,8 +72,34 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
:data="[summaryData]"
|
||||
:show-header="false"
|
||||
v-loading="summaryLoading"
|
||||
class="vi-table outlay-union-summary-table"
|
||||
style="width: 100%">
|
||||
<el-table-column align="center" header-align="center" label="合计" width="80">
|
||||
<template v-slot>合计</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
min-width="50">
|
||||
<template v-slot="{row}">
|
||||
{{summaryValue(column.prop, row)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="250">
|
||||
<template v-slot></template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
@@ -89,10 +116,11 @@ layout("/layouts/platform.html"){
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("detailInfo.js"){}#-->
|
||||
<!--#include("quarterlyOutlayAllocate.js"){}#-->
|
||||
<!--#include("../fixedListLayout.js"){}#-->
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
mixins: [initTableMixins, OUTLAY_UNION_FIXED_LIST_MIXIN],
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
@@ -106,7 +134,10 @@ layout("/layouts/platform.html"){
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY")
|
||||
},
|
||||
unions: []
|
||||
unions: [],
|
||||
summaryData: {},
|
||||
summaryLoading: false,
|
||||
summaryLoaded: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -114,6 +145,39 @@ layout("/layouts/platform.html"){
|
||||
"outlay-manage-union-quarterly-allocate": OUTLAY_MANAGE_UNION_QUARTERLY_ALLOCATE
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
this.querySummary()
|
||||
},
|
||||
querySummary() {
|
||||
this.summaryLoaded = false
|
||||
this.summaryLoading = true
|
||||
this.$axios.post(loc() + "/summary", {
|
||||
year: this.pageForm.year,
|
||||
unionId: this.pageForm.unionId || ""
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.summaryData = res.data || {}
|
||||
this.summaryLoaded = true
|
||||
}
|
||||
}).finally(() => {
|
||||
this.summaryLoading = false
|
||||
})
|
||||
},
|
||||
summaryValue(prop, row) {
|
||||
if (!this.summaryLoaded) {
|
||||
return ""
|
||||
}
|
||||
if (["totalQuota", "usedQuota", "surplusQuota"].indexOf(prop) < 0) {
|
||||
return ""
|
||||
}
|
||||
return this.formatMoney(row[prop])
|
||||
},
|
||||
formatMoney(value) {
|
||||
return Number(value || 0).toFixed(2)
|
||||
},
|
||||
openAllocateView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.quarterlyAllocate.open(row)
|
||||
@@ -129,6 +193,7 @@ layout("/layouts/platform.html"){
|
||||
async created() {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
this.pageData()
|
||||
this.querySummary()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@ let OUTLAY_MANAGE_UNION_QUARTERLY_ALLOCATE = {
|
||||
:value="row.quarterly"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配前额度" prop="allocateHeadMoney"></el-table-column>
|
||||
<el-table-column label="分配额度" prop="allocateMoney"></el-table-column>
|
||||
<el-table-column label="年初数" prop="allocateHeadMoney"></el-table-column>
|
||||
<el-table-column label="经费额度" prop="allocateMoney"></el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
+3
-3
@@ -91,10 +91,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</outlay-reimburse-info>
|
||||
|
||||
+3
-3
@@ -91,10 +91,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</outlay-reimburse-info>
|
||||
|
||||
+3
-3
@@ -105,10 +105,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</outlay-reimburse-info>
|
||||
|
||||
+3
-3
@@ -123,10 +123,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="openAuditPass" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</outlay-reimburse-info>
|
||||
|
||||
+3
-3
@@ -123,10 +123,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</outlay-reimburse-info>
|
||||
|
||||
+3
-3
@@ -91,10 +91,10 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</outlay-reimburse-info>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user