y595705120 3 năm trước cách đây
mục cha
commit
cf879b45b2

+ 16 - 0
src/api/article.js

@@ -48,6 +48,22 @@ export const getEditArticalList = (data) => {
     })
 }
 
+export const getConfirmArticalList = (data) => {
+    return service({
+        url: "/api/artical/getConfirmArticalList",
+        method: 'post',
+        data
+    })
+}
+
+export const getPublishArticalList = (data) => {
+    return service({
+        url: "/api/artical/getPublishArticalList",
+        method: 'post',
+        data
+    })
+}
+
 export const getViewArticalList = (data) => {
     return service({
         url: "/api/artical/getViewArticalList",

+ 7 - 0
src/assets/css/main.css

@@ -72,3 +72,10 @@
 .brief{
   margin: 10px auto;
 }
+
+.link-title{
+  /* text-decoration:underline; */
+  /* cursor:hand; */
+  cursor:pointer;
+  /* color: #46a6ff; */
+}

+ 1 - 1
src/components/Tinymce/index.vue

@@ -6,7 +6,7 @@
       <el-upload
         ref="upload"
         :multiple="true"
-        action="/api/artical/uploadFile"
+        action="/api/artical/uploadAttach"
         :auto-upload="true"
         :show-file-list="false"
         :headers="headers"

+ 27 - 9
src/pages/data/data.js

@@ -3,6 +3,8 @@ import {
   getArticalLikeList,
   getViewArticalList,
   getDownloadArticalList,
+  getPublishArticalList,
+  getConfirmArticalList,
   getManageArticalList,
   getEditArticalList
 } from '@/api/article'
@@ -66,29 +68,45 @@ export default {
   },
   myfiles: [
     {
-      id: "5",
+      id: "0",
       value: '我经办文件',
       label: '我经办文件',
+      isLeader: 1,
       listApi: getEditArticalList
     },
     {
-    id: "1",
-    value: '我发布的文件',
-    label: '我发布的文件',
-    listApi: getMyArticalList
-  },
+      id: "1",
+      value: '我上传的文件',
+      label: '我上传的文件',
+      isLeader: 1,
+      listApi: getMyArticalList
+    },
+    {
+      id: "2",
+      value: '我审核的文件',
+      label: '我审核的文件',
+      isLeader: 2,
+      listApi: getConfirmArticalList
+    },
+    {
+      id: "3",
+      value: '我发布的文件',
+      label: '我发布的文件',
+      isLeader: 3,
+      listApi: getPublishArticalList
+    },
    {
-    id: "2",
+    id: "4",
     value: '我收藏的文件',
     label: '我收藏的文件',
     listApi: getArticalLikeList
   }, {
-    id: "3",
+    id: "5",
     value: '最近浏览的文件',
     label: '最近浏览的文件',
     listApi: getViewArticalList
   }, {
-    id: "4",
+    id: "6",
     value: '最近下载的文件',
     label: '最近下载的文件',
     listApi: getDownloadArticalList

+ 8 - 8
src/pages/other/components/IPanel.vue

@@ -1,6 +1,6 @@
 <template>
 
-    <div>  
+    <div>
         <el-card>
             <div slot="header" class="clearfix">
                 <span> {{categorys['laws']}}</span>
@@ -9,7 +9,7 @@
             <!--  -->
             <el-row :gutter="40" class="panel-group">
                 <el-col :xs="8" :sm="8" :lg="8" class="card-panel-col" v-for="(item,index) in [1,2,3]" :key="index">
-                    <div class="card-panel" @click="handleSetLineChartData('laws', item)">
+                    <div class="card-panel" @click="handleSetLineChartData(index)">
                         <div class="card-panel-icon-wrapper" :class="'color'+index">
                             <svg-icon icon-class="education" class-name="card-panel-icon" />
                         </div>
@@ -32,7 +32,7 @@
             <!--  -->
             <el-row :gutter="40" class="panel-group">
                 <el-col :xs="8" :sm="8" :lg="8" class="card-panel-col" v-for="(item,index) in [1,2,3]" :key="index">
-                    <div class="card-panel" @click="handleSetLineChartData('result', item)">
+                    <div class="card-panel" @click="handleSetLineChartData(index)">
                         <div class="card-panel-icon-wrapper" :class="'color'+index">
                             <svg-icon icon-class="chart" class-name="card-panel-icon" />
                         </div>
@@ -55,7 +55,7 @@
             <!--  -->
             <el-row :gutter="40" class="panel-group">
                 <el-col :xs="8" :sm="8" :lg="8" class="card-panel-col" v-for="(item,index) in [1,2,3]" :key="index">
-                    <div class="card-panel" @click="handleSetLineChartData('mechanism', item)">
+                    <div class="card-panel" @click="handleSetLineChartData(index)">
                         <div class="card-panel-icon-wrapper" :class="'color'+index">
                             <svg-icon icon-class="example" class-name="card-panel-icon" />
                         </div>
@@ -78,7 +78,7 @@
             <!--  -->
             <el-row :gutter="40" class="panel-group">
                 <el-col :xs="8" :sm="8" :lg="8" class="card-panel-col" v-for="(item,index) in [1,2,3]" :key="index">
-                    <div class="card-panel" @click="handleSetLineChartData('other', item)">
+                    <div class="card-panel" @click="handleSetLineChartData(index)">
                         <div class="card-panel-icon-wrapper" :class="'color'+index">
                             <svg-icon icon-class="guide" class-name="card-panel-icon" />
                         </div>
@@ -135,8 +135,8 @@ export default {
     }
   },
   methods: {
-    handleSetLineChartData(type) {
-      this.$emit('handleSetLineChartData', type)
+    handleSetLineChartData( index ) {
+      this.$emit('select', index )
     },
     getAccount( category, index){
         let key = category+index;
@@ -173,7 +173,7 @@ export default {
         .card-panel-icon-wrapper {
           color: #fff;
         }
-        
+
 
         .color0{
             background: #40c9c6;

+ 2 - 2
src/pages/other/file-info.vue

@@ -18,9 +18,9 @@
         <div>
           <el-row>
             <div class="fr mt10">
-              <el-button  type="text"  size="small" v-if="isLeader==2 && info.status==1 &&info.isOpen<2"
+              <el-button  size="small" v-if="isLeader==2 && info.status==1 &&info.isOpen<2"
                       @click="dialogConfirm=true">审核</el-button>
-              <el-button  type="text" size="small"  v-if="isLeader==3 && info.status==2 &&info.isOpen<2"
+              <el-button  size="small"  v-if="isLeader==3 && info.status==2 &&info.isOpen<2"
                       @click="dialogPublish=true">发布</el-button>
 
 

+ 14 - 6
src/pages/other/file-manage.vue

@@ -25,12 +25,12 @@
                 <el-button v-if="item.departmentId == department.departmentId" type="text">
                   {{ item.department}}
                 </el-button>
-                
-                
-                <el-button v-else type="text" style="color:#000">
-                  
+
+
+                <el-button v-else type="text" style="color:#000" >
+
                   {{ item.department}}
-                  
+
                 </el-button>
               </el-menu-item>
             </template>
@@ -49,7 +49,7 @@
           </div>
 
 
-          <IPanel :account="account" :departmentId="department.departmentId"></IPanel>
+          <IPanel :account="account" :departmentId="department.departmentId" @select="doSelect"></IPanel>
 
 
 
@@ -139,6 +139,14 @@ export default {
       this.form = o;
       this.dialogFormVisible = true
     },
+    doSelect( index ){
+      console.log( index, this.department )
+      if( index==0 && this.department.isLeader == 2 ){
+        this.$router.push( {path:'/file-confirm'})
+      }else if (index==1 && this.department.isLeader == 3 ){
+        this.$router.push( {path:'/file-publish'})
+      }
+    },
     getDepartmentAccount(){
       let departmentId = +this.department.departmentId;
       getDepartmentAccount( {departmentId}).then( res=>{

+ 26 - 10
src/pages/other/my-file.vue

@@ -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()
       // 切换文件列表