Przeglądaj źródła

添加核心报告、权限等

zhuliu 2 lat temu
rodzic
commit
92d7ba784e

+ 10 - 0
RMS-FrontEnd/src/api/report.js

@@ -531,5 +531,15 @@ export default {
   //报告可视化
   reportVisual(params){
     return axios.post('/report/api/report/reportVisual',params)
+  },
+
+  //添加核心结论
+  addConclusions(params){
+    return axios.post('/report/api/report/addConclusions',params)
+  },
+
+  //获得报告权限
+  getPermission(params){
+    return axios.get('/report/api/report/getPermission',{params})
   }
 }

+ 3 - 0
RMS-FrontEnd/src/main.js

@@ -21,6 +21,8 @@ import lodash from 'lodash'
 
 import {hasPermission} from './directives/permission';
 Vue.prototype.$permission = hasPermission
+
+import {reportPermission} from '@/utils/reportPermission'
 // import Directives from './directives/index'
 // Vue.use(Directives)
 
@@ -35,6 +37,7 @@ Vue.prototype.$c = Config
 Vue.prototype.$s = Storage
 Vue.prototype.$_ = lodash
 Vue.prototype.$r = hasRole
+Vue.prototype.$reportPermission = reportPermission
 // Vue.use(Charts)
 Vue.use(Particles)
 Vue.use(Element)

+ 21 - 0
RMS-FrontEnd/src/utils/reportPermission.js

@@ -0,0 +1,21 @@
+import Store from '@/store'
+
+export const reportPermission = (reportId, roles) => {
+    if(!reportId){
+        return true
+    }
+    const role = Store.getters.userinfo
+    const permissions = Store.getters && Store.getters.permissions
+    if(permissions.length==0){
+        return true
+    }
+    const reportRole = permissions[reportId]
+        var result = false
+        for(var item of reportRole){
+            if(roles.includes(item)){
+                result = true
+                break
+            }
+        }
+    return result
+  }

+ 5 - 5
RMS-FrontEnd/src/views/components/articles/ContrastIndex.vue

@@ -37,7 +37,7 @@
             </div>
            
             <div  style="  position: relative;">
-              <el-link v-for="item in menuList" :type="activeMenu === item.value ? 'primary' : undefined" @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
+              <el-link v-for="item in menuList" :type="activeMenu === item.value ? 'primary' : undefined" @click.native="handleSelect(item.value)" v-if="$permission('workspace/patent/worth')?true:item.value !='patentWorth'" :disabled="item.value === 'PatentExport' ? !$permission('/workspace/details/exportDocument'): false ">{{ item.label }}</el-link>
               <el-link v-for="item in menuList2" :type="activeMenu === item.value ? 'primary' : undefined" @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
               <el-tooltip class="item" effect="dark" :content="(showRight ? '隐藏' : '显示') + '右侧菜单'" placement="top" v-if="showcard==false">
                 <i :class="showRight ? 'el-icon-s-unfold' : 'el-icon-s-fold'" style="font-size: 25px;position: absolute; right: 10px; margin-top: 5px;color: #2f2f2f; cursor: pointer" @click="showRight = !showRight"></i>
@@ -181,10 +181,10 @@ export default {
           value: 'PatentPDF',
           label: '说明书'
         },
