first commit
This commit is contained in:
@@ -0,0 +1,173 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style></style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="消息类型">
|
||||
<el-select clearable placeholder="请选择消息类型" v-model="pageForm.searchType" style="width: 100%" @change="getMsg">
|
||||
<el-option label="全部类型消息" value="all"></el-option>
|
||||
<el-option label="系统消息" value="system"></el-option>
|
||||
<el-option label="用户消息" value="user"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="消息标题">
|
||||
<el-select placeholder="请选择消息标题" v-model="pageForm.msgId" style="width: 100%" @change="doSearch">
|
||||
<el-option v-for="item in msgOptions" :key="item.id" :label="item.title" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="状态">
|
||||
<el-select placeholder="请选择状态" v-model="pageForm.readStatus" style="width: 100%" @change="doSearch">
|
||||
<el-option label="全部" :value="null"></el-option>
|
||||
<el-option label="未阅读" :value="0"></el-option>
|
||||
<el-option label="已阅读未反馈" :value="1"></el-option>
|
||||
<el-option label="已阅读无需反馈" :value="2"></el-option>
|
||||
<el-option label="已阅读已反馈" :value="3"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" v-model="pageForm.searchKeyword" @keyup.enter.native="doSearch" clearable>
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 80px">
|
||||
<el-option label="工号" value="mu.loginname"></el-option>
|
||||
<el-option label="姓名" value="mu.userName"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" @change="flushUnits" @clear="flushUnits" placeholder="请选择所属工会" filterable clearable>
|
||||
<el-option v-for="item in unionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位" filterable clearable @change="doSearch">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool label="人员列表">
|
||||
<el-button type="primary" @click="exportMultipleAsZip" size="small">导出压缩包</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" size="small" style="width: 100%">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="loginname" label="工号"></el-table-column>
|
||||
<!-- <el-table-column prop="sex" label="性别"></el-table-column>-->
|
||||
<!-- <el-table-column prop="mobile" label="联系方式"></el-table-column>-->
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template v-slot="scope">
|
||||
<el-tag size="mini" v-if="0 === scope.row.status">未阅读</el-tag>
|
||||
<el-tag size="mini" type="warning" v-else-if="1 === scope.row.status && scope.row.needBack">已阅读未反馈</el-tag>
|
||||
<el-tag size="mini" type="success" v-else-if="1 === scope.row.status && !scope.row.needBack">已阅读无需反馈</el-tag>
|
||||
<el-tag size="mini" v-else-if="2 === scope.row.status">已阅读已反馈</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="backFiles" label="反馈附件">
|
||||
<template v-slot="scope">
|
||||
<el-link type="primary" v-if="scope.row.backFiles.length > 0" @click="viewFiles(scope.row)">点击查看</el-link>
|
||||
<el-link type="info" v-else>暂无</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
<el-dialog :visible.sync="backDialogVisible" title="反馈附件" width="40%" top="2%">
|
||||
<div style="width: 100%; text-align: center">
|
||||
<file-preview :files="backFiles" complete_result></file-preview>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
backDialogVisible: false,
|
||||
backFiles: [],
|
||||
backFormData: {},
|
||||
|
||||
msgOptions: [],
|
||||
pageForm: {
|
||||
searchType: "all",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
searchName: "mu.userName",
|
||||
readType: null
|
||||
},
|
||||
unionList: [],
|
||||
unitList: []
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
exportMultipleAsZip() {
|
||||
this.$downLoad(loc() + "/exportMultipleAsZip", this.pageForm)
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.unitList = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
|
||||
this.unitList = data
|
||||
})
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
viewFiles(row) {
|
||||
this.backFiles = row.backFiles
|
||||
this.backDialogVisible = true
|
||||
},
|
||||
async getMsg() {
|
||||
const resp = await this.$axios.post("/platform/sys/msg/summary/getMsg", { searchType: this.pageForm.searchType })
|
||||
this.msgOptions = resp.data
|
||||
if (this.msgOptions && this.msgOptions.length > 0) {
|
||||
this.pageForm.msgId = this.msgOptions[0].id
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$axios.post("/platform/sys/msg/summary/pageData", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.tableData.forEach((item) => {
|
||||
item.backFiles = item.backFiles ? JSON.parse(item.backFiles) : []
|
||||
})
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getMsg()
|
||||
const isAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
if (isAdmin) {
|
||||
this.$businessTool.listUnion(this.pageForm.unionId).then((data) => {
|
||||
this.unionList = data
|
||||
})
|
||||
} else {
|
||||
this.$businessTool.listUnion(this.$store.state.user.union.id).then((data) => {
|
||||
this.unionList = data
|
||||
})
|
||||
}
|
||||
this.unitList = await this.$businessTool.listUnit()
|
||||
await this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user