|
@@ -13,70 +13,202 @@
|
|
|
</div>
|
|
|
|
|
|
|
|
|
- <el-form :inline="true" class="p20" label-width="80px" label-position="left">
|
|
|
+ <el-form :inline="true" class="p20" label-width="80px" label-position="left">
|
|
|
<el-row>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="所属部门">
|
|
|
- <span class="pl10 nowrap span-tit">{{info.department }}</span>
|
|
|
+ <span class="pl10 nowrap span-tit">{{info.department }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="文件分类">
|
|
|
- <span class="pl10 nowrap span-tit">{{categorys[info.category] }}</span>
|
|
|
+ <span class="pl10 nowrap span-tit">{{categorys[info.category] }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="发布人">
|
|
|
- <span class="pl10 nowrap span-tit">{{info.username||'超管' }}</span>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="是否公开">
|
|
|
+ <span class="pl10 nowrap span-tit">{{info.isOpen?'是':'否' }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="发布时间">
|
|
|
- <span class="pl10 nowrap span-tit">{{info.publishTime|toDatetime }}</span>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="文件状态">
|
|
|
+ <span class="pl10 nowrap span-tit">{{statusMap[info.status] }}</span>
|
|
|
+ <span class="ml20">
|
|
|
+ <el-button type="text" v-if="isLeader==2 && info.status==1"
|
|
|
+ @click="dialogConfirm=true">审核</el-button>
|
|
|
+ <el-button type="text" v-if="isLeader==3 && info.status==2"
|
|
|
+ @click="dialogPublish=true">发布</el-button>
|
|
|
+ </span>
|
|
|
+
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="是否公开">
|
|
|
- <span class="pl10 nowrap span-tit">{{info.isOpen?'是':'否' }}</span>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="经办人">
|
|
|
+ <span class="pl10 nowrap span-tit">{{info.username||'超管' }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
-
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="我的权限">
|
|
|
- <span class="pl10 nowrap span-tit">{{owners[isLeader]}}</span>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="首次提交">
|
|
|
+ <span class="pl10 nowrap span-tit">{{info.createAt|toDatetime }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
</el-row>
|
|
|
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <div class="mt10">
|
|
|
- <h2> 文章简介 </h2>
|
|
|
- <div class="content mt10 p20">
|
|
|
- <div>{{info.brief}} </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </el-form>
|
|
|
|
|
|
+<!-- <div>
|
|
|
+ <h2> 文章简介 </h2>
|
|
|
+ <div class="content p20">
|
|
|
+ <div>{{info.brief}} </div>
|
|
|
+ </div>
|
|
|
+ </div> -->
|
|
|
<div class="p20">
|
|
|
<el-button v-if="!isLike" icon="el-icon-star-off" @click="likeArtical"> 收藏</el-button>
|
|
|
<el-button v-else icon="el-icon-star-on" type="info" @click="unLikeArtical">取消</el-button>
|
|
|
|
|
|
+ <el-button icon="el-icon-download" v-if="isLeader>0 || info.isOpen" @click="download"> 下载</el-button>
|
|
|
+ <el-button icon="el-icon-download" v-else @click="applyDownload">申请下载</el-button>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <el-table :data="logs" border stripe v-loading="loading">
|
|
|
+ <el-table-column label="时间" prop="createAt" align="center">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span >{{row.createAt|toDatetime}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
|
|
|
+ <el-table-column label="操作人" prop="nickname">
|
|
|
+ </el-table-column>
|
|
|
|
|
|
- <el-button icon="el-icon-download" v-if="isLeader>0 || info.isOpen" @click="download"> 下载</el-button>
|
|
|
- <el-button icon="el-icon-download" v-else @click="applyDownload">申请下载</el-button>
|
|
|
+ <el-table-column label="备注" prop="content" align="center">
|
|
|
+
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+
|
|
|
+ <el-table-column label="状态" prop="status" align="center">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ {{statusMap[row.oldStatus] }} -> {{statusMap[row.newStatus] }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="操作" prop="status" align="center" width="80">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <div v-if="$index==0">
|
|
|
+ <el-button type="text" size="small" v-if="info.status==3" >已发布</el-button>
|
|
|
+ <el-button type="text" size="small" v-else-if="isLeader==2 && info.status==1" @click="dialogConfirm=true">审核</el-button>
|
|
|
+ <el-button type="text" size="small" v-else-if="isLeader==3 && info.status==2" @click="dialogPublish=true" >发布</el-button>
|
|
|
+ <el-button type="text" size="small" v-else >无权限</el-button>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <el-button type="text" size="small" >已经处理</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <el-dialog title="科长审核文件" center :visible.sync="dialogConfirm" >
|
|
|
+ <el-form class="p20" label-width="100px" label-position="left"
|
|
|
+ ref="elForm" :model="info" :rules="rules" >
|
|
|
+
|
|
|
+ <el-form-item label="文件标题" class="mt20" prop="category">
|
|
|
+ <el-input v-model="info.title" type="textarea" autosize></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="所属分类" class="mt20" prop="category">
|
|
|
+ <el-select v-model="info.category" collapse-tags placeholder="请选择" clearable>
|
|
|
+ <el-option v-for="(item,index) in categorys"
|
|
|
+ :value="index" :key="index" :label="item"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="是否公开" class="mt20" prop="category">
|
|
|
+ <el-switch :active-value="1" :inactive-value="0" v-model="info.isOpen"></el-switch>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="是否通过" class="mt20" prop="category">
|
|
|
+ <el-switch :active-value="1" :inactive-value="0" v-model="form.action"></el-switch>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="审核意见" class="mt20" prop="category">
|
|
|
+ <el-input v-model="form.content" type="textarea" autosize></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <el-form-item >
|
|
|
+ <el-button type="warning" @click="dialogConfirm=false" class="btn-md">
|
|
|
+ 审核取消
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="onConfirm" class="btn-md">
|
|
|
+ 确认审核
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+ <el-dialog title="分管审核文件" center :visible.sync="dialogPublish" >
|
|
|
+ <el-form class="p20" label-width="100px" label-position="left"
|
|
|
+ ref="elForm" :model="info" :rules="rules" >
|
|
|
+
|
|
|
+ <el-form-item label="文件标题" class="mt20" prop="category">
|
|
|
+ <el-input v-model="info.title" type="textarea" autosize></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="所属分类" class="mt20" prop="category">
|
|
|
+ <el-select v-model="info.category" collapse-tags placeholder="请选择" clearable>
|
|
|
+ <el-option v-for="(item,index) in categorys"
|
|
|
+ :value="index" :key="index" :label="item"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="是否公开" class="mt20" prop="category">
|
|
|
+ <el-switch :active-value="1" :inactive-value="0" v-model="info.isOpen"></el-switch>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="是否通过" class="mt20" prop="action">
|
|
|
+ <el-switch :active-value="1" :inactive-value="0" v-model="form.action"></el-switch>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="审核意见" class="mt20" prop="content">
|
|
|
+ <el-input v-model="form.content" type="textarea" autosize></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <el-form-item >
|
|
|
+ <el-button type="warning" @click="dialogPublish=false" class="btn-md">
|
|
|
+ 审核取消
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="onPublish" class="btn-md">
|
|
|
+ 确认审核
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ </el-dialog>
|
|
|
|
|
|
<div style="height: 60px;"></div>
|
|
|
</div>
|
|
@@ -85,13 +217,29 @@
|
|
|
<script>
|
|
|
import IHeader from "./components/IHeader";
|
|
|
import IFooter from "./components/IFooter";
|
|
|
- import {toDatetime } from '@/utils/date.js'
|
|
|
+ import {
|
|
|
+ toDatetime
|
|
|
+ } from '@/utils/date.js'
|
|
|
import data from '../data/data.js'
|
|
|
- import { getArticalInfo, likeArtical, unLikeArtical} from '@/api/article.js'
|
|
|
- import {downloadFile, downloadArtical, applyArtical} from '@/api/article.js'
|
|
|
-
|
|
|
- import {download} from '@/utils/download.js'
|
|
|
- import { mapGetters } from "vuex";
|
|
|
+ import {
|
|
|
+ getArticalInfo,
|
|
|
+ likeArtical,
|
|
|
+ unLikeArtical,
|
|
|
+ confirmArtical,
|
|
|
+ publishArtical
|
|
|
+ } from '@/api/article.js'
|
|
|
+ import {
|
|
|
+ downloadFile,
|
|
|
+ downloadArtical,
|
|
|
+ applyArtical
|
|
|
+ } from '@/api/article.js'
|
|
|
+
|
|
|
+ import {
|
|
|
+ download
|
|
|
+ } from '@/utils/download.js'
|
|
|
+ import {
|
|
|
+ mapGetters
|
|
|
+ } from "vuex";
|
|
|
|
|
|
export default {
|
|
|
name: 'application',
|
|
@@ -104,19 +252,26 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- loading:false,
|
|
|
+ loading: false,
|
|
|
articalId: 0,
|
|
|
- isLeader:0,
|
|
|
+ isLeader: 0,
|
|
|
recommend: [],
|
|
|
apply_list: [],
|
|
|
+ logs:[],
|
|
|
isLike: 0,
|
|
|
+ statusMap: data.statusMap,
|
|
|
owners: data.owners,
|
|
|
- categorys:data.categorys,
|
|
|
- info: {}
|
|
|
+ categorys: data.categorys,
|
|
|
+ dialogConfirm: false,
|
|
|
+ dialogPublish: false,
|
|
|
+ info: {},
|
|
|
+ form:{ action:1,content:'' },
|
|
|
+ rules:{}
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters("user", ["userDepartments"])
|
|
|
+ ...mapGetters("user", ["userDepartments"])
|
|
|
},
|
|
|
created() {
|
|
|
this.articalId = +this.$route.query.articalId || 0;
|
|
@@ -125,50 +280,83 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- download(){
|
|
|
+ download() {
|
|
|
let articalId = this.articalId
|
|
|
- if( this.isLeader >0 ){
|
|
|
- download( `/api/artical/downloadFile/${articalId}`)
|
|
|
- }else{
|
|
|
- this.$message.successMsg("无权限下载", 1)
|
|
|
+ if (this.isLeader > 0) {
|
|
|
+ download(`/api/artical/downloadFile/${articalId}`)
|
|
|
+ } else {
|
|
|
+ this.$message.errorMsg("无权限下载", 1)
|
|
|
}
|
|
|
},
|
|
|
- applyDownload(){
|
|
|
- let param ={articalId: this.articalId}
|
|
|
- this.loading = true;
|
|
|
- applyArtical( param ).then( res=>{
|
|
|
+ onConfirm(){
|
|
|
+ let {departmentId,category, articalId } = this.info;
|
|
|
+ let param = {departmentId,category, articalId }
|
|
|
+ param.action = +this.form.action
|
|
|
+ param.content = this.form.content
|
|
|
+ confirmArtical( param ).then( res=>{
|
|
|
if( res.code == 200){
|
|
|
+ this.$message.successMsg("确认成功", 1)
|
|
|
+ this.dialogConfirm = false
|
|
|
+ this.info.status = 2
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ onPublish(){
|
|
|
+ let {departmentId,category, articalId } = this.info;
|
|
|
+ let param = {departmentId,category, articalId }
|
|
|
+ param.action = +this.form.action
|
|
|
+ param.content = this.form.content
|
|
|
+ publishArtical( param ).then( res=>{
|
|
|
+ if( res.code == 200){
|
|
|
+ this.$message.successMsg("确认成功", 1)
|
|
|
+ this.dialogPublish = false
|
|
|
+ this.info.status = 3
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ applyDownload() {
|
|
|
+ let param = {
|
|
|
+ articalId: this.articalId
|
|
|
+ }
|
|
|
+ this.loading = true;
|
|
|
+ applyArtical(param).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
this.$message.successMsg("申请成功", 1)
|
|
|
}
|
|
|
this.loading = false;
|
|
|
- }).catch( ()=>{
|
|
|
+ }).catch(() => {
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
- likeArtical(){
|
|
|
- let param ={articalId: this.articalId}
|
|
|
+ likeArtical() {
|
|
|
+ let param = {
|
|
|
+ articalId: this.articalId
|
|
|
+ }
|
|
|
this.loading = true;
|
|
|
- likeArtical( param ).then( res=>{
|
|
|
- if( res.code == 200){
|
|
|
+ likeArtical(param).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
this.$message.successMsg("收藏成功", 1)
|
|
|
this.isLike = 1
|
|
|
}
|
|
|
this.loading = false;
|
|
|
- }).catch( ()=>{
|
|
|
+ }).catch(() => {
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
- unLikeArtical(){
|
|
|
- let param ={articalId: this.articalId}
|
|
|
+ unLikeArtical() {
|
|
|
+ let param = {
|
|
|
+ articalId: this.articalId
|
|
|
+ }
|
|
|
this.loading = true;
|
|
|
- unLikeArtical( param ).then( res=>{
|
|
|
+ unLikeArtical(param).then(res => {
|
|
|
console.log("res", res)
|
|
|
- if( res.code == 200){
|
|
|
+ if (res.code == 200) {
|
|
|
this.$message.successMsg("取消成功", 1)
|
|
|
this.isLike = 0
|
|
|
}
|
|
|
this.loading = false;
|
|
|
- }).catch( ()=>{
|
|
|
+ }).catch(() => {
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
@@ -179,11 +367,12 @@
|
|
|
getArticalInfo(param).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.info = res.data.info;
|
|
|
- for( let i in this.userDepartments){
|
|
|
- if( this.userDepartments[i].departmentId == this.info.departmentId){
|
|
|
+ for (let i in this.userDepartments) {
|
|
|
+ if (this.userDepartments[i].departmentId == this.info.departmentId) {
|
|
|
this.isLeader = this.userDepartments[i].isLeader;
|
|
|
}
|
|
|
}
|
|
|
+ this.logs = res.data.logs||[];
|
|
|
this.recommend = res.data.recommend || [];
|
|
|
this.apply_list = res.data.apply_list || [];
|
|
|
this.isLike = res.data.isLike || 0;
|
|
@@ -195,66 +384,15 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .xl_main {
|
|
|
- width: 960px;
|
|
|
- padding: 0px 20px;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- .mar-B20 {
|
|
|
- margin-bottom: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .mar-T15 {
|
|
|
- margin-top: 15px;
|
|
|
- }
|
|
|
-
|
|
|
- .n-tit {
|
|
|
- text-align: center;
|
|
|
- border-bottom: 1px dashed #ccc;
|
|
|
- padding-bottom: 10px;
|
|
|
- }
|
|
|
+ @import "../../styles/main.css";
|
|
|
|
|
|
- .n-tit h3 {
|
|
|
- font-size: 22px;
|
|
|
- font-weight: bold;
|
|
|
- padding-top: 25px;
|
|
|
- text-align: center;
|
|
|
- line-height: 36px;
|
|
|
+ .nopad{
|
|
|
+ border-top: 1px dashed #ccc;
|
|
|
+ padding: 0px !important;
|
|
|
+ // border: none;
|
|
|
+ height: 100px;
|
|
|
}
|
|
|
|
|
|
- .box1 {
|
|
|
- margin-top: 20px;
|
|
|
- padding: 0px 36px 18px 36px;
|
|
|
- font-size: 16px;
|
|
|
- color: #000000;
|
|
|
- }
|
|
|
|
|
|
- p {
|
|
|
- display: block;
|
|
|
- margin-block-start: 1em;
|
|
|
- margin-block-end: 1em;
|
|
|
- margin-inline-start: 0px;
|
|
|
- margin-inline-end: 0px;
|
|
|
- }
|
|
|
|
|
|
- h5 {
|
|
|
- display: block;
|
|
|
- font-size: 0.83em;
|
|
|
- margin-block-start: 1.67em;
|
|
|
- margin-block-end: 1.67em;
|
|
|
- margin-inline-start: 0px;
|
|
|
- margin-inline-end: 0px;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
-
|
|
|
- .xl_btn {
|
|
|
- display: inline-block;
|
|
|
- width: 60px;
|
|
|
- height: 29px;
|
|
|
- line-height: 29px;
|
|
|
- text-align: center;
|
|
|
- margin: 0 10px;
|
|
|
- }
|
|
|
</style>
|