-        {
-          value: 'PatentExport',
-          label: '导出文档'
-        },
+        // {
+        //   value: 'PatentExport',
+        //   label: '导出文档'
+        // },
         {
           value:'Permit',
           label:'许可历史'

+ 5 - 5
RMS-FrontEnd/src/views/components/articles/index.vue

@@ -67,7 +67,7 @@
                 </div>
               
                 <div style="  position: relative;">
-                  <el-link v-for="item in menuList" :type="activeMenu === item.value ? 'primary' : undefined" :disabled="item.value === 'PatentExport' ? !$permission('/workspace/details/exportDocument'): false " @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
+                  <el-link v-for="item in menuList" :type="activeMenu === item.value ? 'primary' : undefined" v-if="$permission('workspace/patent/worth')?true:item.value !='patentWorth'" :disabled="item.value === 'PatentExport' ? !$permission('/workspace/details/exportDocument'): false " @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
                   <el-link v-for="item in menuList2" :type="activeMenu === item.value ? 'primary' : undefined" :disabled="item.value === 'PatentExport' ? !$permission('/workspace/details/exportDocument'): false " @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
                   <el-tooltip class="item" effect="dark" :content="(showRight ? '隐藏' : '显示') + '右侧菜单'" placement="top">
                     <i :class="showRight ? 'el-icon-s-unfold' : 'el-icon-s-fold'" style="font-size: 25px;position: absolute; right: 10px; margin-top: 5px;color: #2f2f2f; cursor: pointer" @click="showRight = !showRight"></i>
@@ -289,10 +289,10 @@ export default {
           value: 'PatentPDF',
           label: '说明书'
         },
-        {
-          value: 'PatentExport',
-          label: '导出文档'
-        },
+        // {
+        //   value: 'PatentExport',
+        //   label: '导出文档'
+        // },
         {
           value:'Permit',
           label:'许可历史'

+ 1 - 1
RMS-FrontEnd/src/views/layout/components/UserBar.vue

@@ -12,7 +12,7 @@
           <el-dropdown-item command="changePwd" v-if="$permission('/admin/updatePassword')" >修改密码</el-dropdown-item>
           <el-dropdown-item command="AnalysisSystem" v-if="$permission('/pcs/analysisSystem')">分析系统</el-dropdown-item>
           <el-dropdown-item command="clientble" v-if="$permission('/workspace/clientManage')">客户管理</el-dropdown-item>
-          <el-dropdown-item command="product" >产品管理</el-dropdown-item>
+          <el-dropdown-item command="product" v-if="$permission('/workspace/product')">产品管理</el-dropdown-item>
           <el-dropdown-item command="set">设置</el-dropdown-item>
           <el-dropdown-item divided command="doLogout">退出登录</el-dropdown-item>
         </el-dropdown-menu>

+ 8 - 1
RMS-FrontEnd/src/views/layout/index.vue

@@ -44,7 +44,7 @@
             <div v-if="header" style="margin-left:20px;width:100%">
               <div v-if="!report.taskName" style="display:flex;justify-content: space-between;">
                 <p>报告名称:{{ report.reportName?report.reportName:report.name}}</p>
-                <p class="menus" v-if="report.showMenu"><span v-if="[1,2].includes(report.status)&&[0,1,2,3].includes(report.type)"><el-link @click="handleFields">自定义字段</el-link></span><span v-if="[2,3].includes(report.status)"><el-link @click="exportReport">导出报告</el-link></span></p> 
+                <p class="menus" v-if=" report.showMenu && $reportPermission(report.id,[0,1])"><span v-if="[1,2].includes(report.status)&&[0,1,2,3].includes(report.type)"><el-link @click="handleFields">自定义字段</el-link></span><span v-if="[2,3].includes(report.status)"><el-link @click="exportReport">导出报告</el-link></span></p> 
               </div>
               <p v-else>
                 <span > 报告名称:<el-link @click.native="checkReport(report)" style="font-size:16px;vertical-align: inherit;margin-right: 20px;">{{ report.reportName?report.reportName:report.name}}</el-link></span>
@@ -140,6 +140,7 @@ export default {
   async created(){
     this.getPermissionList()
     await this.getUserinfo()
+    
   },
   async mounted() {
     this.aside = this.$route.meta.aside || false
@@ -150,9 +151,15 @@ export default {
     this.$store.commit('SET_PREFIX', '/admin')
     // await this.getUserinfo()
     this.DictMessage()
+    await this.getPermissions()
     // this.getSelect()
   },
   methods: {
+    //获取报告权限
+   async getPermissions(){
+      const response = await this.$api.getPermission()
+      this.$store.commit('SET_PERMISSIONS', response.data)
+    },
     //自定义字段
     handleFields() {
       this.setVisible = true

+ 1 - 1
RMS-FrontEnd/src/views/product/components/product.vue

@@ -6,7 +6,7 @@
         <el-input v-model.trim="queryParams.productName" size="small" placeholder="请输入产品名称" style="width: 200px;margin-right: 10px;"></el-input>
         <el-input v-model.trim="queryParams.companyName" size="small" placeholder="请输入产品所属公司名称" style="width: 200px;margin-right: 10px;"></el-input>
           <el-button type="primary" size="small" @click="getList2">查询</el-button>
-          <el-button type="primary" size="small" @click="handleAdd">新增类别</el-button>
+          <el-button type="primary" size="small" @click="handleAdd" v-if="$permission('/workspace/product/addCategory')">新增类别</el-button>
           <el-dropdown @command="handleCommandAdd">
             <el-button type="primary" size="small">
               新增产品<i class="el-icon-arrow-down el-icon--right"></i>

+ 4 - 2
RMS-FrontEnd/src/views/report/Invalid/InvalidPage/Result.vue

@@ -4,7 +4,7 @@
     <div class="menu">
       <div v-if="!taskType">
         <el-button @click="changeShow" type="primary" :plain="!isSelect">对比结果查看</el-button>
-        <el-button @click="changeShow2" type="primary" :plain="isSelect" >对比方案选择</el-button>
+        <el-button @click="changeShow2" type="primary" :plain="isSelect" v-if=" $reportPermission(reportId,[0,1])">对比方案选择</el-button>
       </div>
       <el-select placeholder="请选择显示类型" v-model="Type" style="margin-left: 10px;" @change="TypeSelect($event)" >
             <el-option label="仅显示主权要" value="1"></el-option>
@@ -407,6 +407,7 @@ export default {
           value: 2
         },
       ],
+      
 
     }
   },
@@ -433,7 +434,7 @@ export default {
       this.$nextTick(() => {
               this.setHeight()
       })
-    }
+    },
   },
   computed:{
     dataHeight(){
@@ -460,6 +461,7 @@ export default {
     this.getContrastList()
   },
   methods: {
+    
     changeRight(val){
       this.tableData2 = this.tableData.filter(item=>item.rightId == this.ruleForm.type)
       this.getSpanArr(this.tableData2)

+ 14 - 13
RMS-FrontEnd/src/views/report/components/Card.vue

@@ -5,26 +5,27 @@
                 <el-card shadow="always" style="background:white;box-shadow:2px 2px 10px #909090" class="card">
                 <p style="font-size:18px"><b> <el-link type="primary" style="font-size:18px;font-weight:bolder" @click="tableName(item)">{{item.name}}</el-link></b> </p>
                 <div class="fun" style="color:blue;display:flex;justify-content: flex-end;">
-                    <span style="margin-right: 10px;"  @click="handleEdit(item)">编辑</span>
+                    <span style="margin-right: 10px;"  @click="handleEdit(item)" v-if="$reportPermission(item.id,[0,1])">编辑</span>
+                    <span style="margin-right: 10px;"  @click="handleEdit(item)" v-else>查看</span>
                     <el-dropdown @command="handleCommand($event, item)" trigger="click">
                       <span class="el-dropdown-link">
                         <i class="el-icon-more" style="font-size: 16px;"></i>
                       </span>
                       <el-dropdown-menu slot="dropdown" class="text-align_center" >
-                        <el-dropdown-item command="0">分享</el-dropdown-item>
-                        <el-dropdown-item command="1" v-if="[2,3].includes(item.status)">导出报告</el-dropdown-item>
-                        <el-dropdown-item command="2" v-if="[2,3].includes(item.status)">报告文档</el-dropdown-item>
-                        <el-dropdown-item command="3" v-if="[1,2].includes(item.status)">自定义字段</el-dropdown-item>
-                        <el-dropdown-item command="4" v-if="[2].includes(item.status)&& item.type != 4">任务分配</el-dropdown-item>
-                        <el-dropdown-item command="5" v-if="[1].includes(item.status) || (item.type == 4&& [1,2,3].includes(item.status))">{{!([3,4].includes(item.type))?'拆分特征':'产品信息录入'}}</el-dropdown-item>
-                        <el-dropdown-item command="8" v-if="(item.type == 4 && [1,2].includes(item.status))">专利与产品关联比对</el-dropdown-item>
-                        <el-dropdown-item command="9" v-if="(item.type == 5 && [1,2].includes(item.status))"> 规避方案填写</el-dropdown-item>
-                        <el-dropdown-item command="10" v-if="[0,1,2,3].includes(item.type)&&[2].includes(item.status)"> 添加对比文件</el-dropdown-item>
-                        <el-dropdown-item command="11" v-if="item.status!=3"> 完成报告</el-dropdown-item>
-                        <el-dropdown-item command="12"> 追踪报告</el-dropdown-item>
+                        <el-dropdown-item command="0" v-if="$reportPermission(item.id,[0,1])">分享</el-dropdown-item>
+                        <el-dropdown-item command="1" v-if="[2,3].includes(item.status) && $reportPermission(item.id,[0,1])">导出报告</el-dropdown-item>
+                        <el-dropdown-item command="2" v-if="[2,3].includes(item.status) && $reportPermission(item.id,[0,1])">报告文档</el-dropdown-item>
+                        <el-dropdown-item command="3" v-if="[1,2].includes(item.status) && $reportPermission(item.id,[0,1])">自定义字段</el-dropdown-item>
+                        <el-dropdown-item command="4" v-if="[2].includes(item.status)&& item.type != 4 && $reportPermission(item.id,[0,1])">任务分配</el-dropdown-item>
+                        <el-dropdown-item command="5" v-if="([1].includes(item.status) || (item.type == 4&& [1,2,3].includes(item.status))) && $reportPermission(item.id,[0,1])">{{!([3,4].includes(item.type))?'拆分特征':'产品信息录入'}}</el-dropdown-item>
+                        <el-dropdown-item command="8" v-if="(item.type == 4 && [1,2].includes(item.status)) && $reportPermission(item.id,[0,1])">专利与产品关联比对</el-dropdown-item>
+                        <el-dropdown-item command="9" v-if="(item.type == 5 && [1,2].includes(item.status)) && $reportPermission(item.id,[0,1])"> 规避方案填写</el-dropdown-item>
+                        <el-dropdown-item command="10" v-if="[0,1,2,3].includes(item.type)&&[2].includes(item.status) && $reportPermission(item.id,[0,1])"> 添加对比文件</el-dropdown-item>
+                        <el-dropdown-item command="11" v-if="item.status!=3 && $reportPermission(item.id,[0,1])"> 完成报告</el-dropdown-item>
+                        <el-dropdown-item command="12"  v-if="$reportPermission(item.id,[0,1])">添加追踪报告</el-dropdown-item>
 
                         <!-- <el-dropdown-item command="6" v-if="[2,3].includes(item.status)&& item.type != 4">导入 </el-dropdown-item> -->
-                        <el-dropdown-item command="7" divided style="color: red;">删除 </el-dropdown-item>
+                        <el-dropdown-item command="7" divided style="color: red; " v-if="$reportPermission(item.id,[0,1])">删除 </el-dropdown-item>
                         <!-- <el-dropdown-item command="0">分享</el-dropdown-item> -->
                         <!-- <el-dropdown-item command="1">导出报告</el-dropdown-item>
                         <el-dropdown-item command="2">报告文档</el-dropdown-item>

+ 24 - 11
RMS-FrontEnd/src/views/report/components/CreateReport.vue

@@ -22,20 +22,20 @@
                 active-color="#13ce66"
                 inactive-color="#ff4949"
                 @change="changeStatus"
-                active-value="3"
+                :active-value="3"
                 inactive-value="0">
               </el-switch>
             </el-form-item> 
-            <el-form-item label="核心结论" v-if="form.status == 3">
+            <el-form-item label="核心结论" v-if="!form.id && form.status == 3">
               <el-checkbox-group v-model="form.conclusionIds">
                 <el-checkbox v-for="item in conclusion" :key="item.dictChildValue" :label="item.dictChildValue">{{ item.dictChildLabel }}</el-checkbox>
               </el-checkbox-group>
             </el-form-item>
-            <el-form-item label="结论论述" v-if="form.status == 3">
+            <el-form-item label="结论论述" v-if="!form.id &&form.status == 3">
               <el-input v-model="form.cronConclusion" type="textarea" placeholder="请输入结论论述"></el-input>
             </el-form-item>
-            <el-form-item label="后续跟进事项" v-if="form.status == 3">
-             <span v-if="form.follows"><span v-for="item in form.follows" :key="item.followUpName" style="margin-right:10px">{{ item.followUpName}}</span></span> 
+            <el-form-item label="后续跟进事项" v-if="!form.id &&form.status == 3">
+             <span v-if="form.followUps"><span v-for="item in form.followUps" :key="item.followUpName" style="margin-right:10px">{{ item.followUpName}}</span></span> 
               <span>
                 <el-popover
                 ref="popover"
@@ -107,7 +107,7 @@
               <el-input type='textarea' v-model="form.remark" autocomplete="off" placeholder="请输入备注"></el-input>
             </el-form-item>
         </el-form>
-        <span slot="footer" class="dialog-footer">
+        <span slot="footer" class="dialog-footer" v-if="$reportPermission(form.id,[0,1])">
               <el-button @click="handleClose">取 消</el-button>
               <el-button type="primary" @click="ifDialog" >确 定</el-button>
         </span>
@@ -612,11 +612,12 @@ export default {
             })
           if(val.indexOf(id)!=-1){
             if(index2==-1){
-              this.copyList.splice(index,0,this.copyIndex)
+              this.copyList.splice(index+1,0,this.copyIndex)
             }
           }else{
             if(index2!=-1){
               this.copyList.splice(index2,1)
+              this.form.copyIds.splice(this.form.copyIds.indexOf(this.copyIndex.dictChildValue),1)
             }
           }
         }else{
@@ -645,9 +646,15 @@ export default {
         this.form.departmentId = ''
         a = '创建'
       }
+      if(this.form.clientId == 0){
+        this.form.clientId = null
+      }
       if(dictMessage){
         this.dictMessage.REPORT_TYPE = dictMessage
       }
+      if(row.track && this.form.status == 3){
+        this.changeStatus(3)
+      }
       var reportType = this.dictMessage.REPORT_TYPE.filter(item=>{return item.dictChildValue == this.form.type})[0].dictChildLabel
       this.title = a + reportType + '报告'
       if(row.track){
@@ -663,7 +670,7 @@ export default {
         var arr = this.copyList?this.copyList.map(item=>{return item.dictChildValue}):[]
         this.$set(this.form,'copyIds',arr)
       }
-      if(this.form.signPatentNo ){
+      if(this.form.signPatentNo && !row.track){
         this.$set(this.form,'name',this.form.signPatentNo + reportType)
       }
       this.showDialog = true
@@ -706,7 +713,7 @@ export default {
             }
           }
         })
-        this.form.follows = list
+        this.form.followUps = list
         this.$refs.popover.showPopper = false
         
       }catch(e){
@@ -736,7 +743,7 @@ export default {
                             assistPerson:'',
                             timeLimit:''
                         }
-                        this.form.follows.forEach(item=>{
+                        this.form.followUps.forEach(item=>{
                             var a = false
                             for(let key in keyList){
                                 if(item[key] !='' && item[key] != null){
@@ -772,7 +779,6 @@ export default {
                     }  
                  return false
             }
-            console.log(1)
             this.$confirm('是否需要审核?', '提示', {
                       confirmButtonText: '是',
                       cancelButtonText: '否',
@@ -853,6 +859,9 @@ export default {
     },
     // 弹出框关闭
     handleClose() {
+      if(!this.form.id){
+        this.getPermissions()
+      }
       this.copyIndex = {}
       this.matterType = null
       this.$refs.upload.clearFiles()
@@ -862,6 +871,10 @@ export default {
       this.show = 0
       this.form = {}
     },
+    async getPermissions(){
+      const response = await this.$api.getPermission()
+      this.$store.commit('SET_PERMISSIONS', response.data)
+    },
     handleClose2(){
       this.showPerson = false
     },

+ 14 - 14
RMS-FrontEnd/src/views/report/components/Tabel.vue

@@ -43,21 +43,22 @@
       <el-table-column label="操作" align="center" width="200px">
         <template slot-scope="scope">
           <el-dropdown @command="handleCommand($event, scope.row)" split-button type="primary" size="small"  @click="handleEdit(scope.row)">
-            <p >编辑</p>
+            <p v-if="$reportPermission(scope.row.id,[0,1])">编辑</p>
+            <p v-else>查看</p>
             <el-dropdown-menu slot="dropdown" class="text-align_center">
-              <el-dropdown-item command="0">分享</el-dropdown-item>
-              <el-dropdown-item command="1" v-if="[2,3].includes(scope.row.status)">导出报告</el-dropdown-item>
-              <el-dropdown-item command="2" v-if="[2,3].includes(scope.row.status)">报告文档</el-dropdown-item>
-              <el-dropdown-item command="3" v-if="[1,2].includes(scope.row.status)&&[0,1,2,3].includes(scope.row.type)">自定义字段</el-dropdown-item>
-              <el-dropdown-item command="4" v-if="[2].includes(scope.row.status)&& [0,1,2,3].includes(scope.row.type)">任务分配</el-dropdown-item>
-              <el-dropdown-item command="5" v-if="[1].includes(scope.row.status) || (scope.row.type == 4 && [1,2,3].includes(scope.row.status))">{{!([3,4].includes(scope.row.type))?'拆分特征':'产品信息录入'}}</el-dropdown-item>
-              <el-dropdown-item command="8" v-if="(scope.row.type == 4 && [1,2].includes(scope.row.status))">专利与产品关联比对</el-dropdown-item>
-              <el-dropdown-item command="9" v-if="(scope.row.type == 5 && [1,2].includes(scope.row.status))"> 规避方案填写</el-dropdown-item>
-              <el-dropdown-item command="10" v-if="[0,1,2,3].includes(scope.row.type)&&[2].includes(scope.row.status)"> 添加对比文件</el-dropdown-item>
-              <el-dropdown-item command="11" v-if="scope.row.status!=3"> 完成报告</el-dropdown-item>
-              <el-dropdown-item command="12"> 追踪报告</el-dropdown-item>
+              <el-dropdown-item command="0" v-if="$reportPermission(scope.row.id,[0,1])">分享</el-dropdown-item>
+              <el-dropdown-item command="1" v-if="[2,3].includes(scope.row.status) && $reportPermission(scope.row.id,[0,1])">导出报告</el-dropdown-item>
+              <el-dropdown-item command="2" v-if="[2,3].includes(scope.row.status) && $reportPermission(scope.row.id,[0,1])">报告文档</el-dropdown-item>
+              <el-dropdown-item command="3" v-if="[1,2].includes(scope.row.status)&&[0,1,2,3].includes(scope.row.type) && $reportPermission(scope.row.id,[0,1])">自定义字段</el-dropdown-item>
+              <el-dropdown-item command="4" v-if="[2].includes(scope.row.status)&& [0,1,2,3].includes(scope.row.type) && $reportPermission(scope.row.id,[0,1])">任务分配</el-dropdown-item>
+              <el-dropdown-item command="5" v-if="([1].includes(scope.row.status) || (scope.row.type == 4 && [1,2,3].includes(scope.row.status))) && $reportPermission(scope.row.id,[0,1])">{{!([3,4].includes(scope.row.type))?'拆分特征':'产品信息录入'}}</el-dropdown-item>
+              <el-dropdown-item command="8" v-if="(scope.row.type == 4 && [1,2].includes(scope.row.status)) && $reportPermission(scope.row.id,[0,1])">专利与产品关联比对</el-dropdown-item>
+              <el-dropdown-item command="9" v-if="(scope.row.type == 5 && [1,2].includes(scope.row.status)) && $reportPermission(scope.row.id,[0,1])"> 规避方案填写</el-dropdown-item>
+              <el-dropdown-item command="10" v-if="[0,1,2,3].includes(scope.row.type)&&[2].includes(scope.row.status) && $reportPermission(scope.row.id,[0,1])"> 添加对比文件</el-dropdown-item>
+              <el-dropdown-item command="11" v-if="scope.row.status!=3 && $reportPermission(scope.row.id,[0,1])"> 完成报告</el-dropdown-item>
+              <el-dropdown-item command="12" v-if="$reportPermission(scope.row.id,[0,1])">添加追踪报告</el-dropdown-item>
               <!-- <el-dropdown-item command="6" v-if="[2,3].includes(scope.row.status)&& scope.row.type != 4">导入 </el-dropdown-item> -->
-              <el-dropdown-item command="7" divided style="color: red;">删除 </el-dropdown-item>
+              <el-dropdown-item command="7" divided style="color: red;" v-if=" $reportPermission(scope.row.id,[0,1])">删除 </el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
         </template>
@@ -97,7 +98,6 @@ export default {
         return false
       }
       const offsetBodyHeight = body.offsetHeight
-      console.log(offsetTop,offsetBodyHeight)
       if (this.data.length && offsetBodyHeight < offsetTop) {
         this.tableHeight = offsetBodyHeight + 75
       } else if (!this.data.length) {

+ 143 - 0
RMS-FrontEnd/src/views/report/components/cronConclusion.vue

@@ -0,0 +1,143 @@
+<template>
+    <div>
+        <el-form :model="form" label-width="120px">
+            <el-form-item label="核心结论">
+              <el-checkbox-group v-model="form.conclusionIds">
+                <el-checkbox v-for="item in conclusion" :key="item.dictChildValue" :label="item.dictChildValue">{{ item.dictChildLabel }}</el-checkbox>
+              </el-checkbox-group>
+            </el-form-item>
+            <el-form-item label="结论论述" >
+              <el-input v-model="form.cronConclusion" type="textarea" placeholder="请输入结论论述"></el-input>
+            </el-form-item>
+            <el-form-item label="后续跟进事项">
+             <span v-if="form.followUps"><span v-for="item in form.followUps" :key="item.followUpName" style="margin-right:10px">{{ item.followUpName}}</span></span> 
+              <span>
+                <el-popover
+                ref="popover"
+                placement="bottom"
+                @hide="hidePopover"
+                @show="showPopover"
+                trigger="click">
+                <div>
+                  <addMatter :type="matterType" :sign="matterSign" @value="getMatter"></addMatter>
+                </div>
+                <el-button slot="reference">添加后续事项</el-button>
+              </el-popover>
+              </span>
+              
+            </el-form-item>
+            <el-form-item>
+                <div style="display:flex;justify-content:center">
+                    <el-button type="primary" @click="submitForm()" size="small" style="width:100px" :loading="btnLoading">保存</el-button>
+                    <el-button  @click="resetForm()" size="small" style="width:100px">取消</el-button>
+                </div>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+import addMatter from "./matter/addMatter.vue";
+export default {
+    components:{
+        addMatter,
+    },
+    data() {
+        return {
+            form:{
+                conclusionIds:[]
+            },
+            matterSign:false,
+            matterType:null,
+            btnLoading:false,
+            conclusion:[],
+            reportAsDicItem:{
+                "0":"INVALID_ASSESS",
+                "1":"THIRD_ASSESS",
+                "2":"STABILITY_ASSESS",
+                "3":"FTO_ASSESS",
+                "4":"TORT_ASSESS",
+                "5":"AVOID_ASSESS",
+            },
+        }
+    },
+    computed: {
+        dictMessage() {
+            return this.$store.state.dictMessage.dictMessage
+        },
+    },
+    mounted() {
+    },
+    methods: {
+        //打开弹窗
+        open(row){
+            this.matterType = 2
+            this.form = {
+                conclusionIds:[],
+                reportId :row.id 
+            }
+            this.conclusion = this.dictMessage[this.reportAsDicItem[row.type]]
+        },
+        //隐藏popover
+        hidePopover(){
+            this.matterSign = true
+        },
+        //显示popover
+        showPopover(){
+            this.matterSign = false
+        },
+        //获取后续事项
+        getMatter(val){
+            this.matterSign = false
+            try{
+                var keyList={
+                    followUpName:'',
+                    remark:'',
+                    agent:'',
+                    assistPerson:'',
+                    timeLimit:''
+                }
+                var list = []
+                val.forEach(item=>{
+                var a = false
+                for(let key in keyList){
+                    if(item[key] !='' && item[key] != null){
+                    a = true
+                    }
+                }
+                if(a == true){
+                    if(item.followUpName!='') {
+                    list.push(item)              
+                    }else{
+                    throw new Error()
+                    }
+                }
+                })
+                this.form.followUps = list
+                this.$refs.popover.showPopper = false
+                
+            }catch(e){
+                this.$message.error('后续事项名称不能为空')
+                this.$refs.popover.showPopper = true
+            }  
+        },
+        //添加核心结论
+        submitForm(){
+            this.$api.addConclusions(this.form).then(response=>{
+                if(response.code == 200){
+                    this.$message.success('核心结论添加成功')
+                    this.resetForm()
+                }
+            }).catch(error=>{
+                this.$message.error('核心结论添加失败')
+            })
+        },
+        //关闭弹窗
+        resetForm(){
+            this.matterSign=false,
+            this.matterType=null,
+            this.$emit('dialog',this.form.reportId)
+        }
+
+    },
+}
+</script>

+ 43 - 3
RMS-FrontEnd/src/views/report/index.vue

@@ -105,6 +105,11 @@
       <shareReport :reportId="reportId"></shareReport>
     </el-drawer>
 
+    <!-- 添加核心结论 -->
+    <el-dialog width="800px" title="添加核心结论" :visible.sync="conclusionVisible" :efore-close="closeConclusion">
+      <Cron-Conclusion ref="cronConclusion" :reportId="reportId" @dialog="getDialog"></Cron-Conclusion>
+    </el-dialog>
+
     <project-file-drawer  ref="projectFileDrawer" />
     </div>
 </template>
@@ -120,6 +125,8 @@ import { downLoad2 } from "@/utils";
 
 import shareReport from './components/share/shareReport.vue';
 import ReportVisual from './components/visual/reportVisual.vue';
+
+import CronConclusion from './components/cronConclusion.vue';
 export default {
   components: {
     ReportTabel,
@@ -129,10 +136,12 @@ export default {
     ReportTemplate,
     ProjectFileDrawer,
     shareReport,
-    ReportVisual
+    ReportVisual,
+    CronConclusion
   },
   data() {
     return {
+      conclusionVisible:false,
       drawer:false,
       btnLoading:false,
       reportTemplate:false,
@@ -389,6 +398,10 @@ export default {
       var form = JSON.parse(JSON.stringify(row))
       this.$set(form,'associateReportName',row.volumeNumber?row.volumeNumber:row.name)
       this.$set(form,'associateReportId',row.id)
+      if(isNaN((row.name).substring((row.name).length-1))){
+        form.name = row.name + '-V1'
+      }
+      form.id = null
       form.track = true
       this.$refs.ReportForm.open(form)
     },
@@ -401,9 +414,31 @@ export default {
       this.reportId  = row.id
       this.drawer = true
     },
+     //获取弹窗状态
+     getDialog(val){
+        this.closeConclusion()
+          var a = {
+            reportId:val,
+            status:3
+          }
+          this.$api.UpdateStatus(a).then(response=>{
+            if(response.code == 200){
+              this.$message.success('该报告已完成')
+              this.getList()
+            }
+          })
+      },
+      //关闭弹窗
+      closeConclusion(){
+        this.conclusionVisible = false
+      },
     //完成报告
     completeReport(row){
-      
+      this.conclusionVisible = true
+      this.$nextTick(()=>{
+        this.$refs.cronConclusion.open(row)
+      })
+      return false
       this.$confirm('确定将该报告置为完成?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
@@ -555,7 +590,12 @@ export default {
     },
     getList2(){
       this.getList()
-      this.reportVisual()
+      if(this.queryShowType == 2){
+        this.$nextTick(()=>{
+          this.reportVisual()
+        })
+      }
+      
     },
     getParams(params){
       console.log(params)

+ 3 - 3
RMS-FrontEnd/src/views/report/reportDetails/components/ContrastPlan.vue

@@ -1,8 +1,8 @@
 <template>
     <div class="plan">
       <div style="display:flex; justify-content:flex-end;align-items: center;height: 50px;">
-        <el-button @click="exportReport">导出报告</el-button>
-        <el-button type="danger" @click="delPlan" v-if="checkList.length>0">删除</el-button>
+        <el-button @click="exportReport" v-if="$reportPermission(reportId,[0,1])">导出报告</el-button>
+        <el-button type="danger" @click="delPlan" v-if="checkList.length>0 && $reportPermission(reportId,[0,1])">删除</el-button>
       </div>
         <!-- <el-table
         v-if="show"
@@ -195,7 +195,7 @@
             <div >
               <el-checkbox-group v-model="checkList" >
                 <el-checkbox :label="scope.row.PlanId"  >
-                  <p ><span>{{ scope.row.resultant}} </span><span><el-link style="color:red;margin-left:10px" @click.prevent="delPlan(scope.row.PlanId)">删除</el-link></span></p>
+                  <p ><span>{{ scope.row.resultant}} </span><span v-if="$reportPermission(reportId,[0,1])"><el-link style="color:red;margin-left:10px" @click.prevent="delPlan(scope.row.PlanId)">删除</el-link></span></p>
                 </el-checkbox>
               </el-checkbox-group>
             </div>

+ 2 - 2
RMS-FrontEnd/src/views/report/reportDetails/components/SelectedPatent.vue

@@ -9,8 +9,8 @@
                   <i :class="showRight ? 'el-icon-s-unfold' : 'el-icon-s-fold'" style="font-size: 25px; margin-left: 10px;color: #2f2f2f; cursor: pointer" @click="showRight = !showRight" ></i>
               </el-tooltip>
             </div>
-            <el-button @click="importPatent(reportId,true)" type="primary" size="small" style=" margin-left: 10px;" >导入</el-button>
-            <el-button @click="taskFeil" type="primary" size="small" style="margin-left: 10px;" v-if="row.status!=3">任务分配</el-button>
+            <el-button @click="importPatent(reportId,true)" type="primary" size="small" style=" margin-left: 10px;" v-if="$reportPermission(reportId,[0,1])">导入</el-button>
+            <el-button @click="taskFeil" type="primary" size="small" style="margin-left: 10px;" v-if="row.status!=3 && $reportPermission(reportId,[0,1])">任务分配</el-button>
             <!-- <el-button @click="taskWork" type="primary" size="small" style="float: right; margin-left: 10px;" >协同办公</el-button> -->
             <div >
                 <div class="btnSelected" @click="sift" style="width:80px;height:32px;right: 100px;display:flex;justify-content:space-around;border-radius:5px; cursor: pointer; ">

+ 1 - 1
RMS-FrontEnd/src/views/report/reportDetails/components/basicMessage.vue

@@ -44,7 +44,7 @@
                       <Menu :data="item" @delFile="delFile"></Menu>
                     </div>
                 </div>
-                <el-upload v-if="!noEdit1" ref="upload" class="upload-file" drag action="#" :auto-upload="false" :show-file-list="true" :on-change="onChange" multiple   :on-preview="handlePreview" :on-remove="handleRemove">
+                <el-upload v-if="!noEdit1 && Object.keys(form).length>1 && $reportPermission(reportId,[0,1])" ref="upload" class="upload-file" drag action="#" :auto-upload="false" :show-file-list="true" :on-change="onChange" multiple   :on-preview="handlePreview" :on-remove="handleRemove">
                     <i :class="!file ? 'el-icon-upload' : 'el-icon-refresh'"></i>
                     <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
                     <div class="el-upload__tip" slot="tip"></div>