Bläddra i källkod

添加权限及修改bug

zhuliu 2 år sedan
förälder
incheckning
6acc1beda6

+ 2 - 2
RMS-FrontEnd/src/config/index.js

@@ -1,7 +1,7 @@
 export default {
     baseURL: "/api",
     host: window.location.host,
-    staticURL: process.env.NODE_ENV === 'production' ? 'http://139.224.24.90:8084' : (process.env.NODE_ENV === 'test'?'http://139.224.24.90:8083':'http://192.168.1.24:8084'),
-    staticURL2: process.env.NODE_ENV === 'production' ? 'http://139.224.24.90:8081' : (process.env.NODE_ENV === 'test'?'http://139.224.24.90:8083':'http://192.168.1.24:8081'),
+    staticURL: process.env.NODE_ENV === 'production' ? window.location.protocol+'//'+window.location.hostname+':8084' : (process.env.NODE_ENV === 'test'?'http://139.224.24.90:8083':'http://192.168.1.24:8084'),
+    staticURL2: process.env.NODE_ENV === 'production' ? window.location.protocol+'//'+window.location.hostname+':8081' : (process.env.NODE_ENV === 'test'?'http://139.224.24.90:8083':'http://192.168.1.24:8081'),
     pasURL:process.env.NODE_ENV === 'production' ? window.location.protocol+'//'+window.location.hostname+':80' :(process.env.NODE_ENV === 'test'?window.location.protocol+'//'+window.location.hostname+':8080':window.location.protocol+'//'+window.location.hostname+':8085') ,
 }

+ 1 - 1
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)" 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 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>

+ 1 - 1
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" 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 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>

+ 2 - 1
RMS-FrontEnd/src/views/layout/mixins/index.js

