浏览代码

Merge branch 'shaoyin' into noveltySearch2

zhuliu 7 月之前
父节点
当前提交
21fdd393bf

+ 1 - 1
src/utils/personLazy.js

@@ -25,7 +25,7 @@ export default {
         //获取焦点
         focusPerson(value = ''){
             if(this.personnelList.data && this.personnelList.data.length){
-            return
+                return
             }
             this.remoteMethodPerson(value||'')
         },

+ 2 - 1
src/views/project/patentDetails/components/patentMessage/history/InvalidHistory.vue

@@ -36,7 +36,8 @@
                 </el-table-column>
                 <el-table-column label="结果" prop="result" align="center">
                     <template slot-scope="scope">
-                        <span>{{scope.row.result}}</span>
+                        <span v-if="scope.row.flowType == 16 || scope.row.flowType == 26">{{$constants.litigationResult[scope.row.result]}}</span>
+                        <span v-else>{{scope.row.result}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column label="附件" prop="reportFiles" align="center">

+ 6 - 3
src/views/report/InvalidResponse/components/IPREmail/components/dialog/addOrEditIPREmail.vue

@@ -13,11 +13,11 @@
             <el-input v-model="form.email" placeholder="请输入邮箱"></el-input>
         </el-form-item>
         <el-form-item label="关联账号:" prop="assoAccountId">
-          <el-select style="width:100%" v-model="form.assoAccountId" placeholder="请选择账号" filterable remote @focus="focusPerson(form.userName)"
+          <el-select style="width:100%" v-model="form.assoAccountId" placeholder="请选择账号" filterable remote  @focus="focusPerson(form.accountName)"
             :popper-append-to-body="false" :remote-method="remoteMethodPerson" v-SelectLazyLoading="lazyLoadingPerson"
             :loading="personnelList.loading">
-            <el-option v-for="item in personnelList.data" :key="Number(item.id)" :label="item.name"
-              :value="Number(item.id)"></el-option>
+            <el-option v-for="item in personnelList.data" :key="parseInt(item.id)" :label="item.name"
+              :value="parseInt(item.id)"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="默认发送邮箱:" prop="ifDefault">
@@ -114,6 +114,9 @@ export default {
         2:"代理所"
       }
       this.title = model=='add'?`添加${types[this.form.type]}邮箱`:`修改${types[this.form.type]}邮箱`
+      if(form.assoAccountId){
+        this.focusPerson(form.accountName)
+      }
       this.showDialog = true
     },
     //初始化数据

+ 3 - 1
src/views/report/InvalidResponse/components/dialog/editFlowPath.vue

@@ -286,7 +286,9 @@ const defaultSendEmail = ['6','1','7','8','16','3','17','27','28']
             if(type.id){
               this.form.assoCasePhaseId = type.id
             }
-            
+            if(type.flowType){
+              this.form.flowType = type.flowType
+            }
             this.otherPerson = []
             if(this.$permission.FunPermissions('xiaoshi/sendEmail')){
               if(defaultSendEmail.indexOf(type+'')!=-1){

+ 7 - 1
src/views/report/InvalidResponse/components/table/IPREmail.vue

@@ -51,7 +51,13 @@ const defaultColumnList = [
         name:'账号',
         ifSort:false,
         width:'150px',
-        type:"string",
+        type:"function",
+        useFunction:(data)=>{
+            if(data.accountName){
+              return `${data.accountName}(${data.accountUserName})`  
+            }
+            return ''
+        }
     },
     {
         field:'remark',

+ 83 - 1
src/views/report/components/details/components/basicMessage_official.vue

@@ -135,9 +135,19 @@
                         </el-form-item>
                         <el-form-item label="附件:">
                             <div class="box1 textEmpty">
+                                <el-upload
+                                    class="upload-demo"
+                                    action="#"
+                                    :auto-upload="false"
+                                    :show-file-list="false"
+                                    :on-change="onChangeFile"
+                                    :limit="1">
+                                    <el-button size="small" type="primary">点击上传</el-button>
+                                    <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+                                </el-upload>
                                 <div v-for="item in reportMessage.systemFileList" style="display:flex;align-items:center" :key="item.guid">
                                     <div style="margin-right:20px">{{ item.originalName }}</div>
-                                    <my-menu :data="item" :deleted="false"></my-menu>
+                                    <my-menu :data="item"  @delFile="delFile"></my-menu>
                                 </div>
                             </div>
                         </el-form-item>
@@ -457,6 +467,69 @@ export default {
     this.queryInvalidStatutes()
   },
   methods: {
+    //删除文件
+    delFile(file){
+        let guids = []
+        if( this.reportMessage.systemFileList){
+            guids = this.reportMessage.systemFileList.filter(item=>{
+                return item.guid != file.guid
+            }).map(item=>{
+                return item.guid
+            })
+        }
+        this.reportMessage.fileGuids = guids
+        this.submit2('文件删除')
+    },
+    //上传文件
+    onChangeFile(file){
+        let formData = new FormData()
+        formData.append('sourceId',this.$constants.sourceId)
+        formData.append('files',file.raw)
+        this.$api.uploadFile(formData).then(response=>{
+            if(response.code == 200){
+                let guid = response.data[0]
+                let guids = []
+                if( this.reportMessage.systemFileList){
+                    guids = this.reportMessage.systemFileList.map(item=>{
+                        return item.guid
+                    })
+                }
+                guids.push(guid)
+                this.reportMessage.fileGuids = guids
+                this.submit2('文件上传')
+            }
+        })
+    },
+    submit2(message) {
+        this.reportMessage.type = 2//项目类型(1专利数据库 2报告 3专利挖掘项目)
+
+        // 事件及调查类型处理
+        if (this.reportMessage.scenarioIds && this.reportMessage.scenarioIds.length > 0) {
+            var scenarioIds = JSON.parse(JSON.stringify(this.form.scenarioIds))
+        }
+        if (this.reportMessage.eventId) {
+            this.reportMessage.events = []
+            this.reportMessage.scenarioIds = []
+            this.reportMessage.matterIds.forEach(item => {
+                this.reportMessage.events.push(
+                {
+                    matterId: item,
+                    scenarioId: scenarioIds[0],
+                    eventId: this.reportMessage.eventId
+                }
+                )
+            })
+        }
+        let formData = this.reportMessage
+        this.$api.updateReportProject(formData).then(response => {
+            if (response.code == 200) {
+                this.$message.success(message+'成功')
+                this.$emit('refreshData')
+            }
+        })
+         
+       
+    },
     //修改了案件流程
     changeFlowPath(form){
         if(!form){
@@ -678,4 +751,13 @@ export default {
     color: var(--color1);
     font-size: medium;
 }
+</style>
+<style lang="scss">
+    .upload-demo{
+        display: flex;
+        align-items: center;
+        &>*:first-child{
+            margin-right: 10px;
+        }
+    }
 </style>

+ 6 - 6
src/views/report/components/dialog/addAndEditReport.vue

@@ -48,11 +48,7 @@
               </el-col>
             </el-row>
             <el-row>
-              <!-- <el-col :span="12">
-                <el-form-item label="无效决定号" prop="issueNumber">
-                  <el-input v-model="form.issueNumber" autocomplete="off" placeholder="请输入无效决定号"></el-input>
-                </el-form-item>
-              </el-col> -->
+             
               <el-col :span="12">
                 <el-form-item label="发明创造名称" prop="inventionName">
                   <el-input v-model="form.inventionName" autocomplete="off" placeholder="请输入发明创造名称"></el-input>
@@ -105,7 +101,11 @@
           </div>
         </template>
         <el-row>
-              
+              <el-col :span="12" v-if="form.reportType == 7">
+                <el-form-item label="无效决定号" prop="issueNumber">
+                  <el-input v-model="form.issueNumber" autocomplete="off" placeholder="请输入无效决定号"></el-input>
+                </el-form-item>
+              </el-col>
               <el-col :span="12">
                 <el-form-item label="是否完成" v-if="!form.id" prop="status">
                   <el-switch v-model="form.status" active-color="#13ce66"  @change="changeStatus"

+ 20 - 11
src/views/report/components/dialog/components/handelPersonTable.vue

@@ -73,14 +73,14 @@
                 <template slot-scope="scope">
                     <div>
                         <div v-if="scope.row.id  && editMessage.id!=scope.row.id">
-                            {{ scope.row.assoAccountId }}
+                            <span v-if="scope.row.accountName">{{ scope.row.accountName + '('+ scope.row.accountUserName +')' }}</span>
                         </div>
                         <div v-else>
-                            <el-select style="width:100%" v-model="scope.row.assoAccountId" placeholder="请选择账号" filterable remote @focus="focusPerson(scope.row.userName)"
+                            <el-select style="width:100%" v-model="scope.row.assoAccountId" placeholder="请选择账号" filterable remote @focus="focusPerson(scope.row.accountName)"
                                 :popper-append-to-body="false" :remote-method="remoteMethodPerson" v-SelectLazyLoading="lazyLoadingPerson" :disabled="currentEditField && currentEditField!='assoAccountId'"
                                 :loading="personnelList.loading">
-                                <el-option v-for="item in personnelList.data" :key="Number(item.id)" :label="item.name"
-                                :value="Number(item.id)"></el-option>
+                                <el-option v-for="item in personnelList.data" :key="parseInt(item.id)" :label="item.name"
+                                :value="parseInt(item.id)"></el-option>
                             </el-select>
                         </div>
                     </div>
@@ -184,13 +184,16 @@ export default {
     },
     //编辑
     edit(row){
-      if(this.model != 'list' ){
-        this.$message.warning('已有数据正在编辑,请先保存修改的数据')
-        return
-      }
-      this.currentEditField = null
-        this.model = 'edit'
+        if(this.model != 'list' ){
+            this.$message.warning('已有数据正在编辑,请先保存修改的数据')
+            return
+        }
+        this.currentEditField = null
+        if(row.assoAccountId){
+            this.focusPerson(row.accountName)
+        }
         this.editMessage = JSON.parse(JSON.stringify(row))
+        this.model = 'edit'
     },
     //移除配案人员
     remove(row){
@@ -204,6 +207,7 @@ export default {
               this.$message.success('移除成功')
               this.loading = false
               this.getList()
+              this.$emit('isUpdate',true)
               this.IPREmailList={
                 queryParams:{
                   current:0,
@@ -225,7 +229,7 @@ export default {
       if(this.model == 'add'){
         this.tableData.splice(index,1)
       }else{
-        row = JSON.parse(JSON.stringify(this.editMessage))
+        this.$set(this.tableData,index,JSON.parse(JSON.stringify(this.editMessage)))
         this.editMessage = {}
       }
       this.model = 'list'
@@ -261,6 +265,7 @@ export default {
           if(row.id){
             this.editMessage = {}
           }
+          this.$emit('isUpdate',true)
         }
       }).catch(error=>{
         this.loading = false
@@ -311,6 +316,10 @@ export default {
         this.$set(row,'email',item.email)
         this.$set(row,'iprPersonId',item.id)
         this.$set(row,'assoAccountId',item.assoAccountId)
+        this.$set(row,'accountName',item.accountName)
+        if(item.assoAccountId){
+            this.focusPerson(item.accountName)
+        }
         this.currentEditField = field
     },
     handleInput(){

+ 12 - 3
src/views/report/components/dialog/handlePerson.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
     <el-dialog  title="配案人员" :visible.sync="visible" width="1000px" :close-on-click-modal="false"  :before-close="handleClose" append-to-body>
-      <div style="height:calc(100vh - 250px)">
-        <handelPersonTable :reportId="reportId" title="IPR" :type="1"></handelPersonTable>
+      <div style="height:calc(100vh - 250px)" v-if="visible">
+        <handelPersonTable :reportId="reportId" title="IPR" :type="1" @isUpdate="isUpdate"></handelPersonTable>
         <div style="margin-top:25px">
-          <handelPersonTable :reportId="reportId" title="代理所" :type="2"></handelPersonTable>
+          <handelPersonTable :reportId="reportId" title="代理所" :type="2" @isUpdate="isUpdate"></handelPersonTable>
         </div>
         
       </div>
@@ -23,6 +23,7 @@ export default {
     return {
         visible:false,
         reportId:null,
+        update:false
     };
   },
   watch: {},
@@ -32,11 +33,19 @@ export default {
   methods: {
     open(reportId){
       this.reportId =reportId
+      this.update = false
       this.visible = true
     },
     handleClose(){
         this.visible = false
+        if(this.update){
+         this.$emit('updateHandlePerson',this.reportId) 
+        }
+        
     },
+    isUpdate(val){
+      this.update = true
+    }
     
   },
 };

+ 34 - 4
src/views/report/components/index.vue

@@ -32,7 +32,7 @@
               </el-dropdown-menu>
             </el-dropdown>
             <el-button type="primary" class="margin-left_10 margin-right_10" size="small" @click="showField">显示栏位管理</el-button>
-            <el-button v-if="$permission.FunPermissions('xiaoshi/IPREmail')" type="primary" class="margin-right_10" size="small" @click="IPREmail">IPR邮箱</el-button>
+            <el-button v-if="$permission.FunPermissions('xiaoshi/IPREmail')" type="primary" class="margin-right_10" size="small" @click="IPREmail">联系邮箱</el-button>
           </div>
 
         </div>
@@ -66,10 +66,10 @@
     <!-- 项目分享 -->
     <patentShare ref="patentShare"></patentShare>
 
-    <!-- IPR邮箱 -->
+    <!-- 联系邮箱 -->
     <IPREmailDialog ref="IPREmailDialog"></IPREmailDialog>
     <!-- 配案人员/实际处理人 -->
-    <handlePersonDialog ref="handlePersonDialog"></handlePersonDialog>
+    <handlePersonDialog ref="handlePersonDialog" @updateHandlePerson="updateHandlePerson"></handlePersonDialog>
   </div>
 </template>
 
@@ -260,7 +260,29 @@ export default {
     this.showViews()
   },
   methods: {
-    //IPR邮箱
+    //更新配案人员
+    updateHandlePerson(projectId){
+      let index = this.dataList.findIndex(item=>{
+        return item.id == projectId
+      })
+      if(index==-1){
+        return
+      }
+      let params = {
+        searchQuery: `id=${projectId}`,//检索条件
+        orderDTOList: [],
+      }
+      this.$api.queryReportProject(params).then(res => {
+        if (res.code == 200) {
+          if (res.data.data.length > 0) {
+            this.$set(this.dataList,index,res.data.data[0])
+          } 
+        }
+      }).catch(error => {
+        
+      })
+    },
+    //联系邮箱
     IPREmail(){
       this.$refs.IPREmailDialog.open()
     },
@@ -507,6 +529,14 @@ export default {
         order,
       }
       this.sort = this.$commonJS.getSortData(params)
+      if(!this.sort || this.sort.length == 0){
+        this.sort = [
+          {
+            "orderBy": "createTime",
+            "orderType": 1
+          }
+        ]
+      }
       this.queryParams.current = 1
       this.isGrouping()
     },