first commit
This commit is contained in:
@@ -0,0 +1,362 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.v-tree-layout-left {
|
||||
overflow: unset !important;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .v-tree {
|
||||
width: 100%;
|
||||
height: calc(100vh - 170px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.v-tree:hover::-webkit-scrollbar {
|
||||
width: 3px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .custom-tree-node {
|
||||
width: 90%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .v-tree .v-node {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
/*width: 3px;*/
|
||||
/*background-color: transparent;*/
|
||||
display: none;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never" style="height: calc(100vh - 70px)">
|
||||
<tree-layout>
|
||||
<template #tree>
|
||||
<div style="padding:0 20px 20px;">
|
||||
<el-input placeholder="输入关键字进行查找" v-model="filterText"></el-input>
|
||||
</div>
|
||||
|
||||
<el-tree ref="tree" :data="treeData" class="v-tree" v-loading="treeLoading" node-key="id"
|
||||
:props="defaultProps"
|
||||
:default-expanded-keys="['7e3f5fcbc24f442dbb3a6cc9412e7960']" :expand-on-click-node="false"
|
||||
@node-click="handleNodeClick" accordion
|
||||
highlight-current :filter-node-method="filterNode">
|
||||
<div class="custom-tree-node" slot-scope="{ node, data }">
|
||||
|
||||
<div v-if="node.level==1" style="font-size: 16px;" class="v-node"><i
|
||||
class="el-icon-s-home"></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
<div v-if="node.level==2"
|
||||
style="font-size: 15px" :title="data.name" class="v-node">
|
||||
<i class="el-icon-star-on" v-if="checkData.name==data.name"></i>
|
||||
<i class="el-icon-star-off" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="node.level==3"
|
||||
style="font-size: 14px" :title="data.name" class="v-node">
|
||||
<i class="fa fa-dot-circle-o" v-if="checkData.name==data.name"></i>
|
||||
<i class="fa fa-circle-o" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="node.level>3"
|
||||
style="font-size: 14px" :title="data.name" class="v-node">
|
||||
<i class="fa fa-dot-circle-o" v-if="checkData.name==data.name"></i>
|
||||
<i class="fa fa-circle-o" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-tree>
|
||||
|
||||
</template>
|
||||
|
||||
<template v-if="node.level==1">
|
||||
<div v-if="node.level==1" style="padding:0 10px">
|
||||
<el-card shadow="never">
|
||||
<div class="text-right">
|
||||
<el-button size="medium" type="primary" @click="openBasicType()">
|
||||
<i class="el-icon-plus"></i>
|
||||
新建基础类型
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-table :data="basicTypeData" height="656px">
|
||||
<el-table-column label="序号" type="index">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" align="center" label="名称"></el-table-column>
|
||||
<el-table-column prop="code" align="center" label="代码"></el-table-column>
|
||||
<el-table-column prop="note" align="center" show-overflow-tooltip
|
||||
label="备注"></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'edit',data:row}"
|
||||
:disabled="checkData.code==50000||checkData.code==40000">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:row}"
|
||||
:disabled="checkData.code==50000||checkData.code==40000||checkData.code=='jcsjgl'">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change="(val)=>{pageForm.pageSize = val;pageData()}"
|
||||
@current-change="(val)=>{pageForm.pageNumber = val;pageData()}"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
</tree-layout>
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="basicTypeDialog" width="50%">
|
||||
<el-form :model="formData" ref="addForm" :rules="rules" label-width="100px">
|
||||
<el-row gutter="30">
|
||||
<el-form-item label="上级名称" prop="name" label-width="110px">
|
||||
<el-input maxlength="100" disabled :value="checkData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="基础类型名称" prop="name" label-width="110px">
|
||||
<el-input maxlength="100" placeholder="请输入基础类型名称" v-model="formData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="基础类型代码" prop="code" label-width="110px">
|
||||
<el-input maxlength="100" placeholder="请输入基础类型名称" v-model="formData.code"
|
||||
type="text"
|
||||
:disabled="checkData.code==50000||checkData.code==40000||checkData.code=='jcsjgl'"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="基础类型备注" prop="note" label-width="110px">
|
||||
<el-input maxlength="100" placeholder="请输入基础类型备注" v-model="formData.note"
|
||||
type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="display: flex;justify-content:flex-end;margin-top: 30px">
|
||||
<el-button type="primary" :loading="loading" @click="!formData.id?doAddType():doEditType()">提 交
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
checkData: {},
|
||||
filterText: '',
|
||||
treeData: [],
|
||||
basicTypeData: [],
|
||||
tableData: [],
|
||||
treeLoading: true,
|
||||
basicTypeDialog: false,
|
||||
loading: false,
|
||||
defaultProps: {
|
||||
children: 'child',
|
||||
label: 'name',
|
||||
},
|
||||
node: {
|
||||
level: 1
|
||||
},
|
||||
options: [{
|
||||
value: 'ziyuan',
|
||||
label: '资源',
|
||||
children: [{
|
||||
value: 'axure',
|
||||
label: 'Axure Components'
|
||||
}]
|
||||
}],
|
||||
rules: {
|
||||
name: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
code: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'tree-layout': httpVueLoader('/components/plugins/TreeLayout.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand: function (command) {
|
||||
const {type, data} = command
|
||||
if (type == 'edit') {
|
||||
this.openEditType(data)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data.id)
|
||||
}
|
||||
},
|
||||
pageData() {//加载机构数据
|
||||
sublime.showLoadingbar();//显示loading
|
||||
this.tabLoading = true
|
||||
this.pageForm.parentId = this.checkData.id
|
||||
$.post(loc() + "/pageData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();//关闭loading
|
||||
this.tabLoading = false
|
||||
if (data.code == 0) {
|
||||
this.basicTypeData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
filterNode(value, data, node) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1
|
||||
return false
|
||||
},
|
||||
async handleNodeClick(data, node) {
|
||||
this.checkData = data
|
||||
this.checkNode = node
|
||||
console.log(this.checkData)
|
||||
this.pageData()
|
||||
},
|
||||
async loadTree(flush) {
|
||||
this.treeLoading = true
|
||||
const resp = await $.post(loc() + "/getTreeData")
|
||||
this.treeLoading = false
|
||||
if(resp.code===0){
|
||||
this.treeLoading = false
|
||||
this.treeData = resp.data
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
if (flush && resp.code === 0) {
|
||||
this.checkData = resp.data[0]
|
||||
this.pageData();
|
||||
}
|
||||
},
|
||||
async openBasicType() {
|
||||
const {id} = this.checkData
|
||||
this.formData = {
|
||||
parentId: id
|
||||
}
|
||||
this.basicTypeDialog = true
|
||||
if (this.$refs['addForm']) {
|
||||
this.$refs['addForm'].resetFields()
|
||||
}
|
||||
},
|
||||
doAddType() {
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doAdd", this.formData)
|
||||
this.loading = false
|
||||
if(resp.code===0){
|
||||
this.basicTypeDialog = false
|
||||
this.pageData();
|
||||
this.loadTree(true)
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
doEditType() {
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doEditType", this.formData)
|
||||
this.loading = false
|
||||
this.basicTypeDialog = false
|
||||
if(resp.code===0){
|
||||
this.pageData();
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openEditType(row) {
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
name: row.name,
|
||||
code: row.code,
|
||||
note: row.note
|
||||
}
|
||||
this.basicTypeDialog = true
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('确定要删除该机构吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {
|
||||
const resp = await $.post(loc() + "/doDelete", {id: id})
|
||||
if(resp.code===0){
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
this.loadTree(true)
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.loadTree(true)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,713 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
|
||||
|
||||
<div class="d-search-item btn-group tool-button mr10">
|
||||
<el-checkbox-group @change="doSearch" v-model="pageForm.isMenWomen">
|
||||
<el-checkbox-button :key="2" :label="2">男子</el-checkbox-button>
|
||||
<el-checkbox-button :key="3" :label="3">女子</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div class="d-search-item btn-group tool-button mr10">
|
||||
<el-checkbox-group @change="doSearch" v-model="pageForm.isMenWomen">
|
||||
<el-checkbox-button :key="4" :label="4">单项</el-checkbox-button>
|
||||
<el-checkbox-button :key="5" :label="5">团体</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-search-item btn-group tool-button mr10">
|
||||
<el-select v-model="pageForm.group" @focus="focusGroup"
|
||||
placeholder="请选择比赛组别" clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in groupList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="d-search-item btn-group tool-button mr10">
|
||||
<el-select @focus="exerciseType" clearable filterable placeholder="请选择运动类型"
|
||||
style="width: 100%" v-model="pageForm.events">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in exerciseTypeList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="比赛项目列表" :app="this">
|
||||
|
||||
<template #label_end>
|
||||
|
||||
</template>
|
||||
|
||||
<template #func>
|
||||
<el-input type="number" v-model="pageForm.age" placeholder="输入年龄算出身年"
|
||||
@input="ageInput"
|
||||
style="width: auto">
|
||||
<template slot="prepend">年龄计算器</template>
|
||||
</el-input>
|
||||
<el-tag class="ml10">{{ pageForm.ageYear }}</el-tag>
|
||||
<el-date-picker
|
||||
class="ml10"
|
||||
v-model="pageForm.ageDate"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
<el-button class="ml10" type="primary" icon="el-icon-check"
|
||||
@click="doAssignmentDate">统赋年龄限制
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit-outline"
|
||||
@click="openAdd">
|
||||
创建比赛项目
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
ref="multipleTable"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:width="column.width"
|
||||
:prop="column.prop" :sortable="column.sortable"
|
||||
:sortable="column.sortable" show-overflow-tooltip>
|
||||
|
||||
<template scope="{row}" v-if="column.prop=='baname'">
|
||||
<span>{{row.baname!=null?row.baname:'暂无'}}</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='diname'">
|
||||
<span>{{row.diname!=null?row.diname:'暂无'}}</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='isMenWomen'">
|
||||
<span v-if="row.isMenWomen==1">男子</span>
|
||||
<span v-if="row.isMenWomen==2">女子</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='spname'">
|
||||
<span>{{row.spname!=null?row.spname:''}}</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='projectType'">
|
||||
<span>{{row.projectType=='1'?'单项':'团体'}}</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='note'">
|
||||
<span>{{row.note!=''?row.note:'暂无'}}</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='whetherEnable'">
|
||||
<el-switch @change="switchChange(row)" v-model="row.whetherEnable"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作"
|
||||
width="150px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini" :loading="row.loading">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'edit',row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<template #edit>
|
||||
|
||||
<vi-title title="填写比赛项目信息"></vi-title>
|
||||
|
||||
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px"
|
||||
label-suffix=":">
|
||||
<el-row gutter="40">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="isInterest" label="是否趣味项目">
|
||||
<el-checkbox v-model="formData.isInterest">
|
||||
{{formData.isInterest?'是趣味':'不是趣味'}}
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="projectCode" label="比赛项目编号">
|
||||
<el-input v-model="formData.projectCode"
|
||||
placeholder="请填写比赛项目编号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="isMenWomen" label="性别">
|
||||
<el-select v-model="formData.isMenWomen" placeholder="请选择男女分组"
|
||||
allow-create filterable
|
||||
default-first-option clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in menWomenList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="competitionCategory" label="比赛组别">
|
||||
<el-select v-model="formData.competitionCategory" @focus="focusGroup"
|
||||
placeholder="请选择比赛组别"
|
||||
clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in groupList"
|
||||
:key="item.id"
|
||||
:label="item.name+'('+item.code+')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="distance" label="距离">
|
||||
<el-select v-model="formData.distance" @focus="focusDistance"
|
||||
placeholder="请选择距离"
|
||||
clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in distanceList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="exerciseType" label="运动类型">
|
||||
<el-select v-model="formData.exerciseType" @focus="exerciseType"
|
||||
@change="changeExercise_typeList" placeholder="请选择运动类型"
|
||||
filterable
|
||||
clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in exerciseTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="sports" label="运动项目">
|
||||
<el-select v-model="formData.sports" placeholder="请选择具体运动项目"
|
||||
clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in exerciseTypeList2"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="projectType" label="项目类型">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择具体运动项目"
|
||||
allow-create filterable
|
||||
default-first-option clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in projectTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="ageDate" label="年龄限制范围" v-if="formData.projectType==1">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.ageDate"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="primary" @click="formData.id?doEdit():doAdd()">提 交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
multipleSelection: [],
|
||||
groupList: [],
|
||||
exerciseTypeList: [],
|
||||
distanceList: [],
|
||||
exerciseTypeList2: [],
|
||||
eventDialog: false,
|
||||
loading: false,
|
||||
title: "",
|
||||
pageForm: {
|
||||
age: 1,
|
||||
ageYear: null,
|
||||
activityId: null,
|
||||
ageDate: null,
|
||||
isMenWomen: []
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'projectCode', label: '项目编号', sortable: true},
|
||||
{prop: 'allName', label: '全称', width: "200"},
|
||||
{prop: 'isMenWomen', label: '男子/女子', sortable: true},
|
||||
{prop: 'baname', label: '比赛组别', sortable: true},
|
||||
{prop: 'diname', label: '距离', sortable: true},
|
||||
{prop: 'exename', label: '运动类型', sortable: true},
|
||||
{prop: 'spname', label: '运动项目', sortable: true},
|
||||
{prop: 'projectType', label: '项目类型', sortable: true},
|
||||
{prop: 'whetherEnable', label: '是否启用'},
|
||||
|
||||
],
|
||||
projectTypeList: [
|
||||
{id: '1', name: '单项'},
|
||||
{id: '2', name: '团体'},
|
||||
],
|
||||
menWomenList: [
|
||||
{id: 1, name: '男子'},
|
||||
{id: 2, name: '女子'},
|
||||
],
|
||||
formRules: {
|
||||
exerciseType: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
projectType: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
projectCode: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
/* competitionCategory: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
distance: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
exerciseType: [{required: true, message: '必填', trigger: ['change', 'blur']}],
|
||||
*/
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
},
|
||||
methods: {
|
||||
ageInput(val) {
|
||||
const year = new Date().getFullYear()
|
||||
this.$set(this.pageForm, "ageYear", year - val)
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
async doAssignmentDate() {
|
||||
const aa = this.multipleSelection.map(v => {
|
||||
if (v.isInterest) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
if (aa.find(v => v == true)) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '您勾选的列表中包含趣味项目,趣味项目暂不需要年龄限制',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '请先在旁边勾选需要设置的项目',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
if (this.pageForm.ageDate == null) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '请选择需要赋值的时间段',
|
||||
type: 'warning'
|
||||
});
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm('确定要勾选的项目赋年龄限制吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const data = await $.post(loc() + "/doAssignmentDate", {
|
||||
startAgeDate: this.pageForm.ageDate[0],
|
||||
endAgeDate: this.pageForm.ageDate[1],
|
||||
eventIds: JSON.stringify(this.multipleSelection.map(v => v.id))
|
||||
})
|
||||
this.$notify.success({title: '成功', message: data.msg});
|
||||
this.$refs.multipleTable.clearSelection();
|
||||
this.doSearch()
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === 'edit') {
|
||||
this.openEdit(row)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(row)
|
||||
}
|
||||
},
|
||||
openAdd() {
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.formData = {}
|
||||
},
|
||||
|
||||
//查询比赛组别
|
||||
async focusGroup() {
|
||||
const resp = await $.post(loc() + "/focusGroup")
|
||||
if(resp.code===0){
|
||||
this.groupList = resp.data
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
//查询运动类型
|
||||
async exerciseType() {
|
||||
const resp = await $.post(loc() + "/exerciseType")
|
||||
if(resp.code===0){
|
||||
this.exerciseTypeList = resp.data
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
//查询距离
|
||||
async focusDistance() {
|
||||
const resp = await $.post(loc() + "/focusDistance")
|
||||
if(resp.code===0){
|
||||
this.distanceList = resp.data;
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
//根据运动id查询下面有哪些具体的运动项目
|
||||
async changeExercise_typeList() {
|
||||
const resp = await $.post(loc() + "/changeExercise_typeList", {exerciseType: this.formData.exerciseType})
|
||||
if(resp.code===0){
|
||||
this.exerciseTypeList2 = resp.data
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
doAdd() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const {data} = await $.post(loc() + "/getProjectCodeIsExist", {projectCode: this.formData.projectCode})
|
||||
if (data) {
|
||||
this.$message.error("编号已存在");
|
||||
return
|
||||
}
|
||||
let allName = '';
|
||||
|
||||
this.menWomenList.find(v => {
|
||||
if (v.id === this.formData.isMenWomen) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
this.groupList.find(v => {
|
||||
if (v.id === this.formData.competitionCategory) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
this.distanceList.find(v => {
|
||||
if (v.id === this.formData.distance) {
|
||||
allName += v.name + '米'
|
||||
}
|
||||
})
|
||||
|
||||
/* this.exerciseTypeList.find(v => {
|
||||
if (v.id === this.formData.exerciseType) {
|
||||
allName += v.name
|
||||
}
|
||||
})*/
|
||||
|
||||
this.exerciseTypeList2.find(v => {
|
||||
if (v.id === this.formData.sports) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
this.projectTypeList.find(v => {
|
||||
if (v.id === this.formData.projectType) {
|
||||
allName += "(" + v.name + ")"
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
this.formData.allName = allName
|
||||
if (this.formData.ageDate && this.formData.ageDate.length > 0) {
|
||||
this.formData.startAgeDate = this.formData.ageDate[0]
|
||||
this.formData.endAgeDate = this.formData.ageDate[1]
|
||||
}
|
||||
|
||||
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doAdd", this.formData)
|
||||
this.loading = false
|
||||
if(resp.code===0){
|
||||
this.pageData();
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tabLoading = true
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.isMenWomen = JSON.stringify(pageForm.isMenWomen)
|
||||
$.post(base + "/platform/activity/basic/event/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tabLoading = false
|
||||
if (data.code == 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async switchChange(data) {
|
||||
this.formData = data
|
||||
const resp = await $.post(loc() + "/doEdit", this.formData)
|
||||
if(resp.code===0){
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
doEdit() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.formData.oldProjectCode !== this.formData.projectCode) {
|
||||
const {data} = await $.post(loc() + "/getProjectCodeIsExist", {projectCode: this.formData.projectCode})
|
||||
if (data) {
|
||||
this.$message.error("编号已存在");
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let allName = '';
|
||||
|
||||
this.menWomenList.find(v => {
|
||||
if (v.id === this.formData.isMenWomen) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
this.groupList.find(v => {
|
||||
if (v.id === this.formData.competitionCategory) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
this.distanceList.find(v => {
|
||||
if (v.id === this.formData.distance) {
|
||||
allName += v.name + '米'
|
||||
}
|
||||
})
|
||||
|
||||
/* this.exerciseTypeList.find(v => {
|
||||
if (v.id === this.formData.exerciseType) {
|
||||
allName += v.name
|
||||
}
|
||||
})*/
|
||||
|
||||
this.exerciseTypeList2.find(v => {
|
||||
if (v.id === this.formData.sports) {
|
||||
allName += v.name
|
||||
}
|
||||
})
|
||||
|
||||
this.projectTypeList.find(v => {
|
||||
if (v.id === this.formData.projectType) {
|
||||
allName += "(" + v.name + ")"
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
this.formData.allName = allName
|
||||
if (this.formData.ageDate && this.formData.ageDate.length > 0) {
|
||||
this.formData.startAgeDate = this.formData.ageDate[0]
|
||||
this.formData.endAgeDate = this.formData.ageDate[1]
|
||||
}
|
||||
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doEdit", this.formData)
|
||||
this.loading = true
|
||||
if(resp.code===0){
|
||||
this.pageData();
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openEdit(data) {
|
||||
this.focusGroup()
|
||||
this.exerciseType()
|
||||
this.focusDistance()
|
||||
this.formData = {
|
||||
id: data.id,
|
||||
isInterest: data.isInterest,
|
||||
competitionCategory: data.competitionCategory,
|
||||
distance: data.distance,
|
||||
exerciseType: data.exerciseType,
|
||||
sports: data.sports,
|
||||
projectType: data.projectType,
|
||||
note: data.note,
|
||||
isMenWomen: data.isMenWomen,
|
||||
projectCode: data.projectCode,
|
||||
oldProjectCode: data.projectCode
|
||||
|
||||
}
|
||||
if (data.startAgeDate != null) {
|
||||
this.$set(this.formData, "ageDate", [data.startAgeDate, data.endAgeDate])
|
||||
}
|
||||
|
||||
this.changeExercise_typeList()
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
doDelete(row) {
|
||||
const {id} = row
|
||||
this.$confirm('确定要删除该活动吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" === a) {//确认后再执行
|
||||
|
||||
this.$set(row, "loading", true)
|
||||
const resp = await $.post(loc() + "/doDelete", {id: id});
|
||||
this.$set(row, "loading", false)
|
||||
if(resp.code===0){
|
||||
this.pageData()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.ageInput(this.pageForm.age)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,310 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.query-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.query-row > .query-title {
|
||||
width: 100px;
|
||||
max-width: 100px;
|
||||
min-width: 100px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row > .query-content {
|
||||
min-width: 200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row > .query-content > .el-tag {
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 992px) {
|
||||
.query-row:nth-child(4) .query-content .el-col:not(:last-child) {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.query-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.reverseCheckBox {
|
||||
margin: 0 10px 0 0 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<user-scope ref="userScope"></user-scope>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
/* userList: [],
|
||||
is_H04: "${@shiro.hasRole('H04')}" === 'true',
|
||||
is_A06: "${@shiro.hasRole('A06')}" === 'true',
|
||||
is_H10: "${@shiro.hasRole('H10')}" === 'true',
|
||||
is_H02: "${@shiro.hasRole('club01')}" === 'true',
|
||||
is_sysadmin: "${@shiro.hasRole('sysadmin')}" === 'true',
|
||||
clubOptions: [],
|
||||
settingLoading: false,
|
||||
setDialogVisible: false,
|
||||
setGroupType: null,
|
||||
setGroupId: null,
|
||||
setGroupName: null,
|
||||
personTypeOptions: [],
|
||||
userStateOptions: [],
|
||||
activityGroupList: [],
|
||||
activityGroupList2: [],
|
||||
memberTypeOptions: [{
|
||||
code: 'unionMember',
|
||||
name: '工会会员'
|
||||
}, {
|
||||
code: 'welfareMember',
|
||||
name: '福利会员'
|
||||
}, {
|
||||
code: 'sickFundMember',
|
||||
name: '基金会员'
|
||||
}],
|
||||
sexTypeOptions: [
|
||||
{code: '男', name: '男'},
|
||||
{code: '女', name: '女'}
|
||||
],
|
||||
pageForm: {
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
searchName: "u.username",
|
||||
personTypes: [],
|
||||
userStates: [],
|
||||
memberStatus: [],
|
||||
memberTypes: [],
|
||||
sexTypes: [],
|
||||
minAge: 0,
|
||||
maxAge: 0,
|
||||
year: moment().format('YYYY'),
|
||||
module: "",
|
||||
teacherMeetingId: "",
|
||||
roleIds: [],
|
||||
userId: []
|
||||
},
|
||||
activityUnions: [],
|
||||
unions: [],
|
||||
units: [],
|
||||
activityUnits: [],
|
||||
menuOptions: [],
|
||||
meetingOptions: [],
|
||||
roleList: [],
|
||||
tableHeight: '0px',
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'birthday', label: '出生年月', sortable: true},
|
||||
{prop: 'age', label: '年龄', sortable: true},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'personType', label: '人员类型', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'activityUnionName', label: '活动工会', sortable: true},
|
||||
],
|
||||
rules: {
|
||||
setGroupType: [{required: true, message: '请选择添加方式', trigger: ['blur', 'change']}],
|
||||
setGroupId: [{required: true, message: '请选择分组', trigger: ['blur', 'change']}],
|
||||
setGroupName: [{required: true, message: '请输入分组名称', trigger: ['blur', 'change']}]
|
||||
},
|
||||
relatedSessionMenus: ['aca4d14498c145ceb5b24ed70776aae2', '733d7266652740a3aeac9da97ab5eeca', 'fe2d0768e26d4a80beeb159306bb8d01']*/
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'user-scope': httpVueLoader('/components/plugins/UserScope.vue'),
|
||||
},
|
||||
methods: {
|
||||
/* doReset() {
|
||||
this.pageForm.userId = []
|
||||
this.pageForm.memberTypes = []
|
||||
this.pageForm.sexTypes = []
|
||||
this.pageForm.personTypes = []
|
||||
this.pageForm.userStates = []
|
||||
this.pageForm.unionId = null
|
||||
this.pageForm.module = null
|
||||
this.pageForm.teacherMeetingId = null
|
||||
this.pageForm.roleIds = []
|
||||
this.pageForm.clubId = null
|
||||
this.pageForm.activityGroupId = null
|
||||
this.pageForm.age = [0, 100]
|
||||
this.pageForm.reverseSelection = false
|
||||
},
|
||||
async queryUser(val) {
|
||||
const {list} = await selectUser(val, 10)
|
||||
this.userList = list
|
||||
},
|
||||
tagClick(key, val) {
|
||||
let idx = this.pageForm[key].indexOf(val)
|
||||
if (idx !== -1) {
|
||||
this.pageForm[key].splice(idx, 1)
|
||||
} else {
|
||||
this.pageForm[key].push(val)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
this.activityUnits = await getActivityUnits(this.pageForm.activityUnionId)
|
||||
} else {
|
||||
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
sublime.showLoadingbar()
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
|
||||
pageForm.userStates = JSON.stringify(pageForm.userStates)
|
||||
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
|
||||
pageForm.memberTypes = JSON.stringify(pageForm.memberTypes)
|
||||
pageForm.sexTypes = JSON.stringify(pageForm.sexTypes)
|
||||
pageForm.roleIds = JSON.stringify(pageForm.roleIds)
|
||||
pageForm.userId = JSON.stringify(pageForm.userId)
|
||||
pageForm.age = JSON.stringify(pageForm.age)
|
||||
|
||||
const resp = await $.post(loc() + '/pageData', pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
}
|
||||
sublime.closeLoadingbar()
|
||||
},
|
||||
async doSetActivityUser() {
|
||||
const valid = await this.$refs.setForm.validate()
|
||||
if (!valid) {
|
||||
return
|
||||
}
|
||||
|
||||
// const {personTypes, userState, unionId, unitId} = this.pageForm
|
||||
// if (personTypes.length === 0 && userState.length === 0 && unionId === '' && unitId === '') {
|
||||
// this.$message.warning('请先指定筛选条件!')
|
||||
// return
|
||||
// }
|
||||
|
||||
if (this.tableData.length === 0) {
|
||||
this.$message.warning('请先指定筛选条件!')
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm('是否将符合搜索条件的用户设为活动人员?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
this.settingLoading = true
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
|
||||
pageForm.userStates = JSON.stringify(pageForm.userStates)
|
||||
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
|
||||
pageForm.memberTypes = JSON.stringify(pageForm.memberTypes)
|
||||
pageForm.sexTypes = JSON.stringify(pageForm.sexTypes)
|
||||
pageForm.roleIds = JSON.stringify(pageForm.roleIds)
|
||||
pageForm.userId = JSON.stringify(pageForm.userId)
|
||||
pageForm.clubId = pageForm.clubId
|
||||
Object.assign(pageForm, this.formData)
|
||||
const resp = await $.post(loc() + '/doSetActivityUser', pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.setDialogVisible = false
|
||||
await this.getActivityGroup()
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.formData = {
|
||||
setGroupType: null,
|
||||
setGroupId: null,
|
||||
setGroupName: null
|
||||
}
|
||||
}
|
||||
this.settingLoading = false
|
||||
}
|
||||
},*/
|
||||
/* async getActivityGroup() {
|
||||
const resp = await $.get(loc() + '/getActivityUserScopeGroup')
|
||||
this.activityGroupList = resp.data
|
||||
resp.data.forEach(v => {
|
||||
this.activityGroupList2.push({groupId: v.groupId, groupName: v.groupName + "范围之外人员"})
|
||||
})
|
||||
},
|
||||
async getMenuOptions() {
|
||||
const {data} = await $.get("/platform/sys/role/getMenuOptions")
|
||||
this.menuOptions = data
|
||||
},
|
||||
async getRoleListByMenuId() {
|
||||
if (['aca4d14498c145ceb5b24ed70776aae2', '733d7266652740a3aeac9da97ab5eeca'].includes(this.pageForm.module)) {
|
||||
//教代会
|
||||
let meets = await proposal.getOpenMeeting()
|
||||
this.meetingOptions = meets.map(v => ({...v, name: v.jdhallname}))
|
||||
} else if (['fe2d0768e26d4a80beeb159306bb8d01'].includes(this.pageForm.module)) {
|
||||
//工代会
|
||||
let meets = await getGdh(true)
|
||||
this.meetingOptions = meets.map(v => ({...v, name: v.gdhAllName}))
|
||||
}
|
||||
this.pageForm.teacherMeetingId = ''
|
||||
const {data} = await $.post(loc() + "/getRoleListByMenuId", {menuId: this.pageForm.module})
|
||||
this.roleList = data
|
||||
},*/
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
/**
|
||||
* .el-table::before 下有1px边框 故减1
|
||||
*/
|
||||
// this.tableHeight = window.innerHeight - (this.$refs.userTable.$el.getBoundingClientRect().top) - 20 - 50 - 10 - 1 + 'px'
|
||||
// window.onresize = () => {
|
||||
// this.tableHeight = window.innerHeight - (this.$refs.userTable.$el.getBoundingClientRect().top) - 20 - 50 - 10 - 1 + 'px'
|
||||
// }
|
||||
}, 500)
|
||||
},
|
||||
async created() {
|
||||
/* this.clubOptions = await getClubsByRole()
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('club01')}" === 'false' && "${@shiro.hasRole('H04')}" === 'true') {
|
||||
this.unions = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
this.$set(this.pageForm, "unionId", this.unions[0].id)
|
||||
} else {
|
||||
this.unions = await getUnions(null)
|
||||
this.activityUnions = await getActivityUnions()
|
||||
}
|
||||
if ("${@shiro.hasRole('H04')}" === 'false' && "${@shiro.hasRole('club01')}" === 'true') {
|
||||
if (this.clubOptions.length > 0) {
|
||||
this.$set(this.pageForm, "clubId", this.clubOptions[0].stid)
|
||||
}
|
||||
}
|
||||
this.flushUnits()
|
||||
await this.getActivityGroup()
|
||||
this.personTypeOptions = await getDictOptions("UserType")
|
||||
this.userStateOptions = await getDictOptions("UserState")
|
||||
await this.getMenuOptions()
|
||||
this.pageData()*/
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,629 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-tag {
|
||||
border-radius: 50%;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.el-transfer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.el-transfer-panel {
|
||||
text-align: left;
|
||||
width: 35%;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.el-transfer-panel__list.is-filterable {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.v-tree-layout-left {
|
||||
overflow: unset !important;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .v-tree {
|
||||
width: 100%;
|
||||
height: calc(100vh - 170px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.v-tree:hover::-webkit-scrollbar {
|
||||
width: 3px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .custom-tree-node {
|
||||
width: 90%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.v-tree-layout-left .v-tree .v-node {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
/*width: 3px;*/
|
||||
/*background-color: transparent;*/
|
||||
display: none;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never" style="height: calc(100vh - 70px)">
|
||||
<tree-layout >
|
||||
<template #tree>
|
||||
<div style="padding:0 20px 20px;">
|
||||
<el-input
|
||||
placeholder="输入关键字进行查找" clearable
|
||||
v-model="filterText">
|
||||
</el-input>
|
||||
</div>
|
||||
<el-tree ref="tree" :data="treeData" class="v-tree" v-loading="treeLoading" node-key="id"
|
||||
:props="defaultProps"
|
||||
default-expand-all :expand-on-click-node="false"
|
||||
@node-click="handleNodeClick" accordion @node-expand="nodeExpand"
|
||||
highlight-current :filter-node-method="filterNode">
|
||||
<div class="custom-tree-node" slot-scope="{ node, data }">
|
||||
|
||||
<div v-if="node.level==1" style="font-size: 16px;" class="v-node"><i
|
||||
class="el-icon-s-home"></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
<div v-if="node.level==2"
|
||||
style="font-size: 15px" :title="data.name" class="v-node">
|
||||
<i class="el-icon-star-on" v-if="checkData.name==data.name"></i>
|
||||
<i class="el-icon-star-off" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="node.level==3"
|
||||
style="font-size: 14px" :title="data.name" class="v-node">
|
||||
<i class="fa fa-dot-circle-o" v-if="checkData.name==data.name"></i>
|
||||
<i class="fa fa-circle-o" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="node.level>3"
|
||||
style="font-size: 14px" :title="data.name" class="v-node">
|
||||
<i class="fa fa-dot-circle-o" v-if="checkData.name==data.name"></i>
|
||||
<i class="fa fa-circle-o" v-else></i>
|
||||
{{ data.name }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-tree>
|
||||
|
||||
</template>
|
||||
<template>
|
||||
<div v-if="checkNode.level===1" style="padding:0 10px">
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 120px;">
|
||||
<el-option label="单位名称" value="name"></el-option>
|
||||
<el-option label="单位代码" value="unitcode"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<div class="btn-group tool-button">
|
||||
<el-button icon="el-icon-plus" @click="openAdd">新建单位</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tabLoading" size="medium">
|
||||
<el-table-column align="center" :key="1" header-align="center" label="序号"
|
||||
type="index">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="单位名称"
|
||||
prop="name"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="单位代码"
|
||||
prop="unitcode">
|
||||
<template scope="{row}">
|
||||
{{row.unitcode}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="单位等级" header-align="center" prop="unitlevel"
|
||||
:show-overflow-tooltip="true" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.unitlevel==1" size="mini" type="success" round
|
||||
style=" vertical-align: middle;">1级
|
||||
</el-button>
|
||||
<el-button v-if="scope.row.unitlevel==2" size="mini" type="warning" round
|
||||
style=" vertical-align: middle;">2级
|
||||
</el-button>
|
||||
<el-button v-if="scope.row.unitlevel==3" size="mini" type="danger" round
|
||||
style=" vertical-align: middle;">3级
|
||||
</el-button>
|
||||
<el-button v-if="scope.row.unitlevel>3" size="mini" type="info" round
|
||||
style=" vertical-align: middle;">{{scope.row.unitlevel}}级
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" prop="operating" label="操作"
|
||||
width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'edit',data:row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="{type:'delete',data:row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="checkNode.level===2" style="padding:0 10px">
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" clearable v-model="userPageForm.searchKeyword"
|
||||
@keyup.enter.native="doUserSearch">
|
||||
<el-select v-model="userPageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doUserSearch"></el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-tabs v-model="activeName1" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="单位人员" name="first"></el-tab-pane>
|
||||
<el-tab-pane label="单位负责人" name="second"></el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-table :data="userTableData" style="width: 100%" @sort-change="userPageOrder"
|
||||
size="medium">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(userPageForm.pageNumber - 1) * userPageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="姓名"
|
||||
prop="username"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="loginname"></el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="性别"
|
||||
prop="sex">
|
||||
<template scope="{row:{sex}}">
|
||||
<span v-if="sex">{{sex}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="手机号"
|
||||
prop="mobile">
|
||||
<template scope="{row:{mobile}}">
|
||||
<span v-if="mobile">{{mobile}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="是否会员"
|
||||
prop="member">
|
||||
<template scope="{row:{member}}">
|
||||
<span v-if="member==1" class="text-success">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<el-row v-if="activeName1 === 'first'" class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="userPageSizeChange"
|
||||
@current-change="userPageNumberChange"
|
||||
:current-page="userPageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="userPageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="userPageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</tree-layout>
|
||||
</el-card>
|
||||
<template #edit>
|
||||
|
||||
<el-divider content-position="left"><span style="color: rgb(121, 187, 255)">请填写以下单位信息</span>
|
||||
</el-divider>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="top"
|
||||
label-width="120px"
|
||||
style="padding: 0 30px">
|
||||
<el-row gutter="30">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="上级单位">
|
||||
<el-input maxlength="100" disabled :value="checkData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位名称" prop="name">
|
||||
<el-input maxlength="100" placeholder="请输入单位名称" v-model="formData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位代码" prop="unitcode">
|
||||
<el-input maxlength="100" placeholder="请输入社团编码" v-model="formData.unitcode"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位简称" prop="aliasName">
|
||||
<el-input maxlength="100" placeholder="请输入单位简称" v-model="formData.aliasName"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="telephone">
|
||||
<el-input maxlength="100" placeholder="请输入联系电话" v-model="formData.telephone"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位邮箱" prop="email">
|
||||
<el-input maxlength="100" placeholder="请输入单位邮箱" v-model="formData.email"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位网站" prop="website">
|
||||
<el-input maxlength="100" placeholder="请输入单位网站" v-model="formData.website"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单位地址" prop="address">
|
||||
<el-input maxlength="100" placeholder="请输入单位地址" v-model="formData.address"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单位介绍" prop="note">
|
||||
<el-input maxlength="500" type="textarea" placeholder="请输入单位介绍"
|
||||
v-model="formData.note"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<div style="display: flex;justify-content:flex-end;margin-top: 30px">
|
||||
<el-button type="primary" :loading="loading" @click="!formData.id?doAdd():doEdit()">提 交
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
activeName1: 'first',
|
||||
userTableData: [],
|
||||
userPageForm: {
|
||||
searchName: "username",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
loading: false,
|
||||
filterText: '',
|
||||
defaultProps: {
|
||||
children: 'child',
|
||||
label: 'name',
|
||||
},
|
||||
exKeys: ['0'],
|
||||
activeName: [],
|
||||
typeOptions: [],
|
||||
treeLoading: true,
|
||||
tabLoading: false,
|
||||
formData: {},
|
||||
detailData: {},
|
||||
treeData: [],
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
searchName: "name",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
formRules: {
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
code: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
checkNode: {level: 1},
|
||||
checkData: {},
|
||||
campusOptions: [],
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'tree-layout': httpVueLoader('/components/plugins/TreeLayout.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
this.doUserSearch()
|
||||
},
|
||||
|
||||
dropdownCommand: function (command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data.id)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data.id)
|
||||
}
|
||||
},
|
||||
filterNode(value, data, node) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1
|
||||
|
||||
return false
|
||||
},
|
||||
nodeExpand(data, node, e) {
|
||||
|
||||
},
|
||||
async handleNodeClick(data, node) {
|
||||
this.checkData = data
|
||||
this.checkNode = node
|
||||
if (node.level === 1) {
|
||||
this.doSearch()
|
||||
} else if (node.level === 2) {
|
||||
this.doUserSearch()
|
||||
}
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('确定要删除该单位吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doDelete", {id})
|
||||
if(resp.code===0){
|
||||
this.loadTree(false)
|
||||
this.pageData()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
doEdit() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doEdit", this.formData)
|
||||
this.loading = false
|
||||
if(resp.code===0){
|
||||
this.loadTree(false)
|
||||
this.pageData();
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async openEdit(id) {
|
||||
const resp = await $.get(loc() + "/findOne", {id})
|
||||
if(resp.code===0){
|
||||
this.formData = data
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
doAdd() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const resp = await $.post(loc() + "/doAdd", this.formData)
|
||||
this.loading = false
|
||||
if(resp.code===0){
|
||||
this.loadTree(false)
|
||||
this.pageData();
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openAdd() {
|
||||
const {id, unitlevel} = this.checkData
|
||||
this.formData = {
|
||||
parentId: id,
|
||||
unitlevel: unitlevel + 1
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.tabKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
pageOrder(column) {//按字段排序
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange(val) {//页码更新操作
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageSizeChange(val) {//分页大小更新操作
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageData() {//加载分页数据
|
||||
sublime.showLoadingbar();//显示loading
|
||||
this.tabLoading = true
|
||||
this.pageForm.parentId = this.checkData.id
|
||||
$.post(loc() + "/pageData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();//关闭loading
|
||||
this.tabLoading = false
|
||||
if (data.code == 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async loadTree(flush) {
|
||||
this.treeLoading = true
|
||||
const {code, data, msg} = await $.get(loc() + "/getUnitTreeData")
|
||||
this.treeLoading = false
|
||||
if (code == 0) {
|
||||
this.treeData = data
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
|
||||
if (flush && code == 0) {
|
||||
this.checkData = data[0]
|
||||
this.pageData();
|
||||
}
|
||||
},
|
||||
|
||||
doUserSearch() {
|
||||
this.tabKey = new Date().getTime()
|
||||
this.userPageForm.pageNumber = 1
|
||||
this.userPageData()
|
||||
},
|
||||
userPageOrder(column) {
|
||||
this.userPageForm.pageOrderName = column.prop;
|
||||
this.userPageForm.pageOrderBy = column.order;
|
||||
this.userPageData();
|
||||
},
|
||||
userPageNumberChange(val) {
|
||||
this.userPageForm.pageNumber = val;
|
||||
this.userPageData();
|
||||
},
|
||||
userPageSizeChange(val) {
|
||||
this.userPageForm.pageSize = val;
|
||||
this.userPageData();
|
||||
},
|
||||
async userPageData() {
|
||||
this.userPageForm.unitId = this.checkData.id
|
||||
sublime.showLoadingbar()
|
||||
const resp = await $.post(loc() + "/findPersonByUnitId", this.userPageForm)
|
||||
sublime.closeLoadingbar();
|
||||
if(resp.code===0){
|
||||
if (this.activeName1 === 'first') {
|
||||
this.userTableData = resp.data.userList.list
|
||||
this.userPageForm.totalCount = resp.data.userList.totalCount;
|
||||
} else {
|
||||
this.userTableData = resp.data.principal
|
||||
this.userPageForm.totalCount = 0;
|
||||
}
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.loadTree(true)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,275 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.query-row {
|
||||
|
||||
}
|
||||
|
||||
.query-title {
|
||||
color: rgb(100, 100, 100);
|
||||
margin-right: 10px;
|
||||
min-width: 75px;
|
||||
}
|
||||
|
||||
.query-content {
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<user-data-scope
|
||||
ref="userDataScope"
|
||||
:group_id.sync="formData.activityGroupId"
|
||||
></user-data-scope>
|
||||
</guava>
|
||||
<!--<guava>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动分组:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="活动分组" v-model="pageForm.groupId"
|
||||
style="width: 100%;"
|
||||
@change="doSearch"
|
||||
filterable>
|
||||
<el-option v-for="item in activityGroupList" :label="item.groupName"
|
||||
:value="item.groupId"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!–<div class="search-item"
|
||||
v-if="${@shiro.hasRole('sysadmin')}">
|
||||
<div class="search-item-label">活动工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.activityUnionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true">
|
||||
<el-option v-for="item in ActivityUnions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')}">
|
||||
<div class="search-item-label">活动单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.activityUnitId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in ActivityUnits" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>–>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">人员类型:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.personType" style="width: 100%" clearable
|
||||
placeholder="人员类型"
|
||||
@change="doSearch"
|
||||
code="UserType"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">在职状态:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.userState" style="width: 100%" clearable
|
||||
placeholder="在职状态"
|
||||
@change="doSearch"
|
||||
code="UserState"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :label="currentGroupName" :app="this">
|
||||
<template #label_end>
|
||||
<span class="text-danger pl5">提醒:删除活动分组操作,请先选择某个活动分组后,再点击右边的删除按钮。</span>
|
||||
</template>
|
||||
<template #func>
|
||||
<el-button @click="doDelete(null,pageForm.groupId)"
|
||||
type="danger"
|
||||
size="medium" :disabled="tableData.length===0">
|
||||
删除{{currentGroupName}}
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table ref="userTable" :data="tableData" stripe border :size="tableSize">
|
||||
<el-table-column type="index" label="序号" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="100">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="danger" @click="doDelete(row.id,null)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!–#include("/layouts/pagination.html"){}#–>
|
||||
</el-card>
|
||||
|
||||
</guava>-->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'user-data-scope': httpVueLoader('/components/plugins/UserDataScope.vue'),
|
||||
},
|
||||
computed: {
|
||||
currentGroupName() {
|
||||
if (this.pageForm.groupId) {
|
||||
const group = this.activityGroupList.find(v => v.groupId === this.pageForm.groupId)
|
||||
return group.groupName + '人员'
|
||||
}
|
||||
return '全部人员'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activityGroupList: [],
|
||||
ActivityUnions: [],
|
||||
ActivityUnits: [],
|
||||
unions: [],
|
||||
units: [],
|
||||
pageForm: {
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
searchName: "username",
|
||||
personTypes: [],
|
||||
userStates: [],
|
||||
memberStatus: [],
|
||||
year: moment().format('YYYY')
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'birthday', label: '出生年月'},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'personType', label: '人员类型', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'activityUnionName', label: '活动工会', sortable: true},
|
||||
{prop: 'groupName', label: '所属分组', sortable: true},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doDelete(id, groupId) {
|
||||
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
this.pageForm.id = id
|
||||
const resp = await $.post(loc() + '/doDelete', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
this.ActivityUnits = await getActivityUnits(this.pageForm.activityUnionId)
|
||||
} else {
|
||||
this.units = await getClubUnits()
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const resp = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||
this.activityGroupList = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
await this.getActivityGroup()
|
||||
this.unions = await getUnions(null)
|
||||
this.ActivityUnions = await getActivityUnions()
|
||||
this.flushUnits()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
class typeUtil {
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部会议类型
|
||||
* @returns {Promise<*[]|*>}
|
||||
*/
|
||||
async getAllType() {
|
||||
const resp = await $.get('/platform/activity/site/type/findAll')
|
||||
if (resp.code === 0) {
|
||||
resp.data.forEach(v => {
|
||||
v['text'] = v['meetingTypeName']
|
||||
v['value'] = v['id']
|
||||
})
|
||||
return resp.data
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
async findMaxStateId() {
|
||||
const resp = await $.get('/platform/activity/site/type/findMaxStateId')
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,109 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-popover__title {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.my-mt {
|
||||
margin-top: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-calendar>
|
||||
<template slot="dateCell" slot-scope="{date, data}">
|
||||
<p :class="data.isSelected ? 'is-selected' : ''">
|
||||
{{ data.day.split('-').slice(1).join('-') }} {{ data.isSelected ? '✔️' : ''}}
|
||||
</p>
|
||||
|
||||
<div v-for="item in tableData">
|
||||
<div v-if="data.day.toString()==moment(item.startTime).format('YYYY-MM-DD')">
|
||||
<el-popover placement="top-start" title="活动信息" width="320" trigger="hover">
|
||||
|
||||
<div style="font-size: 10px">
|
||||
<el-row class="my-mt">
|
||||
<el-col :span="5"><b>主办单位</b>:</el-col>
|
||||
<el-col :span="19">{{item.unitName}}</el-col>
|
||||
</el-row>
|
||||
<el-row class="my-mt">
|
||||
<el-col :span="5"><b>活动地址</b>:</el-col>
|
||||
<el-col :span="19">{{item.address}}</el-col>
|
||||
</el-row>
|
||||
<el-row class="my-mt">
|
||||
<el-col :span="5"><b>报名时间</b>:</el-col>
|
||||
<el-col :span="19">{{moment(item.applyStartTime).format('YYYY-MM-DD HH:mm')}} 至
|
||||
{{moment(item.applyEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="my-mt">
|
||||
<el-col :span="5"><b>活动时间</b>:</el-col>
|
||||
<el-col :span="19">{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}} 至
|
||||
{{moment(item.endTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="my-mt">
|
||||
<el-col :span="5"><b>报名链接</b>:</el-col>
|
||||
<el-col :span="19">
|
||||
<el-link style="font-size: 8px" type="primary" target="_blank"
|
||||
@click="djbm">
|
||||
点击报名
|
||||
</el-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<span class="text-primary" slot="reference">
|
||||
{{item.name}}-(<span
|
||||
v-html="activity.school.getStatus(item.close,item.applyStartTime,item.applyEndTime,item.startTime,item.endTime)"></span>)
|
||||
</span>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-calendar>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
tableKey: new Date().getTime(),
|
||||
tabLoading: false,
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
},
|
||||
methods: {
|
||||
djbm() {
|
||||
sublime.jumpPagePjax('/platform/activity/apply')
|
||||
},
|
||||
async getData() {
|
||||
this.tabLoading = true
|
||||
const resp = await $.get(loc() + "/getData")
|
||||
this.tabLoading = false
|
||||
if(resp.code===0){
|
||||
this.tableData = resp.data
|
||||
this.tableKey = new Date().getTime()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,927 @@
|
||||
<!--活动成绩管理 djx 2019-6-28 -->
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.dia .el-dialog__body {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.el-step__title {
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.el-step__icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
/*.el-card__body {*/
|
||||
/* padding: 10px 20px 0px;*/
|
||||
/*}*/
|
||||
|
||||
[class*=el-col-] {
|
||||
text-align: center;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #f56c6c;
|
||||
}
|
||||
|
||||
.bmqk .el-card__body {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
|
||||
.v-0x2323544 {
|
||||
text-align: center;
|
||||
color: rgb(180, 180, 180);
|
||||
}
|
||||
|
||||
.v-0x345756765 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label"></div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy" style="width: 100%"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label"></div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.activityId" placeholder="请选择活动名称" filterable clearable
|
||||
style="width: 100%" @change="getEvents">
|
||||
<el-option
|
||||
v-for="item in activitys"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label"></div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.eventId" placeholder="请选择项目名称" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in events"
|
||||
:key="item.id"
|
||||
:label="item.allname"
|
||||
:value="item.eventid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <el-row type="flex" :gutter="20" align="center" class="search-card">-->
|
||||
<!-- <el-col :span="7">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="pageForm.year"-->
|
||||
<!-- type="year"-->
|
||||
<!-- value-format="yyyy" style="width: 100%"-->
|
||||
<!-- placeholder="选择年">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="7">-->
|
||||
<!-- <el-select v-model="pageForm.activityId" placeholder="请选择活动名称" filterable clearable-->
|
||||
<!-- style="width: 100%" @change="getEvents">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in activitys"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.name"-->
|
||||
<!-- :value="item.id">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="7">-->
|
||||
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1">-->
|
||||
<!-- <div class="btn-group tool-button mt5">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
|
||||
<!-- </el-row>-->
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
<!--表格-->
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-row class="el-table-container">
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod"
|
||||
label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable">
|
||||
|
||||
<template v-if="column.prop=='events'" scope="{row}">
|
||||
<span>{{row.allName}}</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='gameStyle'" scope="{row}">
|
||||
<span>{{activity.school.gameStyle[row.gameStyle]}}</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='startTime'" scope="{row}">
|
||||
{{moment(row.startTime).format('YYYY-MM-DD')}} -
|
||||
{{moment(row.endTime).format('YYYY-MM-DD')}}
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='state'"
|
||||
scope="{row:{close,applyStartTime,applyEndTime,startTime,endTime}}">
|
||||
<div v-html="activity.school.getStatus(close,applyStartTime,applyEndTime,startTime,endTime)"></div>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="openView(scope)" size="mini">查看</el-button>
|
||||
<el-button type="primary" @click="openCj(scope)" size="mini">
|
||||
分配成绩
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-row>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="info"></info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<!--分配成绩-->
|
||||
<el-dialog title="获奖设置" class="dia"
|
||||
:visible.sync="tdDialogVisible" custom-class="ViewDialogClass" width="60%" top="3%">
|
||||
|
||||
<el-row style="text-align: right">
|
||||
<el-select placeholder="请选择奖品类型" style="width: 16%" size="mini" @change="changeVal" v-model="jplx"
|
||||
clearable="true" filterable="true">
|
||||
<el-option label="奖品" value="奖品"></el-option>
|
||||
<el-option label="现金奖赏" value="现金奖赏"></el-option>
|
||||
</el-select>
|
||||
<el-input size="mini" v-if="isShow" style="width: 14%" placeholder="统一设置奖品名称" v-model="jpmc"></el-input>
|
||||
<el-input size="mini" style="width: 14%" placeholder="统一设置金额" v-model="money" type="number">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="tdTableData" size="small">
|
||||
<el-table-column align="center" width="280" header-align="center" label="获奖单位" prop="unitid">
|
||||
<template slot-scope="scope">
|
||||
<el-select placeholder="请选择获奖单位" size="small" v-model="scope.row.unitId" style="width: 68%;"
|
||||
clearable filterable>
|
||||
<el-option
|
||||
v-for="item in unitSel"
|
||||
:key="item.id"
|
||||
:label="item.unitname"
|
||||
:value="item.unitid">
|
||||
</el-option>
|
||||
<!-- <el-option v-for="item in unitSel" :label="item.unitname" :value="item.unitId"></el-option>-->
|
||||
</el-select>
|
||||
<el-popover popper-class="aa"
|
||||
placement="top-start"
|
||||
width="280"
|
||||
trigger="click"
|
||||
@show="popShow(scope)">
|
||||
<el-table :data="cyUser" max-height="260" size="mini">
|
||||
<el-table-column width="120" property="username" label="姓名"></el-table-column>
|
||||
<el-table-column width="120" property="sex" label="性别"></el-table-column>
|
||||
</el-table>
|
||||
<el-link v-show="cyUser!=null" slot="reference" type="primary" :underline="false"
|
||||
style="margin-left: 6px;margin-bottom: 6px;">参赛人员
|
||||
</el-link>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="荣誉奖项" prop="mc">
|
||||
<template slot-scope="scope">
|
||||
<el-input size="small" v-model="scope.row.mc"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="isShow" align="center" header-align="center" label="奖品名称" prop="jpmc">
|
||||
<template slot-scope="scope">
|
||||
<el-input size="small" v-model="scope.row.jpmc"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="金额" prop="money">
|
||||
<template slot-scope="scope">
|
||||
<el-input size="small" v-model="scope.row.money" type="number">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="60px">
|
||||
<template slot-scope="scope">
|
||||
<i v-if="scope.$index == 0" type="success" style="font-size: 2.8em;color:#67C23A;cursor: pointer"
|
||||
@click="addRow(scope)" class="el-icon-circle-plus" circle></i>
|
||||
<i v-if="scope.$index > 0" type="success" style="font-size: 2.8em;color:#f56c6c;cursor: pointer"
|
||||
@click="delRow(scope)" class="el-icon-error" circle></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="tdDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="tdSave">保 存</el-button>
|
||||
<el-button type="success" @click="tdDo">提 交</el-button>
|
||||
</span>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!--个人-->
|
||||
<el-dialog title="设置活动获奖人员" class="dia"
|
||||
:visible.sync="grDialogVisible" custom-class="ViewDialogClass" width="60%" top="3%">
|
||||
|
||||
<el-steps :active="active" align-center>
|
||||
<el-step title="选择获奖人员"></el-step>
|
||||
<el-step title="设置获奖信息"></el-step>
|
||||
</el-steps>
|
||||
|
||||
<el-row style="margin-top: 20px;" v-show="active=='1'">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input style="width:180px;" size="mini" placeholder="可按姓名、教工号查询" v-model="grPageForm.searchKeyword"
|
||||
clearable></el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select placeholder="请选择单位" size="mini" v-model="grPageForm.unit" style="width: 160px;"
|
||||
clearable="true" filterable="true">
|
||||
<el-option v-for="item in unit" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" size="mini" icon="el-icon-search" @click="doGrSearch"></el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="grTableData" ref="grTable" size="small" :row-key="rowKey" @selection-change="changeFun"
|
||||
v-show="active=='1'">
|
||||
<el-table-column :reserve-selection="true"
|
||||
@selection-change="changeFun"
|
||||
type="selection"
|
||||
width="40">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(grPageForm.pageNumber - 1) * grPageForm.pageSize + 1}} </span></template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="教工号" prop="loginname"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="姓名" prop="username"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="单位" prop="unitname"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="电话" prop="mobile"></el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container" v-show="active=='1'">
|
||||
<el-pagination
|
||||
@size-change="grpageSizeChange"
|
||||
@current-change="grpageNumberChange"
|
||||
:current-page="grPageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="grPageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="grPageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
|
||||
<el-card class="box-card" v-show="active=='2'" style="margin-top: 20px">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="color: #ebb563">请填写以下人员的获奖信息</span>
|
||||
|
||||
<el-input size="mini" style="width: 20%;float: right;" placeholder="统一设置金额" v-model="money"
|
||||
type="number">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<el-input size="mini" v-if="isShow" style="width: 20%;float: right;margin-left: 8px;margin-right: 8px;"
|
||||
placeholder="统一设置奖品名称" v-model="jpmc"></el-input>
|
||||
<el-select placeholder="请选择奖品类型" style="width: 20%;float: right;" size="mini" @change="changeVal"
|
||||
v-model="jplx" clearable="true" filterable="true">
|
||||
<el-option label="奖品" value="奖品"></el-option>
|
||||
<el-option label="现金奖赏" value="现金奖赏"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-form :model="formData" label-position="top" size="small" label-width="86px">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="3" style="background-color: #EBEEF5;color: black;font-weight: bold">姓名</el-col>
|
||||
<el-col :span="3" style="background-color: #EBEEF5;color: black;font-weight: bold">性别</el-col>
|
||||
<el-col :span="isShow==true?'6':'9'"
|
||||
style="background-color: #EBEEF5;color: black;font-weight: bold">获奖信息
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="isShow" style="background-color: #EBEEF5;color: black;font-weight: bold">
|
||||
奖品名称
|
||||
</el-col>
|
||||
<el-col :span="isShow==true?'6':'9'"
|
||||
style="background-color: #EBEEF5;color: black;font-weight: bold">金额
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row v-for="item in multipleSelection">
|
||||
<el-col :span="3">
|
||||
<el-lebel style="color: grey">{{item.username}}</el-lebel>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-lebel style="color: grey">{{item.sex}}</el-lebel>
|
||||
</el-col>
|
||||
<el-col :span="isShow==true?'6':'9'">
|
||||
<el-input maxlength="100" placeholder="请输入获奖信息" size="mini" v-model="item.mc" style="width: 88%"
|
||||
auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="isShow">
|
||||
<el-input maxlength="100" placeholder="请输入奖品名称" size="mini" v-model="item.jpmc"
|
||||
style="width: 88%" auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="isShow==true?'6':'9'">
|
||||
<el-input maxlength="100" placeholder="请输入金额" size="mini" v-model="item.money"
|
||||
style="width: 88%" auto-complete="off" tabindex="4" type="number">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin: 20px 0px;" v-if="multipleSelection.length==0">
|
||||
<el-divider content-position="center">您还没有选择获奖人员</el-divider>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="grDialogVisible = false">取 消</el-button>
|
||||
<el-button type="warning" @click="active = '1'" v-if="active == '2'">上一步</el-button>
|
||||
<el-button type="primary" @click="active = '2'" v-if="active == '1'">下一步</el-button>
|
||||
<el-button type="primary" @click="grSave" v-if="active == '2'">保 存</el-button>
|
||||
<el-button type="success" @click="grjxDo" v-if="active == '2'">提 交</el-button>
|
||||
</span>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
data: function () {
|
||||
return {
|
||||
activitys: [],
|
||||
events: [],
|
||||
pageForm: {//分页
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
hdlx: "",
|
||||
hdxm: "",
|
||||
year: new Date().getFullYear() + "",
|
||||
},
|
||||
tableData: [],//表格
|
||||
queryHdlx: [],
|
||||
queryHdxm: [],
|
||||
/*团队获奖设置*/
|
||||
tdDialogVisible: false,
|
||||
tdTableData: [],
|
||||
unitSel: [],
|
||||
temp: [],
|
||||
cyUser: [],
|
||||
/*个人获奖设置*/
|
||||
grDialogVisible: false,
|
||||
grTableData: [],
|
||||
grPageForm: {//分页
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
id: "",
|
||||
unit: "",
|
||||
},
|
||||
unit: [],
|
||||
multipleSelection: [],
|
||||
active: "1",
|
||||
formData: {},
|
||||
|
||||
/*查看*/
|
||||
infoDialogVisible: false,
|
||||
activeName: '1',
|
||||
viewData: [],
|
||||
bmTableData: [],
|
||||
bmfs: "",
|
||||
hdms: "",
|
||||
hjTableData: [],
|
||||
gzryListTableData: [],
|
||||
|
||||
jplx: "",
|
||||
isShow: true,
|
||||
jpmc: "",
|
||||
money: "",
|
||||
isshow: true,
|
||||
xqactive: "1",
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '活动名称'},
|
||||
{prop: 'address', label: '活动地点'},
|
||||
{prop: 'allName', label: '活动项目'},
|
||||
{prop: 'gameStyle', label: '活动类型'},
|
||||
{prop: 'startTime', label: '活动日期'},
|
||||
{prop: 'state', label: '活动状态'},
|
||||
{prop: 'applyNum', label: '已报名人数'},
|
||||
]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'info': httpVueLoader('/components/activity/school/Info.vue'),
|
||||
},
|
||||
methods: {
|
||||
pageData: function () {
|
||||
|
||||
var self = this;
|
||||
sublime.showLoadingbar();//显示loading
|
||||
$.post(base + "/platform/activity/school/grades/data", self.pageForm, function (data) {
|
||||
sublime.closeLoadingbar();//关闭loading
|
||||
if (data.code == 0) {
|
||||
self.tableData = data.data.hds.list;
|
||||
self.pageForm.totalCount = data.data.hds.totalCount;
|
||||
self.queryHdlx = data.data.hdlx;
|
||||
self.unit = data.data.unit;
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
openView(data) {
|
||||
this.$refs.info.getInfo(data.row.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
/*分页*/
|
||||
pageSizeChange: function (val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange: function (val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
grpageSizeChange: function (val) {
|
||||
this.grPageForm.pageSize = val;
|
||||
this.flag();
|
||||
},
|
||||
grpageNumberChange: function (val) {
|
||||
this.grPageForm.pageNumber = val;
|
||||
this.flag();
|
||||
},
|
||||
|
||||
doSearch: function () {
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
},
|
||||
doGrSearch() {
|
||||
this.flag();
|
||||
},
|
||||
|
||||
flag() {
|
||||
$.post(base + "/platform/activity/school/grades/findGrUser", this.grPageForm, (data) => {
|
||||
if (data.code == 0) {
|
||||
this.grTableData = data.data.list;
|
||||
this.grPageForm.totalCount = data.data.totalCount;
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
changeVal: function (obj) {
|
||||
var self = this;
|
||||
if (obj == "现金奖赏") {
|
||||
self.isShow = false;
|
||||
} else if (obj == "奖品") {
|
||||
self.isShow = true;
|
||||
}
|
||||
},
|
||||
|
||||
openCj: function (scope) {
|
||||
var self = this;
|
||||
self.jplx = "";
|
||||
self.tdTableData = [{
|
||||
unitId: "",
|
||||
mc: "",
|
||||
jpmc: "",
|
||||
money: "",
|
||||
}];
|
||||
self.temp = scope.row;
|
||||
if (scope.row.awardsMode == 2) {
|
||||
$.post(base + "/platform/activity/school/grades/findUnit", {id: scope.row.id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.unitSel = data.data;
|
||||
|
||||
}
|
||||
}, "json");
|
||||
setTimeout(function () {
|
||||
$.post(base + "/platform/activity/school/grades/findSaveCj", {
|
||||
id: scope.row.id,
|
||||
eventId: scope.row.eventId
|
||||
}, function (data) {
|
||||
if (data.code == 0) {
|
||||
if (data.data.length == 0) {
|
||||
self.tdTableData = [{
|
||||
unitId: "",
|
||||
mc: "",
|
||||
jpmc: "",
|
||||
money: "",
|
||||
}];
|
||||
} else {
|
||||
self.jplx = data.data[0].jplx;
|
||||
self.tdTableData = data.data;
|
||||
}
|
||||
}
|
||||
}, "json");
|
||||
}, 200);
|
||||
self.tdDialogVisible = true;
|
||||
} else if (scope.row.awardsMode == 1) {
|
||||
self.grPageForm.id = scope.row.id;
|
||||
self.grPageForm.eventId = scope.row.eventId;
|
||||
self.active = "1";
|
||||
$.post(base + "/platform/activity/school/grades/findGrUser", self.grPageForm, (data) => {
|
||||
if (data.code == 0) {
|
||||
self.grTableData = data.data.list;
|
||||
self.grPageForm.totalCount = data.data.totalCount;
|
||||
self.grDialogVisible = true;
|
||||
}
|
||||
}, "json");
|
||||
setTimeout(function () {
|
||||
$.post(base + "/platform/activity/school/grades/findGrCj", {
|
||||
id: scope.row.id,
|
||||
eventId: scope.row.eventId
|
||||
}, function (data) {
|
||||
if (data.code == 0) {
|
||||
if (data.data.length > 0) {
|
||||
self.jplx = data.data[0].jplx;
|
||||
} else {
|
||||
self.jplx = "";
|
||||
}
|
||||
|
||||
for (var i = 0; i < data.data.length; i++) {
|
||||
|
||||
for (var d = 0; d < self.grTableData.length; d++) {
|
||||
|
||||
if (data.data[i].id == self.grTableData[d].id) {
|
||||
self.grTableData[d].mc = data.data[i].mc;
|
||||
self.grTableData[d].jpmc = data.data[i].jpmc;
|
||||
self.grTableData[d].money = data.data[i].money;
|
||||
/*self.grTableData[d]=data.data[i];*/
|
||||
self.$refs.grTable.toggleRowSelection(self.grTableData[d], true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, "json");
|
||||
}, 200);
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
addRow: function (scope) {
|
||||
var self = this;
|
||||
var list = {
|
||||
unitId: "",
|
||||
mc: "",
|
||||
jpmc: self.jpmc,
|
||||
money: self.money,
|
||||
};
|
||||
self.tdTableData.push(list);
|
||||
},
|
||||
|
||||
delRow: function (scope) {
|
||||
var self = this;
|
||||
self.tdTableData.splice(scope.$index, 1);
|
||||
},
|
||||
|
||||
popShow: function (scope) {
|
||||
var self = this;
|
||||
$.post(base + "/platform/activity/school/grades/findCyRy", {
|
||||
unitid: scope.row.unitId,
|
||||
activityId: self.temp.id
|
||||
}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.cyUser = data.data;
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
|
||||
tdSave: function () {
|
||||
var self = this;
|
||||
var array = new Array();
|
||||
self.tdTableData.forEach(function (obj) {
|
||||
array.push({
|
||||
activityId: self.temp.id,
|
||||
eventId: self.temp.eventId,
|
||||
mc: obj.mc,
|
||||
unitId: obj.unitId,
|
||||
hdms: self.temp.awardsMode,
|
||||
jpmc: obj.jpmc,
|
||||
money: obj.money,
|
||||
jplx: self.jplx,
|
||||
});
|
||||
});
|
||||
$.post(base + "/platform/activity/school/grades/tdDo", {
|
||||
data: JSON.stringify(array),
|
||||
activityId: self.temp.id,
|
||||
}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
self.pageData();
|
||||
self.tdDialogVisible = false;
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
|
||||
tdDo: function () {
|
||||
var self = this;
|
||||
var array = new Array();
|
||||
self.tdTableData.forEach(function (obj) {
|
||||
array.push({
|
||||
activityId: self.temp.id,
|
||||
eventId: self.temp.eventId,
|
||||
mc: obj.mc,
|
||||
unitId: obj.unitId,
|
||||
hdms: self.temp.awardsMode,
|
||||
jpmc: obj.jpmc,
|
||||
money: obj.money,
|
||||
jplx: self.jplx,
|
||||
});
|
||||
});
|
||||
if (self.jplx == "" || self.jplx == null) {
|
||||
self.$message({
|
||||
message: "请选择奖品类型!",
|
||||
type: 'warning'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (self.jplx == "奖品") {
|
||||
var flag = 0;
|
||||
self.tdTableData.forEach(function (obj) {
|
||||
if (obj.unitId == "" || obj.mc == "" || obj.jpmc == "" || obj.money == "") {
|
||||
flag = 1;
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (flag == 1) {
|
||||
self.$message({
|
||||
message: "请填写相应的信息!",
|
||||
type: 'warning'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (self.jplx == "现金奖赏") {
|
||||
var flag = 0;
|
||||
self.tdTableData.forEach(function (obj) {
|
||||
if (obj.unitId == "" || obj.mc == "" || obj.money == "") {
|
||||
flag = 1;
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (flag == 1) {
|
||||
self.$message({
|
||||
message: "请填写相应的信息!",
|
||||
type: 'warning'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
self.$confirm("一旦提交不可修改,确定提交吗?", "温馨提示", {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {
|
||||
|
||||
const resp = await $.post("/platform/activity/school/grades/tdDo", {
|
||||
grades: JSON.stringify(array),
|
||||
unitid: array.unitId,
|
||||
eventId: eventId
|
||||
})
|
||||
if (resp.code===0){
|
||||
self.pageData();
|
||||
self.tdDialogVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
grSave: function () {
|
||||
var self = this;
|
||||
var array = new Array();
|
||||
self.multipleSelection.forEach(function (obj) {
|
||||
array.push({
|
||||
activityId: self.temp.id,
|
||||
userId: obj.id,
|
||||
mc: obj.mc,
|
||||
unitId: obj.unitId,
|
||||
hdms: self.temp.awardsMode,
|
||||
jpmc: obj.jpmc,
|
||||
money: obj.money,
|
||||
jplx: self.jplx,
|
||||
});
|
||||
});
|
||||
$.post(base + "/platform/activity/school/grades/grjxDo", {
|
||||
data: JSON.stringify(array),
|
||||
}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
self.pageData();
|
||||
self.grDialogVisible = false;
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
grjxDo: function () {
|
||||
var self = this;
|
||||
|
||||
if (self.multipleSelection.length == 0) {
|
||||
self.$message({
|
||||
message: "您还没有选择获奖人员!",
|
||||
type: 'error'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (self.jplx == "" || self.jplx == null) {
|
||||
self.$message({
|
||||
message: "请选择奖品类型!",
|
||||
type: 'warning'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (self.jplx == "奖品") {
|
||||
var flag = 0;
|
||||
self.multipleSelection.forEach(function (obj) {
|
||||
if (obj.mc == "" || obj.jpmc == "" || obj.money == "") {
|
||||
flag = 1;
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (flag == 1) {
|
||||
self.$message({
|
||||
message: "请填写相应的信息!",
|
||||
type: 'warning'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (self.jplx == "现金奖赏") {
|
||||
var flag = 0;
|
||||
self.multipleSelection.forEach(function (obj) {
|
||||
if (obj.mc == "" || obj.money == "") {
|
||||
flag = 1;
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (flag == 1) {
|
||||
self.$message({
|
||||
message: "请填写相应的信息!",
|
||||
type: 'warning'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var array = new Array();
|
||||
self.multipleSelection.forEach(function (obj) {
|
||||
array.push({
|
||||
activityId: self.temp.id,
|
||||
userId: obj.userid,
|
||||
mc: obj.mc,
|
||||
unitId: obj.unitId,
|
||||
hdms: self.temp.awardsMode,
|
||||
jpmc: obj.jpmc,
|
||||
money: obj.money,
|
||||
jplx: self.jplx,
|
||||
});
|
||||
});
|
||||
self.$confirm("一旦提交不可修改,确定提交吗?", "温馨提示", {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: function (a, b) {
|
||||
if ("confirm" == a) {
|
||||
|
||||
$.post(base + "/platform/activity/school/grades/grjxDo", {
|
||||
grades: JSON.stringify(array),
|
||||
}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
self.pageData();
|
||||
self.multipleSelection = [];
|
||||
setTimeout(function () {
|
||||
self.$refs.grTable.clearSelection();
|
||||
}, 500)
|
||||
self.grDialogVisible = false;
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
rowKey: function (row) {
|
||||
var self = this;
|
||||
return row.id;
|
||||
},
|
||||
|
||||
changeFun: function (val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
async getActivitys() {
|
||||
const {data} = await $.get("/platform/activity/remind/getActivitys")
|
||||
return data;
|
||||
|
||||
},
|
||||
async getEvents() {
|
||||
const resp = await $.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
|
||||
this.events = resp
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
this.activitys = await this.getActivitys()
|
||||
/*this.events = await activity.getEvents()*/
|
||||
},
|
||||
watch: {
|
||||
"pageForm.hdlx": function (obj) {
|
||||
var self = this;
|
||||
if (obj != "" && obj != null && obj != "undefined") {
|
||||
self.pageForm.hdxm = "";
|
||||
$.post(base + "/platform/hd/xhdgl/xhdxxgl/findHdXm", {id: obj}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.queryHdxm = data.data;
|
||||
self.pageForm.hdxm = data.data[0].id;
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
},
|
||||
"jpmc": function (obj) {
|
||||
var self = this;
|
||||
self.tdTableData.forEach(function (value) {
|
||||
value.jpmc = obj;
|
||||
});
|
||||
self.multipleSelection.forEach(function (value) {
|
||||
value.jpmc = obj;
|
||||
});
|
||||
},
|
||||
"money": function (obj) {
|
||||
var self = this;
|
||||
self.tdTableData.forEach(function (value) {
|
||||
value.money = obj;
|
||||
});
|
||||
self.multipleSelection.forEach(function (value) {
|
||||
value.money = obj;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,392 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年  度</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy" style="width: 100%"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动名称</div>
|
||||
<div class="search-item-option">
|
||||
<!--<el-input v-model="pageForm.name" placeholder="请输入活动名称" clearable></el-input>-->
|
||||
<el-select v-model="pageForm.activityId" placeholder="请选择活动名称"
|
||||
filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in activities"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动级别</div>
|
||||
<div class="search-item-option">
|
||||
<!-- <el-select v-model="pageForm.gameStyle" placeholder="请选择活动类型" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="(k,v) in activity.school.gameStyle"
|
||||
:key="v"
|
||||
:label="k"
|
||||
:value="v">
|
||||
</el-option>
|
||||
</el-select>-->
|
||||
<el-select v-model="pageForm.activityLevel" placeholder="请选择活动级别"
|
||||
clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in activityTypeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div class="search-item" style="width: 80vw">
|
||||
<div class="search-item-label">一键查询</div>
|
||||
<div class="search-item-option">
|
||||
<el-radio-group v-model="pageForm.query" @change="doSearch">
|
||||
<el-radio-button v-for="it in queryOptions" :label="it.key"
|
||||
:key="it.key">
|
||||
{{it.value}}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="活动列表" :app="this">
|
||||
<template #func>
|
||||
<el-button type="primary" icon="el-icon-edit-outline" size="small"
|
||||
@click="openAdd">
|
||||
创建活动
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize"
|
||||
class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable">
|
||||
|
||||
<template v-if="column.prop=='events'" scope="{row}">
|
||||
<span>{{row.allName}}</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='gameStyle'" scope="{row}">
|
||||
<span>{{activity.school.gameStyle[row.gameStyle]}}</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='foundUnit'" scope="{row}">
|
||||
<span v-if="row.activityLevel===40001">校工会</span>
|
||||
<span v-if="row.activityLevel===40002">{{row.unionname}}</span>
|
||||
<span v-if="row.activityLevel===40003">{{row.clubName}}</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='startTime'" scope="{row}">
|
||||
{{moment(row.startTime).format('YYYY-MM-DD')}} -
|
||||
{{moment(row.endTime).format('YYYY-MM-DD')}}
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='state'"
|
||||
scope="{row:{close,applyStartTime,applyEndTime,startTime,endTime,isSave}}">
|
||||
<div v-html="activity.school.getStatus(close,applyStartTime,applyEndTime,startTime,endTime,isSave)"></div>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini" :loading="row.loading">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'sendMsg',row}">
|
||||
通知
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'openCode',row}">
|
||||
二维码
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'view',row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item :command="{type:'export',row}">
|
||||
导出名单docx
|
||||
</el-dropdown-item>-->
|
||||
<el-dropdown-item :command="{type:'exportXlsx',row}">
|
||||
导出名单
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
<el-button type="primary" @click="doSave">保 存</el-button>
|
||||
<el-button type="primary" @click="doOperate">提 交</el-button>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<add-activity :form="formData" ref="activity" @flip="flip" @flush="flush"
|
||||
:is_club="is_club"
|
||||
:is_union="is_union" :is_sysadmin="is_sysadmin" :is_a06="is_A06"
|
||||
:is_h10="is_h10"
|
||||
:unionid="'${@shiro.getPrincipalProperty('unit').getUnionid()}'"></add-activity>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="info"></info>
|
||||
</template>
|
||||
|
||||
<send-msg ref="sendMsg" :url="url"></send-msg>
|
||||
|
||||
<open-qr-code ref="openQRCode" :url="url"></open-qr-code>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let E = window.wangEditor
|
||||
const editors = {}
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
is_club: false,
|
||||
is_union: false,
|
||||
is_sysadmin: false,
|
||||
is_A06: false,
|
||||
is_h10: false,
|
||||
activities: [],
|
||||
unitOptions: [],
|
||||
activityTypeList: [],
|
||||
planList: [],
|
||||
typeList: [],
|
||||
types: [],
|
||||
events: [],
|
||||
submitDisabled: false,
|
||||
formData: {
|
||||
activityGroupId: null,
|
||||
personType: 1,
|
||||
activityLevel: 1,
|
||||
gameStyle: 1,
|
||||
applyWay: [2],
|
||||
awardsMode: [],
|
||||
combinationMethod: []
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '活动名称'},
|
||||
{prop: 'activityCode', label: '活动编号', sortable: true},
|
||||
{prop: 'address', label: '活动地点'},
|
||||
{prop: 'foundUnit', label: '创建单位', sortable: true},
|
||||
{prop: 'activityLevelName', label: '活动级别', sortable: true},
|
||||
{prop: 'startTime', label: '活动日期', sortable: true},
|
||||
{prop: 'state', label: '活动状态', sortable: true},
|
||||
{prop: 'applyNum', label: '已报名人数', sortable: true},
|
||||
{prop: 'foundDate', label: '创建时间', sortable: true},
|
||||
],
|
||||
pageForm: {
|
||||
query: 'zero'
|
||||
},
|
||||
queryOptions: [
|
||||
{key: 'zero', value: '全部'},
|
||||
{key: 'one', value: '正在报名'},
|
||||
{key: 'two', value: '报名结束'},
|
||||
{key: 'three', value: '活动进行中'},
|
||||
{key: 'four', value: '活动已结束'},
|
||||
],
|
||||
url: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'info': httpVueLoader('/components/activity/school/Info.vue?v=' + new Date().getTime()),
|
||||
'add-activity': httpVueLoader('/components/activity/school/AddActivity.vue?v=' + new Date().getTime()),
|
||||
'send-msg': httpVueLoader('/components/plugins/SendMsgByGroupId.vue'),
|
||||
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
|
||||
},
|
||||
methods: {
|
||||
flip() {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
flush() {
|
||||
this.pageData()
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === 'view') {
|
||||
this.openView(row)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(row)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(row)
|
||||
} else if (type === 'export') {
|
||||
window.open("/platform/activity/common/export?id=" + row.id)
|
||||
} else if (type === 'exportXlsx') {
|
||||
location.href = "/platform/activity/common/exportXlsx?id=" + row.id
|
||||
} else if (type == 'sendMsg') {
|
||||
this.sendMsg(row)
|
||||
} else if (type === 'openCode') {
|
||||
this.openCode(row)
|
||||
}
|
||||
},
|
||||
openCode(row) {
|
||||
this.$refs.openQRCode.openCode("/mobile/activity/Sports/list/activityList?id=" + row.id + "&signUpMethod=" + row.signUpMethod)
|
||||
},
|
||||
sendMsg(row) {
|
||||
this.url = `<a href="` + (APP_DOMAIN + "/mobile/activity/Sports/list/activityList") + `">点击参与</a>`
|
||||
this.$refs.sendMsg.openDialog(row.activityGroupId)
|
||||
},
|
||||
openView(row) {
|
||||
const {id} = row
|
||||
this.$refs.guava.view()
|
||||
setTimeout(() => {
|
||||
this.$refs.info.getInfo(id)
|
||||
}, 500)
|
||||
|
||||
},
|
||||
async openAdd() {
|
||||
this.$refs.guava.edit()
|
||||
setTimeout(() => {
|
||||
this.$refs.activity.openAdd()
|
||||
}, 500)
|
||||
},
|
||||
async openEdit(row) {
|
||||
const {id, applyStartTime, isSave} = row
|
||||
this.formData.id = id
|
||||
const now = moment().valueOf()
|
||||
this.$refs.guava.edit()
|
||||
setTimeout(() => {
|
||||
this.$refs.activity.openEdit(row, true)
|
||||
}, 500)
|
||||
},
|
||||
doDelete(row) {
|
||||
const {id} = row
|
||||
this.$confirm('确定要删除该活动吗?', '提示', {type: 'warning'}).then(async () => {
|
||||
this.$set(row, "loading", true)
|
||||
const resp = await $.post(loc() + "/doDelete", {id});
|
||||
this.$set(row, "loading", false)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
async getActivitys() {
|
||||
const {data} = await $.get("/platform/activity/remind/getActivitys")
|
||||
return data;
|
||||
},
|
||||
async getActivityTypeList(code) {
|
||||
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code: code})
|
||||
return data;
|
||||
},
|
||||
async doOperate() {
|
||||
await this.$refs.activity.operate()
|
||||
},
|
||||
async doSave() {
|
||||
this.$refs.activity.doSave()
|
||||
},
|
||||
pageData() {//加载分页数据
|
||||
sublime.showLoadingbar();//显示loading
|
||||
$.post(loc() + "/pageData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();//关闭loading
|
||||
if (data.code == 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
if ("${@shiro.hasRole('club01')}" === "true") {
|
||||
this.is_club = true
|
||||
}
|
||||
if ("${@shiro.hasRole('H04')}" === "true" || "${@shiro.hasRole('ghzl')}" === "true") {
|
||||
this.is_union = true
|
||||
}
|
||||
if ("${@shiro.hasRole('sysadmin')}" === "true") {
|
||||
this.is_sysadmin = true
|
||||
}
|
||||
if ("${@shiro.hasRole('A06')}" === "true") {
|
||||
this.is_A06 = true
|
||||
}
|
||||
if ("${@shiro.hasRole('H10')}" === "true") {
|
||||
this.is_h10 = true
|
||||
}
|
||||
|
||||
this.pageData()
|
||||
this.activities = await this.getActivitys()
|
||||
this.unitOptions = await getUnits(null)
|
||||
this.activityTypeList = await this.getActivityTypeList("40000")
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,385 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#content .w-e-toolbar, #content .w-e-text-container {
|
||||
z-index: 1 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">计划年份</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">计划名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.name" placeholder="请输入计划名称" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">项目名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.eventId" placeholder="请选择活动项目" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in eventList"
|
||||
:key="item.id"
|
||||
:label="item.allName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="pageData">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="计划列表" :app="this">
|
||||
<template #func>
|
||||
<el-button type="primary" icon="el-icon-edit-outline" size="small"
|
||||
@click="openAdd">
|
||||
创建活动计划
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable">
|
||||
|
||||
<template v-if="column.prop=='carryOut'" scope="{row}">
|
||||
<span v-if="row.carryOut" class="text-success">已执行</span>
|
||||
<span v-if="!row.carryOut" class="text-primary">未执行</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini" :loading="row.loading">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'activity',row}" v-if="!row.carryOut">
|
||||
创建活动
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'view',row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
<template v-if="!flag">
|
||||
<el-button type="primary" @click="operation">确 定</el-button>
|
||||
</template>
|
||||
|
||||
<template v-if="flag">
|
||||
<el-button type="primary" @click="doSave">保 存</el-button>
|
||||
<el-button type="primary" @click="doActivity">确 定</el-button>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<template v-if="!flag">
|
||||
<vi-title title="填写计划信息"></vi-title>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="100px" label-position="left"
|
||||
label-suffix=":" style="padding: 0 2%">
|
||||
|
||||
<el-form-item prop="type" label="活动类型">
|
||||
<el-radio-group v-model="formData.type">
|
||||
<el-radio :label="1" border>校工会活动计划</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="name" label="计划名称">
|
||||
<el-input maxlength="50" placeholder="请填写计划名称" v-model="formData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="time" label="计划时间">
|
||||
<el-date-picker
|
||||
v-model="formData.time"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="event" label="活动项目">
|
||||
<el-select v-model="formData.event" placeholder="请选择活动项目" filterable multiple
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in eventList"
|
||||
:key="item.id"
|
||||
:label="item.allName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="content" label="计划内容" class="is-required">
|
||||
<div id="content"></div>
|
||||
</el-form-item>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="primary" @click="operation">提 交</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<add-activity v-show="flag" :form="activityFormData" ref="activity" @flip="flip"></add-activity>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<plan-info ref="info"></plan-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let E = window.wangEditor
|
||||
const editors = {}
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
let validContent = (rule, value, callback) => {
|
||||
if (!this.formData.content || !dd3s.html2txt(this.formData.content)) {
|
||||
callback(new Error('请填写计划内容'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
eventList: [],
|
||||
flag: false,
|
||||
formData: {
|
||||
name: '',
|
||||
time: '',
|
||||
event: [],
|
||||
content: ''
|
||||
},
|
||||
activityFormData: {
|
||||
personType: 1,
|
||||
activityLevel: 1,
|
||||
gameStyle: 1,
|
||||
applyWay: [2],
|
||||
awardsMode: [],
|
||||
combinationMethod: []
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '计划名称'},
|
||||
{prop: 'time', label: '计划时间'},
|
||||
{prop: 'allName', label: '活动项目'},
|
||||
{prop: 'carryOut', label: '计划状态'},
|
||||
],
|
||||
formRules: {
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
event: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
type: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
||||
content: [{validator: validContent, trigger: ['blur', 'change']}]
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'add-activity': httpVueLoader('/components/activity/school/AddActivity.vue'),
|
||||
'plan-info': httpVueLoader('/components/activity/school/planInfo.vue?v=1.0.0'),
|
||||
},
|
||||
methods: {
|
||||
flip() {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === 'view') {
|
||||
this.openView(row)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(row)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(row)
|
||||
} else if (type === 'activity') {
|
||||
this.openActivity(row)
|
||||
}
|
||||
},
|
||||
openView(row) {
|
||||
const {id} = row
|
||||
this.$refs.info.getInfo(id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
openActivity(row) {
|
||||
this.flag = true
|
||||
this.activityFormData = {}
|
||||
this.$refs.guava.edit()
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs.activity.openAdd(row)
|
||||
})
|
||||
},
|
||||
doSave() {
|
||||
this.$refs.activity.doSave()
|
||||
},
|
||||
doActivity() {
|
||||
this.formData.id ? this.$refs.activity.doEdit() : this.$refs.activity.doAdd()
|
||||
},
|
||||
async openEdit(row) {
|
||||
this.flag = false
|
||||
|
||||
const cloneRow = clone(row)
|
||||
cloneRow.event = JSON.parse(cloneRow.event)
|
||||
this.formData = cloneRow
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
this.initEditor()
|
||||
})
|
||||
},
|
||||
async openAdd() {
|
||||
this.formData = {
|
||||
type: 1
|
||||
}
|
||||
this.flag = false
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
this.initEditor()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.formData = {
|
||||
name: '',
|
||||
time: '',
|
||||
event: [],
|
||||
content: ''
|
||||
}
|
||||
})
|
||||
},
|
||||
async operation() {
|
||||
let url = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const resp = await $.post(loc() + url, {
|
||||
id: this.formData.id,
|
||||
name: this.formData.name,
|
||||
time: this.formData.time,
|
||||
content: this.formData.content,
|
||||
event: JSON.stringify(this.formData.event)
|
||||
})
|
||||
|
||||
loading.close()
|
||||
if(resp.code===0){
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
} else {
|
||||
this.$notify.error({title: '错误', message: '存在未填写的的必填项'});
|
||||
}
|
||||
});
|
||||
},
|
||||
doDelete(row) {
|
||||
const {id} = row
|
||||
this.$confirm('确定要删除该计划吗?', '提示', {type: 'warning'}).then(async () => {
|
||||
const resp = await $.post(loc() + "/doDelete", {id: id});
|
||||
if(resp.code===0){
|
||||
this.pageData()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
initActivityEditor() {
|
||||
let keys = ['athleteQualification', 'registrationMethod', 'competitionMethod', 'rewardMethod', 'precautions', 'eventNotification']
|
||||
keys.forEach(key => {
|
||||
$("#" + key).html("")
|
||||
editors[key] = new E('#' + key)
|
||||
editors[key].config.onchange = (html) => {
|
||||
this.formData[key] = html
|
||||
}
|
||||
editors[key].create()
|
||||
if (this.formData[key]) {
|
||||
editors[key].txt.html(this.formData[key])
|
||||
}
|
||||
})
|
||||
},
|
||||
initEditor() {
|
||||
let keys = ['content']
|
||||
keys.forEach(key => {
|
||||
$("#" + key).html("")
|
||||
editors[key] = new E('#' + key)
|
||||
editors[key].config.onchange = (html) => {
|
||||
this.formData[key] = html
|
||||
}
|
||||
editors[key].create()
|
||||
if (this.formData[key]) {
|
||||
editors[key].txt.html(this.formData[key])
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.eventList = await activity.getEvents()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,402 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年  度</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
@change="getActivitys"
|
||||
type="year"
|
||||
value-format="yyyy" style="width: 100%"
|
||||
placeholder="选择年" :clearable="false">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.activityId" placeholder="请选择活动名称" filterable :clearable="false"
|
||||
style="width: 100%" @change="actChange(pageForm.activityId)">
|
||||
<el-option
|
||||
v-for="item in activityList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工会名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择工会" filterable :clearable="false"
|
||||
style="width: 100%" @change="unionChange(pageForm.unionId)">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-s-order" @click="summary">汇总表</el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right" style="margin-left: auto ">
|
||||
<el-button type="primary" icon="el-icon-printer" @click="print">打 印</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<div id=print>
|
||||
<!-- <el-card shadow="never" class="mt10">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td colspan="11" class="text-center">
|
||||
<span v-if="activityList.find(v=>v.id === pageForm.activityId)">
|
||||
{{ activityList.find(v=>v.id === pageForm.activityId).name }}
|
||||
({{unionName}})
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>项目</td>
|
||||
<td v-for="i in 8">
|
||||
第{{i}}名
|
||||
</td>
|
||||
<td>备注</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['团体项目']">
|
||||
<td style="vertical-align:middle" v-if="0==index"
|
||||
:rowspan="Object.keys(tableDataUnionPrize['团体项目']).length">团体项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span v-if="o.filter(f=>f.ranking==i && f.numberOfPeople!=null) && o.filter(f=>f.ranking==i && f.numberOfPeople!=null).length>0">
|
||||
{{o.filter(f=>f.ranking==i && f.numberOfPeople!=null).map(g=>g.numberOfPeople).reduce((a,b)=>a+b)}}
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['男子项目']">
|
||||
<td style="vertical-align:middle" v-if="0==index"
|
||||
:rowspan="Object.keys(tableDataUnionPrize['男子项目']).length">男子项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
{{o.filter(f=>f.ranking==i).map(g=>g.username).join('、')}}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['女子项目']">
|
||||
<td style="vertical-align:middle" dd v-if="0==index"
|
||||
:rowspan="Object.keys(tableDataUnionPrize['女子项目']).length">女子项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
{{o.filter(f=>f.ranking==i).map(g=>g.username).join('、')}}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>合计</td>
|
||||
<td></td>
|
||||
<td v-for="i in 9">
|
||||
{{lastSum[i]}}
|
||||
</td>
|
||||
</tr>
|
||||
<!– <tr v-for="(o,k,index) in tableDataUnionPrize['其他']">–>
|
||||
<!– <td v-if="0==index" :rowspan="Object.keys(tableDataUnionPrize['其他']).length">其他</td>–>
|
||||
<!– <td>{{k}}</td>–>
|
||||
<!– <td v-for="i in 8">–>
|
||||
<!– <span v-if="o.filter(f=>f.ranking==i && f.numberOfPeople!=null) && o.filter(f=>f.ranking==i && f.numberOfPeople!=null).length>0">–>
|
||||
<!– {{o.filter(f=>f.ranking==i && f.numberOfPeople!=null).map(g=>g.numberOfPeople).reduce((a,b)=>a+b)}}–>
|
||||
<!– </span>–>
|
||||
<!– </td>–>
|
||||
<!– <td></td>–>
|
||||
<!– </tr>–>
|
||||
|
||||
|
||||
</table>
|
||||
</el-card>-->
|
||||
|
||||
<el-card class="mt10" shadow="never" v-if="pageForm.activityId!=null">
|
||||
<vi-title :title="unionName+'奖品名单'"></vi-title>
|
||||
<template>
|
||||
<table class="table table-bordered" v-if="isSummary==1">
|
||||
<tr>
|
||||
<td class="text-center" colspan="11">
|
||||
<span v-if="activityList.find(v=>v.id === pageForm.activityId)">
|
||||
{{ activityList.find(v=>v.id === pageForm.activityId).name }}
|
||||
({{unionName}})
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>项目</td>
|
||||
<td v-for="i in 8">
|
||||
第{{i}}名
|
||||
</td>
|
||||
<td>备注</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['团体项目']">
|
||||
<td :rowspan="Object.keys(tableDataUnionPrize['团体项目']).length" style="vertical-align:middle"
|
||||
v-if="0==index">团体项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span v-if="o.filter(f=>f.ranking==i && f.numberOfPeople!=null) && o.filter(f=>f.ranking==i && f.numberOfPeople!=null).length>0">
|
||||
{{o.filter(f=>f.ranking==i && f.numberOfPeople!=null).map(g=>g.numberOfPeople).reduce((a,b)=>a+b)}}
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['男子项目']">
|
||||
<td :rowspan="Object.keys(tableDataUnionPrize['男子项目']).length" style="vertical-align:middle"
|
||||
v-if="0==index">男子项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
{{o.filter(f=>f.ranking==i).map(g=>g.username).join('、')}}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['女子项目']">
|
||||
<td :rowspan="Object.keys(tableDataUnionPrize['女子项目']).length" dd
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">女子项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
{{o.filter(f=>f.ranking==i).map(g=>g.username).join('、')}}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>合计</td>
|
||||
<td></td>
|
||||
<td v-for="i in 9">
|
||||
{{lastSum[i]}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<el-table :data="tableData" :header-cell-style="{background:'#FAFAFA'}" @sort-change="pageOrder"
|
||||
border row-key="id"
|
||||
size="mini" stripe style="width: 100%"
|
||||
v-if="isSummary==2" v-loading="tableLoading">
|
||||
|
||||
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号"
|
||||
type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in summaryColumns"
|
||||
v-if="isSummary==2">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="签字"
|
||||
show-overflow-tooltip v-if="isSummary==2"></el-table-column>
|
||||
|
||||
</el-table>
|
||||
</template>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
isSummary: 1,
|
||||
activityList: [],
|
||||
unionList: [],
|
||||
unionName: "",
|
||||
pageForm: {
|
||||
activityId: "",
|
||||
unionId: "",
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
summaryColumns: [
|
||||
{prop: 'unionname', label: '分工会'},
|
||||
{prop: 'one', label: '第一名'},
|
||||
{prop: 'two', label: '第二名'},
|
||||
{prop: 'three', label: '第三名'},
|
||||
{prop: 'four', label: '第四名'},
|
||||
{prop: 'fives', label: '第五名'},
|
||||
{prop: 'six', label: '第六名'},
|
||||
{prop: 'seven', label: '第七名'},
|
||||
{prop: 'eight', label: '第八名'},
|
||||
{prop: 'totalPeople', label: '合计'},
|
||||
],
|
||||
tableDataUnionPrize: {},
|
||||
lastSum: {}
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
getTableTdContent(d, i) {
|
||||
return d.filter(v => {
|
||||
if (v.isteampersonal === 1) {
|
||||
if (v.ranking == i) {
|
||||
console.log(v, i)
|
||||
return v.username
|
||||
}
|
||||
} else {
|
||||
if (v.ranking == i) {
|
||||
return v.numberofpeople
|
||||
}
|
||||
}
|
||||
}).map(v => {
|
||||
return v.isteampersonal === 1 ? v.username : v.numberofpeople
|
||||
}).toString()
|
||||
},
|
||||
|
||||
async summary() {
|
||||
if (this.activityList.length === 0) {
|
||||
return
|
||||
}
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
this.isSummary = 2
|
||||
this.tableData = []
|
||||
// this.pageForm.activityId = this.activityList[1].id
|
||||
const {data} = await $.get(loc() + "/summary", this.pageForm)
|
||||
this.$set(this, "tableData", data.score)
|
||||
this.unionName = "汇总"
|
||||
},
|
||||
print() {
|
||||
let subOutputRankPrint = document.getElementById('print');
|
||||
let newContent = subOutputRankPrint.innerHTML;
|
||||
let oldContent = document.body.innerHTML;
|
||||
document.body.innerHTML = newContent;
|
||||
window.print();
|
||||
window.location.reload();
|
||||
document.body.innerHTML = oldContent;
|
||||
return false;
|
||||
},
|
||||
actChange(activityId) {
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
this.pageForm.activityId = ""
|
||||
const activityData = this.activityList.find(v => v.id == activityId)
|
||||
this.pageForm.activityId = activityData.id
|
||||
this.getPrizes()
|
||||
},
|
||||
unionChange(unionId) {
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
this.pageForm.unionId = ""
|
||||
this.isSummary = 1
|
||||
const unionData = this.unionList.find(v => v.id == unionId)
|
||||
this.pageForm.unionId = unionData.id
|
||||
this.unionName = unionData.unionname
|
||||
this.getPrizes()
|
||||
},
|
||||
async getActivitys() {
|
||||
this.tableData = []
|
||||
const {data} = await $.get("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year})
|
||||
this.pageForm.activityId = ""
|
||||
this.activityList = data
|
||||
if (data && data.length > 0) {
|
||||
this.pageForm.activityId = data[0].id
|
||||
}
|
||||
await this.getPrizes()
|
||||
|
||||
},
|
||||
async getPrizes() {
|
||||
const {data} = await $.get(loc() + "/getPrizes", this.pageForm)
|
||||
this.tableDataUnionPrize = data
|
||||
const lastSum = {}
|
||||
for (let i = 1; i <= 8; i++) {
|
||||
let sum = 0
|
||||
if (!$.isEmptyObject(data['男子项目'])) {
|
||||
let xm = []
|
||||
for (let key in data['男子项目']) {
|
||||
xm = xm.concat(data['男子项目'][key])
|
||||
}
|
||||
sum += xm.filter(v => v.ranking === i).length
|
||||
}
|
||||
if (!$.isEmptyObject(data['女子项目'])) {
|
||||
let xm = []
|
||||
for (let key in data['女子项目']) {
|
||||
xm = xm.concat(data['女子项目'][key])
|
||||
}
|
||||
sum += xm.filter(v => v.ranking === i).length
|
||||
}
|
||||
if (!$.isEmptyObject(data['团体项目'])) {
|
||||
let xm = []
|
||||
for (let key in data['团体项目']) {
|
||||
xm = xm.concat(data['团体项目'][key])
|
||||
}
|
||||
const teams = xm.filter(v => v.ranking === i).map(v => Number(v.numberOfPeople))
|
||||
if (teams && teams.length > 0) {
|
||||
sum += teams.reduce((a, b) => a + b)
|
||||
}
|
||||
}
|
||||
lastSum[i] = sum
|
||||
}
|
||||
|
||||
lastSum[9] = Object.values(lastSum).reduce((a, b) => a + b)
|
||||
this.lastSum = lastSum
|
||||
|
||||
// if (this.pageForm.activityId == null) {
|
||||
// this.tableDataUnionPrize = data
|
||||
// } else {
|
||||
// data.eventList.map(v => {
|
||||
// v.sss = []
|
||||
// data.score.map(x => {
|
||||
// if (v.label === x.allname) {
|
||||
// v.sss.push(x)
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// this.tableData = data.eventList
|
||||
// }
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getActivitys()
|
||||
this.unionList = await getUnions(null)
|
||||
if (this.unionList.length > 0) {
|
||||
this.pageForm.unionId = this.unionList[0].id
|
||||
this.unionName = this.unionList[0].unionname
|
||||
}
|
||||
await this.getPrizes()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,959 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.mb10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.d .el-card__header {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.d .el-card__body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.search .search-item {
|
||||
width: calc((100% - 0px) / 4);
|
||||
}
|
||||
|
||||
.search .search-item-label {
|
||||
/*min-width: 70px;*/
|
||||
}
|
||||
|
||||
.el-row-title {
|
||||
margin-bottom: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="platform" id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动年份</div>
|
||||
<el-date-picker :clearable="false" @change="yearChange()" placeholder="选择年份"
|
||||
style="width: 100%" type="year" v-model="pageForm.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动级别</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="changeLevel" clearable
|
||||
placeholder="请选择活动级别"
|
||||
style="width: 100%" v-model="pageForm.activityLevel">
|
||||
<el-option
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
v-for="item in activityTypeList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动名称</div>
|
||||
<el-select @change="getData()" filterable
|
||||
placeholder="请选择活动"
|
||||
style="width: 100%;font-weight:bold;"
|
||||
v-model="pageForm.id">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in activities"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label" v-if="pageForm.activityLevel!=='40003'">
|
||||
院级工会
|
||||
</div>
|
||||
<div class="search-item-label" v-if="pageForm.activityLevel==='40003'">
|
||||
社团名称
|
||||
</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="changeVVV"
|
||||
@clear="changeVVV"
|
||||
clearable
|
||||
filterable placeholder="院级工会筛选"
|
||||
style="width: 100%;font-weight:bold;" v-model="pageForm.unionid">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--#if(!@shiro.hasRole('H04') || !@shiro.hasRole('ghzl')){#-->
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">报名状态</div>
|
||||
<div class="search-item-option">
|
||||
<el-radio-group size="medium" v-model="pageForm.applyed">
|
||||
<el-radio border label="1" style="background-color: white">未报名
|
||||
</el-radio>
|
||||
<el-radio border label="2" style="background-color: white">已报名
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<!--#}#-->
|
||||
|
||||
<!-- <div class="search-item">
|
||||
<div class="search-item-label">导入导出</div>
|
||||
<div class="search-item-option">
|
||||
<el-button type="primary" plain @click="openImport">导入报名人员</el-button>
|
||||
<el-button @click="doExportByEnroll" plain
|
||||
type="primary">导出报名信息
|
||||
</el-button>
|
||||
<!– <el-button @click="doExportByEnroll" icon="el-icon-printer" plain size="small"
|
||||
style="position: absolute;right: 0px" type="primary">导出报名信息
|
||||
</el-button>–>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10 d" shadow="never" style="padding: 20px">
|
||||
<vi-title2 title="报名列表">
|
||||
<template #func>
|
||||
<!--#if(@shiro.hasRole('sysadmin')){#-->
|
||||
<el-button @click="exportUnionNum" size="small" type="primary">导出分工会报名人数
|
||||
</el-button>
|
||||
<el-button @click="exportUnionUser" size="small" type="primary">导出报名人员名单
|
||||
</el-button>
|
||||
<!--#}#-->
|
||||
<!--#if(@shiro.hasRole('ghzl')){#-->
|
||||
<el-button @click="exportUnionUser" size="small" type="primary">导出报名人员名单
|
||||
</el-button>
|
||||
<!--#}#-->
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-row :gutter="20" class="el-row-title" style="margin-left: 0;margin-right: 0;">
|
||||
<el-col :span="2">序号</el-col>
|
||||
<el-col :span="4">年度</el-col>
|
||||
<el-col :span="6">
|
||||
<span v-if="pageForm.activityLevel!=='40003'">分工会名称</span>
|
||||
<span v-if="pageForm.activityLevel==='40003'">社团名称</span>
|
||||
</el-col>
|
||||
<el-col :span="6">活动名称</el-col>
|
||||
<el-col :span="4">人数</el-col>
|
||||
<el-col :span="2">
|
||||
<!-- <el-button style="position: absolute;right: 0px" plain size="small" icon="el-icon-printer"
|
||||
type="primary" @click="doExport">导 出
|
||||
</el-button>-->
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="[]" size="mini" v-if="noneData||tabLoading"
|
||||
v-loading="tabLoading"></el-table>
|
||||
|
||||
<el-card class="box-card mb10" shadow="hover" v-else v-for="app,tabIdx in apply"
|
||||
v-loading="tabLoading">
|
||||
<div class="clearfix" slot="header">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="2">{{tabIdx + 1}}</el-col>
|
||||
<el-col :span="4">{{pageForm.year}}</el-col>
|
||||
<el-col :span="6">
|
||||
{{isDisPlayCode?'('+app.unioncode+')':null}}{{app.unionname}}
|
||||
</el-col>
|
||||
<el-col :span="6">{{pageForm.activityName || '暂无'}}</el-col>
|
||||
<el-col :span="2">{{app.num |money}} 人</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button @click="$set(app,'show',!app.show)"
|
||||
style="float: right; padding: 3px 5px"
|
||||
type="text">{{app.show?'折叠':'展开'}}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<transition name="el-fade-in-linear">
|
||||
<div class="text item transition-box" style="padding: 20px 20px"
|
||||
v-show="app.show">
|
||||
<el-timeline v-if="pageForm.applyType===1||pageForm.applyType===3">
|
||||
<!-- <el-timeline-item timestamp="领队信息" placement="top" v-if="app.leader.username!=null">
|
||||
<el-card shadow="never">
|
||||
<el-form label-suffix=":" label-position="right" label-width="80px"
|
||||
style="margin-top: 30px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名">
|
||||
{{ app.leader.username | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="性别">
|
||||
{{ app.leader.sex | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="工号">
|
||||
{{ app.leader.loginname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="电话">
|
||||
{{ app.leader.mobile | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单位">
|
||||
{{ app.leader.unitname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="教练信息" placement="top" v-if="app.coach.username!=null">
|
||||
<el-card shadow="never">
|
||||
<el-form label-suffix=":" label-position="right" label-width="80px"
|
||||
style="margin-top: 30px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名">
|
||||
{{ app.coach.username | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="性别">
|
||||
{{ app.coach.sex | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="工号">
|
||||
{{ app.coach.loginname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="电话">
|
||||
{{ app.coach.mobile | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单位">
|
||||
{{ app.coach.unitname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
</el-timeline-item>-->
|
||||
|
||||
<el-timeline-item placement="top" timestamp="教职工信息">
|
||||
|
||||
<el-table :data="app.apply2" :key="tableKey" border size="mini"
|
||||
stripe>
|
||||
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="序号"
|
||||
sortable type="index"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns">
|
||||
|
||||
<template scope="{row}" v-if="column.prop=='team'">
|
||||
<span v-if="row.team">{{ row.team }}</span>
|
||||
<span v-if="!row.team">暂无</span>
|
||||
</template>
|
||||
<template scope="{row:{projectType}}"
|
||||
v-else-if="column.prop=='projectType'">
|
||||
{{projectType==1?'单项':'团体'}}
|
||||
</template>
|
||||
|
||||
<!-- <template scope="{row:{divisionLevelLeadership}}"
|
||||
v-else-if="column.prop=='divisionLevelLeadership'">
|
||||
<span v-if="divisionLevelLeadership" class="text-primary">是</span>
|
||||
<span v-else class="text-danger">否</span>
|
||||
</template>-->
|
||||
|
||||
<template scope="{row}"
|
||||
v-else-if="column.prop=='identity'">
|
||||
<el-tag effect="light"
|
||||
v-if="row.identity.includes(1)">运动员
|
||||
</el-tag>
|
||||
<el-tag effect="light"
|
||||
type="success" v-if="row.identity.includes(2)">教练
|
||||
</el-tag>
|
||||
<el-tag effect="light"
|
||||
type="warning" v-if="row.identity.includes(3)">领队
|
||||
</el-tag>
|
||||
<el-tag effect="light"
|
||||
type="warning"
|
||||
v-if="row.identity.includes(4)">处级领导
|
||||
</el-tag>
|
||||
<el-tag effect="light"
|
||||
type="warning" v-if="row.identity.includes(5)">替补
|
||||
</el-tag>
|
||||
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
|
||||
<el-timeline v-else-if="pageForm.applyType===2">
|
||||
<el-timeline-item placement="top" timestamp="领队信息"
|
||||
v-if="app.leader.username!=null">
|
||||
<el-card shadow="never">
|
||||
<el-form label-position="right" label-suffix=":"
|
||||
label-width="80px"
|
||||
style="margin-top: 30px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名">
|
||||
{{ app.leader.username | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="性别">
|
||||
{{ app.leader.sex | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="工号">
|
||||
{{ app.leader.loginname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="电话">
|
||||
{{ app.leader.mobile | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单位">
|
||||
{{ app.leader.unitname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
</el-timeline-item>
|
||||
<el-timeline-item placement="top" timestamp="教练信息"
|
||||
v-if="app.coach.username!=null">
|
||||
<el-card shadow="never">
|
||||
<el-form label-position="right" label-suffix=":"
|
||||
label-width="80px"
|
||||
style="margin-top: 30px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名">
|
||||
{{ app.coach.username | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="性别">
|
||||
{{ app.coach.sex | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="工号">
|
||||
{{ app.coach.loginname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="电话">
|
||||
{{ app.coach.mobile | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单位">
|
||||
{{ app.coach.unitname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
</el-timeline-item>
|
||||
<el-timeline-item placement="top" timestamp="团长信息"
|
||||
v-if="app.head.username!=null">
|
||||
<el-card shadow="never">
|
||||
<el-form label-position="right" label-suffix=":"
|
||||
label-width="80px"
|
||||
style="margin-top: 30px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名">
|
||||
{{ app.head.username | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="性别">
|
||||
{{ app.head.sex | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="工号">
|
||||
{{ app.head.loginname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="电话">
|
||||
{{ app.head.mobile | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单位">
|
||||
{{ app.head.unitname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
</el-timeline-item>
|
||||
<el-timeline-item placement="top" timestamp="工作人员信息"
|
||||
v-if="app.staff.username!=null">
|
||||
<el-card shadow="never">
|
||||
<el-form label-position="right" label-suffix=":"
|
||||
label-width="80px"
|
||||
style="margin-top: 30px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="姓名">
|
||||
{{ app.staff.username | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="性别">
|
||||
{{ app.staff.sex | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="工号">
|
||||
{{ app.staff.loginname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="电话">
|
||||
{{ app.staff.mobile | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单位">
|
||||
{{ app.staff.unitname | str }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
</el-timeline-item>
|
||||
<el-timeline-item placement="top" timestamp="教职工信息">
|
||||
<el-row gutter="40">
|
||||
<el-col :span="4">
|
||||
<div class="search-item">
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doEvent(app)"
|
||||
clearable
|
||||
filterable placeholder="请选择活动项目"
|
||||
style="width: 100%"
|
||||
v-model="app.eventId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.allName"
|
||||
:value="item.eventId"
|
||||
v-for="item in events">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div class="search-item">
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doEventType(app)"
|
||||
allow-create
|
||||
clearable default-first-option
|
||||
filterable placeholder="请选择项目类型"
|
||||
style="width: 100%"
|
||||
v-model="app.projectType">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in projectTypeList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="app.apply2" :key="tableKey" border class="mt10"
|
||||
size="mini"
|
||||
stripe>
|
||||
<el-table-column
|
||||
align="center" header-align="center" label="序号"
|
||||
sortable type="index"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns">
|
||||
|
||||
<template scope="{row}" v-if="column.prop=='team'">
|
||||
<span v-if="row.team">{{ row.team }}</span>
|
||||
<span v-if="!row.team">暂无</span>
|
||||
</template>
|
||||
|
||||
<!-- <template scope="{row:{divisionLevelLeadership}}"
|
||||
v-else-if="column.prop=='divisionLevelLeadership'">
|
||||
<span v-if="divisionLevelLeadership" class="text-primary">是</span>
|
||||
<span v-else class="text-danger">否</span>
|
||||
</template>-->
|
||||
|
||||
<template scope="{row:{projectType}}"
|
||||
v-else-if="column.prop=='projectType'">
|
||||
{{projectType==1?'单项':'团体'}}
|
||||
</template>
|
||||
|
||||
<template scope="{row}"
|
||||
v-else-if="column.prop=='identity'">
|
||||
<el-tag effect="light"
|
||||
v-if="row.identity.includes(1)">运动员
|
||||
</el-tag>
|
||||
<el-tag effect="light"
|
||||
type="success" v-if="row.identity.includes(2)">教练
|
||||
</el-tag>
|
||||
<el-tag effect="light"
|
||||
type="warning" v-if="row.identity.includes(3)">领队
|
||||
</el-tag>
|
||||
<el-tag effect="light"
|
||||
type="warning"
|
||||
v-if="row.identity.includes(4)">处级领导
|
||||
</el-tag>
|
||||
<el-tag effect="light"
|
||||
type="warning" v-if="row.identity.includes(5)">替补
|
||||
</el-tag>
|
||||
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
|
||||
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
</el-card>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="importVisible"
|
||||
title="导入"
|
||||
width="50%"
|
||||
>
|
||||
<el-timeline>
|
||||
<el-timeline-item placement="top" timestamp="下载模板">
|
||||
<el-card>
|
||||
<el-button
|
||||
@click="location.href='/platform/basics/downloadTemplate?filePath=activity/ActivityApplyUser.xlsx&fileName=导入模板.xlsx'"
|
||||
icon="el-icon-download" size="medium"
|
||||
style="width: 200px"
|
||||
type="">下载模板
|
||||
</el-button>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item placement="top" timestamp="上传文件">
|
||||
<el-card>
|
||||
<el-upload
|
||||
:auto-upload="false"
|
||||
:file-list="importData.fileList"
|
||||
:limit="1"
|
||||
:on-change="(file, fileList) => {
|
||||
importData.fileList = fileHandleChange(file, fileList,{type:['xls','xlsx']})
|
||||
}"
|
||||
:on-remove="(file, fileList) => {
|
||||
importData.fileList = fileHandleRemove(file, fileList)
|
||||
}"
|
||||
name="file"
|
||||
ref="upload">
|
||||
<el-button icon="el-icon-upload" size="medium" style="width: 200px" type="">
|
||||
选择文件
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button :disabled="importLoading" @click="importVisible = false">取 消</el-button>
|
||||
<el-button :loading="importLoading" @click="doImport" type="primary">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
importData: {},
|
||||
importLoading: false,
|
||||
importVisible: false,
|
||||
events: [],
|
||||
activityTypeList: [],
|
||||
noneData: true,
|
||||
tabLoading: true,
|
||||
activities: [],
|
||||
apply: [],
|
||||
apply2: [],
|
||||
unions: [],
|
||||
rootData: [],
|
||||
tableKey: '',
|
||||
pageForm: {
|
||||
id: '',
|
||||
unionid: '',
|
||||
year: new Date().getFullYear() + '',
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'allName', label: '项目名称', sortable: true, width: '200px'},
|
||||
// {prop: 'team', label: '所属队', sortable: true},
|
||||
{prop: 'username', label: '姓名'},
|
||||
{prop: 'loginname', label: '教工号'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
/* {prop: 'divisionLevelLeadership', label: '是否处级领导', sortable: true},*/
|
||||
{prop: 'unitname', label: '单位', sortable: true},
|
||||
{prop: 'mobile', label: '电话'},
|
||||
// {prop: 'projectType', label: '项目类型', sortable: true},
|
||||
// {prop: 'identity', label: '身份', sortable: true, width: '300px'},
|
||||
// {prop: 'notes', label: '备注'},
|
||||
{prop: 'campus', label: '参加地点'},
|
||||
],
|
||||
projectTypeList: [
|
||||
{id: '1', name: '单项'},
|
||||
{id: '2', name: '团体'},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'info': httpVueLoader('/components/activity/school/Info.vue'),
|
||||
},
|
||||
filters: {
|
||||
money(val) {
|
||||
return val ? val : 0
|
||||
},
|
||||
str(val) {
|
||||
return val ? val : '暂无'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'pageForm.applyed': (val) => {
|
||||
vue.changeVVV(val)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
exportUnionNum() {
|
||||
window.open(loc() + '/exportUnionNum?activityId=' + this.pageForm.id + '&activityLevel=' + this.pageForm.activityLevel)
|
||||
},
|
||||
exportUnionUser() {
|
||||
window.open("/platform/activity/common/exportXlsx?id=" + this.pageForm.id + '&unionId=' + this.pageForm.unionid)
|
||||
// window.open("/platform/activity/common/exportXlsx2?id=" + this.pageForm.id+'&unionId='+this.pageForm.unionid)
|
||||
},
|
||||
|
||||
doImport() {
|
||||
if (!this.importData.fileList.length) {
|
||||
this.notifyWarning("请选择文件!")
|
||||
return
|
||||
}
|
||||
const data = new FormData();
|
||||
this.importData.fileList.forEach((val) => {
|
||||
data.append("file", val.raw, val.raw.name);
|
||||
data.append("activityId", this.pageForm.id);
|
||||
});
|
||||
this.importLoading = true
|
||||
$.ajax({
|
||||
url: loc() + "/importUserActivitys",
|
||||
type: "post",
|
||||
data: data,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: (data) => {
|
||||
if (!data.code) {
|
||||
this.notifySuccess(data.msg);
|
||||
this.getData();
|
||||
this.importVisible = false
|
||||
} else {
|
||||
this.notifyWarning(data.msg)
|
||||
}
|
||||
this.importLoading = false
|
||||
},
|
||||
error: (data) => {
|
||||
this.notifyWarning(data.msg)
|
||||
this.importLoading = false
|
||||
}
|
||||
});
|
||||
},
|
||||
openImport() {
|
||||
this.importData = {
|
||||
fileList: []
|
||||
}
|
||||
if (!this.pageForm.id) {
|
||||
this.notifyWarning("请先选择活动名称")
|
||||
return
|
||||
}
|
||||
this.importVisible = true;
|
||||
},
|
||||
doExportByEnroll() {
|
||||
const {id, unionid} = this.pageForm
|
||||
if (unionid === "") {
|
||||
this.$notify.warning({title: '警告', message: "请选择要导出的工会"});
|
||||
return
|
||||
}
|
||||
window.open(loc() + "/doExportByEnroll?id=" + id + "&unionId=" + unionid)
|
||||
},
|
||||
async changeLevel() {
|
||||
await this.getNearActivity()
|
||||
},
|
||||
doExport() {
|
||||
const {id, unionid} = this.pageForm
|
||||
|
||||
location.href = "/platform/activity/common/exportXlsx?id=" + id
|
||||
},
|
||||
async yearChange() {
|
||||
this.pageForm.id = null
|
||||
await this.getNearActivity()
|
||||
},
|
||||
changeVVV() {
|
||||
if (this.pageForm.unionid) {
|
||||
this.apply = this.rootData.filter(v => {
|
||||
return v.id === this.pageForm.unionid
|
||||
})
|
||||
} else {
|
||||
this.apply = JSON.parse(JSON.stringify(this.rootData))
|
||||
}
|
||||
|
||||
if (this.pageForm.applyed === '1') {
|
||||
this.apply = this.apply.filter(v => {
|
||||
return v.num === 0
|
||||
})
|
||||
} else if (this.pageForm.applyed === '2') {
|
||||
this.apply = this.apply.filter(v => {
|
||||
return v.num > 0
|
||||
})
|
||||
}
|
||||
|
||||
this.tableKey = new Date().getTime()
|
||||
},
|
||||
async getNearActivity() {
|
||||
const resp = await $.get(loc() + "/getNearActivity", {
|
||||
year: this.pageForm.year,
|
||||
activityLevel: this.pageForm.activityLevel
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.activities = resp.data
|
||||
if (resp.data.length) {
|
||||
this.pageForm.id = resp.data[0].id
|
||||
this.getData()
|
||||
} else {
|
||||
this.pageForm.unionid = ""
|
||||
this.unionis = []
|
||||
this.pageForm.id = ""
|
||||
this.noneData = true
|
||||
this.tabLoading = false
|
||||
}
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async changeActivit() {
|
||||
const resp = await $.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.id})
|
||||
this.events = resp
|
||||
|
||||
},
|
||||
doEventType(app) {
|
||||
const {apply, projectType} = app
|
||||
if (!app.projectType) {
|
||||
|
||||
this.$set(app, "apply2", apply)
|
||||
} else {
|
||||
const arr = apply.filter(i => {
|
||||
return i.projectType == projectType
|
||||
})
|
||||
this.$set(app, "apply2", arr)
|
||||
}
|
||||
},
|
||||
doEvent(app) {
|
||||
const {apply, eventId} = app
|
||||
|
||||
if (!app.eventId) {
|
||||
this.$set(app, "apply2", apply)
|
||||
} else {
|
||||
const arr = apply.filter(i => {
|
||||
return !i.unionLeader && !i.unionCoach && i.evid == eventId
|
||||
})
|
||||
this.$set(app, "apply2", arr)
|
||||
}
|
||||
},
|
||||
async getData() {
|
||||
this.noneData = true
|
||||
this.tabLoading = true
|
||||
await this.changeActivit()
|
||||
const activity = this.activities.filter(v => {
|
||||
return v.id === this.pageForm.id
|
||||
})
|
||||
|
||||
this.pageForm.activityName = activity.length > 0 ? activity[0].name : null
|
||||
this.pageForm.applyType = activity[0].applyType
|
||||
|
||||
const resp = await $.get(loc() + "/getData", this.pageForm)
|
||||
this.tabLoading = false
|
||||
if (resp.code === 0) {
|
||||
const v = resp.data
|
||||
if (v.length) {
|
||||
/* if (activity[0].applyType == 2) {*/
|
||||
v.forEach(x => {
|
||||
|
||||
const leaders = x.apply.filter(i => {
|
||||
return i.unionLeader
|
||||
})
|
||||
|
||||
x.leader = {}
|
||||
if (leaders.length) {
|
||||
x.leader = leaders[0]
|
||||
}
|
||||
|
||||
const coachs = x.apply.filter(i => {
|
||||
return i.unionCoach
|
||||
})
|
||||
|
||||
x.coach = {}
|
||||
if (coachs.length) {
|
||||
x.coach = coachs[0]
|
||||
}
|
||||
|
||||
const heads = x.apply.filter(i => {
|
||||
return i.unionHead
|
||||
})
|
||||
|
||||
x.head = {}
|
||||
if (heads.length) {
|
||||
x.head = heads[0]
|
||||
}
|
||||
|
||||
const staffs = x.apply.filter(i => {
|
||||
return i.unionStaff
|
||||
})
|
||||
|
||||
x.staff = {}
|
||||
if (staffs.length) {
|
||||
x.staff = staffs[0]
|
||||
}
|
||||
|
||||
x.apply = x.apply.filter(i => {
|
||||
return !i.unionLeader && !i.unionCoach && !i.unionHead && !i.unionStaff
|
||||
})
|
||||
|
||||
})
|
||||
/*}*//* else {
|
||||
v.forEach(x => {
|
||||
const leaders = x.apply.filter(i => {
|
||||
return i.identity.includes(3)
|
||||
})
|
||||
x.leader = {}
|
||||
if (leaders.length) {
|
||||
x.leader = leaders[0]
|
||||
}
|
||||
const coachs = x.apply.filter(i => {
|
||||
return i.identity.includes(2)
|
||||
})
|
||||
|
||||
x.coach = {}
|
||||
if (coachs.length) {
|
||||
x.coach = coachs[0]
|
||||
}
|
||||
|
||||
x.apply = x.apply.filter(i => {
|
||||
return i.identity.includes(1)
|
||||
})
|
||||
})
|
||||
}*/
|
||||
|
||||
|
||||
v.sort((a, b) => {
|
||||
return b.num - a.num
|
||||
})
|
||||
this.unions = v.map(v => {
|
||||
return {id: v.id, unionname: v.unionname}
|
||||
})
|
||||
|
||||
if (this.unions.length == 1) {
|
||||
this.pageForm.unionid = this.unions[0].id
|
||||
}
|
||||
this.rootData = JSON.parse(JSON.stringify(v))
|
||||
this.rootData.forEach(x => {
|
||||
x.apply2 = clone(x.apply)
|
||||
})
|
||||
this.noneData = false
|
||||
} else {
|
||||
this.unions = []
|
||||
this.pageForm.unionid = ""
|
||||
this.noneData = true
|
||||
|
||||
}
|
||||
if (this.pageForm.activityLevel !== '40001' && this.rootData && this.rootData.length > 0) {
|
||||
this.$set(this.rootData[0], "show", true)
|
||||
}
|
||||
this.apply = this.rootData
|
||||
|
||||
this.tableKey = new Date().getTime()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
this.noneData = true
|
||||
}
|
||||
},
|
||||
async getActivityTypeList(code) {
|
||||
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code: code})
|
||||
return data;
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.changeActivit()
|
||||
this.activityTypeList = await this.getActivityTypeList("40000")
|
||||
this.$set(this.pageForm, "activityLevel", this.activityTypeList[0].code)
|
||||
await this.getNearActivity()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,318 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动名称</div>
|
||||
<div class="search-item-option">
|
||||
<!-- <el-input v-model="pageForm.name" placeholder="请输入活动名称" clearable></el-input>-->
|
||||
<el-select v-model="pageForm.activityId" placeholder="请选择活动项目" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in activitys"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="search-item">
|
||||
<div class="search-item-label">活动项目:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.eventId" placeholder="请选择活动项目" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in events"
|
||||
:key="item.id"
|
||||
:label="item.allname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="活动信息" :app="this"></table-tool>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable">
|
||||
|
||||
<template v-if="column.prop=='events'" scope="{row}">
|
||||
<span>{{row.allName}}</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='gameStyle'" scope="{row}">
|
||||
<span>{{activity.school.gameStyle[row.gameStyle]}}</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='startTime'" scope="{row}">
|
||||
{{moment(row.startTime).format('YYYY-MM-DD')}} -
|
||||
{{moment(row.endTime).format('YYYY-MM-DD')}}
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='state'"
|
||||
scope="{row:{close,applyStartTime,applyEndTime,startTime,endTime}}">
|
||||
<div v-html="activity.school.getStatus(close,applyStartTime,applyEndTime,startTime,endTime)"></div>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini" :loading="row.loading">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item
|
||||
v-if="moment(row.applyEndTime).valueOf() >= moment().valueOf() && moment().valueOf() >= moment(row.applyStartTime).valueOf()"
|
||||
:command="{type:'remind',row}">
|
||||
发送提醒
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'view',row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<vi-title title="发送提醒"></vi-title>
|
||||
<el-divider content-position="right">
|
||||
<el-button @click="sendAllRemind" type="primary" size="mini"><i class="el-icon-position"></i> 一键发送提醒
|
||||
</el-button>
|
||||
</el-divider>
|
||||
|
||||
<el-table :data="unionData" style="width: 100%;margin-bottom: 20px" row-key="id" v-loading="tableLoading"
|
||||
class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column type="expand" class="info">
|
||||
<template slot-scope="{row}">
|
||||
<el-card class="box-card">
|
||||
<el-table :data="row.users" style="width: 100%;margin-bottom: 20px" row-key="id" border
|
||||
stripe :size="tableSize" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod"
|
||||
label="序号" width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in applyColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable">
|
||||
|
||||
<template scope="{row}" v-if="column.prop=='divisionLevelLeadership'">
|
||||
<span v-if="row.divisionLevelLeadership==true" class="text-primary">是</span>
|
||||
<span v-else class="text-danger">否</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row:{identity}}" v-else-if="column.prop=='identity'">
|
||||
<el-tag v-if="identity==1" effect="dark">运动员</el-tag>
|
||||
<el-tag v-if="identity==2" type="success" effect="dark">教练</el-tag>
|
||||
<el-tag v-if="identity==3" type="warning" effect="dark">领队</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in unionColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable">
|
||||
|
||||
<template scope="{row}" v-if="column.prop=='telephone'">
|
||||
<span>{{row.telephone?row.telephone:'暂无'}}</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-if="column.prop=='unionleader'">
|
||||
<span>{{row.unionleader?row.unionleader:'暂无'}}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-tooltip class="item" effect="dark" content="发送提醒" placement="top-start">
|
||||
<el-button @click="sendRemind(row)" type="primary" size="mini"
|
||||
icon="el-icon-message"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="info"></info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
planList: [],
|
||||
typeList: [],
|
||||
events: [],
|
||||
activitys: [],
|
||||
unionData: [],
|
||||
unionColumns: [
|
||||
{prop: 'unionname', label: '工会名称'},
|
||||
{prop: 'unionleader', label: '负责人'},
|
||||
{prop: 'telephone', label: '联系方式'},
|
||||
{prop: 'num', label: '已报名人数'},
|
||||
],
|
||||
applyColumns: [
|
||||
{prop: 'username', label: '姓名'},
|
||||
{prop: 'loginname', label: '工号'},
|
||||
{prop: 'mobile', label: '电话'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'divisionLevelLeadership', label: '是否处级领导'},
|
||||
{prop: 'identity', label: '身份'}
|
||||
],
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '活动名称'},
|
||||
{prop: 'address', label: '活动地点'},
|
||||
{prop: 'gameStyle', label: '活动类型'},
|
||||
{prop: 'startTime', label: '活动日期'},
|
||||
{prop: 'state', label: '活动状态'},
|
||||
{prop: 'applyNum', label: '已报名人数'},
|
||||
]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'info': httpVueLoader('/components/activity/school/Info.vue'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === 'remind') {
|
||||
this.openRemind(row)
|
||||
} else if (type === 'view') {
|
||||
this.openView(row)
|
||||
}
|
||||
},
|
||||
openView(row) {
|
||||
const {id} = row
|
||||
this.$refs.guava.view()
|
||||
setTimeout(()=>{
|
||||
this.$refs.info.getInfo(id)
|
||||
},500)
|
||||
},
|
||||
async openRemind(row) {
|
||||
this.activityId = row.id
|
||||
this.$refs.guava.edit()
|
||||
const {data} = await $.get(loc() + "/getUnionRemind", {activityId: row.id})
|
||||
this.unionData = data
|
||||
},
|
||||
sendRemind(row) {
|
||||
if (!row.telephone) {
|
||||
this.$notify.warning({title: '警告', message: '该工会联系方式为空,无法发送短信进行提醒!'});
|
||||
return
|
||||
}
|
||||
this.$confirm("确定要发送提醒短信给【" + row.unionname + "】的负责人吗?", '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const resp = await $.get(loc() + "/sendRemind", {phone: row.telephone, unionname: row.unionname})
|
||||
if(resp.code===0){
|
||||
this.notifySuccess(resp.msg)
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
});
|
||||
},
|
||||
sendAllRemind() {
|
||||
this.$confirm("确定发送提醒短信给所有未报名的分工会吗?", '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在发送...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
|
||||
const resp = await $.get(loc() + "/sendAllRemind", {activityId: this.activityId})
|
||||
|
||||
loading.close()
|
||||
if(resp.code===0){
|
||||
this.notifySuccess(resp.msg)
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
});
|
||||
},
|
||||
async getActivitys() {
|
||||
const {data} = await $.get(loc() + "/getActivitys")
|
||||
return data;
|
||||
|
||||
},
|
||||
async getEvents() {
|
||||
const resp = await $.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
|
||||
this.events = resp
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.activitys = await this.getActivitys()
|
||||
this.planList = await activity.getSchoolActivityPlan()
|
||||
this.unitOptions = await getUnits(null)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,868 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年  度</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
@change="yearChange"
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy" style="width: 100%"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.activityId" placeholder="请选择活动名称" filterable clearable
|
||||
style="width: 100%" @change="doSearchS">
|
||||
<el-option
|
||||
v-for="item in activityList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动项目</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.eventId" placeholder="请选择活动项目" filterable clearable
|
||||
style="width: 100%" @change="doSearchS">
|
||||
<el-option
|
||||
v-for="item in events"
|
||||
:key="item.eventId"
|
||||
:label="item.allName"
|
||||
:value="item.eventId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="项目列表" :app="this">
|
||||
<template #label_end>
|
||||
<!--<el-radio-group v-model="pageForm.isMenWomen" @change="doSearch"
|
||||
style="margin-left: 10px">
|
||||
<el-radio-button :label="1">全部</el-radio-button>
|
||||
<el-radio-button :label="2">男子</el-radio-button>
|
||||
<el-radio-button :label="3">女子</el-radio-button>
|
||||
<el-radio-button :label="4">团体</el-radio-button>
|
||||
</el-radio-group>-->
|
||||
<el-checkbox-group @change="doSearch" class="mr10" v-model="pageForm.isMenWomen">
|
||||
<el-checkbox-button :key="2" :label="2">男子</el-checkbox-button>
|
||||
<el-checkbox-button :key="3" :label="3">女子</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
|
||||
<el-checkbox-group @change="doSearch" v-model="pageForm.isMenWomen">
|
||||
<el-checkbox-button :key="4" :label="4">单项</el-checkbox-button>
|
||||
<el-checkbox-button :key="5" :label="5">团体</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.groupName" placeholder="请选择组别"
|
||||
filterable clearable
|
||||
style="width: 100%;margin-bottom: 5px;margin-left: 10px" @change="doSearch">
|
||||
<el-option
|
||||
v-for="item in groupList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column prop="allName" align="center" header-align="center"
|
||||
label="项目名称"></el-table-column>
|
||||
|
||||
<el-table-column prop="rs" align="center" header-align="center"
|
||||
label="获奖数量"></el-table-column>
|
||||
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini" :loading="row.loading">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'input',row}">
|
||||
录入成绩
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'view',row}">
|
||||
查  看
|
||||
</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
<el-button type="primary" @click="openAdd" v-if="awardsMode==1">临时获奖人员添加</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<template>
|
||||
<vi-title title="录入成绩"></vi-title>
|
||||
<el-form :model="formData" ref="addForm" label-width="120px"
|
||||
label-suffix=":">
|
||||
<el-row gutter="40">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="name" label="活动名称">
|
||||
<el-input maxlength="200" disabled v-model="name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="allName" label="活动项目">
|
||||
<el-input maxlength="200" disabled v-model="allName"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<div style="display: flex;margin: 20px 0">
|
||||
<el-divider content-position="left">获奖名次列表</el-divider>
|
||||
<div style="padding-left: 10px;padding-top: 10px;">
|
||||
<el-tooltip class="item" effect="dark" content="点击添加活动人员" placement="top">
|
||||
<el-button style="float: right;margin-bottom: 10px" type="primary" icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="openAddUser">
|
||||
添加
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<el-table style="margin-bottom: 20px" border stripe :data="userData" size="small"
|
||||
v-loading="userTabLoading">
|
||||
<el-table-column
|
||||
type="index" label="序号" header-align="center" align="center" width="100">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center"
|
||||
:label="awardsMode==1?'姓名':'分工会'"
|
||||
prop="id">
|
||||
<template scope="{$index,row}">
|
||||
<el-select v-model="row.userId" @change="(val)=>{userDetailsChange(val,row)}"
|
||||
placeholder="请输入姓名" filterable clearable
|
||||
style="width: 100%" size="small" v-if="awardsMode==1">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:disabled="item.disabled"
|
||||
:key="item.id"
|
||||
:label="item.username+'('+item.loginname+')'+item.sex"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="row.unionId" @change="(val)=>{unionDetailsChange(val,row)}"
|
||||
placeholder="请输入分工会" filterable clearable
|
||||
style="width: 100%" size="small" v-if="awardsMode==2">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:disabled="item.disabled"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="名次" prop="ranking">
|
||||
<template scope="{$index,row}">
|
||||
<el-select v-model="row.ranking" @change="rankingChange(row)"
|
||||
placeholder="请输入名次" filterable clearable
|
||||
style="width: 100%" size="small">
|
||||
<el-option
|
||||
v-for="item in rankingList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="积分" prop="integral">
|
||||
<template scope="{row}">
|
||||
<el-input-number v-model="row.integral"
|
||||
type="text"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="人数" prop="numberOfPeople"
|
||||
v-if="awardsMode==2">
|
||||
<template scope="{row}">
|
||||
<el-input-number v-model="row.numberOfPeople"
|
||||
type="text"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="分工会" prop="unionname"
|
||||
v-if="awardsMode==1">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.unionname" disabled placeholder="分工会"
|
||||
type="text"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
|
||||
width="150px">
|
||||
<template scope="{$index,row}">
|
||||
<el-button type="danger" icon="el-icon-delete" circle
|
||||
@click="delUser($index,row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<el-form :model="formData" ref="addForm" label-width="120px" label-suffix=":">
|
||||
<el-row gutter="40">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="name" label="活动名称">
|
||||
<el-input maxlength="200" disabled v-model="name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="allName" label="活动项目">
|
||||
<el-input maxlength="200" disabled v-model="allName"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div style="display: flex;margin: 20px 0">
|
||||
<el-divider content-position="left">获奖名次列表</el-divider>
|
||||
</div>
|
||||
<el-table style="margin-bottom: 20px" border stripe :data="viewData" size="small"
|
||||
v-loading="userTabLoading">
|
||||
<el-table-column
|
||||
type="index" label="序号" header-align="center" align="center" width="100">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center"
|
||||
:label="awardsMode==1?'姓名':'分工会'"
|
||||
prop="id">
|
||||
<template scope="{$index,row}">
|
||||
<el-select v-model="row.userId" @change="(val)=>{userDetailsChange(val,row)}"
|
||||
placeholder="请输入姓名" filterable clearable disabled
|
||||
style="width: 100%" size="small" v-if="awardsMode==1">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.id"
|
||||
:label="item.username+'('+item.loginname+')'+item.sex"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="row.unionId" @change="(val)=>{unionDetailsChange(val,row)}"
|
||||
placeholder="请输入分工会" filterable clearable disabled
|
||||
style="width: 100%" size="small" v-if="awardsMode==2">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="名次" prop="ranking">
|
||||
<template scope="{$index,row}">
|
||||
<el-select v-model="row.ranking" @change="rankingChange(row)"
|
||||
placeholder="请输入名次" filterable clearable disabled
|
||||
style="width: 100%" size="small">
|
||||
<el-option
|
||||
v-for="item in rankingList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="积分" prop="integral">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.integral" disabled type="text"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="人数" prop="numberOfPeople"
|
||||
v-if="awardsMode==2">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.numberOfPeople" disabled type="text"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="分工会" prop="unionname"
|
||||
v-if="awardsMode==1">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.unionname" disabled placeholder="分工会"
|
||||
type="text"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
<el-dialog
|
||||
title="添加人员"
|
||||
:visible.sync="dialogVisible"
|
||||
width="40%"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="100px">
|
||||
<!-- <el-form-item prop="loginname" label="工  号">
|
||||
<el-input maxlength="50" placeholder="请填写工号" v-model="formData.loginname"
|
||||
type="text" @blur="userBlur"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="username" label="姓  名">
|
||||
<el-input maxlength="50" placeholder="请填写姓名" v-model="formData.username"
|
||||
type="text"></el-input>
|
||||
</el-form-item>-->
|
||||
<el-form-item prop="mobile" label="姓名或工号">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="formData.userid"
|
||||
filterable
|
||||
clearable
|
||||
remote
|
||||
reserve-keyword
|
||||
allow-create
|
||||
default-first-option
|
||||
placeholder="请输入姓名或工号查找"
|
||||
:remote-method="userRemoteMethod"
|
||||
@change="userChange2">
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.username+'('+item.loginname+')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="loginname" label="工  号">
|
||||
<el-input maxlength="50" placeholder="请填写工号" v-model="formData.loginname"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="mobile" label="电  话">
|
||||
<el-input maxlength="50" placeholder="请填写电话" v-model="formData.mobile"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="sex" label="性  别">
|
||||
<el-radio-group v-model="formData.sex">
|
||||
<el-radio :label="'男'" border>男</el-radio>
|
||||
<el-radio :label="'女'" border>女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="unitId" label="所在单位">
|
||||
<el-select v-model="formData.unitId" placeholder="请选择所在单位" clearable @change="unitChange" filterable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unitOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="unionname" label="所属工会">
|
||||
<el-input disabled placeholder="所属工会" v-model="formData.unionname"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAddUser">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
|
||||
userOptions: [],
|
||||
groupList: [
|
||||
{value: 1, name: "甲组"},
|
||||
{value: 2, name: "乙组"},
|
||||
{value: 3, name: "丙组"},
|
||||
{value: 4, name: "丁组"}
|
||||
],
|
||||
dialogVisible: false,
|
||||
viewData: [],
|
||||
userTabLoading: false,
|
||||
awardsMode: "",
|
||||
isMenWomen: "",
|
||||
allName: "",
|
||||
name: "",
|
||||
eventId: "",
|
||||
activityId: "",
|
||||
userData: [],
|
||||
userList: [],
|
||||
userList2: [],
|
||||
unionList: [],
|
||||
unionList2: [],
|
||||
activityList: [],
|
||||
events: [],
|
||||
unitOptions: [],
|
||||
rankingList: [
|
||||
{name: "第一名", id: 1},
|
||||
{name: "第二名", id: 2},
|
||||
{name: "第三名", id: 3},
|
||||
{name: "第四名", id: 4},
|
||||
{name: "第五名", id: 5},
|
||||
{name: "第六名", id: 6},
|
||||
{name: "第七名", id: 7},
|
||||
{name: "第八名", id: 8}],
|
||||
sexList: [{sex: "男", id: 1}, {sex: "女", id: 2}],
|
||||
pageForm: {
|
||||
isMenWomen: [],
|
||||
year: new Date().getFullYear() + "",
|
||||
},
|
||||
formRules: {
|
||||
unitId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
username: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
loginname: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
},
|
||||
methods: {
|
||||
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === 'view') {
|
||||
this.openView(row)
|
||||
} else if (type === 'input') {
|
||||
this.openInput(row)
|
||||
}
|
||||
},
|
||||
async userRemoteMethod(query) {
|
||||
if (query) {
|
||||
const userData = await searchUser(query, null, null, null, null)
|
||||
this.userOptions = userData
|
||||
}
|
||||
},
|
||||
userChange2(userid) {
|
||||
const aa = this.userOptions.find(v => v.id === userid)
|
||||
|
||||
if (aa != undefined) {
|
||||
this.$set(this.formData, "username", aa.username)
|
||||
this.$set(this.formData, "loginname", aa.loginname)
|
||||
this.$set(this.formData, "mobile", aa.mobile)
|
||||
this.$set(this.formData, "unitId", aa.unitid)
|
||||
this.$set(this.formData, "unionId", aa.unionid)
|
||||
this.$set(this.formData, "unionname", aa.unionname)
|
||||
this.$set(this.formData, "sex", aa.sex)
|
||||
} else {
|
||||
this.$set(this.formData, "username", userid)
|
||||
}
|
||||
|
||||
},
|
||||
async unitChange() {
|
||||
const uniotData = this.unitOptions.find(v => v.id == this.formData.unitId)
|
||||
this.$set(this.formData, "unionname", uniotData.unionname)
|
||||
this.$set(this.formData, "unionId", uniotData.unionid)
|
||||
this.$set(this.formData, "unitname", uniotData.name)
|
||||
},
|
||||
async openAdd() {
|
||||
this.unitOptions = await getUnits(null)
|
||||
this.$set(this.formData, "activityId", this.activityId)
|
||||
this.$set(this.formData, "eventId", this.eventId)
|
||||
this.$set(this.formData, "awardsMode", this.awardsMode)
|
||||
this.$set(this.formData, "identity", ['1'])
|
||||
this.$set(this.formData, "status", 2)
|
||||
this.$set(this.formData, "sex", "男")
|
||||
this.dialogVisible = true
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
|
||||
},
|
||||
async doAddUser() {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.userList.some(v => v.id === this.formData.userid)) {
|
||||
this.notifyWarning("您添加的运动员已经是远动员!")
|
||||
return
|
||||
}
|
||||
await $.post(loc() + "/doAdd", {
|
||||
activityResults: JSON.stringify(this.userData),
|
||||
activityId: this.activityId,
|
||||
eventId: this.eventId
|
||||
})
|
||||
const pageForm = clone(this.formData)
|
||||
pageForm.identity = JSON.stringify(this.formData.identity)
|
||||
const resp = await $.post(loc() + "/doAddUser", pageForm)
|
||||
if(resp.code===0){
|
||||
await this.userChange()
|
||||
this.userDetailsChange()
|
||||
this.dialogVisible = false
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async yearChange() {
|
||||
this.activityList = []
|
||||
this.events = []
|
||||
this.$set(this.pageForm, "activityId", "")
|
||||
this.$set(this.pageForm, "eventId", "")
|
||||
const {data} = await $.get("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year})
|
||||
this.activityList = data
|
||||
if (data.length > 0) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
}
|
||||
await this.doSearchS()
|
||||
},
|
||||
async changeActivit() {
|
||||
const resp = await $.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
|
||||
this.events = resp
|
||||
},
|
||||
async doAdd() {
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
this.userData.activityId = this.activityId
|
||||
this.userData.eventId = this.eventId
|
||||
const resp = await $.post(loc() + "/doAdd", {
|
||||
activityResults: JSON.stringify(this.userData),
|
||||
activityId: this.activityId,
|
||||
eventId: this.eventId
|
||||
})
|
||||
loading.close()
|
||||
if(resp.code===0){
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
rankingChange() {
|
||||
for (let ranking = 1; ranking <= 8; ranking++) {
|
||||
let size = 0
|
||||
let indexArray = [];
|
||||
this.userData.forEach((v, index) => {
|
||||
if (ranking == v.ranking) {
|
||||
size++
|
||||
indexArray.push(index)
|
||||
}
|
||||
})
|
||||
if (size == 1) {
|
||||
/*
|
||||
if (this.awardsMode == 2) {
|
||||
this.userData[indexArray[0]].integral = (this.calScore(ranking) / 2).toFixed(2);
|
||||
console.log(this.calScore(ranking),2)
|
||||
} else {
|
||||
this.userData[indexArray[0]].integral = this.calScore(ranking).toFixed(2);
|
||||
console.log(this.calScore(ranking),1)
|
||||
}*/
|
||||
|
||||
this.userData[indexArray[0]].integral = this.calScore(ranking).toFixed(2);
|
||||
} else {
|
||||
var scoreArray = 0;
|
||||
for (var i = 0; i < size; i++) {
|
||||
scoreArray += this.calScore(ranking * 1 + i * 1);
|
||||
}
|
||||
/* if (this.awardsMode == 2) {
|
||||
scoreArray = scoreArray / size / 2;
|
||||
console.log(scoreArray, 2)
|
||||
} else {
|
||||
scoreArray = scoreArray / size;
|
||||
console.log(scoreArray, 1)
|
||||
}*/
|
||||
scoreArray = scoreArray / size;
|
||||
indexArray.forEach(v => {
|
||||
this.userData[v].integral = scoreArray.toFixed(2);
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
calScore(ranking) {
|
||||
let score;
|
||||
if (ranking < 5) {// 1 2 3 4
|
||||
if (ranking < 3) {//1 2
|
||||
if (ranking == 1) {
|
||||
score = this.awardsMode == 1 ? 9 : 9 * 2;
|
||||
} else if (ranking == 2) {
|
||||
score = this.awardsMode == 1 ? 7 : 7 * 2;
|
||||
}
|
||||
} else {//3 4
|
||||
if (ranking == 3) {
|
||||
score = this.awardsMode == 1 ? 6 : 6 * 2;
|
||||
} else if (ranking == 4) {
|
||||
score = this.awardsMode == 1 ? 5 : 5 * 2;
|
||||
}
|
||||
}
|
||||
} else {//5 6 7 8
|
||||
if (ranking < 7) {//5 6
|
||||
if (ranking == 5) {
|
||||
score = this.awardsMode == 1 ? 4 : 4 * 2;
|
||||
} else if (ranking == 6) {
|
||||
score = this.awardsMode == 1 ? 3 : 3 * 2;
|
||||
}
|
||||
} else {//7 8 9
|
||||
if (ranking == 7) {
|
||||
score = this.awardsMode == 1 ? 2 : 2 * 2;
|
||||
} else if (ranking == 8) {
|
||||
score = this.awardsMode == 1 ? 1 : 1 * 2;
|
||||
} else if (ranking == 9) {
|
||||
score = this.awardsMode == 1 ? 1 : 1 * 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return score;
|
||||
},
|
||||
userDetailsChange(val, row) {
|
||||
const useridArr = this.userData.map(v => v.userId)
|
||||
console.log(useridArr)
|
||||
this.userList.forEach(v => {
|
||||
v.disabled = useridArr.includes(v.id)
|
||||
if (row && row.userId === v.id) {
|
||||
const o = {
|
||||
unionId: v.unionid,
|
||||
activityId: this.activityId,
|
||||
eventId: this.eventId,
|
||||
isTeamPersonal: 1,
|
||||
unionname: v.unionname
|
||||
}
|
||||
Object.assign(row, o)
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
console.log(this.userList)
|
||||
},
|
||||
async unionDetailsChange(val, row) {
|
||||
let data = ''
|
||||
if (row) {
|
||||
const {unionId} = row
|
||||
data = await $.get(loc() + "/getUnionDetails", {
|
||||
activityId: this.activityId,
|
||||
eventId: this.eventId,
|
||||
unionId: unionId
|
||||
})
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
const unionIdArr = this.userData.map(v => v.unionId)
|
||||
this.unionList.forEach(v => {
|
||||
v.disabled = unionIdArr.includes(v.id)
|
||||
if (row && row.unionId === v.id) {
|
||||
const o = {
|
||||
numberOfPeople: data.data,
|
||||
activityId: this.activityId,
|
||||
eventId: this.eventId,
|
||||
isTeamPersonal: 2
|
||||
}
|
||||
Object.assign(row, o)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
delUser(index, row) {
|
||||
this.userData.splice(index, 1)
|
||||
this.userDetailsChange()
|
||||
this.unionDetailsChange()
|
||||
},
|
||||
async getUserList() {
|
||||
const {data} = await $.get(loc() + "/getUserList", {
|
||||
activityId: this.activityId,
|
||||
eventId: this.eventId,
|
||||
isMenWomen: this.isMenWomen
|
||||
})
|
||||
return data;
|
||||
|
||||
},
|
||||
async getUnionList(row) {
|
||||
const {activityId, eventId} = row
|
||||
const {data} = await $.get(loc() + "/getUnionList", {
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
return data;
|
||||
},
|
||||
openAddUser() {
|
||||
this.userData.push({})
|
||||
},
|
||||
async userChange() {
|
||||
this.userList = await this.getUserList()
|
||||
this.userList2 = this.userList
|
||||
this.userData = []
|
||||
const {data} = await $.get(loc() + "/getUserData", {
|
||||
activityId: this.activityId,
|
||||
eventId: this.eventId,
|
||||
isMenWomen: this.isMenWomen
|
||||
})
|
||||
if (data.length > 0) {
|
||||
this.userData = data
|
||||
this.viewData = data
|
||||
}
|
||||
this.$forceUpdate();
|
||||
|
||||
},
|
||||
|
||||
async getUnionData(row) {
|
||||
const {activityId, eventId} = row
|
||||
const {data} = await $.get(loc() + "/getUnionData", {
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
return data
|
||||
},
|
||||
|
||||
|
||||
async openView(row) {
|
||||
this.isMenWomen = ""
|
||||
this.userData = []
|
||||
this.viewData = []
|
||||
this.userList = []
|
||||
this.awardsMode = row.awardsMode
|
||||
this.name = row.name
|
||||
this.allName = row.allName
|
||||
this.activityId = row.activityId
|
||||
this.eventId = row.eventId
|
||||
if (row.awardsMode == 2) {
|
||||
this.unionList = await this.getUnionList(row)
|
||||
this.viewData = await this.getUnionData(row)
|
||||
await this.unionDetailsChange(row)
|
||||
} else {
|
||||
await this.userChange()
|
||||
this.userDetailsChange()
|
||||
}
|
||||
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async openInput(row) {
|
||||
this.isMenWomen = ""
|
||||
this.userData = []
|
||||
this.userList = []
|
||||
this.awardsMode = row.awardsMode
|
||||
this.name = row.name
|
||||
this.allName = row.allName
|
||||
this.activityId = row.activityId
|
||||
this.eventId = row.eventId
|
||||
this.isMenWomen = row.isMenWomen
|
||||
if (row.awardsMode == 2) {
|
||||
this.unionList = await this.getUnionList(row)
|
||||
this.userData = await this.getUnionData(row)
|
||||
await this.unionDetailsChange()
|
||||
} else {
|
||||
await this.userChange()
|
||||
this.userDetailsChange()
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
|
||||
|
||||
},
|
||||
async getActivitys() {
|
||||
const {data} = await $.get("/platform/activity/remind/getActivitys")
|
||||
return data;
|
||||
|
||||
},
|
||||
async doSearchS() {
|
||||
this.doSearch()
|
||||
await this.changeActivit()
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tabLoading = true
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.isMenWomen = JSON.stringify(pageForm.isMenWomen)
|
||||
$.post(base + "/platform/activity/results/input/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tabLoading = false
|
||||
if (data.code == 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
},
|
||||
|
||||
async created() {
|
||||
this.yearChange()
|
||||
this.pageData()
|
||||
/* this.activityList = await this.getActivitys()
|
||||
if (this.activityList.length) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
}
|
||||
await this.changeActivit()
|
||||
this.pageData()*/
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,151 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava" padding="0">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动项目:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.events" placeholder="请选择活动项目" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in events"
|
||||
:key="item.id"
|
||||
:label="item.allName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="pageData">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="活动信息" :app="this"></table-tool>
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable">
|
||||
|
||||
<template v-if="column.prop=='identity'" scope="{row}">
|
||||
<span v-if="row.identity===1">运动员</span>
|
||||
<span v-if="row.identity===2">教练</span>
|
||||
<span v-if="row.identity===3">领队</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='events'" scope="{row}">
|
||||
<span>{{row.allName}}</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='gameStyle'" scope="{row}">
|
||||
<span>{{activity.school.gameStyle[row.gameStyle]}}</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='startTime'" scope="{row}">
|
||||
{{moment(row.startTime).format('YYYY-MM-DD')}} -
|
||||
{{moment(row.endTime).format('YYYY-MM-DD')}}
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='state'"
|
||||
scope="{row:{close,applyStartTime,applyEndTime,startTime,endTime}}">
|
||||
<div v-html="activity.school.getStatus(close,applyStartTime,applyEndTime,startTime,endTime)"></div>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini" :loading="row.loading">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'pass',row}">
|
||||
通过
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'fail',row}">
|
||||
不通过
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
events: [],
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '申请人工号'},
|
||||
{prop: 'username', label: '申请人姓名'},
|
||||
{prop: 'mobile', label: '申请人电话'},
|
||||
{prop: 'identity', label: '申请角色'},
|
||||
{prop: 'allName', label: '活动项目'},
|
||||
{prop: 'startTime', label: '活动日期'},
|
||||
{prop: 'state', label: '活动状态'},
|
||||
]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === 'pass') {
|
||||
this.doPassFail(row, 2)
|
||||
} else if (type === 'fail') {
|
||||
this.doPassFail(row, 3)
|
||||
}
|
||||
},
|
||||
async doPassFail(row, status) {
|
||||
const resp = await $.post(loc() + "/doPassFail", {id: row.id, status: status})
|
||||
if(resp.code===0){
|
||||
this.pageData()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.events = await activity.getEvents()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,443 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
/*max-height: calc(100vh - 50px);
|
||||
overflow: hidden;*/
|
||||
}
|
||||
|
||||
.query-row {
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
|
||||
.query-row-title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
/* .el-select, .el-input {
|
||||
width: 80%;
|
||||
}*/
|
||||
|
||||
.el-date-editor.el-input, .el-date-editor.el-input__inner {
|
||||
width: 175px !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava"
|
||||
style="width: 100%;min-height: 100%;background-color: #f0f2f5;padding: 20px;box-sizing: border-box;">
|
||||
<template>
|
||||
<div style="max-height: 250px">
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
@change="getActivitys"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年" :clearable="false">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select v-model="pageForm.activityId" placeholder="请选择活动名称" filterable
|
||||
:clearable="false" @change="activityChange" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in activityList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button" v-if="isUnion">
|
||||
<el-select v-model="pageForm.unionname" placeholder="请选择工会" filterable clearable
|
||||
@change="unionChange(pageForm.unionId)" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.unionname">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button type="primary" icon="el-icon-search" @click="getYear8(1)">年度男子团体总分</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="getYear8(2)">年度女子团体总分</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="annualResults">年度团体总分</el-button>
|
||||
<el-button type="primary" icon="el-icon-printer" @click="doExcelCj" class="mr10">导出成绩excel
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" style="margin-top: 10px">
|
||||
|
||||
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">按活动统计:</el-col>
|
||||
<el-col class="query-row-content" v-if="isSearchOptions">
|
||||
<el-button
|
||||
style="margin-left: 10px"
|
||||
size="medium"
|
||||
v-for="item in searchOptions"
|
||||
:key="item.id"
|
||||
:type="item.name" @click="searchClick(item.id)">{{item.name}}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col class="query-row-content" v-else>
|
||||
<el-button style="margin-left: 10px"
|
||||
size="medium" @click="gradesClick(9)">成绩统计
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
||||
|
||||
<div class="pull-right offscreen-right" style="margin-left: auto">
|
||||
<!--
|
||||
<el-button type="primary" icon="el-icon-printer" @click="doExport8ByActivity"
|
||||
v-if="[11,12].includes(isSearchOptions)&&pageForm.activityId">导出
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-printer" @click="doGetYear8" v-else-if="isYear8">导出
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-printer" @click="print" v-else>打 印</el-button>-->
|
||||
<el-button type="primary" icon="el-icon-printer" @click="doExportByActivityStatisticsType">
|
||||
导出
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
<div id=print ref="print">
|
||||
<el-card shadow="never" class="mt10"
|
||||
v-show="[1,2,3,4,5,9,10].includes(isSearchOptions)&&isSearchOptions">
|
||||
<vi-title v-if="isSearchOptions==1" title="男子单项成绩"></vi-title>
|
||||
<vi-title v-if="isSearchOptions==2" title="女子单项成绩"></vi-title>
|
||||
<vi-title v-if="isSearchOptions==3" title="男子团体成绩"></vi-title>
|
||||
<vi-title v-if="isSearchOptions==4" title="女子团体成绩"></vi-title>
|
||||
<vi-title v-if="isSearchOptions==5" title="男女混合类成绩"></vi-title>
|
||||
<vi-title v-if="isSearchOptions==9&&isSearch" title="分工会男子项目积分"></vi-title>
|
||||
<vi-title v-if="isSearchOptions==9&&!isSearch" title="分工会项目成绩"></vi-title>
|
||||
<vi-title v-if="isSearchOptions==10" title="分工会女子项目积分"></vi-title>
|
||||
<is-male-female :form="pageForm" ref="female"></is-male-female>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10" v-show="[6,7,8].includes(isSearchOptions)&&isSearchOptions">
|
||||
<vi-title v-if="isSearchOptions==6" title="男子项目前八"></vi-title>
|
||||
<vi-title v-if="isSearchOptions==7" title="女子项目前八"></vi-title>
|
||||
<vi-title v-if="isSearchOptions==8" title="综合类前八"></vi-title>
|
||||
<el-row>
|
||||
<top-eight :form="pageForm" ref="doeight"></top-eight>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10" v-show="[11,12].includes(isSearchOptions)&&isSearchOptions">
|
||||
<vi-title v-if="isSearchOptions==11" title="分工会男子总分前八"></vi-title>
|
||||
<vi-title v-if="isSearchOptions==12" title="分工会女子总分前八"></vi-title>
|
||||
<score-top-eight :form="pageForm" ref="doTopEight"></score-top-eight>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10" v-show="[99].includes(isSearchOptions)">
|
||||
<vi-title v-if="isSearchOptions==99" title="全年成绩"></vi-title>
|
||||
<el-table :data="annualResultsTableData" style="width: 100%;height: 100%" stripe border
|
||||
show-summary
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini" fixed ref="annualResults"
|
||||
>
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
label="名次"
|
||||
width="80px" fixed></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in annualTableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
isMenWomen: "",
|
||||
isUnion: false,
|
||||
isYear8: false,
|
||||
annualTableColumns: [],
|
||||
annualResultsTableData: [],
|
||||
annualMaxHeight: 0,
|
||||
colspan: [],
|
||||
eventList: [],
|
||||
score: [],
|
||||
titleCol: 0,
|
||||
activityList: [],
|
||||
events: [],
|
||||
unionList: [],
|
||||
units: [],
|
||||
isSearch: true,
|
||||
searchOptions: [],
|
||||
Options: [
|
||||
/* {id: 1, name: "男子单项"},
|
||||
{id: 2, name: "女子单项"},
|
||||
{id: 3, name: "男子团体"},
|
||||
{id: 4, name: "女子团体"},
|
||||
{id: 5, name: "男女混合类"},*/
|
||||
{id: 9, name: "分工会男子项目积分"},
|
||||
{id: 10, name: "分工会女子项目积分"},
|
||||
{id: 6, name: "男子项目前八"},
|
||||
{id: 7, name: "女子项目前八"},
|
||||
{id: 8, name: "团体前八"},
|
||||
|
||||
{id: 11, name: "分工会男子总分前八"},
|
||||
{id: 12, name: "分工会女子总分前八"},
|
||||
|
||||
],
|
||||
isSearchOptions: 9,
|
||||
pageForm: {
|
||||
unionname: '',
|
||||
activityId: "",
|
||||
personTypes: [],
|
||||
year: new Date().getFullYear() + "",
|
||||
},
|
||||
activityStatisticsType: 0//统计类型说明:1 年度男子团体总分2.年度女子团体总分3.年度团体总分4.分工会男子项目积分5.分工会女子项目积分,依次后推
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'is-male-female': httpVueLoader('/components/activity/score/isMaleFemale.vue?v=' + new Date().getTime()),
|
||||
'top-eight': httpVueLoader('/components/activity/score/topEight.vue?v=' + new Date().getTime()),
|
||||
'score-top-eight': httpVueLoader('/components/activity/score/scoreTopEight.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doExportByActivityStatisticsType() {
|
||||
const {activityId, year} = this.pageForm
|
||||
const url = "/platform/activity/statistics/export"
|
||||
if (this.activityStatisticsType === 1 || this.activityStatisticsType === 2) {
|
||||
window.open(url + "/getYear8?year=" + year + "&isMenWomen=" + this.isMenWomen)
|
||||
} else if (this.activityStatisticsType === 3) {
|
||||
window.open(url + "/getAnnualResults?year=" + year)
|
||||
} else if (this.activityStatisticsType === 4 || this.activityStatisticsType === 5) {
|
||||
let sex = this.activityStatisticsType === 4 ? "男" : "女"
|
||||
window.open(url + "/isMaleFemale?activityId=" + activityId + "&sex=" + sex + "&awardsMode=4")
|
||||
} else if (this.activityStatisticsType === 6 || this.activityStatisticsType === 7 || this.activityStatisticsType === 8) {
|
||||
let sex = this.activityStatisticsType === 6 ? "男" : "女"
|
||||
let awardsMode = this.activityStatisticsType === 8 ? 2 : 1
|
||||
window.open(url + "/isTopEight?activityId=" + activityId + "&sex=" + sex + "&awardsMode=" + awardsMode)
|
||||
} else if (this.activityStatisticsType === 9 || this.activityStatisticsType === 10) {
|
||||
let sex = this.activityStatisticsType === 9 ? "男" : "女"
|
||||
window.open(url + "/isScoreTopEight?activityId=" + activityId + "&sex=" + sex)
|
||||
}
|
||||
},
|
||||
doExport8ByActivity() {
|
||||
window.open(loc() + "/doExport8ByActivity?activityId=" + this.pageForm.activityId + "&isMenWomen=" + (this.isSearchOptions === 11 ? 1 : 2))
|
||||
|
||||
},
|
||||
doExcelCj() {
|
||||
const {activityId, unionname} = this.pageForm
|
||||
let unionId = ''
|
||||
if (unionname) {
|
||||
const unionlist = clone(this.unionList)
|
||||
unionId = unionlist.find(v => v.unionname === unionname).id
|
||||
}
|
||||
window.open(loc() + "/doExcelCj?activityId=" + activityId + "&unionId=" + unionId)
|
||||
|
||||
},
|
||||
print() {
|
||||
let subOutputRankPrint = document.getElementById('print');
|
||||
let newContent = subOutputRankPrint.innerHTML;
|
||||
let oldContent = document.body.innerHTML;
|
||||
document.body.innerHTML = newContent;
|
||||
window.print();
|
||||
window.location.reload();
|
||||
document.body.innerHTML = oldContent;
|
||||
return false;
|
||||
|
||||
},
|
||||
activityChange() {
|
||||
const aa = this.activityList.find(v => v.id == this.pageForm.activityId)
|
||||
if (aa.applyType == 1) {
|
||||
this.isSearch = false
|
||||
this.searchOptions = [{id: 9, name: "分工会项目成绩"}]
|
||||
} else {
|
||||
this.searchOptions = this.Options
|
||||
}
|
||||
this.searchClick(9)
|
||||
},
|
||||
unionChange() {
|
||||
this.searchClick(9)
|
||||
},
|
||||
searchClick(id) {
|
||||
if (id === 9) {
|
||||
this.activityStatisticsType = 4
|
||||
} else if (id === 10) {
|
||||
this.activityStatisticsType = 5
|
||||
} else if (id === 6) {
|
||||
this.activityStatisticsType = 6
|
||||
} else if (id === 7) {
|
||||
this.activityStatisticsType = 7
|
||||
} else if (id === 8) {
|
||||
this.activityStatisticsType = 8
|
||||
} else if (id === 11) {
|
||||
this.activityStatisticsType = 9
|
||||
} else if (id === 12) {
|
||||
this.activityStatisticsType = 10
|
||||
}
|
||||
this.isSearchOptions = id
|
||||
if (id <= 5 || id == 9 || id == 10) {
|
||||
if (id == 1 || id == 2) {
|
||||
this.isUnion = false
|
||||
this.isYear8 = false
|
||||
this.pageForm.sex = id == 1 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 1
|
||||
} else if (id == 3 || id == 4) {
|
||||
this.isUnion = false
|
||||
this.isUnionisYear8 = false
|
||||
this.pageForm.sex = id == 3 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 2
|
||||
} else if (id == 9 || id == 10) {
|
||||
this.isUnion = true
|
||||
this.pageForm.sex = id == 9 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 4
|
||||
} else {
|
||||
this.pageForm.awardsMode = 3
|
||||
}
|
||||
this.$refs.female.isMaleFemale()
|
||||
} else if (id == 6 || id == 7 || id == 8) {
|
||||
if (id == 6 || id == 7) {
|
||||
this.isUnion = false
|
||||
this.isYear8 = false
|
||||
this.pageForm.sex = id == 6 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 1
|
||||
} else if (id == 8) {
|
||||
this.pageForm.awardsMode = 2
|
||||
}
|
||||
this.$refs.doeight.isTopEight()
|
||||
} else if (id == 11 || id == 12) {
|
||||
this.pageForm.sex = id == 11 ? "男" : "女"
|
||||
this.$refs.doTopEight.isScoreTopEight()
|
||||
}
|
||||
},
|
||||
async doGetYear8() {
|
||||
location.href = loc() + "/doGetYear8?year=" + this.pageForm.year + "&isMenWomen=" + this.isMenWomen
|
||||
},
|
||||
async getYear8(isMenWomen) {
|
||||
this.activityStatisticsType = isMenWomen
|
||||
this.isMenWomen = isMenWomen
|
||||
this.isUnion = false
|
||||
this.isYear8 = true
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.$set(this.pageForm, "unionname", null)
|
||||
this.annualTableColumns = []
|
||||
this.annualResultsTableData = []
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据正在查询中,请稍后...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
this.isSearchOptions = 99
|
||||
const {data} = await $.get(loc() + "/getYear8", {
|
||||
year: this.pageForm.year,
|
||||
isMenWomen: isMenWomen
|
||||
})
|
||||
this.annualResultsTableData = data.score
|
||||
this.annualResultsTableData = this.annualResultsTableData.sort((a, b) => b['总分'] - a['总分'])
|
||||
|
||||
data.label.forEach(v => {
|
||||
this.annualTableColumns.push({label: v, prop: v})
|
||||
})
|
||||
loading.close();
|
||||
},
|
||||
|
||||
async annualResults() {
|
||||
this.activityStatisticsType = 3
|
||||
this.isUnion = false
|
||||
this.isYear8 = false
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.$set(this.pageForm, "unionname", null)
|
||||
this.annualTableColumns = []
|
||||
this.annualResultsTableData = []
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据正在查询中,请稍后...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
this.isSearchOptions = 99
|
||||
const {data} = await $.get(loc() + "/getAnnualResults", {
|
||||
year: this.pageForm.year
|
||||
})
|
||||
this.annualResultsTableData = data.score
|
||||
this.annualResultsTableData = this.annualResultsTableData.sort((a, b) => b['总分'] - a['总分'])
|
||||
|
||||
data.label.forEach(v => {
|
||||
this.annualTableColumns.push({label: v, prop: v})
|
||||
})
|
||||
loading.close();
|
||||
},
|
||||
async getActivitys() {
|
||||
|
||||
const {data} = await $.get(loc() + "/getActivitys", {year: this.pageForm.year})
|
||||
this.pageForm = {
|
||||
activityId: "",
|
||||
year: this.pageForm.year
|
||||
},
|
||||
this.activityList = data
|
||||
|
||||
},
|
||||
async changeActivit() {
|
||||
const resp = await $.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
|
||||
this.events = resp
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.searchOptions = this.Options
|
||||
this.unionList = await getUnions(null)
|
||||
await this.getActivitys()
|
||||
if (this.activityList.length) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.searchClick(9)
|
||||
}, 200)
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,422 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.remindTextArea textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.remindClass {
|
||||
width: 100%;
|
||||
white-space: break-spaces;
|
||||
font-size: 14px;
|
||||
line-height: 25px;
|
||||
background-color: white;
|
||||
max-height: 600px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #1867b0;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<h3 style="color: #1867b0">场地预约</h3>
|
||||
</template>
|
||||
|
||||
<template>
|
||||
<el-divider content-position="left">申请信息填写</el-divider>
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="addForm">
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预约人" prop="reserve_person_username">
|
||||
<el-input readonly placeholder="预约人"
|
||||
v-model="formData.reserve_person_username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预约人工号" prop="reserve_person_loginname">
|
||||
<el-input readonly placeholder="预约人工号"
|
||||
v-model="formData.reserve_person_loginname"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预约人性别" prop="reserve_person_sex">
|
||||
<el-input readonly placeholder="预约人性别"
|
||||
v-model="formData.reserve_person_sex"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="reserve_person_phone">
|
||||
<el-input readonly placeholder="联系电话"
|
||||
v-model="formData.reserve_person_phone"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请部门" prop="reserve_person_unit">
|
||||
<el-select disabled
|
||||
placeholder="申请部门"
|
||||
v-model="formData.reserve_person_unit">
|
||||
<el-option :label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in units">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请工会" prop="reserve_person_unionname">
|
||||
<el-input readonly placeholder="申请工会"
|
||||
v-model="formData.reserve_person_unionname"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预约场地" prop="site_id">
|
||||
<el-select clearable @change="siteChange"
|
||||
filterable placeholder="请选择预约场地"
|
||||
v-model="formData.site_id">
|
||||
<el-option :key="item.id" :label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in siteInfoList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div style="margin-top: 10px">
|
||||
<span style="color: red">提示:选择不同的预约场地,可以查看不同场地的申请情况!</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预约开始时间" prop="reserve_start_time">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
:picker-options="pickerOptions"
|
||||
placeholder="请选择预约开始时间"
|
||||
@focus="timeEditable"
|
||||
:editable="false"
|
||||
v-model="formData.reserve_start_time"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
<!-- <span class="text-danger">由于2024年3月14,15两日开展教代会会议故无法申请该两天的场地。</span>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预约结束时间" prop="reserve_end_time">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
:editable="false"
|
||||
@focus="timeEditable"
|
||||
placeholder="请选择预约结束时间"
|
||||
:picker-options="pickerOptions"
|
||||
v-model="formData.reserve_end_time"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="预约活动项目" prop="reserve_activity">-->
|
||||
<!-- <el-input placeholder="请填写预约活动项目" maxlength="100"-->
|
||||
<!-- v-model="formData.reserve_activity"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预约事由" prop="reserve_cause">
|
||||
<el-input placeholder="请填写预约事由" maxlength="100"
|
||||
v-model="formData.reserve_cause"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="参加人数" prop="reserve_join_user_num">
|
||||
<el-input placeholder="请填写参加人数"
|
||||
v-model="formData.reserve_join_user_num"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="场地需求" prop="reserve_demand">-->
|
||||
<!-- <el-input placeholder="请填写场地需求" maxlength="100"-->
|
||||
<!-- v-model="formData.reserve_demand"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-divider content-position="left">场地预约申请情况</el-divider>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px;padding: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize"
|
||||
empty-text="该场地暂无预约"
|
||||
border
|
||||
class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="primary" @click="doSubmit()">提 交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="writeRemindDialog" top="50px" width="60%"
|
||||
append-to-body>
|
||||
<div style="padding: 0 20px">
|
||||
<h4>职工之家场地预约</h4>
|
||||
<h4>主管部门:校工会</h4>
|
||||
<h3 style="text-align: center">欢迎使用《职工之家场地预约申请流程》服务!</h3>
|
||||
<h4 style="font-weight: bold">流程说明:</h4>
|
||||
<h4 style="font-weight: bold">一、为提高职工之家场地使用效率,充分保障我校相关活动正常有序开展,特制订本管理规定。</h4>
|
||||
<h4 style="font-weight: bold">二、职工之家场地是服务于学校及各部门教职工重大会议及重要文化活动的重要场所,由校工会遵循“申请与统筹协调”相结合的原则统一调度与管理。</h4>
|
||||
<h4 style="font-weight: bold">三、场地管理</h4>
|
||||
<div style="padding-left: 30px;">
|
||||
<h4>1.校工会现有场地3个,位于校工会一层。其中多功能厅座位80个,党员之家会议室座位20个,研讨室座位12个。</h4>
|
||||
<h4>2.职工之家场地的使用安排遵循校级活动优先的原则,兼顾院系活动。如无校级重大会议及活动安排,则按照预约时间顺序安排使用。</h4>
|
||||
<h4>3.校工会负责场地的使用协调、保障场地及设备日常维护;仅提供开水服务,会场布置(大屏设备调试等)及善后工作由各使用单位自行负责。</h4>
|
||||
<h4>4.各使用单位应负责参会人员在会场内的组织和管理工作,保证会后公共设施完好并物归原位,做好使用期间的安全防范等工作。</h4>
|
||||
</div>
|
||||
<h4 style="font-weight: bold">四、职工之家场地申请使用程序</h4>
|
||||
<div style="padding-left: 30px;">
|
||||
<h4>1.使用单位至少提前两天使用南京体育学院信息门户中的“智慧工会系统”申请,经审批通过后方可使用。</h4>
|
||||
<h4>2.需要使用多媒体设备(电子大屏、音视频设备)的单位,请与信息化中心联系,并委派专人提前一天到校工会调试,校工会原则上不提供现场值守服务。</h4>
|
||||
<h4>3.校工会对每次使用情况进行登记、检查与反馈。</h4>
|
||||
</div>
|
||||
<h4 style="font-weight: bold">五、各单位、个人在会场时应自觉遵守以下要求,拒不执行者,校工会有权取消其使用资格。</h4>
|
||||
<div style="padding-left: 30px;">
|
||||
<h4>1.全场禁止吸烟,禁止餐饮。</h4>
|
||||
<h4>2.讲究卫生,禁止随地吐痰、乱丢垃圾;自觉维护良好的秩序,严禁大声喧哗;使用结束后应保持场地干净整洁,会议物品应及时清理。</h4>
|
||||
<h4>3.爱护场地内部的设备、设施、家具和陈设。使用后负责将物品摆放回原位并保证电子大屏及音响等多媒体设备完好,造成损坏须照价赔偿。</h4>
|
||||
<h4>4.如需张贴会标、条幅,须按照管理人员要求在指定位置张贴悬挂,会后应及时拆除;因随意张贴损坏墙面等设施应给予修复或照价赔偿。</h4>
|
||||
<h4>5.严禁使用礼花、喷雾、鞭炮等危险物品。</h4>
|
||||
<h4>6.遇到紧急或异常情况,使用单位应及时报告,并采取应急措施,积极配合有关部门做好善后处理工作。</h4>
|
||||
</div>
|
||||
<h4 style="font-weight: bold">六、本管理规定的解释权归校工会。</h4>
|
||||
<h4 style="font-weight: bold">七、相关事项联系方式:</h4>
|
||||
<div style="padding-left: 30px;">
|
||||
<h4>多功能厅、研讨室使用咨询——校工会办公室</h4>
|
||||
<h4>联系电话:84755127</h4>
|
||||
<h4>党员之家会议室使用咨询——党委组织部、综合考核办公室</h4>
|
||||
<h4>联系电话:84755117 </h4>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
<!-- <div v-html="config.writeRemind"></div>-->
|
||||
<div class="text-center" slot="footer">
|
||||
<el-button @click="writeRemindDialog = false" type="primary">开始办理</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
|
||||
const validateEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择结束时间'))
|
||||
}
|
||||
if (this.formData.reserve_start_time) {
|
||||
//判断是否跨天预约
|
||||
const startTime = this.formData.reserve_start_time.substr(0, 10);
|
||||
const endTime = value.substr(0, 10);
|
||||
if (endTime > startTime) {
|
||||
callback(new Error('预约仅限当天时间段,请勿跨天预约!'))
|
||||
}
|
||||
if (Date.parse(value) <= Date.parse(this.formData.reserve_start_time)) {
|
||||
callback(new Error('结束时间必须大于开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
return {
|
||||
writeRemindDialog: false,
|
||||
units: [],
|
||||
siteInfoList: [],
|
||||
formData: {},
|
||||
tableData: [],
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
// const twoDaysLater = new Date(); // 获取当前日期
|
||||
// const day = time.getDay();
|
||||
// twoDaysLater.setDate(twoDaysLater.getDate());
|
||||
// // return time.getTime() < twoDaysLater.getTime() || [0, 6].includes(day)
|
||||
// return time.getTime() <= twoDaysLater.getTime() || [0, 6].includes(day)
|
||||
|
||||
const today = new Date();
|
||||
today.setHours(0,0,0,0);
|
||||
const day = time.getDay()
|
||||
const year = time.getFullYear();
|
||||
const month = time.getMonth();
|
||||
const date = time.getDate();
|
||||
|
||||
if (time.getTime() < today.getTime()){
|
||||
return true;
|
||||
}
|
||||
|
||||
if (year === 2024 && month === 3 && date === 28){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (year === 2024 && month === 4 && date === 11){
|
||||
return false;
|
||||
}
|
||||
|
||||
if ([0,6].includes(day)){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
selectableRange: '08:30:00 - 17:00:00',
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '场地名称', prop: 'sitename'},
|
||||
{label: '开始时间', prop: 'reserve_start_time'},
|
||||
{label: '结束时间', prop: 'reserve_end_time'},
|
||||
{label: '预约人姓名', prop: 'reserve_person_username'},
|
||||
{label: '预约人部门', prop: 'reserve_person_unitname'},
|
||||
{label: '联系电话', prop: 'reserve_person_phone'},
|
||||
{label: '预约事由', prop: 'reserve_cause'},
|
||||
],
|
||||
formRules: {
|
||||
reserve_start_time: [{required: true, message: '请选择开始时间', trigger: ['change', 'blur']}],
|
||||
site_id: [{required: true, message: '请选择预约场地', trigger: ['change', 'blur']}],
|
||||
// reserve_activity: [{required: true, message: '请选填写活动项目', trigger: ['change', 'blur']}],
|
||||
reserve_cause: [{required: true, message: '请选填写预约事由', trigger: ['change', 'blur']}],
|
||||
reserve_join_user_num: [{required: true, message: '请选填写参加人数', trigger: ['change', 'blur']}],
|
||||
// reserve_demand: [{required: true, message: '请填写场地需求', trigger: ['change', 'blur']}],
|
||||
reserve_end_time: [{required: true, validator: validateEndTime, trigger: ['change', 'blur']}],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
timeEditable() {//组件禁止组件里面的input输入值
|
||||
this.$nextTick(() => {
|
||||
let els = document.querySelectorAll('.el-date-picker__editor-wrap input');
|
||||
for (var i = 0; i <= els.length - 1; i++) {
|
||||
els[i].setAttribute('readonly', 'readonly');
|
||||
}
|
||||
})
|
||||
},
|
||||
async findAllOpenSite() {
|
||||
const resp = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
if (resp.code === 0) {
|
||||
this.siteInfoList = resp.data
|
||||
}
|
||||
},
|
||||
async siteChange() {
|
||||
const resp = await $.get('/platform/activity/site/apply/siteChange', {siteId: this.formData.site_id})
|
||||
console.log(resp)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
const res = await $.get('/platform/activity/site/apply/checkApplyTime', {
|
||||
time: this.formData.reserve_start_time,
|
||||
endTime: this.formData.reserve_end_time,
|
||||
siteId: this.formData.site_id
|
||||
})
|
||||
if (res.code === 1) {
|
||||
this.$notify.warning(res.msg)
|
||||
this.formData.reserve_start_time = ''
|
||||
this.formData.reserve_end_time = ''
|
||||
return
|
||||
}
|
||||
const valid = await this.$refs['addForm'].validate()
|
||||
if (!valid) return
|
||||
|
||||
const {site_id, reserve_start_time, reserve_end_time} = this.formData
|
||||
const siteInfo = this.siteInfoList.find(v => v.id == site_id)
|
||||
|
||||
const confirm = await this.$confirm('您确定要提交【' + siteInfo.name + '】\n,时间为:' + reserve_start_time + "\n至\n" + reserve_end_time + '\n的预约吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/platform/activity/site/apply/insert', {"siteReserve": JSON.stringify(this.formData)})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success(resp.msg);
|
||||
setTimeout(() => {
|
||||
window.location.href = '/platform/activity/site/reserve'
|
||||
}, 500)
|
||||
} else {
|
||||
this.$notify.error(resp.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
const {data} = await $.get(loc() + '/applyUserInfo')
|
||||
this.$set(this.formData, 'reserve_person_id', data.reserve_person_id)
|
||||
this.$set(this.formData, 'reserve_person_username', data.reserve_person_username)
|
||||
this.$set(this.formData, 'reserve_person_loginname', data.reserve_person_loginname)
|
||||
this.$set(this.formData, 'reserve_person_sex', data.reserve_person_sex)
|
||||
this.$set(this.formData, 'reserve_person_phone', data.reserve_person_phone)
|
||||
this.$set(this.formData, 'reserve_person_unitname', data.reserve_person_unitname)
|
||||
this.$set(this.formData, 'reserve_person_unionname', data.reserve_person_unionname)
|
||||
this.$set(this.formData, 'reserve_person_unionid', data.reserve_person_unionid)
|
||||
this.$set(this.formData, 'reserve_person_unit', '${@shiro.getPrincipalProperty("unit").getId()}')
|
||||
this.writeRemindDialog = true
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.units = await getUnits();
|
||||
await this.findAllOpenSite();
|
||||
this.initData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,406 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-divider--horizontal {
|
||||
margin: 5px 0;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year" value-format="yyyy" style="width: 200px" placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 110px;">
|
||||
<el-option label="场地名称" value="name"></el-option>
|
||||
<el-option label="场地地址" value="address"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.siteType" placeholder="场地类型" clearable
|
||||
style="width: 200px;">
|
||||
<el-option v-for="item in activityTypeList" :label="item.text" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="openAdd">新建场地</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" show-overflow-tooltip header-align="center" label="场地名称"
|
||||
prop="name"></el-table-column>
|
||||
<el-table-column align="center" show-overflow-tooltip header-align="center" label="场地地址"
|
||||
prop="address"></el-table-column>
|
||||
<el-table-column align="center" show-overflow-tooltip header-align="center" label="联系人"
|
||||
prop="contact_person"></el-table-column>
|
||||
<el-table-column align="center" show-overflow-tooltip header-align="center" label="联系方式"
|
||||
prop="contact_phone"></el-table-column>
|
||||
|
||||
<el-table-column align="center" show-overflow-tooltip header-align="center" label="每日开放场次"
|
||||
prop="count">
|
||||
<template slot-scope="{row}">
|
||||
<el-tooltip class="item" effect="dark" placement="right">
|
||||
<div slot="content">
|
||||
<div v-if="row.open_hours" v-for="item in row.open_hours">
|
||||
{{item.start_time}} - {{item.end_time}}
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
<div v-else>暂无开放场次</div>
|
||||
</div>
|
||||
<el-link :underline="false" type="primary">
|
||||
<i class="el-icon-view el-icon--left"></i>{{row.open_hours.length}}
|
||||
</el-link>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" :show-overflow-tooltip="true" header-align="center" label="开启状态"
|
||||
prop="state">
|
||||
<template slot-scope="{row}">
|
||||
<el-switch disabled v-model="row.state" active-color="#13ce66"
|
||||
inactive-color="#ff4949"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" :show-overflow-tooltip="true" header-align="center" label="是否多次预约"
|
||||
prop="multiple">
|
||||
<template slot-scope="{row}">
|
||||
<el-switch disabled v-model="row.multiple" active-color="#13ce66"
|
||||
inactive-color="#ff4949"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" :show-overflow-tooltip="true" header-align="center" label="限定工作日预约"
|
||||
prop="workday">
|
||||
<template slot-scope="{row}">
|
||||
<el-switch disabled v-model="row.workday" active-color="#13ce66"
|
||||
inactive-color="#ff4949"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="操作" width="250px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" @click="openEdit(row.id)" size="mini">编辑</el-button>
|
||||
<el-button type="danger" @click="doDelete(row)" size="mini">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<vi-title title="填写场地信息"></vi-title>
|
||||
<div style="padding: 0 5%">
|
||||
<el-form :model="formData" ref="addForm" :rules="formRules" label-width="120px">
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="create_username" label="创建人">
|
||||
<el-input readonly v-model="formData.create_username" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="create_time" label="创建时间">
|
||||
<el-input readonly v-model="formData.create_time" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="name" label="场地名称">
|
||||
<el-input maxlength="100" placeholder="请填写场地名称" v-model="formData.name"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="address" label="场地地址">
|
||||
<el-input maxlength="100" placeholder="请填写场地地址" v-model="formData.address"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="contact_person" label="联系人">
|
||||
<el-input v-model="formData.contact_person" placeholder="请填写联系人" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="contact_phone" label="联系方式">
|
||||
<el-input v-model="formData.contact_phone" placeholder="请填写联系方式" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="state" label="开启状态">
|
||||
<el-switch v-model="formData.state" active-color="#13ce66" inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="state" label="是否多次预约">
|
||||
<el-switch v-model="formData.multiple" active-color="#13ce66" inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="state" label="限定工作日预约">
|
||||
<el-switch v-model="formData.workday" active-color="#13ce66" inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="typeId" label="场地类型">
|
||||
<el-select v-model="formData.typeId" style="width: 100%" filterable
|
||||
placeholder="请选择场地类型">
|
||||
<el-option v-for="item in activityTypeList" :label="item.meetingTypeName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="sexLimit" label="性别限制">
|
||||
<el-radio-group v-model="formData.sexLimit" size="medium">
|
||||
<el-radio-button label="0">不限制</el-radio-button>
|
||||
<el-radio-button label="1">男</el-radio-button>
|
||||
<el-radio-button label="2">女</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="添加场次 " label-width="110px" class="view-header">
|
||||
<el-button style="float: right;margin-bottom: 10px" icon="el-icon-plus" size="mini"
|
||||
type="primary" @click="formData.open_hours.push({})">添加
|
||||
</el-button>
|
||||
|
||||
<el-table :data="formData.open_hours" border size="mini">
|
||||
<el-table-column prop="start_time" label="开始时间" align="center" header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-time-select
|
||||
placeholder="开始时间"
|
||||
v-model="row.start_time"
|
||||
:picker-options="{ start: '00:00',step: '00:30',end: '24:00'}">
|
||||
</el-time-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="end_time" label="结束时间" align="center" header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-time-select
|
||||
placeholder="结束时间"
|
||||
v-model="row.end_time"
|
||||
:picker-options="{start: '00:00',step: '00:30',end: '24:00',minTime: row.start_time }">
|
||||
</el-time-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" header-align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" icon="el-icon-delete" circle
|
||||
:disabled="formData.open_hours.length==0"
|
||||
@click="formData.open_hours.splice(scope.$index, 1)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="primary" :disabled="subDis" @click="operation">确 定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const activityUtil = new typeUtil()
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
activityTypeList: [],
|
||||
tabKey: '',
|
||||
tableLoading: false,
|
||||
subDis: false,
|
||||
tableData: [],
|
||||
formData: {
|
||||
open_hours: [{}],
|
||||
sexLimit: '0'
|
||||
},
|
||||
pageForm: {
|
||||
searchName: "name",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
year: ""
|
||||
},
|
||||
formRules: {
|
||||
name: [{required: true, message: '请填写场地名称', trigger: ['blur', 'change']}],
|
||||
address: [{required: true, message: '请填写场地地址', trigger: ['blur', 'change']}],
|
||||
contact_person: [{required: true, message: '请填写联系人', trigger: ['blur', 'change']}],
|
||||
contact_phone: [{required: true, message: '请填写联系电话', trigger: ['blur', 'change']}],
|
||||
state: [{required: true, message: '请选择开启状态', trigger: ['blur', 'change']}],
|
||||
typeId: [{required: true, message: '请选择场地类型', trigger: ['blur', 'change']}],
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
},
|
||||
methods: {
|
||||
doDelete(row) {
|
||||
this.$confirm('此操作将删除【' + row.name + '】场地的所有信息!', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: (a, b) => {
|
||||
if ("confirm" == a) {
|
||||
$.post(location.href + "/doDelete", {id: row.id}, (data) => {
|
||||
if (data.code == 0) {
|
||||
this.$message.success(data.msg)
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async operation() {
|
||||
let method = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.subDis = true
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
const {code, data, msg} = await $.post(location.href + method, {data: JSON.stringify(this.formData)})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(msg);
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.$message.error(msg);
|
||||
}
|
||||
loading.close()
|
||||
this.subDis = false
|
||||
}
|
||||
});
|
||||
},
|
||||
async findOneSite(id) {
|
||||
const {data} = await $.get("/platform/activity/site/mange/findOneSite", {id: id})
|
||||
return data
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async openEdit(id) {
|
||||
this.formData = await this.findOneSite(id)
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
openAdd() {
|
||||
this.formData = {
|
||||
state: true,
|
||||
multiple: true,
|
||||
open_hours: [{}],
|
||||
create_username: '${@shiro.getPrincipalProperty("username")}',
|
||||
create_time: moment().format('YYYY-MM-DD'),
|
||||
sexLimit: '0'
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
|
||||
if (this.$refs['addForm']) {
|
||||
this.$refs['addForm'].resetFields()
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.tabKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
pageOrder(column) {
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
$.post(location.href + "/pageData", this.pageForm, (res) => {
|
||||
const {code, data, msg} = res
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (code == 0) {
|
||||
for (let i = 0; i < data.list.length; i++) {
|
||||
data.list[i].open_hours = site.reverseRankingDate(data.list[i].open_hours)
|
||||
}
|
||||
this.tableData = data.list;
|
||||
this.pageForm.totalCount = data.totalCount;
|
||||
} else {
|
||||
this.$message.error(msg);
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
this.activityTypeList = await activityUtil.getAllType()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,385 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/jqFullCalendar/css/fullcalendar.css">
|
||||
<script src="${base!}/assets/platform/plugins/jqFullCalendar/js/fullcalendar.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jqFullCalendar/js/moment.min.js"></script>
|
||||
|
||||
<style>
|
||||
.fc-toolbar {
|
||||
display: block !important;
|
||||
visibility: unset !important;
|
||||
}
|
||||
|
||||
.yantaoshi {
|
||||
background: #39b54a;
|
||||
}
|
||||
|
||||
.duogongnengting {
|
||||
background: #31b48d;
|
||||
}
|
||||
|
||||
.dangyuanzhijia {
|
||||
background: #9c26b0;
|
||||
}
|
||||
|
||||
.other {
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">月份:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地类型:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.siteType" placeholder="场地类型"
|
||||
clearable filterable style="width: 100%">
|
||||
<el-option v-for="item in activityTypeList" :label="item.text"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<vi-title2 title="预约列表">
|
||||
<template #func>
|
||||
<el-button size="small" type="primary" class="el-icon-date" @click="openCalendar">预约日历
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
|
||||
<template scope="{row}" v-if="column.prop==='state_name'">
|
||||
<!--<span :style="'color:'+row.state_color">{{row.state_name}}</span>-->
|
||||
<span v-if="[0].includes(row.stateaudittype)"
|
||||
style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==3" style="color: #67c23a">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==1" style="color: #f56c6c">{{row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<reserve-info ref="reserve"></reserve-info>
|
||||
</template>
|
||||
|
||||
<template #public>
|
||||
<div id="site-calendar"></div>
|
||||
</template>
|
||||
|
||||
<el-dialog title="预约详情" :visible.sync="siteInfoDialog" width="60%">
|
||||
<reserve-info ref="reserveDialogInfo"></reserve-info>
|
||||
</el-dialog>
|
||||
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const activityUtil = new typeUtil()
|
||||
let calendar = null
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
userid: "${@shiro.getPrincipalProperty('id')}",
|
||||
role: "${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}",
|
||||
activityTypeList: [],
|
||||
siteList: [],
|
||||
pageForm: {
|
||||
searchName: "u.username",
|
||||
searchKeyword: "",
|
||||
isAudit: false,
|
||||
time: "",
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '场地名称', prop: 'site_name', sortable: true},
|
||||
{label: '预约人姓名', prop: 'reserve_person_username', sortable: true},
|
||||
{label: '预约人部门', prop: 'reserve_person_unitname', sortable: true},
|
||||
{label: '开始时间', prop: 'reserve_start_time', sortable: true},
|
||||
{label: '结束时间', prop: 'reserve_end_time', sortable: true},
|
||||
{label: '联系电话', prop: 'reserve_person_phone'},
|
||||
// {label: '活动名称', prop: 'reserve_activity'},
|
||||
{label: '预约事由', prop: 'reserve_cause'},
|
||||
{label: '预约状态', prop: 'state_name'},
|
||||
],
|
||||
sites: [],
|
||||
events: [],
|
||||
calendarHeight: 0,
|
||||
siteInfoDialog: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'reserve-info': httpVueLoader('/components/activity/site/ReserveInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.reserve.openView(row.id)
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm("您确定要删除此预约吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
const resp = await $.post('/platform/activity/site/reserve/doDelete', {id, op: 1})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getSites() {
|
||||
const {data} = await $.get(loc() + '/getSites')
|
||||
this.sites = data
|
||||
},
|
||||
|
||||
initCalendar() {
|
||||
const that = this
|
||||
if (calendar) {
|
||||
return
|
||||
}
|
||||
calendar = $('#site-calendar').fullCalendar({
|
||||
header: { //设置日历头部信息,false,则不显示头部信息。包括left,center,right左中右三个位置
|
||||
left: 'prev,next, today', //上一个、下一个、今天
|
||||
center: 'title', //标题
|
||||
right: 'month,agendaWeek,agendaDay' //月、周、日、日程列表
|
||||
},
|
||||
locale: 'zh-cn', //?没用?
|
||||
timeFormat: 'HH:mm', //日程事件的时间格式
|
||||
buttonText: { //各按钮的显示文本信息
|
||||
today: '今天',
|
||||
month: '月',
|
||||
agendaWeek: '周',
|
||||
agendaDay: '日',
|
||||
listMonth: '日程',
|
||||
},
|
||||
monthNames: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], //月份全称
|
||||
monthNamesShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], //月份简写
|
||||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], //周全称
|
||||
dayNamesShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], //周简写
|
||||
noEventsMessage: "当月无数据", //listview视图下,无数据提示
|
||||
allDayText: "全天", //自定义全天视图的名称
|
||||
allDaySlot: false, //是否在周日历上方显示全天
|
||||
allDayDefault: false, //是否为全天日程事件,显示这一天中所做的事情
|
||||
slotDuration: "00:30:00", //一格时间槽代表多长时间,默认00:30:00(30分钟)
|
||||
slotLabelFormat: "H(:mm)a", //日期视图左边那一列显示的每一格日期时间格式
|
||||
slotLabelInterval: "01:00:00", //日期视图左边那一列多长间隔显示一条日期文字(默认跟着slotDuration走的,可自定义)
|
||||
snapDuration: "01:00:00", //其实就是动态创建一个日程时,默认创建多长的时间块
|
||||
firstDay: 1, //一周中显示的第一天是哪天,周日是0,周一是1,类推
|
||||
hiddenDays: [], //隐藏一周中的某一天或某几天,数组形式,如隐藏周二和周五:[2,5],默认不隐藏,除非weekends设置为false。
|
||||
weekends: true, //是否显示周六和周日,设为false则不显示周六和周日。默认值为true
|
||||
weekMode: 'fixed', //月视图里显示周的模式,因每月周数不同月视图高度不定。fixed:固定显示6周高,日历高度保持不变liquid:不固定周数,高度随周数变化variable:不固定周数,但高度固定
|
||||
weekNumbers: false, //是否在日历中显示周次(一年中的第几周),如果设置为true,则会在月视图的左侧、周视图和日视图的左上角显示周数。
|
||||
weekNumberCalculation: 'iso', //周次的显示格式。
|
||||
height: that.calendarHeight, //设置日历的高度,包括header日历头部,默认未设置,高度根据aspectRatio值自适应。
|
||||
// contentHeight: 600, //设置日历主体内容的高度,不包括header部分,默认未设置,高度根据aspectRatio值自适应。
|
||||
handleWindowResize: true, //是否随浏览器窗口大小变化而自动变化。
|
||||
defaultView: 'agendaWeek', //初始化时默认视图,默认是月month,agendaWeek是周,agendaDay是当天
|
||||
slotEventOverlap: false, //事件是否可以重叠覆盖
|
||||
defaultDate: moment().format('YYYY-MM-DD'), //默认显示那一天的日期视图getDates(true)2020-05-10
|
||||
nowIndicator: false, //周/日视图中显示今天当前时间点(以红线标记),默认false不显示
|
||||
eventLimit: 2, //数据条数太多时,限制显示条数(多余的以“+2more”格式显示),默认false不限制,支持输入数字设定固定的显示条数
|
||||
eventLimitText: "更多", //当一块区域内容太多以"+2 more"格式显示时,这个more的名称自定义(应该与eventLimit: true一并用)
|
||||
dayPopoverFormat: "YYYY年M月d日预约信息", //点开"+2 more"弹出的小窗口标题,与eventLimitClick可以结合用
|
||||
render: (view) => { //method,绑定日历到id上。$('#id').fullCalendar('render');
|
||||
},
|
||||
viewRender: (view) => {
|
||||
that.getCalendarData()
|
||||
},
|
||||
eventRender: (info, element) => {
|
||||
console.log($(info.el))
|
||||
console.log(info)
|
||||
console.log(element)
|
||||
console.log(element.find('.fc-event-title'))
|
||||
element.find('.fc-title').append("<br/>申请人:" + info.reserve_person_username)
|
||||
element.find('.fc-title').append("<br/>申请事由:" + info.reserve_cause)
|
||||
element.find('.fc-title').append("<br/>申请活动:" + info.reserve_activity)
|
||||
element.find('.fc-title').append("<br/>审核状态:" + info.state_name)
|
||||
// $(info.el).html(info.event.title);
|
||||
},
|
||||
//日历数据源
|
||||
events: that.events,
|
||||
eventClick: (event, jsEvent) => {
|
||||
console.log(event)
|
||||
console.log(jsEvent)
|
||||
// that.openView(event)
|
||||
|
||||
that.siteInfoDialog = true
|
||||
setTimeout(async () => {
|
||||
await httpVueLoader('/components/activity/site/ReserveInfo.vue')()
|
||||
// that.$refs.reserveDialogInfo.openView(event.id)
|
||||
}, 1000)
|
||||
|
||||
// if (event.is_auditing === 1) {
|
||||
// sublime.jumpPagePjax('/platform/activity/site/review')
|
||||
// } else {
|
||||
//
|
||||
// }
|
||||
// this.askTypeArray = []
|
||||
// if (event.o.appointmentUser) {
|
||||
// return
|
||||
// }
|
||||
// if (new Date().getTime() > event.o.startTimeTs) {
|
||||
// return
|
||||
// }
|
||||
// this.appointmentDialogVisible = true
|
||||
// that.formData = event.o
|
||||
// if (event.askTypeList) {
|
||||
// const array = JSON.parse(event.askTypeList)
|
||||
// this.askTypeList.map(o => {
|
||||
// if (array.includes(o.code)) {
|
||||
// this.askTypeArray.push(o)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// if (this.askTypeArray && this.askTypeArray.length === 1) {
|
||||
// that.$set(that.formData, 'appointmentAskTypeValue', this.askTypeArray[0].code)
|
||||
// }
|
||||
},
|
||||
selectable: false, //是否允许通过单击或拖动选择日历中的对象,包括天和时间
|
||||
selectMirror: true, //镜像
|
||||
lazyFetching: false, //是否启用懒加载技术--即只取当前条件下的视图数据,其它数据在切换时触发,默认true只取当前视图的,false是取全视图的
|
||||
defaultTimedEventDuration: "01:00:00", //在Event Object中如果没有end参数时使用,如start=7:00pm,则该日程对象时间范围就是7:00~9:00
|
||||
defaultAllDayEventDuration: {days: 1}, //默认1天是多长,(有的是采用工作时间模式,所以支持自定义)
|
||||
});
|
||||
},
|
||||
async getCalendarData() {
|
||||
if (!calendar) {
|
||||
return
|
||||
}
|
||||
const view = calendar.fullCalendar('getView')
|
||||
//这里取时间戳
|
||||
const startTimeTs = view.start.format('YYYY-MM-DD HH:mm:ss')
|
||||
const endTimeTs = view.end.format('YYYY-MM-DD HH:mm:ss')
|
||||
const {data} = await $.get(loc() + '/getCalendarData', {
|
||||
siteId: this.pageForm.siteId,
|
||||
startTimeTs,
|
||||
endTimeTs
|
||||
})
|
||||
if (data && data.length > 0) {
|
||||
data.map(x => {
|
||||
console.log(x)
|
||||
if (x.site_id === '83dfd7d780f448aea307d2ce967b51fe') {
|
||||
x.className = 'yantaoshi'
|
||||
} else if (x.site_id === 'd6ebd7e454a24e3495b0d18438fb6a59') {
|
||||
x.className = 'duogongnengting'
|
||||
} else if (x.site_id === 'a6486481018b479ab137bac53936f15e') {
|
||||
x.className = 'dangyuanzhijia'
|
||||
} else {
|
||||
x.className = 'other'
|
||||
}
|
||||
})
|
||||
let events = data
|
||||
calendar.fullCalendar('removeEvents', () => true)
|
||||
calendar.fullCalendar('addEventSource', events, true);
|
||||
} else {
|
||||
calendar.fullCalendar('removeEvents', () => true)
|
||||
}
|
||||
},
|
||||
openCalendar() {
|
||||
this.$refs.guava.public()
|
||||
setTimeout(() => {
|
||||
this.initCalendar()
|
||||
this.getCalendarData()
|
||||
}, 500)
|
||||
},
|
||||
async findAllOpenSite() {
|
||||
const {data} = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
return data
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
this.calendarHeight = window.innerHeight - 164 - 6
|
||||
}, 100)
|
||||
},
|
||||
async created() {
|
||||
this.activityTypeList = await activityUtil.getAllType()
|
||||
this.siteList = await this.findAllOpenSite()
|
||||
this.pageData()
|
||||
this.getSites()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,273 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">月份:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地类型:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.siteType" placeholder="场地类型"
|
||||
clearable filterable style="width: 100%">
|
||||
<el-option v-for="item in activityTypeList" :label="item.text" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="预约列表">
|
||||
<template #func>
|
||||
<el-button @click="location.href='/platform/activity/site/apply'" size="medium" type="primary">我要预约</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
|
||||
<template scope="{row}" v-if="column.prop==='state_name'">
|
||||
<!--<span :style="'color:'+row.state_color">{{row.state_name}}</span>-->
|
||||
<span v-if="[0].includes(row.stateaudittype)"
|
||||
style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==3" style="color: #67c23a">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==1" style="color: #f56c6c">{{row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="200px">
|
||||
<template scope="scope">
|
||||
<!--<el-button @click="() => {dropdownCommand({type:'view',data:scope.row})}" size="mini">查看</el-button>
|
||||
<el-button type="danger" @click="() => {dropdownCommand({type:'delete',data:scope.row})}" size="mini">删除</el-button>-->
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<!--# if(@shiro.hasRole('sysadmin')){ #-->
|
||||
<el-dropdown-item
|
||||
:command="{type:'delete',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<!--# } #-->
|
||||
<el-dropdown-item
|
||||
v-if="scope.row.reserve_person_id === '${@shiro.getPrincipalProperty('id')}'
|
||||
&& (scope.row.reserve_person_union_process == null || scope.row.reserve_person_union_process == '')"
|
||||
:command="{type:'cancel',data:scope.row}">
|
||||
撤销预约
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<reserve-info ref="reserve"></reserve-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const activityUtil = new typeUtil()
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
activityTypeList: [],
|
||||
siteList: [],
|
||||
tableData: [],
|
||||
userid:'',
|
||||
pageForm: {
|
||||
searchName: "u.username",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
time: ''
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '场地名称', prop: 'site_name', sortable: true},
|
||||
{label: '预约人姓名', prop: 'reserve_person_username', sortable: true},
|
||||
{label: '预约人部门', prop: 'reserve_person_unitname', sortable: true},
|
||||
{label: '开始时间', prop: 'reserve_start_time', sortable: true},
|
||||
{label: '结束时间', prop: 'reserve_end_time', sortable: true},
|
||||
{label: '联系电话', prop: 'reserve_person_phone'},
|
||||
{label: '预约事由', prop: 'reserve_cause'},
|
||||
{label: '预约状态', prop: 'state_name'},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'reserve-info': httpVueLoader('/components/activity/site/ReserveInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'view') {
|
||||
this.userid = data.reserve_person_id;
|
||||
this.openView(data)
|
||||
} else if (type === 'delete') {
|
||||
this.doClean(data.id)
|
||||
} else if (type === 'cancel') {
|
||||
this.doRevoke(data.id)
|
||||
}
|
||||
},
|
||||
backOption(row) {
|
||||
this.$prompt('请填写反馈意见', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputValidator: (value) => {
|
||||
if (value === null) {
|
||||
return '反馈意见不能为空'
|
||||
}
|
||||
}
|
||||
}).then(async ({value}) => {
|
||||
const res = await $.post('/mobile/activity/site/info/backOption', {
|
||||
id: row.id,
|
||||
option: value
|
||||
})
|
||||
if (res.code === 0) {
|
||||
await this.doSearch()
|
||||
this.$notify.success({title: '提示', message: '操作成功!'});
|
||||
} else {
|
||||
this.$notify.warning({title: '警告', message: '操作失败!'});
|
||||
}
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
async doClean(id){
|
||||
this.$confirm("您确定要删除此预约吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: (a, b) => {
|
||||
if ("confirm" === a) {
|
||||
$.post("/platform/activity/site/apply/doClean", {id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.$message.success(data.msg)
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$message.warning(data.msg)
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async doRevoke(id) {
|
||||
this.$confirm("您确定要撤销此预约吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: (a, b) => {
|
||||
if ("confirm" === a) {
|
||||
$.post("/platform/activity/site/apply/revoke", {id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.$message.success(data.msg)
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$message.warning(data.msg)
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
const role = "${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
this.$refs.reserve.role = role
|
||||
const backOptionShow = "${@shiro.getPrincipalProperty('id')}" === this.userid
|
||||
this.$refs.reserve.backOptionShow = (role || backOptionShow)
|
||||
this.$refs.reserve.openView(row.id)
|
||||
},
|
||||
async doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
this.siteList = await this.findAllOpenSite()
|
||||
},
|
||||
async findAllOpenSite() {
|
||||
const {data} = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
return data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.activityTypeList = await activityUtil.getAllType()
|
||||
this.siteList = await this.findAllOpenSite()
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,228 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">月份:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地类型:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.siteType" placeholder="场地类型"
|
||||
clearable filterable style="width: 100%">
|
||||
<el-option v-for="item in activityTypeList" :label="item.text" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="预约列表">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
|
||||
<template scope="{row}" v-if="column.prop==='state_name'">
|
||||
<!--<span :style="'color:'+row.state_color">{{row.state_name}}</span>-->
|
||||
<span v-if="[0].includes(row.stateaudittype)"
|
||||
style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==3" style="color: #67c23a">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==1" style="color: #f56c6c">{{row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.reserve_state == 6118" @click="doProcess(row)" size="mini" type="primary">审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit style="padding: 0 10%">
|
||||
<reserve-info ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="校工会审核" name="xghsh">
|
||||
<el-form :model="formData" label-suffix=":" label-width="100px" ref="auditForm">
|
||||
<el-form-item label="审核人">
|
||||
${@shiro.getPrincipalProperty('username')}
|
||||
</el-form-item>
|
||||
<el-form-item label="审核时间">
|
||||
{{moment().format('YYYY-MM-DD')}}
|
||||
</el-form-item>
|
||||
<el-form-item :rules="[{required: true, message: '请输入审核意见', trigger: ['blur']}]"
|
||||
label="审核意见"
|
||||
prop="schoolOption">
|
||||
<el-input maxlength="300" rows="5" type="textarea"
|
||||
v-model="formData.schoolOption"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-button type="danger" @click="doReview(false)">拒绝</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通过</el-button>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</reserve-info>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<reserve-info ref="reserve"></reserve-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const activityUtil = new typeUtil()
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
activityTypeList:[],
|
||||
siteList:[],
|
||||
pageForm: {
|
||||
searchName: "u.username",
|
||||
searchKeyword: "",
|
||||
isAudit: false,
|
||||
time: "",
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '场地名称', prop: 'site_name', sortable: true},
|
||||
{label: '预约人姓名', prop: 'reserve_person_username', sortable: true},
|
||||
{label: '预约人部门', prop: 'reserve_person_unitname', sortable: true},
|
||||
{label: '开始时间', prop: 'reserve_start_time', sortable: true},
|
||||
{label: '结束时间', prop: 'reserve_end_time', sortable: true},
|
||||
{label: '联系电话', prop: 'reserve_person_phone'},
|
||||
// {label: '活动名称', prop: 'reserve_activity'},
|
||||
{label: '预约事由', prop: 'reserve_cause'},
|
||||
{label: '预约状态', prop: 'state_name'},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'reserve-info': httpVueLoader('/components/activity/site/ReserveInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
const role = "${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
this.$refs.reserve.role = role
|
||||
const backOptionShow = "${@shiro.getPrincipalProperty('id')}" === row.reserve_person_id
|
||||
this.$refs.reserve.backOptionShow = (role || backOptionShow)
|
||||
this.$refs.reserve.openView(row.id)
|
||||
},
|
||||
doProcess(row){
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.openView(row.id, 'xghsh')
|
||||
this.formData={
|
||||
id: row.id,
|
||||
schoolOption: null,
|
||||
}
|
||||
},
|
||||
async doReview(row){
|
||||
const valid = await this.$refs['auditForm'].validate()
|
||||
if (!valid) return
|
||||
this.formData.reserve_state = row ? 6138 : 6128
|
||||
this.formData.isPass = row
|
||||
const resp = await $.post('/platform/activity/site/review/doProcess', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
doInstructions() {
|
||||
$.post(location.href + "/doReview", this.formData, (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData();
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async findAllOpenSite() {
|
||||
const {data} = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
return data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.activityTypeList = await activityUtil.getAllType()
|
||||
this.siteList = await this.findAllOpenSite()
|
||||
this.pageData();
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,445 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.audit-userids-select .el-select__tags {
|
||||
flex-wrap: unset;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<table-tool :app="this" label="类型列表">
|
||||
<template #func>
|
||||
<el-button @click="openAdd" size="small" type="primary">新增类型</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize"
|
||||
@sort-change="pageOrder" class="vi-table"
|
||||
row-key="id" style="width: 100%">
|
||||
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
align="center"
|
||||
header-align="center"
|
||||
min-width="50"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<vi-title title="基础信息"></vi-title>
|
||||
<el-form :model="formData" :rules="formRules" label-width="80px" ref="form">
|
||||
<el-form-item label="名称" prop="meetingTypeName">
|
||||
<el-input v-model="formData.meetingTypeName"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="模块名称" prop="moduleName">
|
||||
<el-input v-model="formData.moduleName"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="序号" prop="sortNum">
|
||||
<el-input-number :max="tableData.length + 1" :min="1" :precision="0"
|
||||
v-model="formData.sortNum"></el-input-number>
|
||||
</el-form-item>
|
||||
|
||||
<vi-title title="审核节点信息(温馨提醒:如审核节点没有限制,审核节点类型不选或选择不限制)"></vi-title>
|
||||
<el-table :data="formData.auditStateList">
|
||||
<el-table-column label="节点ID" prop="stateId" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-input readonly v-model="scope.row.stateId"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="审核节点名称" prop="stateName">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.stateName"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="审核节点类型" prop="auditAfterType" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.auditAfterType" clearable>
|
||||
<el-option :label="item.desc"
|
||||
:value="item.value"
|
||||
v-for="item in activityAuditTypeEnum"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="审核人" prop="selectUserId">
|
||||
<template slot-scope="scope">
|
||||
<el-select :remote-method="userRemoteMethod" class="audit-userids-select" filterable
|
||||
multiple placeholder="请输入姓名或工号查找"
|
||||
remote style="width: 100%"
|
||||
v-model="scope.row.selectUserId">
|
||||
<el-option :key="item.id" :label="item.username + '(' + item.loginname + ')'"
|
||||
:value="item.id"
|
||||
v-for="item in userList"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="筛选审核人" width="100px">
|
||||
<template scope="scope">
|
||||
<el-button @click="openUserSelect(scope.$index)" type="text">筛选用户</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="通过下个节点" pro="afterPassStateId" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.afterPassStateId">
|
||||
<el-option :label="item"
|
||||
:value="item"
|
||||
v-for="item in stateIdList"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="拒绝下个节点" pro="afterRejectStateId" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.afterRejectStateId">
|
||||
<el-option :label="item"
|
||||
:value="item"
|
||||
v-for="item in stateIdList"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="审核类型" prop="stateAuditType" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.stateAuditType">
|
||||
<el-option :label="item.desc"
|
||||
:value="item.value"
|
||||
v-for="item in stateAuditTypeList"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column width="100px">
|
||||
<template scope="scope" slot="header">
|
||||
<el-button @click="addState"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
size="mini"
|
||||
type="primary"></el-button>
|
||||
</template>
|
||||
<template scope="scope">
|
||||
<el-button @click="formData.auditStateList.splice(scope.$index, 1)"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<el-row class="mt10" justify="end" type="flex">
|
||||
<el-button @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button @click="doConfirm" type="primary">确定</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<condition :fields="fields"
|
||||
:show_filter_result="true"
|
||||
@confirm="cndConfirm"
|
||||
ref="cnd"
|
||||
v-model="cnd"></condition>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
function isJson(str){
|
||||
if(typeof str == 'string'){
|
||||
try{
|
||||
var obj = JSON.parse(str);
|
||||
if (typeof obj == 'object' && obj){
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}catch (e){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
const activityUtil = new typeUtil()
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'condition': httpVueLoader('/components/plugins/ConditionStructure.vue?v=1.0.0'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{prop: 'meetingTypeName', label: '类型名称'},
|
||||
{prop: 'moduleName', label: '模块名称'},
|
||||
{prop: 'sortNum', label: '排序编号'}],
|
||||
stateAuditTypeList: [],
|
||||
formData: {
|
||||
auditStateList: []
|
||||
},
|
||||
formRules: {
|
||||
meetingTypeName: [{required: true, message: '请输入类型名称', trigger: ['blur', 'change']}],
|
||||
moduleName: [{required: true, message: '请输入模块名称,英文命名', trigger: ['blur', 'change']}],
|
||||
sortNum: [{required: true, message: '请输入排序编号', trigger: ['blur', 'change']}]
|
||||
},
|
||||
userList: [],
|
||||
maxStateId: 0,
|
||||
userSelectDialogVisible: false,
|
||||
cnd: {},
|
||||
fields: [],
|
||||
nodeIndex: null,
|
||||
activityAuditTypeEnum:[],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
async 'formData.auditStateList'(val) {
|
||||
const {id} = this.formData
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
let item = val[i]
|
||||
if (id) {
|
||||
if (item.isAddRow) {
|
||||
//当前行是新增的第几行
|
||||
const addIndex = i + 1 - val.filter(v => !v.isAddRow).length
|
||||
|
||||
const stateId = val[0].stateId + i * 10
|
||||
const licitStateCode = await this.checkStateId(stateId, addIndex)
|
||||
item['stateId'] = licitStateCode
|
||||
}
|
||||
} else {
|
||||
item['stateId'] = this.maxStateId + (i + 1) * 10
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// this.$set(this.formData,'auditStateList',val)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogTitle() {
|
||||
if (this.formData.id) {
|
||||
return '编辑'
|
||||
}
|
||||
return '新增'
|
||||
},
|
||||
stateIdList() {
|
||||
return this.formData.auditStateList.map(v => v.stateId)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async checkStateId(stateId, stateIndex) {
|
||||
const resp = await $.get(loc() + '/checkStateId', {stateId, stateIndex})
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
addState() {
|
||||
this.formData.auditStateList.push({
|
||||
stateId: this.maxStateId,
|
||||
stateName: null,
|
||||
selectUserId: [],
|
||||
auditStateUserList: [],
|
||||
afterPassStateId: null,
|
||||
afterRejectStateId: null,
|
||||
isAddRow: true
|
||||
})
|
||||
},
|
||||
|
||||
async findAll() {
|
||||
const resp_data = await $.get(loc() + '/findAll')
|
||||
if (resp_data.code === 0) {
|
||||
resp_data.data.forEach(v => {
|
||||
v.auditStateList.forEach(x => {
|
||||
if (x.matchCnd) {
|
||||
x.matchCnd = JSON.parse(x.matchCnd)
|
||||
}
|
||||
})
|
||||
})
|
||||
this.tableData = resp_data.data
|
||||
}
|
||||
},
|
||||
openAdd() {
|
||||
this.formData = {
|
||||
meetingName: null,
|
||||
sortNum: this.tableData.length + 1,
|
||||
auditStateList: [{}]
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
async doConfirm() {
|
||||
try {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (valid) {
|
||||
this.formData.auditStateList.forEach(v => {
|
||||
v['auditStateUserList'] = v.selectUserId.map(x => {
|
||||
return {userId: x}
|
||||
})
|
||||
if(v['matchCnd']) {
|
||||
const o = isJson(v['matchCnd']);
|
||||
if (!o){
|
||||
v['matchCnd'] = JSON.stringify(v['matchCnd'])
|
||||
}
|
||||
}
|
||||
})
|
||||
const resp = await $.post(loc() + '/doHandle', {data: JSON.stringify(this.formData)})
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.findAll()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
},
|
||||
async openEdit(row) {
|
||||
const d = clone(row)
|
||||
let u = []
|
||||
const {data} = await $.post(loc() + '/findOne', {module: row.moduleName})
|
||||
data.forEach(v => {
|
||||
v['selectUserId'] = v.auditStateUserList.map(x => x.userId)
|
||||
u = u.concat(v['selectUserId'])
|
||||
})
|
||||
d.auditStateList = data
|
||||
this.userList = await queryUserByIds(u)
|
||||
|
||||
this.formData = d
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
async doDelete(id) {
|
||||
try {
|
||||
const confirm = await this.$confirm('您确定要删除吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post(loc() + '/delete/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.findAll()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async userRemoteMethod(query) {
|
||||
if (query) {
|
||||
this.userList = await searchUser(query)
|
||||
}
|
||||
},
|
||||
openUserSelect(node_index) {
|
||||
this.nodeIndex = node_index
|
||||
const node = this.formData.auditStateList[node_index]
|
||||
if (node.matchCnd) {
|
||||
if (this.cnd == null){
|
||||
if(this.cnd == null) {
|
||||
this.cnd = {
|
||||
method: "AND",
|
||||
conditions: [{}],
|
||||
}
|
||||
}
|
||||
}else {
|
||||
try {
|
||||
this.cnd = JSON.parse(node.matchCnd)
|
||||
}catch (e){
|
||||
this.cnd = node.matchCnd
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.cnd = {method: "AND", conditions: [{}]}
|
||||
}
|
||||
this.$refs.cnd.open(false)
|
||||
},
|
||||
async initCndFields() {
|
||||
this.cnd = {
|
||||
method: "AND",
|
||||
conditions: [{}],
|
||||
}
|
||||
/*const meet_data = await getOpenMeeting()
|
||||
const meet_options = meet_data.map(v => {
|
||||
return {"label": v.jdhallname, "value": v.id}
|
||||
})
|
||||
this.fields.push(
|
||||
{label: '教代会', value: 'jdhid', type: "select", options: meet_options}
|
||||
)*/
|
||||
const {data: role_data} = await $.get('/platform/sys/role/getAllRoles')
|
||||
const role_options = role_data.map(v => {
|
||||
return {"label": v.name, "value": v.id}
|
||||
})
|
||||
this.fields.push(
|
||||
{label: '角色', value: 'roleId', type: "select", options: role_options}
|
||||
)
|
||||
this.fields.push(
|
||||
{label: '姓名', value: 'username', options: null}
|
||||
)
|
||||
|
||||
|
||||
},
|
||||
async cndConfirm(val) {
|
||||
if (val) {
|
||||
const matchCnd = clone(val)
|
||||
if (matchCnd.conditions && matchCnd.conditions.length > 0) {
|
||||
this.formData.auditStateList[this.nodeIndex].matchCnd = matchCnd
|
||||
const resp = await $.post('/platform/userFilter/findUserByCnd', {cnd: JSON.stringify(matchCnd)})
|
||||
if (resp.code === 0) {
|
||||
if (resp.data) {
|
||||
const d = this.formData.auditStateList[this.nodeIndex]
|
||||
d.matchCnd = matchCnd
|
||||
d.selectUserId = [...new Set(d.selectUserId.concat(resp.data.map(v => v.id)))]
|
||||
|
||||
this.$set(this.formData.auditStateList, this.nodeIndex, d)
|
||||
let u = []
|
||||
this.formData.auditStateList.forEach(v => {
|
||||
u = u.concat(v.selectUserId.map(x => x))
|
||||
})
|
||||
this.userList = await queryUserByIds([...new Set(u)])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.findAll()
|
||||
this.initCndFields()
|
||||
this.maxStateId = await activityUtil.findMaxStateId()
|
||||
this.stateAuditTypeList = await getEnumOptions('AuditTypeEnum')
|
||||
this.activityAuditTypeEnum = await getEnumOptions('ActivityAuditTypeEnum')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,217 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">月份:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入场地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.siteName">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">场地类型:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.siteType" placeholder="场地类型"
|
||||
clearable filterable style="width: 100%">
|
||||
<el-option v-for="item in activityTypeList" :label="item.text" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="预约列表">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
|
||||
<template scope="{row}" v-if="column.prop==='state_name'">
|
||||
<!--<span :style="'color:'+row.state_color">{{row.state_name}}</span>-->
|
||||
<span v-if="[0].includes(row.stateaudittype)"
|
||||
style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==3" style="color: #67c23a">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==1" style="color: #f56c6c">{{row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.reserve_state == 6098" @click="doProcess(row)" size="mini" type="primary">审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit style="padding: 0 10%">
|
||||
<reserve-info ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="分工会审核" name="fghsh">
|
||||
<el-form :model="formData" label-suffix=":" label-width="100px" ref="auditForm">
|
||||
<el-form-item label="审核人">
|
||||
${@shiro.getPrincipalProperty('username')}
|
||||
</el-form-item>
|
||||
<el-form-item label="审核时间">
|
||||
{{moment().format('YYYY-MM-DD')}}
|
||||
</el-form-item>
|
||||
<el-form-item :rules="[{required: true, message: '请输入审核意见', trigger: ['blur']}]"
|
||||
label="审核意见"
|
||||
prop="unionOption">
|
||||
<el-input maxlength="300" rows="5" type="textarea"
|
||||
v-model="formData.unionOption"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-button type="danger" @click="doReview(false)">拒绝</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通过</el-button>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</reserve-info>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<reserve-info ref="reserve"></reserve-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const activityUtil = new typeUtil()
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data(){
|
||||
return{
|
||||
activityTypeList:[],
|
||||
siteList:[],
|
||||
pageForm: {
|
||||
searchName: "u.username",
|
||||
searchKeyword: "",
|
||||
isAudit: false,
|
||||
time: "",
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '场地名称', prop: 'site_name', sortable: true},
|
||||
{label: '预约人姓名', prop: 'reserve_person_username', sortable: true},
|
||||
{label: '预约人部门', prop: 'reserve_person_unitname', sortable: true},
|
||||
{label: '开始时间', prop: 'reserve_start_time', sortable: true},
|
||||
{label: '结束时间', prop: 'reserve_end_time', sortable: true},
|
||||
{label: '联系电话', prop: 'reserve_person_phone'},
|
||||
// {label: '活动名称', prop: 'reserve_activity'},
|
||||
{label: '预约事由', prop: 'reserve_cause'},
|
||||
{label: '预约状态', prop: 'state_name'},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'reserve-info': httpVueLoader('/components/activity/site/ReserveInfo.vue'),
|
||||
},
|
||||
methods:{
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
const role = "${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
this.$refs.reserve.role = role
|
||||
const backOptionShow = "${@shiro.getPrincipalProperty('id')}" === row.reserve_person_id
|
||||
this.$refs.reserve.backOptionShow = (role || backOptionShow)
|
||||
this.$refs.reserve.openView(row.id)
|
||||
},
|
||||
doProcess(row){
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.openView(row.id, 'fghsh')
|
||||
this.formData={
|
||||
id: row.id,
|
||||
unionOption: null,
|
||||
}
|
||||
},
|
||||
async doReview(row){
|
||||
const valid = await this.$refs['auditForm'].validate()
|
||||
if (!valid) return
|
||||
this.formData.reserve_state = row ? 6118 : 6108
|
||||
this.formData.isPass = row
|
||||
const resp = await $.post('/platform/activity/site/unionProcess/doProcess', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
async findAllOpenSite() {
|
||||
const {data} = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
return data
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
this.activityTypeList = await activityUtil.getAllType()
|
||||
this.siteList = await this.findAllOpenSite()
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,228 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">月份:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.time"
|
||||
placeholder="请选择月份"
|
||||
type="month"
|
||||
value-format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="search-item">-->
|
||||
<!-- <div class="search-item-label">场地名称:</div>-->
|
||||
<!-- <div class="search-item-option">-->
|
||||
<!-- <el-input @keyup.enter.native="doSearch" clearable clearable-->
|
||||
<!-- placeholder="请输入场地名称"-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- v-model="pageForm.siteName">-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="search-item">-->
|
||||
<!-- <div class="search-item-label">场地类型:</div>-->
|
||||
<!-- <div class="search-item-option">-->
|
||||
<!-- <el-select v-model="pageForm.siteType" placeholder="场地类型"-->
|
||||
<!-- clearable filterable style="width: 100%">-->
|
||||
<!-- <el-option v-for="item in activityTypeList" :label="item.text" :value="item.value"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="预约列表">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
|
||||
<template scope="{row}" v-if="column.prop==='state_name'">
|
||||
<!--<span :style="'color:'+row.state_color">{{row.state_name}}</span>-->
|
||||
<span v-if="[0].includes(row.stateaudittype)"
|
||||
style="color: #e6a23c">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==3" style="color: #67c23a">{{row.state_name}}</span>
|
||||
<span v-if="row.stateaudittype==1" style="color: #f56c6c">{{row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.reserve_state == 6118" @click="doProcess(row)" size="mini" type="primary">审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit style="padding: 0 10%">
|
||||
<reserve-info ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="校工会审核" name="xghsh">
|
||||
<el-form :model="formData" label-suffix=":" label-width="100px" ref="auditForm">
|
||||
<el-form-item label="审核人">
|
||||
${@shiro.getPrincipalProperty('username')}
|
||||
</el-form-item>
|
||||
<el-form-item label="审核时间">
|
||||
{{moment().format('YYYY-MM-DD')}}
|
||||
</el-form-item>
|
||||
<el-form-item :rules="[{required: true, message: '请输入审核意见', trigger: ['blur']}]"
|
||||
label="审核意见"
|
||||
prop="schoolOption">
|
||||
<el-input maxlength="300" rows="5" type="textarea"
|
||||
v-model="formData.schoolOption"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-button type="danger" @click="doReview(false)">拒绝</el-button>
|
||||
<el-button type="primary" @click="doReview(true)">通过</el-button>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</reserve-info>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<reserve-info ref="reserve"></reserve-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const activityUtil = new typeUtil()
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
activityTypeList:[],
|
||||
siteList:[],
|
||||
pageForm: {
|
||||
searchName: "u.username",
|
||||
searchKeyword: "",
|
||||
isAudit: false,
|
||||
time: "",
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '场地名称', prop: 'site_name', sortable: true},
|
||||
{label: '预约人姓名', prop: 'reserve_person_username', sortable: true},
|
||||
{label: '预约人部门', prop: 'reserve_person_unitname', sortable: true},
|
||||
{label: '开始时间', prop: 'reserve_start_time', sortable: true},
|
||||
{label: '结束时间', prop: 'reserve_end_time', sortable: true},
|
||||
{label: '联系电话', prop: 'reserve_person_phone'},
|
||||
// {label: '活动名称', prop: 'reserve_activity'},
|
||||
{label: '预约事由', prop: 'reserve_cause'},
|
||||
{label: '预约状态', prop: 'state_name'},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'reserve-info': httpVueLoader('/components/activity/site/ReserveInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
const role = "${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
this.$refs.reserve.role = role
|
||||
const backOptionShow = "${@shiro.getPrincipalProperty('id')}" === row.reserve_person_id
|
||||
this.$refs.reserve.backOptionShow = (role || backOptionShow)
|
||||
this.$refs.reserve.openView(row.id)
|
||||
},
|
||||
doProcess(row){
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.openView(row.id, 'xghsh')
|
||||
this.formData={
|
||||
id: row.id,
|
||||
schoolOption: null,
|
||||
}
|
||||
},
|
||||
async doReview(row){
|
||||
const valid = await this.$refs['auditForm'].validate()
|
||||
if (!valid) return
|
||||
this.formData.reserve_state = row ? 6138 : 6128
|
||||
this.formData.isPass = row
|
||||
const resp = await $.post('/platform/activity/site/partyMemberHomeAudit/doProcess', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
doInstructions() {
|
||||
$.post(location.href + "/doReview", this.formData, (res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData();
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async findAllOpenSite() {
|
||||
const {data} = await $.get("/platform/activity/site/apply/getAllSite")
|
||||
return data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.activityTypeList = await activityUtil.getAllType()
|
||||
this.siteList = await this.findAllOpenSite()
|
||||
this.pageData();
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,112 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<!--#include("/platform/activity/summary/common/addSummaryCommon.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
files: [],
|
||||
tissueId: '',
|
||||
},
|
||||
summaryType: [],
|
||||
id: '',
|
||||
clubOptions: [],
|
||||
userOptions: [],
|
||||
summaryFrom: '3',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async querySqr(key) {
|
||||
const data = await selectUser(key, 30)
|
||||
this.userOptions = data.list
|
||||
},
|
||||
cancel() {
|
||||
if (this.id) {
|
||||
sublime.jumpPagePjax('/platform/activity/yearSummary/club')
|
||||
}
|
||||
},
|
||||
async doHandle() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (valid) {
|
||||
this.formData.userId = "${@shiro.getPrincipalProperty('id')}";
|
||||
this.formData.summaryFrom = "3";
|
||||
this.formData.files = JSON.stringify(this.formData.files)
|
||||
const resp = await $.post('/platform/activity/yearSummary/doHandle', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: resp.msg,
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
sublime.jumpPagePjax('/platform/activity/yearSummary/club')
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
const id = GetQueryString("id")
|
||||
this.id = id
|
||||
if (id) {
|
||||
const resp = await $.post('/platform/activity/yearSummary/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
this.formData.files = JSON.parse(this.formData.files)
|
||||
this.userOptions = [
|
||||
{
|
||||
username: this.formData.username,
|
||||
loginname: this.formData.loginname,
|
||||
id: this.formData.userId,
|
||||
}
|
||||
]
|
||||
}
|
||||
} else {
|
||||
this.formData.userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
this.userOptions = [
|
||||
{
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
id: "${@shiro.getPrincipalProperty('id')}",
|
||||
}
|
||||
]
|
||||
const clubs = await $.post('/platform/activity/yearSummary/getMyClub')
|
||||
this.formData.tissueId = clubs[0] === undefined ? '' : clubs[0]
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initData()
|
||||
this.summaryType = await getDictOptions('summaryType')
|
||||
this.clubOptions = await getClubs()
|
||||
const isAdmin = "${@shiro.hasAnyRoles('sysadmin', 'A06')}" === 'true'
|
||||
if (!isAdmin) {
|
||||
const clubs = await this.getMyClub()
|
||||
let clubArray = []
|
||||
for (let c of Array.from(clubs)) {
|
||||
const cl = this.clubOptions.find(x => x.id === c)
|
||||
if (cl) {
|
||||
clubArray.push(cl)
|
||||
}
|
||||
}
|
||||
this.clubOptions = clubArray
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,245 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
placeholder="选择年度" style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">社团</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.tissueId" placeholder="请选择社团(社团)" style="width: 100%;">
|
||||
<el-option v-for="item in unionOptions" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">总结类型</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.summaryType" placeholder="请选择总结类型" style="width: 100%;">
|
||||
<el-option v-for="item in summaryType" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="pageData">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" @sort-change='pageOrder'>
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="year" label="年度">
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="name" label="社团">
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="typename" label="总结类型">
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="username" label="上传人">
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="ctime" label="上传时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="userOnline" label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini"><i class="ti-settings"></i><span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<div style="width: 80%; margin: 0 auto">
|
||||
<vi-title title="总结详情"></vi-title>
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="年度">
|
||||
{{viewData.year}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="社团">
|
||||
{{viewData.name}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="总结类型">
|
||||
{{viewData.typename}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上传人">
|
||||
{{viewData.username}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上传时间" :span="2">
|
||||
{{viewData.ctime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件">
|
||||
<file-upload v-if="viewData.files&&viewData.files.length"
|
||||
:files="JSON.parse(viewData.files)"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: "#app",
|
||||
components: {
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
fileList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
summaryFrom: '3',
|
||||
year: moment().format('YYYY')
|
||||
},
|
||||
formData: {},
|
||||
summaryType: [],
|
||||
unionOptions: [],
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.viewData = row
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data.id)
|
||||
}
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('确定要删除吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
$.post(base + '/platform/activity/yearSummary/doDelete', {id: id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
pageOrder(column) {
|
||||
this.pageForm.pageOrderName = column.prop
|
||||
this.pageForm.pageOrderBy = column.order
|
||||
this.pageData()
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData()
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
$.post('/platform/activity/yearSummary/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
sublime.jumpPagePjax('/platform/activity/yearSummary/addClubSummary?id=' + row.id)
|
||||
},
|
||||
async getMyClub() {
|
||||
return await $.post('/platform/activity/yearSummary/getMyClub')
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unionOptions = await getClubs()
|
||||
const isAdmin = "${@shiro.hasAnyRoles('sysadmin', 'A06')}" === 'true'
|
||||
if (!isAdmin) {
|
||||
const clubs = await this.getMyClub()
|
||||
let clubArray = []
|
||||
for (let c of Array.from(clubs)) {
|
||||
const cl = this.unionOptions.find(x => x.id === c)
|
||||
if (cl) {
|
||||
clubArray.push(cl)
|
||||
}
|
||||
}
|
||||
this.unionOptions = clubArray
|
||||
}
|
||||
this.summaryType = await getDictOptions('summaryType')
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,57 @@
|
||||
<el-form :model="formData" label-width="120px" ref="form">
|
||||
<vi-title title="年度总结"></vi-title>
|
||||
<el-row :gutter="10" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="姓名" prop="username">
|
||||
<el-select v-model="formData.userId" style="width: 100%"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
reserve-keyword
|
||||
placeholder="输入工号或姓名查找"
|
||||
:remote-method="querySqr">
|
||||
<el-option v-for="o in userOptions" :label="o.username+'-'+o.loginname" :value="o.id"
|
||||
:key="o.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="summaryFrom === '2'" :gutter="10" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属工会" prop="tissueId">
|
||||
<el-select v-model="formData.tissueId" placeholder="请选择所属工会" style="width: 100%;">
|
||||
<el-option v-for="item in unionOptions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="summaryFrom === '3'" :gutter="10" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="社团" prop="tissueId">
|
||||
<el-select v-model="formData.tissueId" placeholder="请选择社团(社团)" style="width: 100%;">
|
||||
<el-option v-for="item in clubOptions" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="总结类型" prop="summaryType" :rules="{required:true,message: '请选择总结类型', trigger: 'blur'}">
|
||||
<el-select v-model="formData.summaryType" placeholder="请选择总结类型" style="width: 100%;">
|
||||
<el-option v-for="item in summaryType" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="files" label="附件上传">
|
||||
<file-upload :files.sync="formData.files"></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row class="mt10" justify="end" type="flex">
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button @click="doHandle" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
@@ -0,0 +1,99 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<!--#include("/platform/activity/summary/common/addSummaryCommon.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
files: [],
|
||||
tissueId: '',
|
||||
},
|
||||
summaryFrom: '1',
|
||||
summaryType: [],
|
||||
id: '',
|
||||
unionOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async querySqr(key) {
|
||||
const data = await selectUser(key, 30)
|
||||
this.userOptions = data.list
|
||||
},
|
||||
cancel() {
|
||||
if (this.id) {
|
||||
sublime.jumpPagePjax('/platform/activity/yearSummary/school')
|
||||
}
|
||||
},
|
||||
async doHandle() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (valid) {
|
||||
this.formData.userId = "${@shiro.getPrincipalProperty('id')}";
|
||||
this.formData.summaryFrom = "1";
|
||||
this.formData.files = JSON.stringify(this.formData.files)
|
||||
const resp = await $.post('/platform/activity/yearSummary/doHandle', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: resp.msg,
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
sublime.jumpPagePjax('/platform/activity/yearSummary/school')
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
const id = GetQueryString("id")
|
||||
this.id = id
|
||||
if (id) {
|
||||
const resp = await $.post('/platform/activity/yearSummary/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
this.formData.files = JSON.parse(this.formData.files)
|
||||
this.userOptions = [
|
||||
{
|
||||
username: this.formData.username,
|
||||
loginname: this.formData.loginname,
|
||||
id: this.formData.userId,
|
||||
}
|
||||
]
|
||||
}
|
||||
} else {
|
||||
this.formData.userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
this.userOptions = [
|
||||
{
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
id: "${@shiro.getPrincipalProperty('id')}",
|
||||
}
|
||||
]
|
||||
this.formData.tissueId = "${@shiro.getPrincipalProperty('union').getId()}"
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initData()
|
||||
this.summaryType = await getDictOptions('summaryType')
|
||||
this.unionOptions = await getUnions()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,236 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
placeholder="选择年度" style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="search-item">
|
||||
<div class="search-item-label">所属工会</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.tissueId" placeholder="请选择所属工会" style="width: 100%;">
|
||||
<el-option v-for="item in unionOptions" :label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">总结类型</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.summaryType" placeholder="请选择总结类型"
|
||||
clearable style="width: 100%;">
|
||||
<el-option v-for="item in summaryType" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="pageData">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" @sort-change='pageOrder'>
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="year" label="年度">
|
||||
</el-table-column>
|
||||
<!--<el-table-column sortable prop="name" label="所属工会">
|
||||
</el-table-column>-->
|
||||
<el-table-column sortable prop="typename" label="总结类型">
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="username" label="上传人">
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="ctime" label="上传时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="userOnline" label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini"><i class="ti-settings"></i><span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<div style="width: 80%; margin: 0 auto">
|
||||
<vi-title title="总结详情"></vi-title>
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="年度">
|
||||
{{viewData.year}}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="所属工会">
|
||||
{{viewData.name}}
|
||||
</el-descriptions-item>-->
|
||||
<el-descriptions-item label="总结类型">
|
||||
{{viewData.typename}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上传人">
|
||||
{{viewData.username}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上传时间" :span="2">
|
||||
{{viewData.ctime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件">
|
||||
<file-upload v-if="viewData.files&&viewData.files.length"
|
||||
:files="JSON.parse(viewData.files)"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: "#app",
|
||||
components: {
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
fileList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
summaryFrom: '1',
|
||||
year: moment().format('YYYY')
|
||||
},
|
||||
formData: {},
|
||||
summaryType: [],
|
||||
unionOptions: [],
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.viewData = row
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data.id)
|
||||
}
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('确定要删除吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
$.post(base + '/platform/activity/yearSummary/doDelete', {id: id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
pageOrder(column) {
|
||||
this.pageForm.pageOrderName = column.prop
|
||||
this.pageForm.pageOrderBy = column.order
|
||||
this.pageData()
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData()
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
$.post('/platform/activity/yearSummary/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
sublime.jumpPagePjax('/platform/activity/yearSummary/addSchoolSummary?id=' + row.id)
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unionOptions = await getUnions()
|
||||
const isAdmin = "${@shiro.hasAnyRoles('sysadmin', 'A06')}" === 'true'
|
||||
if (!isAdmin) {
|
||||
const selfUnion = "${@shiro.getPrincipalProperty('union').getId()}";
|
||||
this.unionOptions = this.unionOptions.find(x => x.id === selfUnion)
|
||||
}
|
||||
this.summaryType = await getDictOptions('summaryType')
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,105 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<!--#include("/platform/activity/summary/common/addSummaryCommon.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
files: [],
|
||||
tissueId: '',
|
||||
},
|
||||
summaryFrom: '2',
|
||||
summaryType: [],
|
||||
id: '',
|
||||
unionOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async querySqr(key) {
|
||||
const data = await selectUser(key, 30)
|
||||
this.userOptions = data.list
|
||||
},
|
||||
cancel() {
|
||||
if (this.id) {
|
||||
sublime.jumpPagePjax('/platform/activity/yearSummary/union')
|
||||
}
|
||||
},
|
||||
async doHandle() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (valid) {
|
||||
this.formData.userId = "${@shiro.getPrincipalProperty('id')}";
|
||||
this.formData.tissueId = "${@shiro.getPrincipalProperty('union').getId()}";
|
||||
this.formData.summaryFrom = "2";
|
||||
this.formData.files = JSON.stringify(this.formData.files)
|
||||
const resp = await $.post('/platform/activity/yearSummary/doHandle', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: resp.msg,
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
sublime.jumpPagePjax('/platform/activity/yearSummary/union')
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
const id = GetQueryString("id")
|
||||
this.id = id
|
||||
if (id) {
|
||||
const resp = await $.post('/platform/activity/yearSummary/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
this.formData.files = JSON.parse(this.formData.files)
|
||||
this.userOptions = [
|
||||
{
|
||||
username: this.formData.username,
|
||||
loginname: this.formData.loginname,
|
||||
id: this.formData.userId,
|
||||
}
|
||||
]
|
||||
}
|
||||
} else {
|
||||
this.formData.userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
this.userOptions = [
|
||||
{
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
id: "${@shiro.getPrincipalProperty('id')}",
|
||||
}
|
||||
]
|
||||
this.formData.tissueId = "${@shiro.getPrincipalProperty('union').getId()}"
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initData()
|
||||
this.summaryType = await getDictOptions('summaryType')
|
||||
this.unionOptions = await getUnions()
|
||||
const isAdmin = "${@shiro.hasAnyRoles('sysadmin', 'A06')}" === 'true'
|
||||
if (!isAdmin) {
|
||||
const selfUnion = "${@shiro.getPrincipalProperty('union').getId()}";
|
||||
this.unionOptions = [this.unionOptions.find(x => x.id === selfUnion)]
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,236 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
placeholder="选择年度" style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.tissueId" placeholder="请选择所属工会" style="width: 100%;">
|
||||
<el-option v-for="item in unionOptions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">总结类型</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.summaryType" placeholder="请选择总结类型" style="width: 100%;">
|
||||
<el-option v-for="item in summaryType" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="pageData">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" @sort-change='pageOrder'>
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="year" label="年度">
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="name" label="所属工会">
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="typename" label="总结类型">
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="username" label="上传人">
|
||||
</el-table-column>
|
||||
<el-table-column sortable prop="ctime" label="上传时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="userOnline" label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini"><i class="ti-settings"></i><span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<div style="width: 80%; margin: 0 auto">
|
||||
<vi-title title="总结详情"></vi-title>
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="年度">
|
||||
{{viewData.year}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属工会">
|
||||
{{viewData.name}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="总结类型">
|
||||
{{viewData.typename}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上传人">
|
||||
{{viewData.username}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="上传时间" :span="2">
|
||||
{{viewData.ctime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件">
|
||||
<file-upload v-if="viewData.files&&viewData.files.length"
|
||||
:files="JSON.parse(viewData.files)"
|
||||
:view="true"></file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: "#app",
|
||||
components: {
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
fileList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
summaryFrom: '2',
|
||||
year: moment().format('YYYY')
|
||||
},
|
||||
formData: {},
|
||||
summaryType: [],
|
||||
unionOptions: [],
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.viewData = row
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data.id)
|
||||
}
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm('确定要删除吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
$.post(base + '/platform/activity/yearSummary/doDelete', {id: id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
pageOrder(column) {
|
||||
this.pageForm.pageOrderName = column.prop
|
||||
this.pageForm.pageOrderBy = column.order
|
||||
this.pageData()
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData()
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
$.post('/platform/activity/yearSummary/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
sublime.jumpPagePjax('/platform/activity/yearSummary/addUnionSummary?id=' + row.id)
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unionOptions = await getUnions()
|
||||
const isAdmin = "${@shiro.hasAnyRoles('sysadmin', 'A06')}" === 'true'
|
||||
if (!isAdmin) {
|
||||
const selfUnion = "${@shiro.getPrincipalProperty('union').getId()}";
|
||||
this.unionOptions = [this.unionOptions.find(x => x.id === selfUnion)]
|
||||
}
|
||||
this.summaryType = await getDictOptions('summaryType')
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,443 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-divider {
|
||||
background-color: #409EFF !important;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #409EFF !important;
|
||||
}
|
||||
|
||||
.el-timeline-item__timestamp {
|
||||
color: #409EFF;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动时间:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.name" placeholder="请输入活动名称" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工会名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择工会" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="pageData">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="活动列表" :app="this">
|
||||
<template #func>
|
||||
<el-button type="primary" icon="el-icon-edit-outline" size="small"
|
||||
@click="openAdd">
|
||||
创建活动
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable">
|
||||
|
||||
<template v-if="column.prop=='time'" scope="{row}">
|
||||
<span>
|
||||
{{moment(row.startTime).format('YYYY-MM-DD')}} - {{moment(row.endTime).format('YYYY-MM-DD')}}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='type'" scope="{row}">
|
||||
<span v-if="row.type==40001">分工会活动计划</span>
|
||||
<span v-if="row.type==40003">社团活动计划</span>
|
||||
<span v-if="row.type==40003">校工会活动计划</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='tussueName'" scope="{row}">
|
||||
<span v-if="row.type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||
<span v-if="row.type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini" :loading="row.loading">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<!--# if(!@shiro.hasRole('A06')){ #-->
|
||||
<el-dropdown-item :command="{type:'export',row}">
|
||||
导出
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<!--# } #-->
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
<el-button type="primary" @click="operation">确 定</el-button>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<vi-title title="填写活动信息"></vi-title>
|
||||
<el-form :model="formData" ref="addForm" :rules="formRules" label-width="100px" label-position="left"
|
||||
label-suffix=":" style="padding: 0 2%">
|
||||
|
||||
<el-form-item prop="name" label="活动名称">
|
||||
<el-input maxlength="50" placeholder="请填写活动名称" v-model="formData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!--<el-row :gutter="40">
|
||||
<el-col :span="12">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="type" label="活动类型">
|
||||
<el-radio-group v-model="formData.type">
|
||||
<el-radio label="1" border>分工会活动</el-radio>
|
||||
<el-radio label="2" border>社团活动</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
|
||||
<el-row :gutter="40">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="time" label="活动时间">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.time"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="peopleNum" label="活动人数">
|
||||
<el-input maxlength="10" placeholder="请填写活动人数" v-model="formData.peopleNum"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="40">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="address" label="活动地址">
|
||||
<el-input maxlength="50" placeholder="请填写活动地址" v-model="formData.address"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div style="display: flex;margin: 20px 0">
|
||||
<el-divider content-position="left">活动人员列表</el-divider>
|
||||
|
||||
<div style="padding-left: 10px">
|
||||
<el-tooltip class="item" effect="dark" content="点击添加活动人员" placement="top">
|
||||
<el-button icon="el-icon-plus" circle @click="openAddUser" type="primary"></el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<el-table style="margin-bottom: 20px" border stripe :data="userData" size="small"
|
||||
v-loading="userTabLoading">
|
||||
<el-table-column
|
||||
type="index" label="序号" header-align="center" align="center" width="100">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in userColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable">
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
|
||||
width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button type="danger" icon="el-icon-delete" circle @click="delUser"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<el-divider content-position="left">活动资料</el-divider>
|
||||
<file-upload :files.sync="formData.files"></file-upload>
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<tissue-info ref="info"></tissue-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="添加人员" :visible.sync="dialogVisible" width="40%">
|
||||
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="100px">
|
||||
<el-form-item prop="userId" label="参加人员">
|
||||
<el-select v-model="formData.tissuePersonList" placeholder="请选择参加人员"
|
||||
multiple
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
:remote-method="remoteMethod"
|
||||
:loading="selectLoading"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.userId"
|
||||
:label="item.userName+'-'+item.loginName+'-'+item.unitName"
|
||||
:value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAddUser">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
selectLoading: false,
|
||||
userTabLoading: false,
|
||||
dialogVisible: false,
|
||||
userData: [],
|
||||
userList: [],
|
||||
unionList: [],
|
||||
formData: {
|
||||
tissuePersonList: []
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '活动名称'},
|
||||
{prop: 'address', label: '活动地点'},
|
||||
{prop: 'type', label: '活动类型'},
|
||||
{prop: 'tussueName', label: '所属组织'},
|
||||
{prop: 'time', label: '活动日期'},
|
||||
{prop: 'peopleNum', label: '活动人数'}
|
||||
],
|
||||
userColumns: [
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'mobile', label: '联系方式'},
|
||||
{prop: 'unitName', label: '所属单位'},
|
||||
{prop: 'unionName', label: '所属工会'}
|
||||
],
|
||||
formRules: {
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
address: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
peopleNum: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'tissue-info': httpVueLoader('/components/activity/school/tissueInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === 'view') {
|
||||
this.openView(row)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(row)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(row)
|
||||
} else if (type === 'export') {
|
||||
location.href = "/platform/activity/union/info/mange/export?id=" + row.id
|
||||
}
|
||||
},
|
||||
async remoteMethod(query) {
|
||||
if (query) {
|
||||
this.selectLoading = true;
|
||||
const {data} = await $.post(loc() + "/findUser", {serachWord: query})
|
||||
this.userList = data
|
||||
this.selectLoading = false;
|
||||
}
|
||||
},
|
||||
openAddUser() {
|
||||
this.formData.tissuePersonList = []
|
||||
this.dialogVisible = true
|
||||
},
|
||||
doAddUser() {
|
||||
this.formData.tissuePersonList = this.userList.filter(v => this.formData.tissuePersonList.some(x => v.userId === x))
|
||||
this.userData = this.userData.concat(this.formData.tissuePersonList)
|
||||
this.dialogVisible = false
|
||||
},
|
||||
delUser(row) {
|
||||
this.userData.splice(this.userData.indexOf(row.userId), 1)
|
||||
this.formData.tissuePersonList.splice(this.formData.tissuePersonList.indexOf(row.userId), 1)
|
||||
},
|
||||
openView(row) {
|
||||
const {id} = row
|
||||
this.$refs.info.getInfo(id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async openEdit(row) {
|
||||
const {id} = row
|
||||
const resp = await $.post(loc() + "/findOne", {id})
|
||||
if(resp.code===0){
|
||||
const data = resp.data
|
||||
data.type = data.type + ''
|
||||
data.files = JSON.parse(data.files)
|
||||
data.time = [data.startTime, data.endTime]
|
||||
this.userData = clone(data.tissuePersonList)
|
||||
this.formData = data
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
async openAdd() {
|
||||
this.$refs.guava.edit()
|
||||
this.userData = []
|
||||
this.$nextTick(() => {
|
||||
this.formData = {
|
||||
name: '',
|
||||
time: '',
|
||||
peopleNum: '',
|
||||
address: '',
|
||||
files: [],
|
||||
type: "40002",
|
||||
tissuePersonList: []
|
||||
}
|
||||
if (this.$refs['addForm']) {
|
||||
this.$refs['addForm'].resetFields()
|
||||
}
|
||||
})
|
||||
},
|
||||
async operation() {
|
||||
let url = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
|
||||
if (formData.time && formData.time.length) {
|
||||
formData.startTime = formData.time[0]
|
||||
formData.endTime = formData.time[1]
|
||||
formData.time = undefined
|
||||
}
|
||||
|
||||
const resp = await $.post(loc() + url, {tissue: JSON.stringify(formData),})
|
||||
|
||||
loading.close()
|
||||
if(resp.code===0){
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
} else {
|
||||
this.$notify.error({title: '错误', message: '存在未填写的的必填项'});
|
||||
}
|
||||
});
|
||||
},
|
||||
doDelete(row) {
|
||||
const {id} = row
|
||||
this.$confirm('确定要删除该活动吗?', '提示', {type: 'warning'}).then(async () => {
|
||||
this.$set(row, "loading", true)
|
||||
const resp = await $.post(loc() + "/doDelete", {id: id});
|
||||
this.$set(row, "loading", false)
|
||||
if(resp.code===0){
|
||||
this.pageData()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.unionList = await getUnions(null)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,341 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">计划年份:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">计划名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.name" placeholder="请输入计划名称" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工会名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.tissueId" placeholder="请选择工会" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-if="searchMore">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">项目名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.eventId" placeholder="请选择活动项目" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in eventList"
|
||||
:key="item.id"
|
||||
:label="item.allName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="pageData">搜索</el-button>
|
||||
<more v-model="searchMore"></more>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="计划列表" :app="this">
|
||||
<template #func>
|
||||
<el-button type="primary" icon="el-icon-edit-outline" size="small"
|
||||
@click="openAdd">
|
||||
创建活动计划
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable">
|
||||
|
||||
<template v-if="column.prop=='carryOut'" scope="{row}">
|
||||
<span v-if="row.carryOut" class="text-success">已执行</span>
|
||||
<span v-if="!row.carryOut" class="text-primary">未执行</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='type'" scope="{row}">
|
||||
<span v-if="row.type==40001">分工会活动计划</span>
|
||||
<span v-if="row.type==40003">社团活动计划</span>
|
||||
<span v-if="row.type==40003">校工会活动计划</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini" :loading="row.loading">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<!--# if(!@shiro.hasRole('A06')){ #-->
|
||||
<el-dropdown-item :command="{type:'edit',row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<!--# } #-->
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
<el-button type="primary" @click="operation">确 定</el-button>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<vi-title title="填写计划信息"></vi-title>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="100px" label-position="left"
|
||||
label-suffix=":" style="padding: 0 2%">
|
||||
|
||||
<el-form-item prop="type" label="活动类型">
|
||||
<el-radio-group v-model="formData.type">
|
||||
<el-radio label="2" border>分工会活动计划</el-radio>
|
||||
<el-radio label="3" border>社团活动计划</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="name" label="计划名称">
|
||||
<el-input maxlength="50" placeholder="请填写计划名称" v-model="formData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="time" label="计划时间">
|
||||
<el-date-picker
|
||||
v-model="formData.time"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="eventId" label="活动项目">
|
||||
<el-select v-model="formData.eventId" placeholder="请选择活动项目" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in eventList"
|
||||
:key="item.id"
|
||||
:label="item.allName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="content" label="计划内容" class="is-required">
|
||||
<div id="content"></div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<plan-info ref="info"></plan-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let E = window.wangEditor
|
||||
const editors = {}
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
let validContent = (rule, value, callback) => {
|
||||
if (!this.formData.content || !dd3s.html2txt(this.formData.content)) {
|
||||
callback(new Error('请填写计划内容'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
unionList: [],
|
||||
eventList: [],
|
||||
flag: false,
|
||||
formData: {
|
||||
name: '',
|
||||
time: '',
|
||||
eventId: '',
|
||||
content: ''
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '计划名称'},
|
||||
{prop: 'time', label: '计划预计时间'},
|
||||
{prop: 'allName', label: '活动项目'},
|
||||
{prop: 'type', label: '类型'},
|
||||
{prop: 'carryOut', label: '计划状态'}
|
||||
],
|
||||
formRules: {
|
||||
type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
eventId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
content: [{validator: validContent, trigger: ['blur', 'change']}]
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'plan-info': httpVueLoader('/components/activity/school/planInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === 'view') {
|
||||
this.openView(row)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(row)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(row)
|
||||
}
|
||||
},
|
||||
openView(row) {
|
||||
const {id} = row
|
||||
this.$refs.info.getInfo(id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async openEdit(row) {
|
||||
this.flag = false
|
||||
row.type = row.type + ''
|
||||
this.formData = row
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
this.initEditor()
|
||||
})
|
||||
},
|
||||
async openAdd() {
|
||||
this.formData = {}
|
||||
this.flag = false
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
this.initEditor()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
|
||||
this.formData = {
|
||||
type: '2',
|
||||
name: '',
|
||||
time: '',
|
||||
eventId: '',
|
||||
content: ''
|
||||
}
|
||||
})
|
||||
},
|
||||
async operation() {
|
||||
let url = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
|
||||
const resp = await $.post(loc() + url, {
|
||||
data: JSON.stringify(this.formData),
|
||||
})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
} else {
|
||||
this.$notify.error({title: '错误', message: '存在未填写的的必填项'});
|
||||
}
|
||||
});
|
||||
},
|
||||
doDelete(row) {
|
||||
const {id} = row
|
||||
this.$confirm('确定要删除该计划吗?', '提示', {type: 'warning'}).then(async () => {
|
||||
const resp = await $.post(loc() + "/doDelete", {id: id});
|
||||
if(resp.code===0){
|
||||
this.pageData()
|
||||
}else{
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
initEditor() {
|
||||
let keys = ['content']
|
||||
keys.forEach(key => {
|
||||
$("#" + key).html("")
|
||||
editors[key] = new E('#' + key)
|
||||
editors[key].config.onchange = (html) => {
|
||||
this.formData[key] = html
|
||||
}
|
||||
editors[key].create()
|
||||
if (this.formData[key]) {
|
||||
editors[key].txt.html(this.formData[key])
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.eventList = await activity.getEvents()
|
||||
this.unionList = await getUnions(null);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,152 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<!--#include("/platform/activity/union/addPlanCommon.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let E = window.wangEditor
|
||||
const editors = {}
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'plan-info': httpVueLoader('/components/activity/school/planInfo.vue'),
|
||||
},
|
||||
data() {
|
||||
let validContent = (rule, value, callback) => {
|
||||
if (!this.formData.content || !dd3s.html2txt(this.formData.content)) {
|
||||
callback(new Error('请填写计划内容'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
activityTypeList: [],
|
||||
eventList: [],
|
||||
formData: {
|
||||
type: '40003',
|
||||
name: '',
|
||||
time: '',
|
||||
event: '',
|
||||
content: ''
|
||||
},
|
||||
formRules: {
|
||||
type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
money: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
event: [{required: true, message: '必填', trigger: ['blur']}],
|
||||
activityType: [{required: true, message: '必填', trigger: ['blur']}],
|
||||
content: [{validator: validContent, trigger: ['blur', 'change']}]
|
||||
},
|
||||
id: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
if (this.id) {
|
||||
sublime.jumpPagePjax('/platform/activity/plan/club')
|
||||
}
|
||||
},
|
||||
doHandle() {
|
||||
let url = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
|
||||
const resp = await $.post('/platform/activity/plan' + url, {
|
||||
id: this.formData.id,
|
||||
name: this.formData.name,
|
||||
time: this.formData.time,
|
||||
content: this.formData.content,
|
||||
money: this.formData.money,
|
||||
event: JSON.stringify(this.formData.event),
|
||||
type: '40003',
|
||||
activityType: this.formData.activityType,
|
||||
})
|
||||
|
||||
if (resp.code === 0) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: resp.msg,
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
sublime.jumpPagePjax('/platform/activity/plan/club')
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$notify.error({title: '错误', message: '存在未填写的的必填项'});
|
||||
}
|
||||
});
|
||||
},
|
||||
initEditor() {
|
||||
let keys = ['content']
|
||||
keys.forEach(key => {
|
||||
$("#" + key).html("")
|
||||
editors[key] = new E('#' + key)
|
||||
editors[key].config.onchange = (html) => {
|
||||
this.formData[key] = html
|
||||
}
|
||||
editors[key].create()
|
||||
if (this.formData[key]) {
|
||||
editors[key].txt.html(this.formData[key])
|
||||
}
|
||||
})
|
||||
},
|
||||
async getEvents() {
|
||||
const {code, data, msg} = await $.get("/platform/activity/common/getEvents")
|
||||
return data
|
||||
},
|
||||
async getActivityType() {
|
||||
const {code, data, msg} = await $.get("/platform/activity/common/getActivityType")
|
||||
return data
|
||||
},
|
||||
async initData() {
|
||||
const id = GetQueryString("id")
|
||||
this.id = id
|
||||
if (id) {
|
||||
const resp = await $.post('/platform/activity/plan/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
const cloneRow = clone(resp.data)
|
||||
cloneRow.event = JSON.parse(cloneRow.event)
|
||||
this.formData = cloneRow
|
||||
this.$nextTick(() => {
|
||||
this.initEditor()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const self = this
|
||||
setTimeout(function () {
|
||||
self.initEditor()
|
||||
}, 100)
|
||||
//this.eventList = await this.getEvents()
|
||||
this.activityTypeList = await this.getActivityType()
|
||||
await this.initData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,65 @@
|
||||
<vi-title title="填写计划信息"></vi-title>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="100px" label-position="left"
|
||||
label-suffix=":" style="padding: 0 2%">
|
||||
|
||||
<!-- <el-form-item prop="type" label="活动类型">
|
||||
<el-radio-group v-model="formData.type">
|
||||
<el-radio label="2" border>分工会活动计划</el-radio>
|
||||
<el-radio label="3" border>社团活动计划</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item prop="name" label="计划名称">
|
||||
<el-input maxlength="50" placeholder="请填写计划名称" v-model="formData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="time" label="活动时间">
|
||||
<el-date-picker
|
||||
v-model="formData.time"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<!--<el-form-item prop="event" label="活动项目">
|
||||
<!–<el-input maxlength="50" placeholder="请填写活动项目" v-model="formData.event"
|
||||
type="text"></el-input>–>
|
||||
<el-select v-model="formData.event" placeholder="请选择活动项目" filterable clearable multiple
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in eventList"
|
||||
:key="item.id"
|
||||
:label="item.allName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item prop="activityType" label="活动类型">
|
||||
<el-select v-model="formData.activityType" placeholder="请选择活动类型" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in activityTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="money" label="预算费用" class="is-required">
|
||||
<el-input maxlength="50" placeholder="请填写整数或者小数" v-model="formData.money"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="content" label="计划内容" class="is-required">
|
||||
<div id="content"></div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row class="mt10" justify="end" type="flex">
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button @click="doHandle" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
@@ -0,0 +1,152 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<!--#include("/platform/activity/union/addPlanCommon.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let E = window.wangEditor
|
||||
const editors = {}
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'plan-info': httpVueLoader('/components/activity/school/planInfo.vue'),
|
||||
},
|
||||
data() {
|
||||
let validContent = (rule, value, callback) => {
|
||||
if (!this.formData.content || !dd3s.html2txt(this.formData.content)) {
|
||||
callback(new Error('请填写计划内容'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
activityTypeList: [],
|
||||
eventList: [],
|
||||
formData: {
|
||||
type: '40001',
|
||||
name: '',
|
||||
time: '',
|
||||
event: '',
|
||||
content: ''
|
||||
},
|
||||
formRules: {
|
||||
type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
money: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
event: [{required: true, message: '必填', trigger: ['blur']}],
|
||||
activityType: [{required: true, message: '必填', trigger: ['blur']}],
|
||||
content: [{validator: validContent, trigger: ['blur', 'change']}]
|
||||
},
|
||||
id: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
if (this.id) {
|
||||
sublime.jumpPagePjax('/platform/activity/plan/school')
|
||||
}
|
||||
},
|
||||
doHandle() {
|
||||
let url = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
|
||||
const resp = await $.post('/platform/activity/plan' + url, {
|
||||
id: this.formData.id,
|
||||
name: this.formData.name,
|
||||
time: this.formData.time,
|
||||
content: this.formData.content,
|
||||
money: this.formData.money,
|
||||
event: JSON.stringify(this.formData.event),
|
||||
type: '40001',
|
||||
activityType: this.formData.activityType,
|
||||
})
|
||||
|
||||
if (resp.code === 0) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: resp.msg,
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
sublime.jumpPagePjax('/platform/activity/plan/school')
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$notify.error({title: '错误', message: '存在未填写的的必填项'});
|
||||
}
|
||||
});
|
||||
},
|
||||
initEditor() {
|
||||
let keys = ['content']
|
||||
keys.forEach(key => {
|
||||
$("#" + key).html("")
|
||||
editors[key] = new E('#' + key)
|
||||
editors[key].config.onchange = (html) => {
|
||||
this.formData[key] = html
|
||||
}
|
||||
editors[key].create()
|
||||
if (this.formData[key]) {
|
||||
editors[key].txt.html(this.formData[key])
|
||||
}
|
||||
})
|
||||
},
|
||||
async getEvents() {
|
||||
const {code, data, msg} = await $.get("/platform/activity/common/getEvents")
|
||||
return data
|
||||
},
|
||||
async getActivityType() {
|
||||
const {code, data, msg} = await $.get("/platform/activity/common/getActivityType")
|
||||
return data
|
||||
},
|
||||
async initData() {
|
||||
const id = GetQueryString("id")
|
||||
this.id = id
|
||||
if (id) {
|
||||
const resp = await $.post('/platform/activity/plan/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
const cloneRow = clone(resp.data)
|
||||
cloneRow.event = JSON.parse(cloneRow.event)
|
||||
this.formData = cloneRow
|
||||
this.$nextTick(() => {
|
||||
this.initEditor()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const self = this
|
||||
setTimeout(function () {
|
||||
self.initEditor()
|
||||
}, 100)
|
||||
//this.eventList = await this.getEvents()
|
||||
this.activityTypeList = await this.getActivityType()
|
||||
await this.initData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,152 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<!--#include("/platform/activity/union/addPlanCommon.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let E = window.wangEditor
|
||||
const editors = {}
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'plan-info': httpVueLoader('/components/activity/school/planInfo.vue'),
|
||||
},
|
||||
data() {
|
||||
let validContent = (rule, value, callback) => {
|
||||
if (!this.formData.content || !dd3s.html2txt(this.formData.content)) {
|
||||
callback(new Error('请填写计划内容'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
activityTypeList: [],
|
||||
eventList: [],
|
||||
formData: {
|
||||
type: '40002',
|
||||
name: '',
|
||||
time: '',
|
||||
event: '',
|
||||
content: ''
|
||||
},
|
||||
formRules: {
|
||||
type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
money: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
event: [{required: true, message: '必填', trigger: ['blur']}],
|
||||
activityType: [{required: true, message: '必填', trigger: ['blur']}],
|
||||
content: [{validator: validContent, trigger: ['blur', 'change']}]
|
||||
},
|
||||
id: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
if (this.id) {
|
||||
sublime.jumpPagePjax('/platform/activity/plan/union')
|
||||
}
|
||||
},
|
||||
doHandle() {
|
||||
let url = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
|
||||
const resp = await $.post('/platform/activity/plan' + url, {
|
||||
id: this.formData.id,
|
||||
name: this.formData.name,
|
||||
time: this.formData.time,
|
||||
content: this.formData.content,
|
||||
money: this.formData.money,
|
||||
event: JSON.stringify(this.formData.event),
|
||||
type: '40002',
|
||||
activityType: this.formData.activityType,
|
||||
})
|
||||
|
||||
if (resp.code === 0) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: resp.msg,
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
sublime.jumpPagePjax('/platform/activity/plan/union')
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$notify.error({title: '错误', message: '存在未填写的的必填项'});
|
||||
}
|
||||
});
|
||||
},
|
||||
initEditor() {
|
||||
let keys = ['content']
|
||||
keys.forEach(key => {
|
||||
$("#" + key).html("")
|
||||
editors[key] = new E('#' + key)
|
||||
editors[key].config.onchange = (html) => {
|
||||
this.formData[key] = html
|
||||
}
|
||||
editors[key].create()
|
||||
if (this.formData[key]) {
|
||||
editors[key].txt.html(this.formData[key])
|
||||
}
|
||||
})
|
||||
},
|
||||
async getEvents() {
|
||||
const {code, data, msg} = await $.get("/platform/activity/common/getEvents")
|
||||
return data
|
||||
},
|
||||
async getActivityType() {
|
||||
const {code, data, msg} = await $.get("/platform/activity/common/getActivityType")
|
||||
return data
|
||||
},
|
||||
async initData() {
|
||||
const id = GetQueryString("id")
|
||||
this.id = id
|
||||
if (id) {
|
||||
const resp = await $.post('/platform/activity/plan/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
const cloneRow = clone(resp.data)
|
||||
cloneRow.event = JSON.parse(cloneRow.event)
|
||||
this.formData = cloneRow
|
||||
this.$nextTick(() => {
|
||||
this.initEditor()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const self = this
|
||||
setTimeout(function () {
|
||||
self.initEditor()
|
||||
}, 100)
|
||||
//this.eventList = await this.getEvents()
|
||||
this.activityTypeList = await this.getActivityType()
|
||||
await this.initData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,999 @@
|
||||
<style>
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#signMap .amap-icon img {
|
||||
position: absolute !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never" style="min-height: calc(100vh - 70px);position: relative">
|
||||
<el-form :model="formData" ref="addForm" :rules="formRules" label-width="130px"
|
||||
label-suffix=":">
|
||||
<el-tabs tab-position="top" v-model="activeName">
|
||||
<el-tab-pane label="活动基础信息" name="1">
|
||||
<vi-title title="填写活动信息"></vi-title>
|
||||
|
||||
<el-row :gutter="40">
|
||||
<el-col :xs="24" :lg="12" :xl="12">
|
||||
<el-form-item prop="name" label="活动名称">
|
||||
<el-input maxlength="50" placeholder="请填写活动名称"
|
||||
v-model="formData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :lg="12" :xl="12">
|
||||
<el-form-item prop="activityCode" label="活动编号">
|
||||
<el-input maxlength="50" disabled
|
||||
v-model="formData.activityCode"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :lg="12" :xl="12">
|
||||
<el-form-item prop="projectTypeCode" label="活动项目类型">
|
||||
<el-select v-model="formData.projectTypeCode"
|
||||
placeholder="请选择活动类型"
|
||||
style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in projectType"
|
||||
:key="item.id"
|
||||
:label="item.name+' ('+item.code+')'"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :lg="12" :xl="12">
|
||||
<el-form-item prop="isEnrollSystem" label="是否用于报名">
|
||||
<el-radio-group v-model="formData.isEnrollSystem">
|
||||
<el-radio-button :label="true">活动报名</el-radio-button>
|
||||
<el-radio-button :label="false">活动管理</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :lg="12" :xl="12">
|
||||
<el-form-item prop="address" label="活动地址">
|
||||
<el-input maxlength="50" placeholder="请填写活动地址"
|
||||
v-model="formData.address"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :lg="12" :xl="12">
|
||||
<el-form-item prop="userId" label="联系人">
|
||||
<el-select v-model="formData.userId" placeholder="请选择联系人"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
reserve-keyword
|
||||
:remote-method="remoteMethod"
|
||||
:loading="selectLoading"
|
||||
style="width: 100%" @change="userChang">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.userId"
|
||||
:label="item.userName+'-'+item.loginName+'-'+item.unitName"
|
||||
:value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :lg="12" :xl="12">
|
||||
<el-form-item prop="mobile" label="联系方式">
|
||||
<el-input maxlength="50" placeholder="请填写联系方式"
|
||||
v-model="formData.mobile"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :lg="12" :xl="12" v-if="formData.isEnrollSystem">
|
||||
<el-form-item prop="plannedDate" label="活动计划时间">
|
||||
<!--<el-input maxlength="50" placeholder="活动计划时间"
|
||||
v-model="formData.plannedDate"></el-input>-->
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.plannedDate"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" @change="plannedDateChange">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :lg="12" :xl="12">
|
||||
<el-form-item prop="time" label="实际活动时间">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.time"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :lg="12" :xl="12">
|
||||
<el-form-item
|
||||
:rules="[{required:[1,2].includes(formData.signUpMethod),message:'请选择报名日期',trigger:['change','blur']}]"
|
||||
label="报名日期"
|
||||
prop="applyTime2">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="formData.applyTime2"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm"
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :lg="12" :xl="12" >
|
||||
<el-form-item prop="peopleNum" label="活动人数">
|
||||
<el-input-number maxlength="10" placeholder="请填写活动人数"
|
||||
:step="1"
|
||||
:precision="0"
|
||||
:disabled="[1,2].includes(formData.signUpMethod)"
|
||||
v-model.number="formData.peopleNum"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :lg="12" :xl="12">
|
||||
<el-form-item prop="groupId" label="参加人员范围">
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 99%">
|
||||
<el-select prop="groupId" placeholder="参加人员范围"
|
||||
v-model="formData.groupId"
|
||||
style="width: 99%;"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in activityGroupList"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
@click="$refs.drawerUserScope.userScopeDialog = true"
|
||||
type="primary">设置
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :lg="12" :xl="12" :xs="24" v-if="formData.isEnrollSystem">
|
||||
<el-form-item prop="signUpMethod" label="报名方式">
|
||||
<el-radio-group v-model="formData.signUpMethod"
|
||||
@change="signUpMethodChange">
|
||||
<!-- <el-radio :label="null">无需报名</el-radio>-->
|
||||
<el-radio :label="1">个人报名</el-radio>
|
||||
<el-radio :label="3">组队报名</el-radio>
|
||||
<el-radio :label="2" v-if="type===40001">分工会报名</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12" :xl="12" :xs="24">
|
||||
<el-form-item prop="xlFlag" label="活动提醒">
|
||||
<el-switch
|
||||
v-model="formData.xlFlag"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :xs="12" :lg="12" :xl="12"
|
||||
v-if="[1,2,3].includes(formData.signUpMethod)">
|
||||
<el-form-item prop="userNumberLimit" label="报名人数限制">
|
||||
<el-radio-group v-model="formData.userNumberLimit">
|
||||
<el-radio :label="1"
|
||||
:disabled="formData.signUpMethod===2">
|
||||
总人数限制
|
||||
</el-radio>
|
||||
<el-radio :label="2" v-if="type===40001">分工会人数限制
|
||||
</el-radio>
|
||||
<el-radio :label="null">不限制</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="12" :lg="12" :xl="12"
|
||||
v-if="[3].includes(formData.signUpMethod)">
|
||||
<el-form-item prop="totalUserNumberLimit" label="组队人数">
|
||||
<el-input-number v-model="formData.teamNum" :min="1"
|
||||
:max="2000"
|
||||
:precision="0"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="12" :lg="12" :xl="12"
|
||||
v-if="[1,2,3].includes(formData.signUpMethod) && formData.userNumberLimit===1">
|
||||
<el-form-item prop="totalUserNumberLimit" label="总人数限制">
|
||||
<el-input-number v-model="formData.totalUserNumberLimit"
|
||||
:min="1" :max="2000"
|
||||
:precision="0"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24"
|
||||
v-if="[1,2,3].includes(formData.signUpMethod) && formData.userNumberLimit===2">
|
||||
<el-form-item prop="unionUserNumberLimit" label="分工会人数限制">
|
||||
<vi-title2 title="分段设置">
|
||||
<template #func>
|
||||
<el-button size="small" type="primary" @click="unionLimitQuickSetting">
|
||||
应用分段设置
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-row v-for="(item,index) in unionUserNumCalc" :gutter="20" class="mb5">
|
||||
<el-col :span="7">
|
||||
<el-input-number v-model="item.startNum" :precision="0" :step="1" :min="1"
|
||||
placeholder="请输入最小人数"
|
||||
style="width: 100%"></el-input-number>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-input-number v-model="item.endNum" :precision="0" :step="1" :min="1"
|
||||
placeholder="请输入最大人数"
|
||||
style="width: 100%"></el-input-number>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input-number v-model="item.resultNum" :precision="0" :step="1" :min="1"
|
||||
placeholder="请输入限制人数"
|
||||
style="width: 100%"></el-input-number>
|
||||
</el-col>
|
||||
<el-col :span="4" class="text-right">
|
||||
<el-button icon="el-icon-plus" @click="unionUserNumCalc.push({})"></el-button>
|
||||
<el-button icon="el-icon-minus" @click="unionUserNumCalc.splice(index,1)"
|
||||
:disabled="unionUserNumCalc.length===1"></el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="mt10">
|
||||
<div v-for="(item,index) in unionUserNumCalcTips" class="text-danger">
|
||||
<span class="mr10">({{index+1}}).</span> {{item}}
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<vi-title2 title="比例设置" class="mt20">
|
||||
<template #func>
|
||||
一键比例:
|
||||
<el-input-number v-model="unionUserNumOneKeyRatio" :precision="0" :step="1" :min="0"
|
||||
placeholder="请输入一键比例"
|
||||
size="small"
|
||||
:max="100"></el-input-number>
|
||||
<el-button size="small" type="primary" @click="applyScaleSettings" class="ml5">应用比例设置
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
<el-table :data="formData.unionUserNumberLimit" max-height="500px">
|
||||
<el-table-column prop="unionname" label="分工会"></el-table-column>
|
||||
<el-table-column prop="teacherCount" label="人数"></el-table-column>
|
||||
<el-table-column prop="ratio" label="比例(%)">
|
||||
<template scope="{row}">
|
||||
<el-input-number v-model="row.ratio" :precision="0" :step="1" :min="0"
|
||||
:max="100"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="limitNum" label="限制人数">
|
||||
<template scope="{row}">
|
||||
<el-input-number v-model="row.limitNum" :precision="0" :step="1" :min="0"
|
||||
:max="row.teacherCount"
|
||||
@change="calSummaryCount"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<div class="text-danger"
|
||||
style="width: 100%;font-size: 18px;display: flex;align-items: center;font-weight: bold">
|
||||
限制总人数:{{summaryCount}}人
|
||||
</div>
|
||||
<!-- <el-button @click="clearUnionLimit" type="danger">清空分工会人数限制</el-button>
|
||||
<el-button @click="setUpUnionLimitDialog=false">取消</el-button>
|
||||
<el-button @click="doConfirmSetUpUnionLimit" type="primary">确定</el-button>-->
|
||||
</el-row>
|
||||
<!-- <el-table border stripe
|
||||
:data="formData.unionUserNumberLimit"
|
||||
size="small"
|
||||
height="500">
|
||||
<el-table-column type="index" label="序号"
|
||||
header-align="center" align="center"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="分工会名称"
|
||||
prop="unionName"></el-table-column>
|
||||
<el-table-column label="分工会人数"
|
||||
prop="unionNum"></el-table-column>
|
||||
<el-table-column label="限制人数" prop="limitNum">
|
||||
<template slot-scope="{row}">
|
||||
<el-input-number v-model="row.limitNum" :min="1"
|
||||
:max="row.unionNum"
|
||||
:precision="0"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" v-if="[1,2,3].includes(formData.signUpMethod)">
|
||||
<el-form-item label="是否需要签到">
|
||||
<el-radio-group v-model="formData.needSign"
|
||||
@change="(val)=>{formData.needSign?initMap():null}">
|
||||
<el-radio :label="true">需要</el-radio>
|
||||
<el-radio :label="false">不需要</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" v-if="formData.needSign">
|
||||
<el-form-item label="签到半径(m)">
|
||||
<el-input-number v-model="formData.rangeMeter"
|
||||
@change="rangeMeterChange"
|
||||
:precision="0" :step="1"
|
||||
:min="50"
|
||||
:max="1000"></el-input-number>
|
||||
<!-- <el-button type="primary" @click="marker.setMap(null);">清除点位</el-button>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24" v-show="formData.needSign">
|
||||
<el-form-item label="活动签到点位">
|
||||
<el-card shadow="never">
|
||||
<div style="width: 100%;height: 300px"
|
||||
id="signMap"></div>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="activityContent" label="活动内容">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="7"
|
||||
placeholder="请输入活动内容"
|
||||
v-model="formData.activityContent">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" v-if="!formData.isEnrollSystem">
|
||||
<el-form-item prop="activityExamineContent" label="活动考核内容">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="7"
|
||||
placeholder="请输入活动考核内容"
|
||||
v-model="formData.activityExamineContent">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" v-if="formData.signUpMethod!=null">
|
||||
<el-form-item prop="cover" label="封面图">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
:action="FILE_UPLOAD_ADDRESS"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload">
|
||||
<img v-if="formData.cover"
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + formData.cover"
|
||||
class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="活动费用" name="2" v-if="!formData.isEnrollSystem">
|
||||
<div style="display: flex;margin: 20px 0">
|
||||
<el-divider content-position="left">购置物品及价格</el-divider>
|
||||
|
||||
<div style="padding-left: 10px">
|
||||
<el-tooltip class="item" effect="dark" content="点击添加购置物品及价格"
|
||||
placement="top">
|
||||
<el-button icon="el-icon-plus" circle
|
||||
@click="formData.goods.push({})"
|
||||
type="primary"></el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-table :data="formData.goods" border size="mini" style="width: 100%"
|
||||
height="200">
|
||||
|
||||
<el-table-column sortable type="index" width="100" label="序号"
|
||||
align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="物品名称" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="物品名称"
|
||||
v-model="row.name"
|
||||
type="text"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="预算费用" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="预算费用"
|
||||
v-model="row.price"
|
||||
type="number" @input="blur"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualPrice" label="实际费用" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="实际费用"
|
||||
v-model="row.actualPrice"
|
||||
type="number" @input="blur"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center"
|
||||
header-align="center"
|
||||
width="80px"
|
||||
fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" icon="el-icon-delete" circle
|
||||
:disabled="formData.goods.length==0"
|
||||
@click="delNotesItem(scope)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left" class="dia"><span
|
||||
style="color: #3ea1ec;">附件</span>
|
||||
</el-divider>
|
||||
<el-row :gutter="40">
|
||||
|
||||
<el-col :xs="24" :lg="12" :xl="12" class="mb25">
|
||||
<el-form-item prop="billFiles" label="发票">
|
||||
<file-upload :files.sync="formData.billFiles"
|
||||
card></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :lg="12" :xl="12" class="mb25">
|
||||
<el-form-item prop="photoFiles" label="照片">
|
||||
<file-upload :files.sync="formData.photoFiles"
|
||||
card></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :xs="24" :lg="12" :xl="12">
|
||||
<el-form-item prop="otherFiles" label="其他">
|
||||
<file-upload :files.sync="formData.otherFiles"
|
||||
card></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="活动人员信息" name="3" v-if="!formData.isEnrollSystem">
|
||||
<table-tool label="活动人员信息" :app="this">
|
||||
<template #func>
|
||||
<el-button icon="el-icon-plus" @click="openAddUser"
|
||||
type="primary">添加活动人员
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table border stripe :data="userData" size="small"
|
||||
v-loading="userTabLoading" height="500">
|
||||
<el-table-column
|
||||
type="index" label="序号" header-align="center" align="center"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in userColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable">
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作"
|
||||
width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button type="danger" size="mini"
|
||||
@click="delUser(row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="活动总结" name="4" v-if="!formData.isEnrollSystem">
|
||||
<el-form-item prop="activitySummary" label="活动总结">
|
||||
<el-input
|
||||
:disabled="!formData.time || Date.now() < Date.parse(formData.time[1])"
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder="请输入活动内容"
|
||||
v-model="formData.activitySummary">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-alert
|
||||
class="mb20"
|
||||
style="margin-left: 130px"
|
||||
v-if="!formData.time || Date.now() < Date.parse(formData.time[1])"
|
||||
show-icon
|
||||
title="活动结束后可输入活动总结"
|
||||
type="info">
|
||||
</el-alert>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
<div style="padding: 20px;text-align: center;">
|
||||
<el-button type="primary" @click="operation" style="width: 300px">确 定</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</guava>
|
||||
|
||||
<el-dialog title="添加人员" :visible.sync="dialogVisible" width="40%" :close-on-click-modal="false">
|
||||
|
||||
<el-form :model="formData" label-width="100px">
|
||||
<el-form-item prop="userId" label="参加人员">
|
||||
<el-select v-model="formData.tissuePersonList" placeholder="请选择参加人员"
|
||||
multiple
|
||||
filterable
|
||||
remote
|
||||
:remote-method="remoteMethod"
|
||||
:loading="selectLoading"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:disabled="userData.map(v=>v.userId).includes(item.userId)"
|
||||
:key="item.userId"
|
||||
:label="item.userName+'-'+item.loginName+'-'+item.unitName"
|
||||
:value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAddUser">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<drawer-user-scope
|
||||
@group_change="getActivityGroup"
|
||||
ref="drawerUserScope"
|
||||
:group_id.sync="formData.groupId"
|
||||
></drawer-user-scope>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let marker = null
|
||||
let map = null
|
||||
let circle = null
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unionUserNumOneKeyRatio: null,
|
||||
summaryCount: 0,
|
||||
unionUserNumCalc: [{}],
|
||||
activeName: '1',
|
||||
actvivtyUrl: "/platform/activity/info/mange",
|
||||
selectLoading: false,
|
||||
userTabLoading: false,
|
||||
dialogVisible: false,
|
||||
userData: [],
|
||||
userList: [],
|
||||
unionList: [],
|
||||
projectType: [],
|
||||
pageForm: {
|
||||
type: type,
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
formRules: {
|
||||
groupId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
projectTypeCode: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
address: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
plannedDate: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
userColumns: [
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'mobile', label: '联系方式'},
|
||||
{prop: 'unitName', label: '所属单位'},
|
||||
{prop: 'unionName', label: '所属工会'}
|
||||
],
|
||||
/*ZXY - ADD*/
|
||||
activityGroupList: [],
|
||||
userScopeDialog: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
unionUserNumCalcTips() {
|
||||
return this.unionUserNumCalc.map(v => {
|
||||
return (v.startNum ? v.startNum : '?') + '-' + (v.endNum ? v.endNum : '?') + '人的分工会,限报' + (v.resultNum ? v.resultNum : '?') + '人'
|
||||
})
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'drawer-user-scope': httpVueLoader('/components/plugins/DrawerUserScope.vue'),
|
||||
},
|
||||
methods: {
|
||||
//应用比例设置
|
||||
applyScaleSettings() {
|
||||
this.formData.unionUserNumberLimit.forEach(v => {
|
||||
v.limitNum = parseFloat((v.teacherCount * this.unionUserNumOneKeyRatio / 100).toFixed(0))
|
||||
if (v.ratio) {
|
||||
v.limitNum = parseFloat((v.teacherCount * v.ratio / 100).toFixed(0))
|
||||
}
|
||||
})
|
||||
this.calSummaryCount()
|
||||
},
|
||||
calSummaryCount() {
|
||||
const array = this.formData.unionUserNumberLimit
|
||||
if (array) {
|
||||
this.summaryCount = array.reduce((prev, curr) => {
|
||||
const value = Number(curr.limitNum);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr.limitNum;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0)
|
||||
}
|
||||
},
|
||||
unionLimitQuickSetting() {
|
||||
this.unionUserNumCalc.forEach((v, i) => {
|
||||
const startNum = v.startNum
|
||||
const endNum = v.endNum
|
||||
const resultNum = v.resultNum
|
||||
if (startNum > endNum) {
|
||||
this.$message.warning('第' + (i + 1) + '行设置错误')
|
||||
} else {
|
||||
this.formData.unionUserNumberLimit.forEach(x => {
|
||||
if (x.teacherCount >= startNum && x.teacherCount <= endNum) {
|
||||
x.limitNum = resultNum
|
||||
}
|
||||
})
|
||||
this.calSummaryCount()
|
||||
}
|
||||
})
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
const isLt4M = file.size / 1024 / 1024 / 1024 / 1024 < 2;
|
||||
if (!isLt4M) {
|
||||
this.$message.warning('上传头像图片大小不能超过 4MB!');
|
||||
}
|
||||
return isLt4M;
|
||||
},
|
||||
rangeMeterChange(val) {
|
||||
if (!marker || !this.formData.location || !Array.isArray(this.formData.location)) {
|
||||
return
|
||||
}
|
||||
const lng = parseFloat(this.formData.location[0])
|
||||
const lat = parseFloat(this.formData.location[1])
|
||||
if (circle) {
|
||||
map.remove(circle)
|
||||
circle = null
|
||||
}
|
||||
circle = new AMap.Circle({
|
||||
center: new AMap.LngLat(lng, lat), // 圆心位置
|
||||
radius: val, //半径
|
||||
strokeColor: "#F33", //线颜色
|
||||
strokeOpacity: 1, //线透明度
|
||||
strokeWeight: 1, //线粗细度
|
||||
fillColor: "#ee2200", //填充颜色
|
||||
fillOpacity: 0.35 //填充透明度
|
||||
})
|
||||
map.add(circle)
|
||||
map.setFitView()
|
||||
},
|
||||
|
||||
async handleAvatarSuccess(res, file) {
|
||||
this.$set(this.formData, 'cover', res.data.filepath)
|
||||
await this.$refs['addForm'].validate()
|
||||
},
|
||||
plannedDateChange(val) {
|
||||
this.$set(this.formData, "time", val)
|
||||
},
|
||||
userChang(val) {
|
||||
this.$set(this.formData, "mobile", val ? this.userList.find(v => v.userId === val).mobile : null)
|
||||
},
|
||||
delNotesItem(scope) {
|
||||
this.delNotesList.push(scope.row.id)
|
||||
this.formData.goods.splice(scope.$index, 1)
|
||||
},
|
||||
async remoteMethod(query) {
|
||||
if (query) {
|
||||
this.selectLoading = true;
|
||||
const {data} = await $.post(this.actvivtyUrl + "/findUser", {
|
||||
serachWord: query,
|
||||
activity_type: type
|
||||
})
|
||||
this.userList = data
|
||||
this.selectLoading = false;
|
||||
}
|
||||
},
|
||||
openAddUser() {
|
||||
this.formData.tissuePersonList = []
|
||||
this.dialogVisible = true
|
||||
},
|
||||
doAddUser() {
|
||||
this.formData.tissuePersonList = this.userList.filter(v => this.formData.tissuePersonList.some(x => v.userId === x))
|
||||
this.userData = this.userData.concat(this.formData.tissuePersonList)
|
||||
this.dialogVisible = false
|
||||
},
|
||||
async delUser(row) {
|
||||
this.userData.splice(this.userData.indexOf(row.userId), 1)
|
||||
this.formData.tissuePersonList.splice(this.formData.tissuePersonList.indexOf(row.userId), 1)
|
||||
|
||||
// const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// if (confirm === 'confirm') {
|
||||
// this.userData.splice(this.userData.indexOf(row.userId), 1)
|
||||
// this.formData.tissuePersonList.splice(this.formData.tissuePersonList.indexOf(row.userId), 1)
|
||||
// const resp = await $.post('/platform/activity/apply/doDeleteActivityRegister', {
|
||||
// activityId: row.tissueId,
|
||||
// userId: row.userId
|
||||
// })
|
||||
// }
|
||||
},
|
||||
async groupIdChange(val) {
|
||||
const resp = await $.get('/platform/activity/apply/getUnionData', {activityScopeGroupId: val})
|
||||
this.formData.unionUserNumberLimit = resp.data
|
||||
},
|
||||
|
||||
async operation() {
|
||||
if (this.formData.applyTime2 && this.formData.applyTime2.length > 0) {
|
||||
if (moment(this.formData.time[0]).valueOf() <= moment(this.formData.applyTime2[0]).valueOf()) {
|
||||
this.$notify.error({title: '错误', message: '活动时间必须晚于报名时间'});
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let url = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
formData.type = this.pageForm.type
|
||||
formData.apply_type = 1
|
||||
const {time, applyTime2, plannedDate} = formData
|
||||
if (applyTime2 && applyTime2.length) {
|
||||
formData.applyStartTime = applyTime2[0]
|
||||
formData.applyEndTime = applyTime2[1]
|
||||
formData.applyTime2 = undefined
|
||||
}
|
||||
if (time && time.length) {
|
||||
formData.startTime = formData.time[0]
|
||||
formData.endTime = formData.time[1]
|
||||
formData.time = undefined
|
||||
}
|
||||
if (plannedDate && plannedDate.length) {
|
||||
formData.startPlannedDate = formData.plannedDate[0]
|
||||
formData.endPlannedDate = formData.plannedDate[1]
|
||||
formData.plannedDate = undefined
|
||||
}
|
||||
|
||||
const resp = await $.post(this.actvivtyUrl + url, {tissue: JSON.stringify(formData)})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
if (type === 40002) {
|
||||
sublime.jumpPagePjax("/platform/activity/info/mange/union")
|
||||
} else if (type === 40003) {
|
||||
sublime.jumpPagePjax("/platform/activity/info/mange/club")
|
||||
} else {
|
||||
sublime.jumpPagePjax("/platform/activity/info/mange/school")
|
||||
}
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
} else {
|
||||
this.$notify.error({title: '错误', message: '存在未填写的的必填项'});
|
||||
}
|
||||
});
|
||||
},
|
||||
async init() {
|
||||
this.delNotesList = []
|
||||
this.formData = {
|
||||
time: [],
|
||||
applyTime2: [],
|
||||
plannedDate: [],
|
||||
goods: [],
|
||||
billFiles: [],
|
||||
photoFiles: [],
|
||||
otherFiles: [],
|
||||
tissuePersonList: [],
|
||||
unionUserNumberLimit: [],
|
||||
signUpMethod: null,
|
||||
rangerMeter: 100,
|
||||
isEnrollSystem: true,
|
||||
}
|
||||
const {data} = await $.get('/platform/activity/apply/generateActivityCode', {activity_type: type})
|
||||
this.$set(this.formData, 'activityCode', data)
|
||||
this.unionList = await getUnions(null)
|
||||
const resp = await $.get('/platform/activity/apply/getUnionData', {activityScopeGroupId: this.formData.groupId})
|
||||
this.formData.unionUserNumberLimit = resp.data
|
||||
await this.initMap()
|
||||
},
|
||||
async findOne(id) {
|
||||
const {data, code, msg} = await $.post(this.actvivtyUrl + "/findOne", {id})
|
||||
if (code === 0) {
|
||||
if (data.userId) {
|
||||
const user = await queryUserByIds([data.userId])
|
||||
await this.remoteMethod(user[0].loginname)
|
||||
}
|
||||
data.type = data.type + ''
|
||||
if (data.billFiles && data.billFiles.length > 0) data.billFiles = JSON.parse(data.billFiles)
|
||||
if (data.photoFiles && data.photoFiles.length > 0) data.photoFiles = JSON.parse(data.photoFiles)
|
||||
if (data.otherFiles && data.otherFiles.length > 0) data.otherFiles = JSON.parse(data.otherFiles)
|
||||
if (data.applyStartTime) data.applyTime2 = [data.applyStartTime, data.applyEndTime]
|
||||
if (data.startTime) data.time = [data.startTime, data.endTime]
|
||||
if (data.startPlannedDate) data.plannedDate = [data.startPlannedDate, data.endPlannedDate]
|
||||
this.userData = clone(data.tissuePersonList)
|
||||
data.unionUserNumberLimit = JSON.parse(data.unionUserNumberLimit)
|
||||
data.location = JSON.parse(data.location)
|
||||
this.formData = data
|
||||
if (!this.formData.unionUserNumberLimit) {
|
||||
const resp = await $.get('/platform/activity/apply/getUnionData', {activityScopeGroupId: this.formData.groupId})
|
||||
this.formData.unionUserNumberLimit = resp.data
|
||||
}
|
||||
if (this.formData.needSign) {
|
||||
await this.initMap()
|
||||
}
|
||||
} else {
|
||||
this.notifyWarning(msg)
|
||||
}
|
||||
},
|
||||
initMap() {
|
||||
this.$nextTick(() => {
|
||||
// if (map == null) {
|
||||
map = new AMap.Map("signMap", {
|
||||
resizeEnable: true,
|
||||
center: [118.640081, 32.082496],
|
||||
zoom: 16
|
||||
})
|
||||
// }
|
||||
|
||||
if (!this.formData.needSign) {
|
||||
return
|
||||
}
|
||||
|
||||
if (this.formData.location && Array.isArray(this.formData.location)) {
|
||||
const lng = parseFloat(this.formData.location[0])
|
||||
const lat = parseFloat(this.formData.location[1])
|
||||
if (marker) {
|
||||
map.remove(marker)
|
||||
marker = null
|
||||
}
|
||||
|
||||
marker = new AMap.Marker({
|
||||
position: [lng, lat],
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
console.log(marker)
|
||||
map.add(marker)
|
||||
this.rangeMeterChange(this.formData.rangeMeter)
|
||||
}
|
||||
map.on('click', (e) => {
|
||||
if (!this.formData.rangeMeter) {
|
||||
this.$message.warning('请先设置签到半径')
|
||||
return
|
||||
}
|
||||
|
||||
if (marker) {
|
||||
map.remove(marker)
|
||||
}
|
||||
if (circle) {
|
||||
map.remove(circle)
|
||||
}
|
||||
marker = new AMap.Marker({
|
||||
position: [e.lnglat.getLng(), e.lnglat.getLat()],
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
map.add(marker)
|
||||
this.formData.location = []
|
||||
this.formData.location.push(e.lnglat.getLng())
|
||||
this.formData.location.push(e.lnglat.getLat())
|
||||
this.rangeMeterChange(this.formData.rangeMeter)
|
||||
|
||||
});
|
||||
})
|
||||
},
|
||||
signUpMethodChange(val) {
|
||||
if (val == null) {
|
||||
this.$set(this.formData, 'userNumberLimit', null)
|
||||
this.$set(this.formData, 'needSign', false)
|
||||
this.$set(this.formData, 'rangeMeter', null)
|
||||
}
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const resp = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||
this.activityGroupList = resp.data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getActivityGroup()
|
||||
const projectType = await getActivityTwoLevelType("50000")
|
||||
projectType.forEach(v => {
|
||||
if (v.code !== "50004") {
|
||||
this.projectType.push(v)
|
||||
}
|
||||
})
|
||||
const id = GetQueryString("id")
|
||||
id ? await this.findOne(id) : this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<script>
|
||||
window.type = 40003
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/layoutActivity.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<script>
|
||||
window.type = 40003
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/applyActivity.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,20 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.type = 40003
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/layoutAuditActivity.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,20 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.type = 40003
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/layoutPlan.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<script>
|
||||
window.type = 40003
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/layoutStatisticsActivity.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,367 @@
|
||||
<style>
|
||||
.el-divider {
|
||||
background-color: #409EFF !important;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #409EFF !important;
|
||||
}
|
||||
|
||||
.el-timeline-item__timestamp {
|
||||
color: #409EFF;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动时间</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.name" placeholder="请输入活动名称"
|
||||
clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="type==1">
|
||||
<div class="search-item-label">工会名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择工会" filterable
|
||||
clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="pageData">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="活动列表" :app="this">
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize"
|
||||
class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></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"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable">
|
||||
|
||||
<template v-if="column.prop=='time'" scope="{row}">
|
||||
<span>
|
||||
{{moment(row.startTime).format('YYYY-MM-DD')}} - {{moment(row.endTime).format('YYYY-MM-DD')}}
|
||||
</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='time2'">
|
||||
{{row.applyStartTime}}-{{row.applyEndTime}}
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='projectTypeName'" scope="{row}">
|
||||
{{row.projectTypeName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='tussueName'" scope="{row}">
|
||||
<span v-if="row.type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||
<span v-if="row.type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
||||
<span v-if="row.type==40001">校工会</span>
|
||||
</template>
|
||||
<template v-else-if="column.prop=='state'" scope="{row}">
|
||||
{{row.state===1?'未审核':row.state===2?'审核不通过':'审核通过'}}
|
||||
</template>
|
||||
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini" :loading="row.loading">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="{type:'edit',row}"
|
||||
:disabled="row.projectTypeCode==50004">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',row}"
|
||||
:disabled="row.projectTypeCode==50004">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'sendMsg',row}">
|
||||
通知
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'openCode',row}">
|
||||
二维码
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item :command="{type:'export',row}">
|
||||
导出人员名单
|
||||
</el-dropdown-item>-->
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
||||
<template #view>
|
||||
<tissue-info ref="info"></tissue-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<send-msg ref="sendMsg" :url="url"></send-msg>
|
||||
|
||||
<open-qr-code ref="openQRCode" :url="url"></open-qr-code>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
actvivtyUrl: "/platform/activity/info/mange",
|
||||
selectLoading: false,
|
||||
userTabLoading: false,
|
||||
dialogVisible: false,
|
||||
url: "",
|
||||
userData: [],
|
||||
userList: [],
|
||||
unionList: [],
|
||||
pageForm: {
|
||||
type: type,
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
formData: {
|
||||
tissuePersonList: []
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '活动名称'},
|
||||
{prop: 'address', label: '活动地点'},
|
||||
{prop: 'projectTypeName', label: '活动项目类型'},
|
||||
{prop: 'tussueName', label: '举办单位'},
|
||||
{prop: 'time', label: '活动日期'},
|
||||
{prop: 'time2', label: '报名日期', width: '300'},
|
||||
{prop: 'applyTime', label: '创建时间', sortable: true},
|
||||
{prop: 'state', label: '审核状态', sortable: true},
|
||||
|
||||
],
|
||||
userColumns: [
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'mobile', label: '联系方式'},
|
||||
{prop: 'unitName', label: '所属单位'},
|
||||
{prop: 'unionName', label: '所属工会'}
|
||||
],
|
||||
formRules: {
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
address: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
peopleNum: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'tissue-info': httpVueLoader('/components/activity/school/tissueInfo.vue'),
|
||||
'send-msg': httpVueLoader('/components/plugins/SendMsgByGroupId.vue'),
|
||||
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === 'view') {
|
||||
this.openView(row)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(row)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(row)
|
||||
} else if (type === 'sendMsg') {
|
||||
this.sendMsg(row)
|
||||
} else if (type === 'openCode') {
|
||||
this.openCode(row)
|
||||
} else if (type === 'export') {
|
||||
location.href = "/platform/activity/info/mange/export?id=" + row.id
|
||||
}
|
||||
},
|
||||
openCode(row) {
|
||||
this.$refs.openQRCode.openCode("/mobile/activity/unionActivity/goReg?id=" + row.id + "&signUpMethod=" + row.signUpMethod)
|
||||
},
|
||||
sendMsg(row) {
|
||||
this.url = `<a href="` + (APP_DOMAIN + "/mobile/activity/unionActivity/goReg?id=" + row.id + "&signUpMethod=" + row.signUpMethod) + `">点击参与</a>`
|
||||
this.$refs.sendMsg.openDialog(row.groupId)
|
||||
},
|
||||
async remoteMethod(query) {
|
||||
if (query) {
|
||||
this.selectLoading = true;
|
||||
const {data} = await $.post(this.actvivtyUrl + "/findUser", {serachWord: query})
|
||||
this.userList = data
|
||||
this.selectLoading = false;
|
||||
}
|
||||
},
|
||||
openAddUser() {
|
||||
this.formData.tissuePersonList = []
|
||||
this.dialogVisible = true
|
||||
},
|
||||
doAddUser() {
|
||||
this.formData.tissuePersonList = this.userList.filter(v => this.formData.tissuePersonList.some(x => v.userId === x))
|
||||
this.userData = this.userData.concat(this.formData.tissuePersonList)
|
||||
this.dialogVisible = false
|
||||
},
|
||||
delUser(row) {
|
||||
this.userData.splice(this.userData.indexOf(row.userId), 1)
|
||||
this.formData.tissuePersonList.splice(this.formData.tissuePersonList.indexOf(row.userId), 1)
|
||||
},
|
||||
openView(row) {
|
||||
const {id} = row
|
||||
this.$refs.info.getInfo(id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async openEdit(row) {
|
||||
const {id, type} = row
|
||||
if (type == 40002) {
|
||||
sublime.jumpPagePjax("/platform/activity/apply/union?id=" + id)
|
||||
} else if (type == 40003) {
|
||||
sublime.jumpPagePjax("/platform/activity/apply/club?id=" + id)
|
||||
} else {
|
||||
sublime.jumpPagePjax("/platform/activity/apply/school?id=" + id)
|
||||
}
|
||||
/*this.$refs.guava.edit()*/
|
||||
},
|
||||
async openAdd() {
|
||||
this.$refs.guava.edit()
|
||||
this.userData = []
|
||||
this.$nextTick(() => {
|
||||
this.formData = {
|
||||
name: '',
|
||||
time: '',
|
||||
peopleNum: '',
|
||||
address: '',
|
||||
files: [],
|
||||
type: "40002",
|
||||
tissuePersonList: []
|
||||
}
|
||||
if (this.$refs['addForm']) {
|
||||
this.$refs['addForm'].resetFields()
|
||||
}
|
||||
})
|
||||
},
|
||||
async operation() {
|
||||
let url = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
formData.type = this.pageForm.type
|
||||
if (formData.time && formData.time.length) {
|
||||
formData.startTime = formData.time[0]
|
||||
formData.endTime = formData.time[1]
|
||||
formData.time = undefined
|
||||
}
|
||||
|
||||
const resp = await $.post(this.actvivtyUrl + url, {tissue: JSON.stringify(formData),})
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
} else {
|
||||
this.$notify.error({title: '错误', message: '存在未填写的的必填项'});
|
||||
}
|
||||
});
|
||||
},
|
||||
doDelete(row) {
|
||||
const {id} = row
|
||||
this.$confirm('确定要删除该活动吗?', '提示', {type: 'warning'}).then(async () => {
|
||||
this.$set(row, "loading", true)
|
||||
const resp = await $.post(this.actvivtyUrl + "/doDelete", {id: id});
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
this.$set(row, "loading", false)
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
$.post("/platform/activity/info/mange/pageData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.unionList = await getUnions(null)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,281 @@
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
|
||||
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动时间</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.name" placeholder="请输入活动名称"
|
||||
clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="type==40002">
|
||||
<div class="search-item-label">工会名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择工会" filterable
|
||||
clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="pageData">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="活动列表" :app="this">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" size="small" v-model="pageForm.state">
|
||||
<el-radio-button :label="i.code" v-for="i in auditList">{{i.name}}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize"
|
||||
class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable">
|
||||
|
||||
<template v-if="column.prop=='time'" scope="{row}">
|
||||
<span>
|
||||
{{moment(row.startTime).format('YYYY-MM-DD')}} - {{moment(row.endTime).format('YYYY-MM-DD')}}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='projectTypeName'" scope="{row}">
|
||||
{{row.projectTypeName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='tussueName'" scope="{row}">
|
||||
<span v-if="row.type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||
<span v-if="row.type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
||||
<span v-if="row.type==40001">校工会</span>
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop=='state'" scope="{row}">
|
||||
{{row.state===1?'未审核':row.state===2?'审核不通过':'审核通过'}}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" :loading="row.loading" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" :loading="row.loading" type="primary"
|
||||
@click="openAudit(row)"
|
||||
v-if="row.state===1">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<tissue-info ref="info"></tissue-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<tissue-info ref="editInfo" :handle="true" label="校工会审核">
|
||||
<template #handle>
|
||||
<el-form :model="formData" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="username" label="审核人">
|
||||
<el-input v-model="formData.username"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="idea" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion"
|
||||
rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(false)" :disabled="subDis"
|
||||
:loading="subLoading1">拒
|
||||
绝
|
||||
</el-button>
|
||||
<el-button type="success" @click="doReview(true)" :disabled="subDis"
|
||||
:loading="subLoading2">通
|
||||
过
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</tissue-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
auditList: [{code: true, name: "已审核"}, {code: false, name: "未审核"}],
|
||||
selectLoading: false,
|
||||
userTabLoading: false,
|
||||
dialogVisible: false,
|
||||
userData: [],
|
||||
userList: [],
|
||||
unionList: [],
|
||||
subDis: false,
|
||||
subLoading1: false,
|
||||
subLoading2: false,
|
||||
pageForm: {
|
||||
state: false,
|
||||
type: type,
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '活动名称'},
|
||||
{prop: 'address', label: '活动地点'},
|
||||
{prop: 'projectTypeName', label: '活动项目类型'},
|
||||
{prop: 'tussueName', label: '举办单位'},
|
||||
{prop: 'time', label: '活动日期'},
|
||||
{prop: 'applyTime', label: '创建时间', sortable: true},
|
||||
{prop: 'state', label: '审核状态', sortable: true},
|
||||
|
||||
],
|
||||
userColumns: [
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'mobile', label: '联系方式'},
|
||||
{prop: 'unitName', label: '所属单位'},
|
||||
{prop: 'unionName', label: '所属工会'}
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'tissue-info': httpVueLoader('/components/activity/school/tissueInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
openAudit(row) {
|
||||
this.$refs.editInfo.getInfo(row.id)
|
||||
this.$refs.guava.edit()
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
}
|
||||
},
|
||||
async doReview(flag) {
|
||||
const confirm = await this.$confirm('确定要审核' + (flag ? '通过' : '拒绝') + '吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
this.formData.flag = flag
|
||||
this.subDis = true
|
||||
flag ? this.subLoading2 = true : this.subLoading1 = true
|
||||
const resp = await $.post("/platform/activity/audit/doReview", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
openView(row) {
|
||||
const {id} = row
|
||||
this.$refs.info.getInfo(id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
$.post("/platform/activity/audit/pageData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unionList = await getUnions(null)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,406 @@
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">计划名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.name" placeholder="请输入计划名称" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="window.type === 40002" class="search-item">
|
||||
<div class="search-item-label">工会名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.tissueId" placeholder="请选择工会" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="window.type === 40003" class="search-item">
|
||||
<div class="search-item-label">社团</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.tissueId" placeholder="请选择社团(社团)" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in clubList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <template v-if="searchMore">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">项目名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.eventId" placeholder="请选择活动项目" filterable clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in eventList"
|
||||
:key="item.id"
|
||||
:label="item.allName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>-->
|
||||
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="pageData">搜索</el-button>
|
||||
<!-- <more v-model="searchMore"></more>-->
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<!--<table-tool label="计划列表" :app="this">
|
||||
<!–<template #func>
|
||||
<el-button type="primary" icon="el-icon-edit-outline" size="small"
|
||||
@click="openAdd">
|
||||
创建活动计划
|
||||
</el-button>
|
||||
</template>–>
|
||||
</table-tool>-->
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column prop="year" label="年度"></el-table-column>
|
||||
|
||||
<el-table-column v-if="window.type === 40002" prop="unionname" label="所属工会" show-overflow-tooltip>
|
||||
<template scope="{row}">
|
||||
<span>{{unionList.find(x => x.id == row.tissueId) === undefined ? '' : unionList.find(x => x.id == row.tissueId).unionname}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-if="window.type === 40003" prop="clubname" label="社团" show-overflow-tooltip>
|
||||
<template scope="{row}">
|
||||
<span>{{clubList.find(x => x.id == row.tissueId) === undefined ? '' : clubList.find(x => x.id == row.tissueId).name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="name" label="计划名称" show-overflow-tooltip></el-table-column>
|
||||
<!--<el-table-column prop="allName" label="活动项目" show-overflow-tooltip>
|
||||
</el-table-column>-->
|
||||
<el-table-column prop="activityTypeName" label="活动类型" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="time" label="计划预计时间" sortable></el-table-column>
|
||||
<el-table-column prop="money" label="预算费用"></el-table-column>
|
||||
<!--<el-table-column prop="carryOut" label="计划状态">
|
||||
<template scope="{row}">
|
||||
<span v-if="row.carryOut" class="text-success">已执行</span>
|
||||
<span v-if="!row.carryOut" class="text-primary">未执行</span>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini" :loading="row.loading">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'delete',row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
<el-button type="primary" @click="operation">确 定</el-button>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<vi-title title="填写计划信息"></vi-title>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-width="100px" label-position="left"
|
||||
label-suffix=":" style="padding: 0 2%">
|
||||
|
||||
<!-- <el-form-item prop="type" label="活动类型">
|
||||
<el-radio-group v-model="formData.type">
|
||||
<el-radio label="2" border>分工会活动计划</el-radio>
|
||||
<el-radio label="3" border>社团活动计划</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item prop="name" label="计划名称">
|
||||
<el-input maxlength="50" placeholder="请填写计划名称" v-model="formData.name"
|
||||
type="text"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="time" label="计划时间">
|
||||
<el-date-picker
|
||||
v-model="formData.time"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="event" label="活动项目">
|
||||
<!--<el-input maxlength="50" placeholder="请填写活动项目" v-model="formData.event"
|
||||
type="text"></el-input>-->
|
||||
<el-select v-model="formData.event" placeholder="请选择活动项目" filterable clearable multiple
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in eventList"
|
||||
:key="item.id"
|
||||
:label="item.allName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="content" label="计划内容" class="is-required">
|
||||
<div id="content"></div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<plan-info ref="info"></plan-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let E = window.wangEditor
|
||||
const editors = {}
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
let validContent = (rule, value, callback) => {
|
||||
if (!this.formData.content || !dd3s.html2txt(this.formData.content)) {
|
||||
callback(new Error('请填写计划内容'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
clubList: [],
|
||||
planUrl: "/platform/activity/plan",
|
||||
unionList: [],
|
||||
eventList: [],
|
||||
flag: false,
|
||||
pageForm: {
|
||||
type: type,
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
formData: {
|
||||
name: '',
|
||||
time: '',
|
||||
event: '',
|
||||
content: ''
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'name', label: '计划名称'},
|
||||
{prop: 'time', label: '计划预计时间'},
|
||||
{prop: 'allName', label: '活动项目'},
|
||||
{prop: 'carryOut', label: '计划状态'}
|
||||
],
|
||||
formRules: {
|
||||
type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
event: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
content: [{validator: validContent, trigger: ['blur', 'change']}]
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'plan-info': httpVueLoader('/components/activity/school/planInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, row} = command
|
||||
if (type === 'view') {
|
||||
this.openView(row)
|
||||
} else if (type === 'edit') {
|
||||
this.openEdit(row)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(row)
|
||||
}
|
||||
},
|
||||
openView(row) {
|
||||
const {id} = row
|
||||
this.$refs.info.getInfo(id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async openEdit(row) {
|
||||
|
||||
if (window.type === 40002) {
|
||||
sublime.jumpPagePjax('/platform/activity/plan/addUnionPlan?id=' + row.id)
|
||||
} else if (window.type === 40003) {
|
||||
sublime.jumpPagePjax('/platform/activity/plan/addClubPlan?id=' + row.id)
|
||||
} else if (window.type === 40001) {
|
||||
sublime.jumpPagePjax('/platform/activity/plan/addSchoolPlan?id=' + row.id)
|
||||
}
|
||||
},
|
||||
async openAdd() {
|
||||
this.formData = {}
|
||||
this.flag = false
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
this.initEditor()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
|
||||
this.formData = {
|
||||
type: '40003',
|
||||
name: '',
|
||||
time: '',
|
||||
event: '',
|
||||
content: ''
|
||||
}
|
||||
})
|
||||
},
|
||||
async operation() {
|
||||
let url = this.formData.id ? "/doEdit" : "/doAdd"
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
|
||||
this.formData.type = this.pageForm.type
|
||||
|
||||
const resp = await $.post(this.planUrl + url, {
|
||||
id: this.formData.id,
|
||||
name: this.formData.name,
|
||||
time: this.formData.time,
|
||||
content: this.formData.content,
|
||||
event: JSON.stringify(this.formData.event),
|
||||
type: this.pageForm.type,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
loading.close()
|
||||
|
||||
} else {
|
||||
this.$notify.error({title: '错误', message: '存在未填写的的必填项'});
|
||||
}
|
||||
});
|
||||
},
|
||||
doDelete(row) {
|
||||
const {id} = row
|
||||
this.$confirm('确定要删除该计划吗?', '提示', {type: 'warning'}).then(async () => {
|
||||
const resp = await $.post(this.planUrl + "/doDelete", {id: id});
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
initEditor() {
|
||||
let keys = ['content']
|
||||
keys.forEach(key => {
|
||||
$("#" + key).html("")
|
||||
editors[key] = new E('#' + key)
|
||||
editors[key].config.onchange = (html) => {
|
||||
this.formData[key] = html
|
||||
}
|
||||
editors[key].create()
|
||||
if (this.formData[key]) {
|
||||
editors[key].txt.html(this.formData[key])
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
$.post("/platform/activity/plan/pageData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async getMyClub() {
|
||||
return await $.post('/platform/activity/yearSummary/getMyClub')
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.eventList = await activity.getEvents()
|
||||
this.unionList = await getUnions(null);
|
||||
this.clubList = await getClubs()
|
||||
const isAdmin = "${@shiro.hasAnyRoles('sysadmin', 'A06')}" === 'true'
|
||||
if (!isAdmin) {
|
||||
const selfUnion = "${@shiro.getPrincipalProperty('union').getId()}";
|
||||
this.unionList = [this.unionList.find(x => x.id === selfUnion)]
|
||||
|
||||
const clubs = await this.getMyClub()
|
||||
let clubArray = []
|
||||
for (let c of Array.from(clubs)) {
|
||||
const cl = this.clubList.find(x => x.id === c)
|
||||
if (cl) {
|
||||
clubArray.push(cl)
|
||||
}
|
||||
}
|
||||
this.clubList = clubArray
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
<div id="app" class="platform" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动时间</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
@change="getActivityByYearOrType"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
type="year"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.activityId" placeholder="请选择活动" filterable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in activityList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="type==40002||type==40001">
|
||||
<div class="search-item-label">工会名称</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择工会" filterable
|
||||
clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名/工号</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入姓名/工号" clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="姓名/工号"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginanme"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="人员列表" :app="this">
|
||||
<template #func>
|
||||
<el-button icon="el-icon-s-promotion" type="primary" @click="doExport" size="medium">导出
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px" row-key="id"
|
||||
@sort-change="pageOrder" v-loading="tableLoading" :size="tableSize"
|
||||
class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unionList: {},
|
||||
activityList: {},
|
||||
pageForm: {
|
||||
unionId: '',
|
||||
searchName: "u.username",
|
||||
type: type,
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'username', label: '姓名'},
|
||||
{prop: 'loginname', label: '工号'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'mobile', label: '联系方式'},
|
||||
{prop: 'unitname', label: '所属单位'},
|
||||
{prop: 'unionname', label: '所属工会'},
|
||||
{prop: 'applyDateTime', label: '报名时间'},
|
||||
// {prop: 'notes', label: '备注'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doExport() {
|
||||
const {activityId, unionId} = this.pageForm
|
||||
window.open("/platform/activity/info/mange/doExportUser?id=" + activityId +
|
||||
"&unionId=" + unionId)
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
$.post("/platform/activity/user/statistics/pageData", this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.notifyError(data.msg)
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async getActivityByYearOrType() {
|
||||
const resp = await $.get("/platform/activity/user/statistics/getActivityByYearOrType", {
|
||||
type: this.pageForm.type,
|
||||
year: this.pageForm.year,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.activityList = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.$set(this.pageForm, "activityId", resp.data[0].id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getActivityByYearOrType()
|
||||
this.unionList = await getUnions(null)
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<script>
|
||||
window.type = 40001
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/layoutActivity.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<script>
|
||||
window.type = 40001
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/applyActivity.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,20 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.type = 40001
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/layoutPlan.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<script>
|
||||
window.type = 40001
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/layoutStatisticsActivity.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<script>
|
||||
window.type = 40002
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/layoutActivity.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<script>
|
||||
window.type = 40002
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/applyActivity.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,20 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.type = 40002
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/layoutAuditActivity.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,20 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.type = 40002
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/layoutPlan.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,12 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<script>
|
||||
window.type = 40002
|
||||
</script>
|
||||
<!--#include("/platform/activity/union/layoutStatisticsActivity.html"){}#-->
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user