@@ -4,7 +4,8 @@ import Store from '@/store'
 export const webSocket = {
   methods: {
     connectWebSocket(userId) {
-      let webSocket = new WebSocket(`ws://139.224.24.90:8872/api/report/api/ws/`+userId)
+      // let webSocket = new WebSocket(`ws://139.224.24.90:8872/api/report/api/ws/`+userId)
+      let webSocket = new WebSocket(`ws://192.168.1.24:8872/api/report/api/ws/`+userId)
       Store.commit('SET_WEB_SOCKET', webSocket)
       webSocket.onopen = () => {
         console.log('WebSocket连接成功')

+ 1 - 1
RMS-FrontEnd/src/views/report/FTO/FTOPage/ReportDetails/index.vue

@@ -3,7 +3,7 @@
         <el-container>
         <el-aside width="210px" style="overflow:hidden" class="patent-articles-menu">
           <el-menu class="theme-dark" :default-active="activeMenu" @select="handleSelect">
-            <el-menu-item v-for="item in menuList" :index="item.path" v-if="item.show">
+            <el-menu-item v-for="item in menuList" :index="item.path" v-if="item.show && (item.path=='TaskDetails'?$reportPermission(reportId,[0,1]):true)">
               <i class="el-icon-film"></i>
               <span slot="title">{{item.title}}</span>
             </el-menu-item>

+ 1 - 1
RMS-FrontEnd/src/views/report/FTO/FTOPage/components/ProductMessage.vue

@@ -3,7 +3,7 @@
         <el-container>
             <el-main  style="border:0;padding:20px 20px 20px;">
                 <div class="header1">
-                    <el-button  @click="changEdit()" v-if="!noEdit1 && !isEdit">编辑</el-button>
+                    <el-button  @click="changEdit()" v-if="!noEdit1 && !isEdit && $reportPermission(reportId,[0,1])">编辑</el-button>
                     <el-button type="primary" @click="saveProduct" v-if="!noEdit1 && isEdit">保存</el-button>
                 </div>
                 <div class="demo-input-suffix" style="width:800px;margin:0 auto">

+ 1 - 1
RMS-FrontEnd/src/views/report/FTO/FTOPage/components/ProductResult.vue

@@ -5,7 +5,7 @@
             <el-aside style="background:white" :style="{width:'calc(100% - ' + width +')'}">
                 <div style="display:flex; justify-content:flex-end;align-items:center;margin-bottom: 10px;">
                     <!-- <el-button @click="choice" type="primary" size="small" >选择专利</el-button> -->
-                    <el-button @click="taskWork" type="primary" size="small" >协同办公</el-button>
+                    <el-button @click="taskWork" type="primary" size="small" v-if="$reportPermission(reportId,[0,1])">协同办公</el-button>
                     <el-dropdown size="medium" style="margin:10px 20px 10px 20px">
                         <el-button type="primary" size="small" >
                             创建报告<i class="el-icon-arrow-down el-icon--right"></i>

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

@@ -80,7 +80,9 @@
                       <el-popover
                         placement="bottom"
                         width="200"
-                        trigger="click">
+                        trigger="click"
+                        v-if="$reportPermission(reportId,[0,1])"
+                        >
                         <p>将本文件(<span style="color:red">{{ item.patentNo }}</span>)作为:</p>
                         <el-tree
                           ref="tree"
@@ -125,7 +127,9 @@
                       <el-popover
                         placement="bottom"
                         width="200"
-                        trigger="click">
+                        trigger="click"
+                        v-if="$reportPermission(reportId,[0,1])"
+                        >
                         <p>将本文件(<span style="color:red">{{ scope.row.patentNo }}</span>)作为:</p>
                         <el-tree
                           ref="tree"

+ 1 - 1
RMS-FrontEnd/src/views/report/avoid/avoidAsid/index.vue

@@ -3,7 +3,7 @@
       <el-container>
       <el-aside width="210px" style="overflow:hidden" class="patent-articles-menu">
         <el-menu class="theme-dark" :default-active="activeMenu" @select="handleSelect">
-          <el-menu-item v-for="item in menuList" :index="item.path" >
+          <el-menu-item v-for="item in menuList" :index="item.path" v-if="item.path=='TaskDetails'?$reportPermission(reportId,[0,1]):true">
             <i class="el-icon-film"></i>
             <span slot="title">{{item.title}}</span>
           </el-menu-item>

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

@@ -637,7 +637,7 @@ export default {
       this.tenantType = this.userinfo.tenantType
       this.verify=true
       var a = ''
-      this.form = row
+      this.form = JSON.parse(JSON.stringify(row))
       if(this.form.clientId&&this.form.personId){
         this.form.clientId = Number(row.clientId)
       this.form.personId = Number(row.personId)

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

@@ -101,7 +101,7 @@ export default {
                 var a = false
                 for(let key in keyList){
                     if(item[key] !='' && item[key] != null){
-                    a = true
+                        a = true
                     }
                 }
                 if(a == true){

+ 1 - 1
RMS-FrontEnd/src/views/report/components/matter/addMatter.vue

@@ -47,7 +47,7 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item>
-            <div style="display:flex;justify-content:center" v-if="formData[0].status == '进行中'">
+            <div style="display:flex;justify-content:center" v-if="formData[0].status != '已完成'">
                 <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>

+ 34 - 2
RMS-FrontEnd/src/views/report/components/matter/remarryMatter.vue

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <div style="display: flex;justify-content: flex-end; margin-bottom: 20px;">
+        <div style="display: flex;justify-content: flex-end; margin-bottom: 20px;" v-if="$reportPermission(reportId,[0,1])">
             <el-dropdown trigger="click" split-button type="primary" size="small" @command="handleCommand($event)" >
                <span @click="handleClick(1)">添加后续事项</span>
                 <el-dropdown-menu slot="dropdown" class="text-align_center">
@@ -369,6 +369,7 @@ export default {
         closeRegister(){
             this.type = null
             this.registerForm = {}
+            this.file = []
             if(this.registerForm.type==1 || this.registerForm.edit){
                 this.$refs.upload.clearFiles()
             }
@@ -376,8 +377,36 @@ export default {
         },
         //获取后续事项
         getMatter(val){
-            this.registerForm.followUps = 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.registerForm.followUps = list
+                
+            }catch(e){
+                this.$message.error('后续事项名称不能为空')
+            }  
         },
         //编辑事项结果
         editRegister(){
@@ -429,6 +458,9 @@ export default {
                     formData.append("files", this.file[i]);
                     }
                 }
+                if(this.registerForm.type == 1){
+                    this.registerForm.filesVOs = null
+                }
                 this.registerForm.followUpId = this.registerForm.id
                 formData.append('register',JSON.stringify(this.registerForm))
                 this.$api.register(formData).then(response=>{

+ 5 - 1
RMS-FrontEnd/src/views/report/index.vue

@@ -400,7 +400,11 @@ export default {
       this.$set(form,'associateReportId',row.id)
       if(isNaN((row.name).substring((row.name).length-1))){
         form.name = row.name + '-V1'
+      }else{
+       var a= Number((row.name).substring((row.name).length-1)) + 1
+       form.name = (row.name).substring(0,(row.name).length-1)+a
       }
+      form.status = 0
       form.id = null
       form.track = true
       this.$refs.ReportForm.open(form)
@@ -589,6 +593,7 @@ export default {
       this.handleChangeView()
     },
     getList2(){
+      this.queryParams.current = 1
       this.getList()
       if(this.queryShowType == 2){
         this.$nextTick(()=>{
@@ -598,7 +603,6 @@ export default {
       
     },
     getParams(params){
-      console.log(params)
       this.queryParams.cronIds=[params.conclusionType]
       this.queryShowType = '0'
       this.getList2()

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

@@ -9,7 +9,7 @@
               </el-form-item>
               <el-form-item>
                 <el-button type="" size="small" @click="getList">查询</el-button>
-                <el-button type="primary" size="small" @click="handleAdd()">新增</el-button>
+                <el-button type="primary" size="small" @click="handleAdd()" v-if="$reportPermission(reportId,[0,1])">新增</el-button>
               </el-form-item>
             </el-form>
           </el-header>

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

@@ -3,7 +3,7 @@
         <el-container>
         <el-aside width="210px" style="overflow:hidden" class="patent-articles-menu">
           <el-menu class="theme-dark" :default-active="activeMenu" @select="handleSelect">
-            <el-menu-item v-for="item in menuList" :index="item.path" >
+            <el-menu-item v-for="item in menuList" :index="item.path" v-if="item.path=='TaskDetails'?$reportPermission(reportId,[0,1]):true">
               <i class="el-icon-film"></i>
               <span slot="title">{{item.title}}</span>
             </el-menu-item>