first commit

This commit is contained in:
2026-09-08 19:49:21 +08:00
commit ebffbab428
7320 changed files with 1477614 additions and 0 deletions
@@ -0,0 +1,220 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" class="platform" v-cloak>
<guava ref="guava" padding="0 5%">
<template>
<el-card shadow="never">
<div class="btn-group tool-button mr10">
<el-date-picker clearable end-placeholder="结束日期"
range-separator="-"
start-placeholder="开始日期"
type="daterange"
v-model="pageForm.dateRange"
value-format="yyyy-MM-dd">
</el-date-picker>
</div>
<div class="btn-group tool-button mr10">
<el-input placeholder="请输入活动名称" clearable v-model="pageForm.title"
style="width: 100%"
@keyup.enter.native="doSearch">
</el-input>
</div>
<div class="btn-group tool-button mt5 mr10">
<el-checkbox-group v-model="pageForm.sendTypes" @change="doSearch">
<el-checkbox-button label="msg" border>短信发送</el-checkbox-button>
<el-checkbox-button label="WeChat" border>微信发送</el-checkbox-button>
</el-checkbox-group>
</div>
<div class="btn-group tool-button ">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="消息列表" :app="this">
<template #func>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" 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
show-overflow-tooltip
align="center"
header-align="center"
v-for="column in tableColumns"
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
min-width="50"
>
<template v-if="column.prop==='module'" scope="{row}">
{{row.module=='hy'?'会员模块':'教代会模块'}}
</template>
<template v-else-if="column.prop==='teacherMeetingName'" scope="{row}">
{{!row.teacherMeetingId?'暂无':row.jdhallname}}
</template>
<template v-else-if="column.prop==='type'" scope="{row}">
{{row.type=='system'?'预设团体':row.type=='user'?'自定义人员':'活动设置人员'}}
</template>
<template v-else-if="column.prop==='hold'" scope="{row}">
{{row.hold?'已发送':'未发送'}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right">
<template scope="{row}">
<el-button @click="doSend(row)" size="mini" type="success" v-if="!row.hold">发送</el-button>
<el-button @click="openView(row)" size="mini" v-if="row.hold">查看</el-button>
<el-button size="mini" type="primary" @click="openEdit(row)" v-if="!row.hold">编辑</el-button>
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
</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 {
unions: [],
units: [],
pageForm: {
sendTypes: [],
},
tableColumns: [
{prop: 'title', label: '活动名称'},
// {prop: 'module', label: '所属模块'},
// {prop: 'teacherMeetingName', label: '所属教代会'},
{prop: 'type', label: '人员范围', sortable: true},
{prop: 'sendTypesName', label: '发送方式'},
{prop: 'hold', label: '是否发送'},
{prop: 'CreateTime', label: '创建时间'},
// {prop: 'content', label: '发送内容'},
]
}
},
methods: {
async doSend(row) {
const confirm = await this.$confirm('您确定要发送消息吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
const resp = await $.post(loc() + "/doSend", {
id: row.id,
sendTypes: row.sendTypes,
content: row.content
})
if (resp.code === 0) {
this.$notify.success(resp.msg)
this.pageData()
} else {
this.$notify.error(resp.msg)
}
loading.close()
}
},
async doDelete(id) {
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm) {
const res = await $.post(loc() + "/doDelete", {TitleId: id})
if (res.code === 0) {
this.pageData()
this.$message.success(res.msg)
}
}
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.sendTypes = JSON.stringify(pageForm.sendTypes)
pageForm.dateRange = JSON.stringify(pageForm.dateRange)
$.post(loc() + "/pageData", pageForm, (data) => {
sublime.closeLoadingbar();
this.tableLoading = false
if (data.code == 0) {
data.data.list.forEach(v => {
const a = JSON.parse(v.sendTypes).map(z => {
if (z == "msg") {
return "短信"
} else {
return "微信"
}
})
v.sendTypesName = a.toString()
})
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
}, "json");
},
async openEdit(row) {
/* const {data} = await $.post(loc() + "/getMeetingByMsgId", {id: row.id})
if (data != null) {
const confirm = await this.$confirm('此会议与会务管理系统已绑定,是否前往会务管理系统修改?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
window.location.href = "/platform/meeting/manage"
}
} else {
const {id, hold} = row
window.location.href = '/platform/msgNotify/send?notifyId=' + id + "&hold=" + hold
}*/
const {id, hold} = row
window.location.href = '/platform/msgNotify/send?notifyId=' + id + "&hold=" + hold
},
openView(row) {
const {id, hold} = row
window.location.href = '/platform/msgNotify/send?notifyId=' + id + "&hold=" + hold
},
},
async created() {
this.pageData();
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,232 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-card__body {
width: 70%;
margin: 0 auto;
}
.card {
height: 100%;
}
.transition-item {
height: 100%;
}
.el-card {
overflow-y: auto;
height: 100%;
}
.el-select-dropdown el-popper is-multiple {
z-index: 1 !important;
}
</style>
<div id="app" v-cloak>
<guava>
<el-card shadow="never">
<template #header>
<el-row type="flex">
<el-col :span="12" v-if="notify_id">
<el-button @click="location.replace('/platform/msgNotifyTitle/list')" icon="el-icon-back"
style="font-size: 16px" type="text">返回
</el-button>
</el-col>
<el-col :span="12" class="text-right">
<h3 style="color: rgb(24, 103, 176);">{{h3Title}}</h3>
</el-col>
</el-row>
</template>
<msg-notify :hold="hold" :notify_id="notify_id" ref="a" v-model="msgData"></msg-notify>
<div style="text-align: right" v-if="!hold">
<el-button type="primary" @click="doAdd(false)">保 存</el-button>
<el-button type="primary" @click="doAdd(true)">发 送</el-button>
</div>
</el-card>
</guava>
</div>
<script>
var vue = new Vue({
el: "#app",
mixins: [initTableMixins],
data() {
return {
h3Title: "新建消息",
msgData: {
type: "",
sendTypes: []
},
formData: {
type: "",
sendTypes: []
},
menuOptions: [],
activityGroupList: [],
notify_id: "",
holdAdd: false,
hold: false,
users: [],
selections: [],
selectUsers: [],
active: 0,
meetingOptions: [],
roleList: [],
pageForm: {
searchName: 'username'
},
pageForm1: {
groupId: "",
searchName: 'u.username',
pageNumber: 1,
pageSize: 5,
totalCount: 0,
},
formRules: {
title: [{required: true, message: '请输入发送标题', trigger: ['blur', 'change']}],
sendTypes: [{required: true, message: '请输入发送方式', trigger: ['blur', 'change']}],
content: [{required: true, message: '请输入发送内容', trigger: ['blur', 'change']}],
}
}
},
components: {
'msg-notify': httpVueLoader('/components/msgNotify/msgNotify.vue'),
},
methods: {
pageSizeChange1(val) {
this.pageForm1.pageSize = val;
if (this.formData.roleIds.length > 0) {
this.changeRole();
} else if (this.formData.activityGroupId != "") {
this.getActivityUserData()
} else {
this.getUsersByTitleId(this.formData.id)
}
},
pageNumberChange1(val) {
this.pageForm1.pageNumber = val;
if (this.formData.roleIds.length > 0) {
this.changeRole();
} else if (this.formData.activityGroupId != "") {
this.getActivityUserData()
} else {
this.getUsersByTitleId(this.formData.id)
}
},
async changeRole() {
const data = await $.post(loc() + "/getUserByRoleId", {
roleIds: JSON.stringify(this.formData.roleIds),
module: this.formData.module,
teacherMeetingId: this.formData.teacherMeetingId,
pageSize: this.pageForm1.pageSize,
pageNumber: this.pageForm1.pageNumber,
searchName: this.pageForm1.searchName,
searchKeyword: this.pageForm1.searchKeyword
})
this.users = data.data.list;
this.pageForm1.totalCount = data.data.totalCount;
},
addUser() {
this.users = this.users.concat(this.selectUsers)
this.selectDialogVisible = false;
},
async openSelect() {
this.pageData(this.users)
this.selectDialogVisible = true
},
async doAdd(flag) {
this.formData = this.msgData
if (this.formData.users && this.formData.users.length === 0) {
this.$notify.warning('请选择需要发送的人员')
return
}
const confirm = await this.$confirm('您确定要' + (flag ? '发送' : '保存') + '消息吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm) {
const loading = this.$loading({
lock: true,
text: '正在提交...',
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
let aa = ((!flag && this.formData.id) || (flag && this.formData.id)) ? "/doEdit" : "/doAdd"
const resp = await $.post(loc() + aa, {
msgNotify: JSON.stringify(this.formData),
users: JSON.stringify(this.formData.users.length > 0 ? this.formData.users.map(v => v.id) : this.formData.users),
flag: flag
})
if (resp.code === 0) {
this.$notify.success(resp.msg)
sublime.jumpPagePjax('/platform/msgNotifyTitle/list')
} else {
this.$notify.error(resp.msg)
}
loading.close()
}
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.users = JSON.stringify(this.users.map(v => v.id))
$.post(loc() + "/pageData", 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 getMenuOptions() {
const {data} = await $.get("/platform/sys/role/getMenuOptions")
this.menuOptions = data
if (!this.formData.id) {
this.$set(this.formData, "roleIds", [])
this.$set(this, "users", [])
}
}
},
async created() {
this.meetingOptions = await proposal.getOpenMeeting()
await this.getMenuOptions()
this.notify_id = GetQueryString("notifyId")
if (this.notify_id) {
this.hold = GetQueryString("hold")
this.h3Title = this.hold === "true" ? "查看消息" : "编辑消息"
this.hold = this.hold !== 'false'
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,180 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" class="platform" v-cloak>
<guava ref="guava" padding="0 5%">
<template>
<el-card shadow="never">
<div class="btn-group tool-button mr10">
<el-date-picker clearable end-placeholder="结束日期"
range-separator="-"
start-placeholder="开始日期"
type="daterange"
@change="getTitleList(pageForm.dateRange)"
v-model="pageForm.dateRange"
value-format="yyyy-MM-dd">
</el-date-picker>
</div>
<div class="btn-group tool-button mr10">
<el-select placeholder="消息列表" v-model="pageForm.titleId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in titleList" :label="item.title" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mr10">
<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 class="btn-group tool-button mr10"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
<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 class="btn-group tool-button mr10">
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
clearable="true"
filterable="true">
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5 mr10">
<el-checkbox-group v-model="pageForm.sendTypes" @change="doSearch">
<el-checkbox-button label="msg" border>短信发送</el-checkbox-button>
<el-checkbox-button label="WeChat" border>微信发送</el-checkbox-button>
</el-checkbox-group>
</div>
<div class="btn-group tool-button ">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="接收人列表" :app="this">
<template #func>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" 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
show-overflow-tooltip
align="center"
header-align="center"
v-for="column in tableColumns"
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
min-width="50"
></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 {
unions: [],
units: [],
titleList: [],
pageForm: {
sendTypes: [],
searchName: 'u.username'
},
tableColumns: [
{prop: 'username', label: '姓名'},
{prop: 'loginname', label: '工号'},
{prop: 'unitname', label: '单位', sortable: true},
{prop: 'unionname', label: '工会', sortable: true},
{prop: 'title', label: '所属活动'},
{prop: 'sendTypesName', label: '发送类型'},
{prop: 'content', label: '消息内容'},
{prop: 'sendTime', label: '发送时间', sortable: true},
]
}
},
methods: {
async getTitleList(dateRange) {
const {data} = await $.post(loc() + "/getTitleList", {dateRange: JSON.stringify(dateRange)})
this.titleList = data
},
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)
} else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
}
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.sendTypes = JSON.stringify(pageForm.sendTypes)
pageForm.dateRange = JSON.stringify(pageForm.dateRange)
$.post(loc() + "/pageData", pageForm, (data) => {
sublime.closeLoadingbar();
this.tableLoading = false
if (data.code == 0) {
console.log(data.data.list)
data.data.list.forEach(v => {
const a = JSON.parse(v.sendTypes).map(z => {
if (z == "msg") {
return "短信"
} else {
return "微信"
}
})
v.sendTypesName = a.toString()
})
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
}, "json");
},
},
async created() {
this.pageData();
this.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->