办理情况查询页面功能
diff --git a/leave-school-vue/src/api/handling-api.js b/leave-school-vue/src/api/handling-api.js
new file mode 100644
index 0000000..81f5de2
--- /dev/null
+++ b/leave-school-vue/src/api/handling-api.js
@@ -0,0 +1,16 @@
+import request from '@/utils/request'
+
+export function getList(params) {
+ return request({
+ url: '/api/statistical/handling/list-api',
+ method: 'get',
+ params
+ })
+}
+export function getItem(params) {
+ return request({
+ url: '/api/statistical/handling/get-item',
+ method: 'get',
+ params
+ })
+}
diff --git a/leave-school-vue/src/assets/images/line.png b/leave-school-vue/src/assets/images/line.png
new file mode 100644
index 0000000..36b6901
--- /dev/null
+++ b/leave-school-vue/src/assets/images/line.png
Binary files differ
diff --git a/leave-school-vue/src/assets/schoolCss/school.css b/leave-school-vue/src/assets/schoolCss/school.css
new file mode 100644
index 0000000..062c09e
--- /dev/null
+++ b/leave-school-vue/src/assets/schoolCss/school.css
@@ -0,0 +1,50 @@
+body{margin: 0;}
+a{text-decoration: none;}
+ul{list-style: none;margin: 0;padding: 0;}
+h1,h2,h3,h4,h5,h6{margin: 0;}
+
+.content-box{width: 100%;overflow: hidden;box-shadow: 1px 1px 6px #ccc;}
+.left{width: 29%;float: left;padding: 1%;padding-bottom: 30px;}
+
+.check h4{font-weight: 600;letter-spacing: 1px;font-size: 18px;height: 30px;}
+.textarea-box{position: relative;padding: 10px 0;}
+.textarea-box textarea{width: 100%;resize: none;padding: 10px;}
+.textarea-box span{position: absolute;right: 10%;bottom: 20px;}
+.btn-box{padding-top: 10px;}
+.content-box button{float: left;width: 70px;height: 30px;border:none;border-radius: 5px;}
+.affirm{background: #1789e7;color: white;margin-right: 20px;}
+.cancel{background: #eeeeee;color:black;}
+
+.statistics h4{font-weight: 600;font-size: 16px;height: 30px;}
+.statistics{width: 100%;float: left;overflow: hidden;padding-top: 50px;}
+.statistics table{width: 100%;border-collapse: collapse;}
+.statistics table thead{background: #ebebeb;}
+.statistics table thead td{font-weight: 700;}
+.statistics table tr:nth-child(even){background: #f9f9f9;}
+.statistics table td{border:1px solid #dadada;height: 42px;padding: 0 5px;}
+
+.right{float: left;width: 70%;border-left: 1px solid #dadada;}
+.perInfo table{float: left; width: 98%;margin:1%;border:1px solid #e0efff;background: #f9fcff;border-collapse: separate;padding: 10px 0;}
+
+.perInfo table td{height: 30px;line-height: 30px;}
+.perInfo table .title{color:#909090;padding-right:2px;}
+
+
+.record h5{float: left;width: 100%; height: 40px; background: #ededed;padding: 15px;font-size: 14px;}
+.record table{float: left;margin-top: 10px;}
+.record table td {vertical-align: top;position: relative;padding-bottom: 20px;}
+
+.record table td.line{background: url(../images/line.png) repeat-y left top;}
+.record table td i{color: #999;font-style: normal;}
+.record table td.line .circle.active{left:-20%; width: 15px;height: 15px;background: #f86a6a;border: 3px #fcc3c3 solid; }
+.record table td.line .circle{width: 10px;height: 10px; position: absolute;top: 0;left: -14%;border-radius: 50%;background: #e0e0e0;
+}
+.text-danger{color:#f03030;}
+.text-success{color:#399c76;}
+.record table td .clear-1{height: 10px;line-height: 10px;clear: both;font-size: 1px;}
+.record table td .cause{line-height: 22px;}
+
+@media screen and (max-width: 1366px) {
+ .record table td.line .circle.active{left:-25%;}
+ .record table td.line .circle{left:-18%;}
+ }
\ No newline at end of file
diff --git a/leave-school-vue/src/icons/svg/handling.svg b/leave-school-vue/src/icons/svg/handling.svg
new file mode 100644
index 0000000..134f777
--- /dev/null
+++ b/leave-school-vue/src/icons/svg/handling.svg
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1534822605518" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3472" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M264.659217 547.930327l434.789501-431.436126c15.971763-15.83464 37.902238-24.555256 61.753459-24.555256 27.572986 0 55.19509 11.720949 75.785034 32.156374l58.739822 58.284451c19.399839 19.221784 30.851659 44.056402 32.253588 69.927629 1.39272 25.75457-7.357572 49.383734-24.641213 66.534346L468.543767 750.216473 264.659217 547.930327zM767.927345 147.894352c-10.129708 0-19.467377 3.724835-26.292829 10.486842L344.308255 552.62014l119.508861 118.583792 397.320121-394.249179c15.160281-15.015995 13.870916-40.782845-2.880607-57.437154l-58.742892-58.284451C790.956851 152.756079 779.444657 147.894352 767.927345 147.894352z" p-id="3473" fill="#bfcbd9"></path><path d="M611.37173 249.76039 653.459291 208.002334 811.11803 364.450503 769.031493 406.199349Z" p-id="3474" fill="#bfcbd9"></path><path d="M225.057267 814.210973c-7.082302 0-13.748119-2.739391-18.768459-7.709589-6.703679-6.653537-9.31311-16.424064-6.808056-25.496697l62.535265-227.481991 43.132356 42.787502-42.36897 154.177452 155.345044-42.076304 43.152822 42.836621-229.274824 62.045101c-2.263553 0.608867-4.600785 0.917906-6.943133 0.917906C225.05829 814.210973 225.057267 814.210973 225.057267 814.210973z" p-id="3475" fill="#bfcbd9"></path><path d="M141.863497 940.705945c-45.76123 0-82.992179-36.950564-82.992179-82.368986l0-697.710632c0-45.412282 37.229926-82.358753 82.992179-82.358753l427.058422 0 0 48.38908L141.863497 126.656655c-18.87079 0-34.222429 15.239076-34.222429 33.969673l0 697.710632c0 18.73776 15.35164 33.981952 34.222429 33.981952l732.532719 0c18.876929 0 34.234709-15.244192 34.234709-33.981952L908.630924 434.590979l48.756447 0 0 423.74598c0 45.418422-37.228903 82.368986-82.992179 82.368986L141.863497 940.705945z" p-id="3476" fill="#bfcbd9"></path></svg>
\ No newline at end of file
diff --git a/leave-school-vue/src/mock/dictionary.js b/leave-school-vue/src/mock/dictionary.js
index fbfb169..0f8166b 100644
--- a/leave-school-vue/src/mock/dictionary.js
+++ b/leave-school-vue/src/mock/dictionary.js
@@ -90,6 +90,16 @@
'id': '18',
'type': 'jszlx',
'name': '所有教职工'
+},
+{
+ 'id': '19',
+ 'type': 'xslb',
+ 'name': '本专科生'
+},
+{
+ 'id': '20',
+ 'type': 'xslb',
+ 'name': '研究生'
}]
export default{
diff --git a/leave-school-vue/src/mock/handling.js b/leave-school-vue/src/mock/handling.js
new file mode 100644
index 0000000..32cd9dd
--- /dev/null
+++ b/leave-school-vue/src/mock/handling.js
@@ -0,0 +1,113 @@
+import Mock from 'mockjs'
+import { param2Obj } from '@/utils'
+
+const recordList = Mock.mock({
+ 'list|26': [{
+ 'id': '@increment',
+ 'xh': '@word(5)',
+ 'xm': '@cword(2, 3)',
+ 'yx': '@cword(6, 15)',
+ 'zy': '@cword(6, 15)',
+ 'bj': '@cword(6, 15)',
+ 'xslb': '@cword(3, 5)',
+ 'sfzylx|1': ['准予', '不准予'],
+ 'shjllist|4': [{
+ 'shhj': '@cword(6, 8)',
+ 'shzt|1': ['通过', '不通过'],
+ 'shyj|3': [{
+ 'shzt|1': ['通过', '不通过'],
+ 'shsj': '@datetime',
+ 'shr': '@cword(2, 3)',
+ 'shyj': '@cword(6, 10)'
+ }]
+ }],
+ 'blbmlist': [{
+ 'bmmc': '后勤处',
+ 'shjg|1': ['—', '×', '√']
+ },
+ {
+ 'bmmc': '财务处',
+ 'shjg|1': ['—', '×', '√']
+ },
+ {
+ 'bmmc': '学生处',
+ 'shjg|1': ['—', '×', '√']
+ },
+ {
+ 'bmmc': '图书馆',
+ 'shjg|1': ['—', '×', '√']
+ }]
+ }]
+}).list
+
+export default{
+ getList: config => {
+ const { pcmc, xh, xm, sfzylx, yx, zy, bj, xslb, pageIndex = 1, pageSize = 20 } = param2Obj(config.url)
+ const mockList = recordList.filter(item => {
+ if (pcmc && item.pcmc + '' !== pcmc + '') return false
+ if (xh && item.xh !== xh) return false
+ if (xm && item.xm !== xm) return false
+ if (sfzylx && item.sfzylx !== sfzylx) return false
+ if (yx && item.yx !== yx) return false
+ if (zy && item.zy !== zy) return false
+ if (bj && item.bj !== bj) return false
+ if (xslb && item.xslb !== xslb) return false
+ return true
+ })
+
+ const pageList = mockList.filter((item, index) => index < pageSize * pageIndex && index >= pageSize * (pageIndex - 1))
+ return {
+ items: pageList,
+ recordCount: mockList.length,
+ code: 200
+ }
+ },
+ getAllList: config => {
+ return {
+ items: recordList,
+ code: 200
+ }
+ },
+ getItem: config => {
+ const { id } = param2Obj(config.url)
+ const mockList = recordList.filter(item => item.id + '' === id + '')
+ return {
+ data: mockList.length > 0 ? mockList[0] : null,
+ code: 200
+ }
+ },
+ createData: config => {
+ const record = JSON.parse(config.body)
+ if (!record.id) {
+ record.id = '' + parseInt(Math.random() * 100) + 1024 // mock a id
+ recordList.unshift(record)
+ } else {
+ for (let i = 0; i < recordList.length; i++) {
+ if (recordList[i].id + '' === record.id + '') {
+ recordList.splice(i, 1, record)
+ break
+ }
+ }
+ }
+ return {
+ item: record,
+ code: 200
+ }
+ },
+ deleteData: config => {
+ const record = JSON.parse(config.body)
+ let index = -1
+ for (let i = 0; i < recordList.length; i++) {
+ if (recordList[i].id + '' === record.id + '') {
+ index = i
+ break
+ }
+ }
+ if (index > -1) {
+ recordList.splice(index, 1)
+ }
+ return {
+ code: 200
+ }
+ }
+}
diff --git a/leave-school-vue/src/mock/index.js b/leave-school-vue/src/mock/index.js
index 1e9f075..981622e 100644
--- a/leave-school-vue/src/mock/index.js
+++ b/leave-school-vue/src/mock/index.js
@@ -12,6 +12,7 @@
import departmentleaderApi from './departmentleader'
import instructorApi from './instructor'
import newspublishApi from './newspublish'
+import handlinghApi from './handling'
// 登录
Mock.mock(/\/api\/login\/login/, 'post', loginApi.loginByUsername)
@@ -87,4 +88,8 @@
Mock.mock(/\/api\/news\/newspublish\/delete-newspublish/, 'delete', newspublishApi.deleteData)
Mock.mock(/\/api\/news\/newspublish\/get-item/, 'get', newspublishApi.getItem)
+// 办理情况查询
+Mock.mock(/\/api\/statistical\/handling\/list-api/, 'get', handlinghApi.getList)
+Mock.mock(/\/api\/statistical\/handling\/get-item/, 'get', handlinghApi.getItem)
+
export default Mock
diff --git a/leave-school-vue/src/mock/menulist.js b/leave-school-vue/src/mock/menulist.js
index 7453cd9..343a71e 100644
--- a/leave-school-vue/src/mock/menulist.js
+++ b/leave-school-vue/src/mock/menulist.js
@@ -88,6 +88,25 @@
meta: { title: '新闻公告查看', icon: 'newview' }
}
]
+ },
+ {
+ path: '/statistical',
+ code: 'statistical',
+ meta: { title: '离校统计查询', icon: 'news' },
+ children: [
+ {
+ path: 'handling',
+ code: 'HandlingSituation',
+ resource: '/views/statistical/handling/index',
+ meta: { title: '办理情况查询', icon: 'handling' }
+ },
+ {
+ path: 'nodereport',
+ code: 'nodereport',
+ resource: '/views/news/newview/index',
+ meta: { title: '环节统计报表查询', icon: 'newview' }
+ }
+ ]
}
]
diff --git a/leave-school-vue/src/utils/crud.js b/leave-school-vue/src/utils/crud.js
index 70eb9e2..e7639a1 100644
--- a/leave-school-vue/src/utils/crud.js
+++ b/leave-school-vue/src/utils/crud.js
@@ -23,7 +23,7 @@
}
}
-export function crudPageList(page, _pagelist) {
+export function crudPageList(page, _pagelist, _callback) {
page.listLoading = true
_pagelist(Object.assign({}, page.listQuery)).then(response => {
page.items = response.items
@@ -31,6 +31,9 @@
page.recordCount = response.recordCount
page.pageIndex = response.pageIndex
page.pageSize = response.pageSize
+ if (typeof _callback === 'function') {
+ _callback()
+ }
})
}
export function crudGetItem(page, _get, rowid, initData) {
diff --git a/leave-school-vue/src/views/statistical/handling/index.vue b/leave-school-vue/src/views/statistical/handling/index.vue
new file mode 100644
index 0000000..a3ff438
--- /dev/null
+++ b/leave-school-vue/src/views/statistical/handling/index.vue
@@ -0,0 +1,312 @@
+<template>
+ <div class="app-container">
+ <div class="filter-container">
+ <el-row :gutter="20">
+ <el-col :span="4">
+ <el-select clearable @change="initZyList" class="filter-item" v-model="listQuery.pcmc" placeholder="批次名称">
+ </el-select>
+ </el-col>
+ <el-col :span="4">
+ <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="学号" v-model="listQuery.xh">
+ </el-input>
+ </el-col>
+ <el-col :span="4">
+ <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="姓名" v-model="listQuery.xm">
+ </el-input>
+ </el-col>
+ <el-col :span="4">
+ <el-select clearable @change="initZyList" class="filter-item" v-model="listQuery.sfzylx" placeholder="是否准予离校">
+ <el-option key="1" label="准予" value="1">
+ </el-option>
+ <el-option key="0" label="不准予" value="0">
+ </el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="8">
+ <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查询</el-button>
+ <el-button class="filter-item" style="margin-left: 10px;" @click="handleReset" type="primary" icon="el-icon-edit">重置</el-button>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="4">
+ <el-select clearable @change="initZyList" class="filter-item" v-model="listQuery.yx" placeholder="院系">
+ <el-option v-for="item in yxList" :key="item.id" :label="item.dwmc" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="4">
+ <el-select clearable class="filter-item" v-model="listQuery.zy" placeholder="专业">
+ <el-option v-for="item in zyList" :key="item.id" :label="item.zymc" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="4">
+ <el-select clearable class="filter-item" v-model="listQuery.bj" placeholder="班级">
+ <el-option v-for="item in bjList" :key="item.id" :label="item.bjmc" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="4">
+ <el-select clearable @change="initZyList" class="filter-item" v-model="listQuery.nj" placeholder="学生类别">
+ <el-option v-for="item in xslbList" :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="12">
+ </el-col>
+ </el-row>
+ </div>
+ <el-table :height="height" :data="items" v-loading="listLoading" element-loading-text="Loading" border fit highlight-current-row>
+ <el-table-column align="center" type="index" label='序号' width="95">
+ </el-table-column>
+ <el-table-column label="学号" align="center">
+ <template slot-scope="scope">
+ {{scope.row.xh}}
+ </template>
+ </el-table-column>
+ <el-table-column label="姓名" align="center">
+ <template slot-scope="scope">
+ <a href="#" @click="showTrace(scope.row)">{{scope.row.xm}}</a>
+ </template>
+ </el-table-column>
+ <el-table-column label="院系" align="center">
+ <template slot-scope="scope">
+ {{scope.row.yx}}
+ </template>
+ </el-table-column>
+ <el-table-column label="专业" align="center">
+ <template slot-scope="scope">
+ {{scope.row.zy}}
+ </template>
+ </el-table-column>
+ <el-table-column label="班级" align="center">
+ <template slot-scope="scope">
+ {{scope.row.bj}}
+ </template>
+ </el-table-column>
+ <el-table-column label="学生类别" align="center">
+ <template slot-scope="scope">
+ {{scope.row.xslb}}
+ </template>
+ </el-table-column>
+ <el-table-column v-for="blbm in colList" :label="blbm" :key="blbm" :prop="blbm" align="center">
+ </el-table-column>
+ <el-table-column label="是否准予离校" align="center">
+ <template slot-scope="scope">
+ <font color="green" v-if="scope.row.sfzylx == '准予'">{{scope.row.sfzylx}}</font>
+ <font color="red" v-else>{{scope.row.sfzylx}}</font>
+ </template>
+ </el-table-column>
+ </el-table>
+ <div class="pagination-container">
+ <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listQuery.pageIndex"
+ :page-sizes="[10,20,30, 50]" :page-size="listQuery.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="recordCount">
+ </el-pagination>
+ </div>
+ <el-dialog title="审核意见" :visible.sync="dialogFormVisible" width="80%" top="10vh">
+ <div class="J_conWarp g-lr-mg">
+ <div id="dcMain">
+ <div id="index" class="mainBox" style=" height: auto; min-height: 310px;">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" class="indexBoxTwo">
+ <tbody>
+ <tr>
+ <td width="85%" valign="top" class="pr">
+ <div class="indexBox">
+ <div class="boxTitle">基本信息</div>
+ <ul>
+ <table width="100%" border="0" cellspacing="0" cellpadding="7" class="tableBasic">
+ <tbody>
+ <tr>
+ <td width="120">学号:</td>
+ <td><b>{{ jbxx.xh }}</b></td>
+ <td width="100">姓名:</td>
+ <td><b>{{ jbxx.xm }}</b></td>
+ </tr>
+ <tr>
+ <td>院系:</td>
+ <td><b>{{ jbxx.yx }}</b></td>
+ <td>专业:</td>
+ <td><b>{{ jbxx.zy }}</b></td>
+ </tr>
+ <tr>
+ <td>班级:</td>
+ <td><b>{{ jbxx.bj }}</b></td>
+ <td>学生类别:</td>
+ <td><b>{{ jbxx.xslb }}</b></td>
+ </tr>
+ </tbody>
+ </table>
+ </ul>
+ </div>
+ </td>
+ <td valign="top" class="pl">
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class="indexBox">
+ <div class="boxTitle">审核记录</div>
+ <ul>
+ <table width="100%" border="0" cellspacing="0" cellpadding="7" class="tableBasic">
+ <tbody>
+ <tr>
+ <th width="35%">审核环节</th>
+ <th>审核意见</th>
+ </tr>
+ <tr v-for="shjl in shjllist" :key="shjl.shhj">
+ <td align="center">
+ {{shjl.shhj}}
+ [<font color="green" v-if="shjl.shzt == '通过'">{{shjl.shzt}}</font>
+ <font color="red" v-else>{{shjl.shzt}}</font>]
+ </td>
+ <td align="left">
+ <template v-for="sj in shjl.shyj">
+ [<font color="green" v-if="sj.shzt == '通过'">{{sj.shzt}}</font>
+ <font color="red" v-else>{{sj.shzt}}</font> {{sj.shsj}}]
+ 【{{shjl.shhj}}】
+ 审核意见:{{sj.shyj}}
+ <br>
+ </template>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </ul>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ <div slot="footer" class="dialog-footer" style="text-align:center">
+ <el-button @click="dialogFormVisible = false">关闭</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import { getAllList as getClassList } from '@/api/class-api'
+import { getList } from '@/api/handling-api'
+import { getDicList } from '@/api/dictionary-api'
+import { getAllList as getAllDeptList } from '@/api/department-api'
+import { getZyListByYx } from '@/api/major-api'
+import waves from '@/directive/waves' // 水波纹指令
+import { resetForm } from '@/utils'
+import { crudPageList } from '@/utils/crud'
+import mixindata from '@/utils/crud'
+
+export default {
+ name: 'class',
+ directives: {
+ waves
+ },
+ mixins: [mixindata],
+ data() {
+ return {
+ pcmcList: [],
+ yxList: [],
+ zyList: [],
+ bjList: [],
+ colList: [],
+ xslbList: [],
+ jbxx: {},
+ shjllist: []
+ }
+ },
+ filters: {
+ statusFilter(status) {
+ const statusMap = {
+ '1': 'success',
+ '0': 'danger'
+ }
+ return statusMap[status]
+ }
+ },
+ created() {
+ this.initYxList()
+ this.initZyList()
+ this.initBjList()
+ this.initXslbList()
+ this.handlePageList()
+ this.height = window.innerHeight - 266
+ },
+ methods: {
+ initYxList() {
+ getAllDeptList(this.listQuery).then(response => {
+ this.yxList = response.items
+ })
+ },
+ initZyList() {
+ getZyListByYx({ yx: this.listQuery.yx }).then(response => {
+ this.zyList = response.items
+ // TODO 坑,this.listQuery.zy == null 直接赋值,专业下拉框选择出bug,无法选择,原因未知
+ for (const attr in this.listQuery) {
+ if (attr === 'zy') {
+ this.listQuery['zy'] = null
+ }
+ }
+ })
+ },
+ initXslbList() {
+ getDicList({ type: 'xslb' }).then(response => {
+ this.xslbList = response.items
+ })
+ },
+ initBjList() {
+ getClassList().then(response => {
+ this.bjList = response.items
+ })
+ },
+ handlePageList() {
+ crudPageList(this, getList, this.parseItems)
+ },
+ parseItems() {
+ // 重新组织列表,动态生成列
+ for (let i = 0; i < this.items.length; i++) {
+ const item = this.items[i]
+ if (i === 0) {
+ for (const blbm of item.blbmlist) {
+ if (this.colList.indexOf(blbm.bmmc) === -1) {
+ this.colList.push(blbm.bmmc)
+ }
+ }
+ }
+ for (const blbm of item.blbmlist) {
+ item[blbm.bmmc] = blbm.shjg
+ }
+ }
+ },
+ handleReset() {
+ resetForm(this.listQuery)
+ },
+ handleFilter() {
+ this.listQuery.pageIndex = 1
+ this.handlePageList()
+ },
+ handleSizeChange(val) {
+ this.listQuery.pageSize = val
+ this.handlePageList()
+ },
+ handleCurrentChange(val) {
+ this.listQuery.pageIndex = val
+ this.handlePageList()
+ },
+ handleAudit(rowid) {
+ this.dialogFormVisible = true
+ },
+ showTrace(item) {
+ this.jbxx = item
+ this.shjllist = item.shjllist
+ this.dialogFormVisible = true
+ }
+ }
+}
+</script>
+<style scoped>
+.app-container a:visited {
+ color: #00a4f4;
+ text-decoration: none;
+}
+</style>
+
diff --git a/leave-school-vue/src/views/statistical/newspublish/index.vue b/leave-school-vue/src/views/statistical/newspublish/index.vue
new file mode 100644
index 0000000..019db1b
--- /dev/null
+++ b/leave-school-vue/src/views/statistical/newspublish/index.vue
@@ -0,0 +1,256 @@
+<template>
+ <div class="app-container">
+ <div class="filter-container">
+ <el-row :gutter="20">
+ <el-col :span="5">
+ <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="公告标题" v-model="listQuery.ggbt">
+ </el-input>
+ </el-col>
+ <el-col :span="5">
+ <el-date-picker
+ v-model="listQuery.fbqssj"
+ type="date"
+ placeholder="发布起始时间">
+ </el-date-picker>
+ </el-col>
+ <el-col :span="5">
+ <el-date-picker
+ v-model="listQuery.fbjssj"
+ type="date"
+ placeholder="发布结束时间">
+ </el-date-picker>
+ </el-col>
+ <el-col :span="9">
+ <el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查询</el-button>
+ <el-button class="filter-item" style="margin-left: 10px;" @click="handleCreate(null, 'create')" type="primary" icon="el-icon-edit">添加</el-button>
+ <el-button class="filter-item" style="margin-left: 10px;" @click="handleReset" type="primary" icon="el-icon-edit">重置</el-button>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="5">
+ <el-select class="filter-item" v-model="temp.sfky" placeholder="是否可用">
+ <el-option key="1" label="可用" value="1">
+ </el-option>
+ <el-option key="0" label="不可用" value="0">
+ </el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="5">
+ <el-select clearable class="filter-item" v-model="listQuery.xswz" placeholder="显示位置">
+ <el-option v-for="item in xswzList" :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="5">
+ <el-select clearable class="filter-item" v-model="listQuery.jlckzt" placeholder="记录查看状态">
+ <el-option key="1" label="需要" value="1">
+ </el-option>
+ <el-option key="0" label="不需要" value="0">
+ </el-option>
+ </el-select>
+ </el-col>
+ <el-col :span="9">
+ </el-col>
+ </el-row>
+ </div>
+ <el-table :height="height" :data="items" v-loading="listLoading" element-loading-text="Loading" border fit highlight-current-row>
+ <el-table-column align="center" type="index" label='序号' width="95">
+ </el-table-column>
+ <el-table-column label="公告标题" align="center">
+ <template slot-scope="scope">
+ {{scope.row.ggbt}}
+ </template>
+ </el-table-column>
+ <el-table-column label="公告类型" align="center">
+ <template slot-scope="scope">
+ <span>{{scope.row.gglx}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="接收者类型" align="center">
+ <template slot-scope="scope">
+ {{scope.row.jszlx}}
+ </template>
+ </el-table-column>
+ <el-table-column label="是否可用" align="center">
+ <template slot-scope="scope">
+ {{scope.row.sfky}}
+ </template>
+ </el-table-column>
+ <el-table-column label="发布起始时间" align="center">
+ <template slot-scope="scope">
+ {{scope.row.fbqssj}}
+ </template>
+ </el-table-column>
+ <el-table-column label="发布结束时间" align="center">
+ <template slot-scope="scope">
+ {{scope.row.fbjssj}}
+ </template>
+ </el-table-column>
+ <el-table-column label="显示位置设置" align="center">
+ <template slot-scope="scope">
+ {{scope.row.xswz}}
+ </template>
+ </el-table-column>
+ <el-table-column label="点击数" align="center">
+ <template slot-scope="scope">
+ {{scope.row.djs}}
+ </template>
+ </el-table-column>
+ <el-table-column
+ fixed="right"
+ header-align="center"
+ align="center"
+ width="150"
+ label="操作">
+ <template slot-scope="scope">
+ <el-button type="text" size="small" @click="handleCreate(scope.row.id, 'update')">修改</el-button>
+ <el-button type="text" size="small" @click="handleDelete(scope.row.id)">删除</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <div class="pagination-container">
+ <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listQuery.pageIndex" :page-sizes="[10,20,30, 50]" :page-size="listQuery.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="recordCount">
+ </el-pagination>
+ </div>
+
+ <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="80%" top="10vh">
+ <el-form :rules="rules" ref="dataForm" :model="temp" label-position="left" label-width="150px" style='margin-left:50px;'>
+ <el-form-item label="公告标题" prop="ggbt">
+ <el-input v-model="temp.ggbt"></el-input>
+ <input type="hidden" v-model="temp.id" />
+ </el-form-item>
+ <el-form-item label="是否可用" prop="sfky">
+ <el-select class="filter-item" v-model="temp.sfky" placeholder="是否可用">
+ <el-option key="1" label="可用" value="1">
+ </el-option>
+ <el-option key="0" label="不可用" value="0">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="发布开始时间">
+ <el-date-picker
+ v-model="temp.fbqssj"
+ type="date"
+ placeholder="选择日期">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="发布结束时间">
+ <el-date-picker
+ v-model="temp.fbjssj"
+ type="date"
+ placeholder="选择日期">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="记录查看状态">
+ <el-select class="filter-item" v-model="temp.jlckzt" placeholder="请选择">
+ <el-option key="1" label="需要" value="1">
+ </el-option>
+ <el-option key="0" label="不需要" value="0">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="显示位置" prop="xswz">
+ <el-select class="filter-item" v-model="temp.xswz" placeholder="请选择">
+ <el-option v-for="item in xswzList" :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="接收者类型">
+ <el-radio-group v-model="temp.jszlx">
+ <el-radio v-for="item in jszlxList" :label="item.id" :key="item.id" >{{item.name}}</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="公告内容">
+ <div class="editor-container">
+ <UE v-model="temp.ggnr" :config=config ref="ue"></UE>
+ </div>
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="dialogFormVisible = false">返回</el-button>
+ <el-button type="primary" @click="createData">提交</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import { getList, getItem, createNewspublish, deleteNewspublish } from '@/api/newspublish-api'
+import { getDicList } from '@/api/dictionary-api'
+import waves from '@/directive/waves' // 水波纹指令
+import { resetForm } from '@/utils'
+import { crudPageList, crudGetItem, crudCreate, crudDelete } from '@/utils/crud'
+import mixindata from '@/utils/crud'
+import UE from '@/components/UEditor'
+
+const initData = { sfky: '1', xswz: '14', jszlx: '16', ggnr: '' }
+export default {
+ name: 'newspublish',
+ components: { UE },
+ directives: {
+ waves
+ },
+ mixins: [mixindata],
+ data() {
+ return {
+ config: {
+ initialFrameWidth: null,
+ initialFrameHeight: 350
+ },
+ xswzList: [],
+ jszlxList: [],
+ rules: {
+ ggbt: [{ required: true, message: '公告标题必填', trigger: 'blur' }],
+ sfky: [{ required: true, message: '是否可用必选', trigger: 'change' }],
+ xswz: [{ required: true, message: '显示位置必选', trigger: 'change' }]
+ }
+ }
+ },
+ created() {
+ this.getXswzList()
+ this.getJszlxList()
+ this.handlePageList()
+ this.height = window.innerHeight - 266
+ },
+ methods: {
+ getXswzList() {
+ getDicList({ type: 'xswz' }).then(response => {
+ this.xswzList = response.items
+ })
+ },
+ getJszlxList() {
+ getDicList({ type: 'jszlx' }).then(response => {
+ this.jszlxList = response.items
+ })
+ },
+ handlePageList() {
+ crudPageList(this, getList)
+ },
+ handleCreate(rowid, dialogStatus) {
+ this.dialogStatus = dialogStatus
+ crudGetItem(this, getItem, rowid, initData)
+ },
+ handleReset() {
+ resetForm(this.listQuery)
+ },
+ handleFilter() {
+ this.listQuery.pageIndex = 1
+ this.handlePageList()
+ },
+ handleSizeChange(val) {
+ this.listQuery.pageSize = val
+ this.handlePageList()
+ },
+ handleCurrentChange(val) {
+ this.listQuery.pageIndex = val
+ this.handlePageList()
+ },
+ createData() {
+ crudCreate(this, createNewspublish, this.handlePageList)
+ },
+ handleDelete(rowid) {
+ crudDelete(this, deleteNewspublish, rowid, this.handlePageList)
+ }
+ }
+}
+</script>