|
@@ -4,31 +4,22 @@
|
|
<div class="squrt"></div>系统日志
|
|
<div class="squrt"></div>系统日志
|
|
</h2>
|
|
</h2>
|
|
<div class="m-core">
|
|
<div class="m-core">
|
|
|
|
+ <el-tabs @tab-click="onTabClick">
|
|
|
|
+ <el-tab-pane label="系统通知" value="SYSTEM"></el-tab-pane>
|
|
|
|
+ <el-tab-pane label="学生申诉" value="STUDENT"></el-tab-pane>
|
|
|
|
+ <!-- <el-tab-pane label="退团退课" value="MUSICGROUP"></el-tab-pane> -->
|
|
|
|
+ <el-tab-pane label="请假处理" value="LEAVE"></el-tab-pane>
|
|
|
|
+ <el-tab-pane label="VIP申请审核" value="VIPAPPLY"></el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
<el-form :inline="true"
|
|
<el-form :inline="true"
|
|
ref="searchForm"
|
|
ref="searchForm"
|
|
:model="searchForm">
|
|
:model="searchForm">
|
|
- <!-- <el-form-item>
|
|
|
|
- <el-input v-model.trim="searchForm.search"
|
|
|
|
- @keyup.enter.native="search"
|
|
|
|
- placeholder="课程编号、课程组名称"></el-input>
|
|
|
|
- </el-form-item> -->
|
|
|
|
- <el-form-item prop="group">
|
|
|
|
- <el-select v-model.trim="searchForm.group"
|
|
|
|
- clearable
|
|
|
|
- placeholder="日志类型">
|
|
|
|
- <el-option label="系统通知" value="SYSTEM"></el-option>
|
|
|
|
- <el-option label="学生申诉" value="STUDENT"></el-option>
|
|
|
|
- <el-option label="退团退课" value="MUSICGROUP"></el-option>
|
|
|
|
- <el-option label="请假处理" value="LEAVE"></el-option>
|
|
|
|
- <el-option label="VIP申请审核" value="VIPAPPLY"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
<el-form-item prop="readStatus">
|
|
<el-form-item prop="readStatus">
|
|
<el-select v-model.trim="searchForm.readStatus"
|
|
<el-select v-model.trim="searchForm.readStatus"
|
|
clearable
|
|
clearable
|
|
placeholder="日志状态">
|
|
placeholder="日志状态">
|
|
- <el-option label="已读" value="1"></el-option>
|
|
|
|
- <el-option label="未读" value="0"></el-option>
|
|
|
|
|
|
+ <el-option label="已读" :value="1"></el-option>
|
|
|
|
+ <el-option label="未读" :value="0"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- <el-form-item>
|
|
<!-- <el-form-item>
|
|
@@ -39,10 +30,8 @@
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button type="danger" @click="onSearch">搜索</el-button>
|
|
<el-button type="danger" @click="onSearch">搜索</el-button>
|
|
- <el-button type="primary" @click="onSearchReset('searchForm')">重置</el-button>
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
-
|
|
|
|
<div class="tableWrap">
|
|
<div class="tableWrap">
|
|
<el-table style="width: 100%"
|
|
<el-table style="width: 100%"
|
|
:header-cell-style="{background:'#EDEEF0',color:'#444'}"
|
|
:header-cell-style="{background:'#EDEEF0',color:'#444'}"
|
|
@@ -54,18 +43,12 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="center" label="申请时间" prop="createOn"></el-table-column>
|
|
<el-table-column align="center" label="申请时间" prop="createOn"></el-table-column>
|
|
- <el-table-column align="center" label="类型">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- {{ scope.row.group | journalTypeFormat }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
<el-table-column align="center" label="内容" prop="content"></el-table-column>
|
|
<el-table-column align="center" label="内容" prop="content"></el-table-column>
|
|
<el-table-column align="center"
|
|
<el-table-column align="center"
|
|
label="操作"
|
|
label="操作"
|
|
fixed="right">
|
|
fixed="right">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" v-if="scope.row.readStatus != 1">已读</el-button>
|
|
|
|
- <el-button type="text">查看</el-button>
|
|
|
|
|
|
+ <el-button type="text" @click="onLook(scope.row)">查看</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -76,21 +59,46 @@
|
|
@pagination="getList" />
|
|
@pagination="getList" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <el-dialog :title="dialogTitle"
|
|
|
|
+ :visible.sync="dialogSystem"
|
|
|
|
+ width="400px">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="24">{{ dialogDetail.content }}</el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <div slot="footer">
|
|
|
|
+ <el-button type="primary" @click="dialogSystem = false">确 定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog :title="dialogTitle"
|
|
|
|
+ :visible.sync="dialogStudent"
|
|
|
|
+ width="500px">
|
|
|
|
+ <student v-if="dialogStudent"
|
|
|
|
+ :dialogDetail="dialogDetail"
|
|
|
|
+ @close="dialogStudent = false" />
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import cleanDeep from 'clean-deep';
|
|
import cleanDeep from 'clean-deep';
|
|
import pagination from "@/components/Pagination/index";
|
|
import pagination from "@/components/Pagination/index";
|
|
import { queryCountOfUnread, sysMessageList, setRead } from '@/api/journal'
|
|
import { queryCountOfUnread, sysMessageList, setRead } from '@/api/journal'
|
|
|
|
+import { journalType } from '@/constant'
|
|
|
|
+import Student from './model/student'
|
|
export default {
|
|
export default {
|
|
- components: { pagination },
|
|
|
|
|
|
+ components: { pagination, Student },
|
|
name: 'journal',
|
|
name: 'journal',
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
|
|
+ dialogSystem: false,
|
|
|
|
+ dialogStudent: false,
|
|
|
|
+ dialogTitle: null,
|
|
|
|
+ dialogDetail: {},
|
|
searchForm: {
|
|
searchForm: {
|
|
search: null,
|
|
search: null,
|
|
- group: null,
|
|
|
|
- readStatus: null
|
|
|
|
|
|
+ group: 'SYSTEM',
|
|
|
|
+ readStatus: 0
|
|
},
|
|
},
|
|
tableList: [],
|
|
tableList: [],
|
|
pageInfo: {
|
|
pageInfo: {
|
|
@@ -106,22 +114,17 @@ export default {
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- __init () {
|
|
|
|
- // 未读消息
|
|
|
|
- // queryCountOfUnread().then(res => {
|
|
|
|
- // if (res.code == 200) {
|
|
|
|
- // if (res.data && res.data.SYSTEM) {
|
|
|
|
- // this.noReadMessage = res.data.SYSTEM
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
- },
|
|
|
|
onSearch() {
|
|
onSearch() {
|
|
this.pageInfo.page = 1
|
|
this.pageInfo.page = 1
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
- onSearchReset(formName) {
|
|
|
|
- this.$refs[formName].resetFields()
|
|
|
|
|
|
+ onTabClick(elm) {
|
|
|
|
+ // 判断 group 是否一致
|
|
|
|
+ const searchForm = this.searchForm
|
|
|
|
+ if(elm.$attrs.value == searchForm.group) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ searchForm.group = elm.$attrs.value
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
async getList() {
|
|
async getList() {
|
|
@@ -135,6 +138,29 @@ export default {
|
|
pageInfo.total = res.data.total
|
|
pageInfo.total = res.data.total
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ async onLook(row) {
|
|
|
|
+ switch(row.group) {
|
|
|
|
+ case 'SYSTEM':
|
|
|
|
+ this.dialogSystem = true
|
|
|
|
+ break;
|
|
|
|
+ case 'STUDENT':
|
|
|
|
+ this.dialogStudent = true
|
|
|
|
+ break;
|
|
|
|
+ case 'LEAVE':
|
|
|
|
+ this.dialogLeave = true
|
|
|
|
+ break;
|
|
|
|
+ case 'VIPAPPLY':
|
|
|
|
+ this.dialogVipApply = true
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ // 把当前消息变成已读
|
|
|
|
+ if(row.readStatus != 1) {
|
|
|
|
+ await setRead({ id: row.id })
|
|
|
|
+ row.readStatus = 1 // 手动把消息变一下状态
|
|
|
|
+ }
|
|
|
|
+ this.dialogTitle = journalType[row.group]
|
|
|
|
+ this.dialogDetail = row
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|