|
@@ -8,7 +8,7 @@
|
|
|
style="min-height: 700px;"
|
|
|
>
|
|
|
<template v-for="(item, index) in options">
|
|
|
- <el-menu-item :index="'1-'+item.id" @click="selectTag(item)" :key="index">
|
|
|
+ <el-menu-item :index="'1-'+item.id" @click="selectTag(item)" :key="index" v-if="checkLeader(item.isLeader)" :class="{'is-active':item.id==selectId}">
|
|
|
<span>{{ item.value }}</span>
|
|
|
</el-menu-item>
|
|
|
</template>
|
|
@@ -45,7 +45,7 @@
|
|
|
<el-table-column label="标题" min-width="180" prop="title">
|
|
|
<template slot-scope="{row}">
|
|
|
<el-input v-if="row._edit" v-model="row.title" type="text"></el-input>
|
|
|
- <span v-else> {{row.title}}</span>
|
|
|
+ <span v-else class="link-title" @click="gotoDetail(row)"> {{row.title}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
@@ -65,16 +65,16 @@
|
|
|
<el-button type="text" style="color: green;" @click="confirmEdit(row)" v-if="row._edit"> 确认 </el-button>
|
|
|
|
|
|
|
|
|
- <el-button type="text" @click="initEdit(row)" v-if="!row._edit &&(selectId==5 || selectId==1)"> 改标题 </el-button>
|
|
|
+ <el-button type="text" @click="initEdit(row)" v-if="!row._edit &&isLeader==1"> 改标题 </el-button>
|
|
|
|
|
|
<!-- look -->
|
|
|
- <el-button type="text" @click="editFile(row)" v-if="!row._edit && (selectId==5 || selectId==1)">编辑</el-button>
|
|
|
-
|
|
|
- <el-button type="text" @click="gotoDetail(row)" v-else-if="!row._edit"> 查看 </el-button>
|
|
|
+ <el-button type="text" @click="editFile(row)" v-if="!row._edit && isLeader>0">编辑</el-button>
|
|
|
|
|
|
<!-- delete -->
|
|
|
|
|
|
- <el-button v-if="!row._edit &&(selectId==5 || selectId==1) " type="text" style="color:darkorange" @click="row._delete=true" >删除</el-button>
|
|
|
+ <el-button v-if="!row._edit &&isLeader>0 " type="text" style="color:darkorange" @click="row._delete=true" >删除</el-button>
|
|
|
+
|
|
|
+ <el-button v-else type="text" @click="gotoDetail(row)" >详情</el-button>
|
|
|
|
|
|
<el-popover placement="top" width="150" v-model="row._delete" :style="{'margin-top': $index>0?'0px':'-60px'}">
|
|
|
<p>你是否确认删除?</p>
|
|
@@ -114,7 +114,7 @@ import {getEditArticalList,downloadFile, editArticalTitle} from '@/api/article'
|
|
|
import {download} from '@/utils/download.js'
|
|
|
import {toDatetime, toDate} from '@/utils/date.js'
|
|
|
import data from '../data/data.js'
|
|
|
-import { mapActions } from "vuex";
|
|
|
+import { mapActions,mapGetters } from "vuex";
|
|
|
|
|
|
export default {
|
|
|
name: 'application',
|
|
@@ -143,7 +143,7 @@ export default {
|
|
|
keyword:''
|
|
|
},
|
|
|
state3: '',
|
|
|
- selectId:"5",
|
|
|
+ selectId:"0",
|
|
|
selectName: '我经办文件',
|
|
|
isShowMore: false
|
|
|
}
|
|
@@ -153,10 +153,24 @@ export default {
|
|
|
toDate
|
|
|
},
|
|
|
created() {
|
|
|
- this.getArticalList();
|
|
|
+ let index = this.$route.query.index||0;
|
|
|
+
|
|
|
+ this.selectTag( data.myfiles[index] );
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters("user", ["userDepartments"])
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions("user", ["logout"]),
|
|
|
+ checkLeader(leaderId){
|
|
|
+ if( !leaderId ) return true;
|
|
|
+ for( let i in this.userDepartments){
|
|
|
+ if( this.userDepartments[i].isLeader == leaderId){
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ },
|
|
|
download( row ){
|
|
|
let query= {articalId: row.articalId }
|
|
|
this.$router.push( {path: '/file-info', query})
|
|
@@ -207,8 +221,10 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
selectTag( item ) {
|
|
|
+ console.log("select", item)
|
|
|
this.selectId = item.id;
|
|
|
this.listApi = item.listApi,
|
|
|
+ this.isLeader = item.isLeader||0;
|
|
|
this.selectName = item.value
|
|
|
this.getArticalList()
|
|
|
// 切换文件列表
|