Browse Source

Merge branch 'product' of http://1.116.113.26:8088/zhuliu/xiaoshi_system into product

zhuliu 1 year ago
parent
commit
ef4925eddd

+ 20 - 2
src/api/newApi/task.js

@@ -1,7 +1,7 @@
 
 import axios from "@/utils/axios";
 export default {
-
+// 
   /**
    * 任务查询
    */
@@ -12,7 +12,7 @@ export default {
    * 专利挖掘审核
    */
   addProjectOpenExamineTask(data) {
-    return axios.post("/xiaoshi/projectTask/addProjectOpenExamineTask", data);
+    return axios.post("/xiaoshi/projectTask/addProjectOpenAuditTask", data);
   },
   /**
    * 创建专利挖掘文件分配任务/文件分配审核任务
@@ -45,12 +45,24 @@ export default {
     return axios.post("/xiaoshi/patentDigProjectFiles/addPatentDigProjectFiles", data);
   },
   /**
+   * 专利挖掘文件列表新增审核任务
+   */
+  addPDProjectFilesTask(data) {
+    return axios.post("/xiaoshi/patentDigProjectFiles/addPDProjectFilesTask", data);
+  },
+  /**
    * 专利挖掘文件列表查询
    */
   queryPatentDigProjectFiles(data) {
     return axios.post("/xiaoshi/patentDigProjectFiles/queryPatentDigProjectFiles", data);
   },
   /**
+   * 专利挖掘文件列表删除
+   */
+  deletePatentDigProjectFiles(data) {
+    return axios.post("/xiaoshi/patentDigProjectFiles/deletePatentDigProjectFiles", data);
+  },
+  /**
    * 专利挖掘文件处理分配审核任务,提交审核结果
    */
   addTaskAuditResult(data) {
@@ -62,4 +74,10 @@ export default {
   queryAuditHistory(params) {
     return axios.get("/xiaoshi/projectTask/queryAuditHistory", {params});
   },
+  /**
+   * 任务完成、取消、同意、缺少资料等状态的修改
+   */
+  updateTaskStatus(params) {
+    return axios.get("/xiaoshi/projectTask/updateTaskStatus", {params});
+  },
 };

+ 14 - 13
src/views/components/dialog/examine.vue

@@ -81,18 +81,18 @@ export default {
   methods: {
     open(data, type) {
       
-      // 判断文件是否都上传完毕
-      if (data.systemFileList && data.systemFileList.length > 0) {
-        data.fileGuids = []
-        for (let i = 0; i < data.systemFileList.length; i++) {
-          if (data.systemFileList[i].guid) {
-            data.fileGuids.push(data.systemFileList[i].guid)
-          } else {
-            this.$message.error('文件未全部上传,请耐心等待')
-            return false
-          }
-        }
-      }
+      // // 判断文件是否都上传完毕
+      // if (data.systemFileList && data.systemFileList.length > 0) {
+      //   data.fileGuids = []
+      //   for (let i = 0; i < data.systemFileList.length; i++) {
+      //     if (data.systemFileList[i].guid) {
+      //       data.fileGuids.push(data.systemFileList[i].guid)
+      //     } else {
+      //       this.$message.error('文件未全部上传,请耐心等待')
+      //       return false
+      //     }
+      //   }
+      // }
       this.parentForm = data
       // 任务类型
       this.form.type = type
@@ -111,6 +111,7 @@ export default {
            * 4协同任务
            * 5任务审核任务
            * 6文件分配任务审核
+           * 7文件列表审核
            */
 
           if (this.form.handlerName.includes('@')) {//是邮箱为1
@@ -142,7 +143,7 @@ export default {
               this.fileTask(params)
               break;
             case 7://专利挖掘项目-文件列表审核任务
-
+              this.$emit('examineFile',this.form)
               break;
 
             default:

+ 5 - 1
src/views/patentMining/components/details/components/drawer.vue

@@ -8,7 +8,7 @@
           </el-tabs>
         </el-header>
         <el-main>
-          <component :is='activeName' :id="id"></component>
+          <component :is='activeName' :id="id" :pathObj="pathObj"></component>
         </el-main>
       </el-container>
     </el-drawer>
@@ -38,6 +38,7 @@ export default {
           path: 'FileMessage'
         },
       ],
+      pathObj:null,
     }
   },
   mounted() {
@@ -46,10 +47,13 @@ export default {
   methods: {
     // 打开
     open(data) {
+      this.pathObj=JSON.parse(JSON.stringify(data))
       this.drawer = true
     },
     // 关闭
     handleClose() {
+      this.pathObj = null
+      this.activeName='ExcavateTaskIndex'
       this.drawer = false
     },
   },

+ 115 - 37
src/views/patentMining/components/details/components/projectPath.vue

@@ -4,54 +4,110 @@
     <span>项目流程</span>
     <el-divider></el-divider>
     <svg viewBox="0 0 1800 400" width="100%" height="100%">
+
+
       <g transform=translate(0,0) class="svgG">
         <g @click="toDrawer('创新点梳理', 1)">
-          <rect width="200" height="120" :fill="getColor('创新点梳理')"> </rect>
+          <rect width="200" height="120" :fill="getColor('创新点梳理',1)"> </rect>
           <text x="30" y="65">创新点梳理</text>
-          <circle cx="150" cy="60" r="16" stroke-width="1" stroke="#fff" :fill="getColor('创新点梳理')" />
-          <text :x="getNumber('创新点梳理') > 9 ? '140' : '145'" y="65" fill="#fff">{{ getNumber('创新点梳理') }}</text>
+        </g>
+        <g @click="toFilePage('创新点梳理', 1,'任务')">
+          <text x="120" y="45">任务:</text>
+          <circle cx="180" cy="40" r="16" stroke-width="1" stroke="#fff" :fill="getColor('创新点梳理',1)" />
+          <text :x="getNumber('创新点梳理',1) > 9 ? '170' : '175'" y="45" fill="#fff">{{ getNumber('创新点梳理',1, 'task') }}</text>
+          <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+        </g>
+        <g @click="toFilePage('创新点梳理', 1,'文件')">
+          <text x="120" y="85">文件:</text>
+          <circle cx="180" cy="80" r="16" stroke-width="1" stroke="#fff" :fill="getColor('创新点梳理',1)" />
+          <text :x="getNumber('创新点梳理',1) > 9 ? '170' : '175'" y="85" fill="#fff">{{ getNumber('创新点梳理',1 , 'file') }}</text>
           <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
         </g>
         <polygon points="350,55,360,60,350,65"></polygon>
       </g>
+
+
       <g transform="translate(360,0)" class="svgG">
         <g @click="toDrawer('查新检索', 2)">
-          <rect width="200" height="120" :fill="getColor('查新检索')"> </rect>
+          <rect width="200" height="120" :fill="getColor('查新检索',2)"> </rect>
           <text x="30" y="65">查新检索</text>
-          <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('查新检索')" />
-          <text :x="getNumber('查新检索') > 9 ? '140' : '145'" y="65" fill="#fff">{{ getNumber('查新检索') }}</text>
+        </g>
+        <g>
+          <text x="120" y="45">任务:</text>
+          <circle cx="180" cy="40" r="15" stroke-width="1" stroke="#fff" :fill="getColor('查新检索',2)" />
+          <text :x="getNumber('查新检索',2) > 9 ? '170' : '175'" y="45" fill="#fff">{{ getNumber('查新检索',2,'task') }}</text>
+          <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+        </g>
+        <g>
+          <text x="120" y="85">文件:</text>
+          <circle cx="180" cy="80" r="15" stroke-width="1" stroke="#fff" :fill="getColor('查新检索',2)" />
+          <text :x="getNumber('查新检索',2) > 9 ? '170' : '175'" y="85" fill="#fff">{{ getNumber('查新检索',2,'file') }}</text>
           <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
         </g>
         <polygon points="350,55,360,60,350,65"></polygon>
       </g>
+
+
       <g transform="translate(720,0)" class="svgG">
         <g @click="toDrawer('保护主题规划', 3)">
-          <rect width="200" height="120" :fill="getColor('保护主题规划')"> </rect>
+          <rect width="200" height="120" :fill="getColor('保护主题规划',3)"> </rect>
           <text x="30" y="65">保护主题规划</text>
-          <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('保护主题规划')" />
-          <text x="145" y="65" fill="#fff">{{ getNumber('保护主题规划') }}</text>
+        </g>
+        <g>
+          <text x="120" y="45">任务:</text>
+          <circle cx="180" cy="40" r="15" stroke-width="1" stroke="#fff" :fill="getColor('保护主题规划',3)" />
+          <text :x="getNumber('保护主题规划',3) > 9 ? '170' : '175'" y="45" fill="#fff">{{ getNumber('保护主题规划',3,'task') }}</text>
+          <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+        </g>
+        <g>
+          <text x="120" y="85">文件:</text>
+          <circle cx="180" cy="80" r="15" stroke-width="1" stroke="#fff" :fill="getColor('保护主题规划',3)" />
+          <text :x="getNumber('保护主题规划',3) > 9 ? '170' : '175'" y="85" fill="#fff">{{ getNumber('保护主题规划',3,'file') }}</text>
           <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
         </g>
 
         <polygon points="350,55,360,60,350,65"></polygon>
       </g>
+
+
       <g transform="translate(1080,0)" class="svgG">
         <g @click="toDrawer('独权撰写', 4)">
-          <rect width="200" height="120" :fill="getColor('独权撰写')"> </rect>
+          <rect width="200" height="120" :fill="getColor('独权撰写',4)"> </rect>
           <text x="30" y="65">独权撰写</text>
-          <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('独权撰写')" />
-          <text x="145" y="65" fill="#fff">{{ getNumber('独权撰写') }}</text>
+        </g>
+        <g>
+          <text x="120" y="45">任务:</text>
+          <circle cx="180" cy="40" r="15" stroke-width="1" stroke="#fff" :fill="getColor('独权撰写',4)" />
+          <text :x="getNumber('独权撰写',4) > 9 ? '170' : '175'" y="45" fill="#fff">{{ getNumber('独权撰写',4,'task') }}</text>
+          <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+        </g>
+        <g>
+          <text x="120" y="85">文件:</text>
+          <circle cx="180" cy="80" r="15" stroke-width="1" stroke="#fff" :fill="getColor('独权撰写',4)" />
+          <text :x="getNumber('独权撰写',4) > 9 ? '170' : '175'" y="85" fill="#fff">{{ getNumber('独权撰写',4,'file') }}</text>
           <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
         </g>
 
         <polygon points="350,55,360,60,350,65"></polygon>
       </g>
+
+
+      
       <g transform="translate(1440,0)" class="svgG">
         <g @click="toDrawer('从权撰写', 5)">
-          <rect width="200" height="120" :fill="getColor('从权撰写')"> </rect>
+          <rect width="200" height="120" :fill="getColor('从权撰写',5)"> </rect>
           <text x="30" y="65">从权撰写</text>
-          <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('从权撰写')" />
-          <text x="145" y="65" fill="#fff">{{ getNumber('从权撰写') }}</text>
+        </g>
+        <g>
+          <text x="120" y="45">任务:</text>
+          <circle cx="180" cy="40" r="15" stroke-width="1" stroke="#fff" :fill="getColor('从权撰写',5)" />
+          <text :x="getNumber('从权撰写',5) > 9 ? '170' : '175'"  y="45" fill="#fff">{{ getNumber('从权撰写',5,'task') }}</text>
+          <line x1="100" y1="120" x2="100" y2="190" stroke='#333'></line>
+        </g>
+        <g>
+          <text x="120" y="85">文件:</text>
+          <circle cx="180" cy="80" r="15" stroke-width="1" stroke="#fff" :fill="getColor('从权撰写',5)" />
+          <text :x="getNumber('从权撰写',5) > 9 ? '170' : '175'"  y="85" fill="#fff">{{ getNumber('从权撰写',5,'file') }}</text>
           <line x1="100" y1="120" x2="100" y2="190" stroke='#333'></line>
         </g>
         <polygon points="95,190,100,200,105,190"></polygon>
@@ -66,20 +122,39 @@
       </g> -->
       <g transform="translate(1440,200)" class="svgG">
         <g @click="toDrawer('申请文件定稿', 6)">
-          <rect width="200" height="120" :fill="getColor('申请文件定稿')"> </rect>
+          <rect width="200" height="120" :fill="getColor('申请文件定稿',6)"> </rect>
           <text x="30" y="65">申请文件定稿</text>
-          <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('申请文件定稿')" />
-          <text x="145" y="65" fill="#fff">{{ getNumber('申请文件定稿') }}</text>
+        </g>
+        <g>
+          <text x="120" y="45">任务:</text>
+          <circle cx="180" cy="40" r="15" stroke-width="1" stroke="#fff" :fill="getColor('申请文件定稿',6)" />
+          <text :x="getNumber('申请文件定稿',6) > 9 ? '170' : '175'" y="45" fill="#fff">{{ getNumber('申请文件定稿',6,'task') }}</text>
+          <line x1="0" y1="60" x2="-150" y2="60" stroke='#333'></line>
+        </g>
+        <g>
+          <text x="120" y="85">文件:</text>
+          <circle cx="180" cy="80" r="15" stroke-width="1" stroke="#fff" :fill="getColor('申请文件定稿',6)" />
+          <text :x="getNumber('申请文件定稿',6) > 9 ? '170' : '175'" y="85" fill="#fff">{{ getNumber('申请文件定稿',6,'file') }}</text>
           <line x1="0" y1="60" x2="-150" y2="60" stroke='#333'></line>
         </g>
         <polygon points="-150,55,-160,60,-150,65"></polygon>
       </g>
+
+
       <g transform="translate(1080,200)" class="svgG" @click="toDrawer('说明书规划撰写', 7)">
-        <rect width="200" height="120" :fill="getColor('说明书规划撰写')"> </rect>
+        <rect width="200" height="120" :fill="getColor('说明书规划撰写',7)"> </rect>
         <text x="15" y="65" xml:space='preserve'>说明书规划撰写
         </text>
-        <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('说明书规划撰写')" />
-        <text x="145" y="65" fill="#fff">{{ getNumber('说明书规划撰写') }}</text>
+        <g>
+          <text x="120" y="45">任务:</text>
+          <circle cx="180" cy="40" r="15" stroke-width="1" stroke="#fff" :fill="getColor('说明书规划撰写',7)" />
+          <text :x="getNumber('说明书规划撰写',7) > 9 ? '170' : '175'" y="45" fill="#fff">{{ getNumber('说明书规划撰写',7,'task') }}</text>
+        </g>
+        <g>
+          <text x="120" y="85">文件:</text>
+          <circle cx="180" cy="80" r="15" stroke-width="1" stroke="#fff" :fill="getColor('说明书规划撰写',7)" />
+          <text :x="getNumber('说明书规划撰写',7) > 9 ? '170' : '175'" y="85" fill="#fff">{{ getNumber('说明书规划撰写',7,'file') }}</text>
+        </g>
       </g>
     </svg>
 
@@ -94,27 +169,27 @@ export default {
   data() {
     return {
       numObj: {
-        '创新点梳理': 2,
-        '查新检索': 0,
-        '保护主题规划': 0,
-        '独权撰写': 0,
-        '从权撰写': 0,
-        '申请文件定稿': 0,
-        '说明书规划撰写': 0,
+        '创新点梳理': {'task':0,'file':2},
+        '查新检索': {'task':0,'file':0},
+        '保护主题规划': {'task':0,'file':0},
+        '独权撰写': {'task':0,'file':0},
+        '从权撰写': {'task':0,'file':0},
+        '申请文件定稿': {'task':0,'file':0},
+        '说明书规划撰写': {'task':0,'file':0},
       },
     }
   },
   computed: {},
-  mounted() {
-
+  async mounted() {
+    // await this.getFileNumber()
   },
   methods: {
     // 获取流程节点及相对应的文件
-    getFileNumber() {
+    async getFileNumber() {
       let params = {
         id: this.id,
       }
-      this.$api.query(params).then(response => {
+      await this.$api.query(params).then(response => {
         if (response.code == 200) {
           this.numObj = response.data
         }
@@ -123,13 +198,15 @@ export default {
       })
     },
     // 获取文件数量
-    getNumber(str) {
-      return this.numObj[str]
+    getNumber(str, id, type) {
+      return this.numObj[str][type]
     },
     // 获取背景颜色
     getColor(str) {
-      return this.getNumber(str) > 0 ? '#5ed325' : 'pink'
+      let num=this.numObj[str].task + this.numObj[str].file
+      return num > 0 ? '#5ed325' : 'pink'
     },
+    // 打开抽屉弹窗
     toDrawer(str, id) {
       let obj = {
         pathName: str,
@@ -138,10 +215,11 @@ export default {
       this.$emit('on-drawer',obj)
     },
     // 跳转文件列表界面
-    toFilePage(str, id) {
+    toFilePage(str, id , type) {
       let obj = {
         pathName: str,
-        pathId: id
+        pathId: id,
+        type:type
       }
       this.$emit('grandson',obj)
     },

+ 12 - 5
src/views/patentMining/components/details/index.vue

@@ -3,7 +3,7 @@
   <div class="height_100">
       <el-container>
         <el-header class="basic_header">
-            <el-tabs v-model="activeName" type="card" @tab-click="handleClick" style="width:100%">
+            <el-tabs v-model="activeName" type="card"  style="width:100%">
               <el-tab-pane v-for="item in menu" :key='item.path' :label="item.label" :name="item.path"></el-tab-pane>
             </el-tabs>
         </el-header>
@@ -42,13 +42,16 @@ export default {
           path:'FileMessage'
         },
       ],
-      pathObj:'',
+      pathObj:null,
     };
   },
   watch: {
     activeName(val) {
-      if (val != 'FileMessage') {
-        this.pathObj=''
+      if (val != 'FileMessage' || val != 'ExcavateTaskIndex') {
+        this.$nextTick(() => {
+          this.pathObj=null
+        })
+        
       }
     },
   },
@@ -64,7 +67,11 @@ export default {
     // 项目流程孙传祖的值,用于跳转文件列表
     handleGrandson(val) {
       if (val) {
-        this.activeName = 'FileMessage'
+        if (val.type == '任务') {
+          this.activeName = 'ExcavateTaskIndex'
+        } else {
+          this.activeName = 'FileMessage'
+        }
         this.pathObj=val
       }
     },

+ 12 - 4
src/views/patentMining/components/dialog/createTask.vue

@@ -7,7 +7,7 @@
         <el-form-item label="任务名称:" prop="name">
           <el-input v-model="form.name" placeholder="请输入任务名称" :disabled="form.id ? true : false"></el-input>
         </el-form-item>
-        <el-form-item label="任务流程:" prop="processId">
+        <el-form-item v-if="form.type != 1" label="任务流程:" prop="processId">
           <el-select v-model="form.processId" placeholder="请选择流程" style="width: 100%;" :disabled="form.id ? true : false">
             <el-option v-for="item in pathOptions" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
@@ -66,11 +66,13 @@ export default {
   methods: {
     //打开弹窗
     async open(data) {
-      if (data.type == 6 || data.type == 5) {//文件分配任务//文件分配审核任务
+      if (data.type == 6 || data.type == 5 || data.type == 1) {//文件分配任务//文件分配审核任务
         if (data.type == 6) {
           this.title = '编辑文件分配任务'
-        } else {
+        } else if(data.type == 5) {
           this.title = '编辑文件分配审核任务'
+        } else {
+          this.title = '编辑项目开卷审核任务'
         }
         this.form = JSON.parse(JSON.stringify(data))
         // 负责人
@@ -114,7 +116,13 @@ export default {
               }
             })
           } else {
-
+            this.$api.editTask(this.form).then(res => {
+              if (res.code == 200) {
+                this.$message.success('编辑任务成功')
+                this.$emit('isCreate', '编辑成功')
+                this.handleClose()
+              }
+            })
           }
 
         } else {

+ 6 - 6
src/views/patentMining/components/dialog/handleTask1.vue

@@ -138,20 +138,20 @@ export default {
       btnObj: [
         {
           label: '同意创建',
-          value: 1
+          value: 0
         },
         {
           label: '取消创建',
-          value: 4
+          value: 1
         },
         {
           label: '缺少材料',
-          value: 5
+          value: 2
         }
       ],
       btn: {
         label: '同意创建',
-        value: 1
+        value: 0
       },
       options: [],
       fileList: [],
@@ -255,9 +255,9 @@ export default {
       let params = {
         id: this.form.id,
         taskId: this.form.taskId,
-        status:this.btn.value
+        type:this.btn.value
       }
-      this.$api.submit(params).then(res => {
+      this.$api.updateTaskStatus(params).then(res => {
         if (res.code == 200) {
           this.$message.success('任务已处理')
           this.$emit('isSuccess', '成功')

+ 7 - 15
src/views/patentMining/components/dialog/handleTask2.vue

@@ -64,9 +64,7 @@ export default {
       form: {
         systemFileList: [],
       },
-      rules: {
-        // systemFileList: [{ required: true, message: '请选择附件', trigger: 'blur' },],
-      },
+      rules: {},
       dialogVisible: false,
       // auditTask: false,
       // 备注
@@ -107,12 +105,6 @@ export default {
     },
     //打开弹窗
     open(row, val) {
-      // let row = JSON.parse(JSON.stringify(row))
-      // if(this.form.id){
-      //     this.title = '编辑任务'
-      // }else{
-      //     this.title = '创建任务'
-      // }
       this.row = row
       this.isLook = val
       this.title = '任务名称:' + row.name
@@ -129,7 +121,7 @@ export default {
           this.tableData = res.data.systemFileList
         }
       }).catch(error => {
-        this.tableData=[]
+        this.tableData = []
       })
     },
     // 删除文件
@@ -153,8 +145,8 @@ export default {
     },
     // 保存
     async handleSave(type) {
-       // 判断文件是否都上传完毕
-       if (this.form.systemFileList && this.form.systemFileList.length > 0) {
+      // 判断文件是否都上传完毕
+      if (this.form.systemFileList && this.form.systemFileList.length > 0) {
         this.form.fileGuids = []
         for (let i = 0; i < this.form.systemFileList.length; i++) {
           if (this.form.systemFileList[i].guid) {
@@ -164,7 +156,7 @@ export default {
             return false
           }
         }
-      } 
+      }
       this.form.taskId = this.row.id
       await this.$api.addTaskAuditResult(this.form).then(res => {
         if (res.code == 200) {
@@ -177,12 +169,12 @@ export default {
     },
     // 提交审核时有未保存的文件调用保存接口
     async isHandleSave() {
-      if (this.form.systemFileList && this.form.systemFileList.length > 0) { 
+      if (this.form.systemFileList && this.form.systemFileList.length > 0) {
         await this.handleSave(1)
       }
     },
     //提交审核
-     submit() {
+    submit() {
       this.$refs.form.validate((valid) => {
         if (valid) {
           this.form.projectId = this.row.projectId//项目id

+ 34 - 24
src/views/patentMining/components/dialog/uploadFile.vue

@@ -28,16 +28,16 @@
       </span>
     </el-dialog>
 
-    <examine ref="examine" @taskForm="handleTaskForm"></examine>
+    <examine ref="examine" @taskForm="handleTaskForm" @examineFile="handleExamineFile"></examine>
   </div>
 </template>
 
 <script>
-import {optionsData} from '../mixins/index2'
+import {optionsData,handleJs} from '../mixins/index2'
 import examine from '@/views/components/dialog/examine.vue'
 
 export default {
-  mixins:[optionsData],
+  mixins:[optionsData,handleJs],
   components: {
     examine,
   },
@@ -61,11 +61,33 @@ export default {
   created() { },
   mounted() { },
   methods: {
+    // 提交审核任务
+    handleExamineFile(val) {
+      let params = {
+        patentDigProjectFilesDTO: this.form,
+        projectTaskDTO :val
+      }
+      this.$api.addPDProjectFilesTask(params).then(res => {
+        if (res.code == 200) {
+          this.getList()
+          this.$refs.examine.close()
+          this.handleClose()
+        }
+      })
+    },
     //提交审核
     examine() {
       this.$refs.form.validate((valid) => {
         if (valid) {
-          this.$refs.examine.open(this.form, 7)
+          var allUpload = this.validFile()
+          if (allUpload) {
+            this.$message.warning('文件未全部上传,请耐心等待')
+            return false
+          }
+          this.form.fileGuids = this.form.systemFileList.map(item => {
+            return item.guid
+          })
+          this.$refs.examine.open(null, 7)
         }
       })
     },
@@ -104,17 +126,14 @@ export default {
       this.$refs.form.validate((valid) => {
         if (valid) {
           // 判断文件是否都上传完毕
-          if (this.form.systemFileList && this.form.systemFileList.length > 0) {
-            this.form.fileGuids = []
-            for (let i = 0; i < this.form.systemFileList.length; i++) {
-              if (this.form.systemFileList[i].guid) {
-                this.form.fileGuids.push(this.form.systemFileList[i].guid)
-              } else {
-                this.$message.error('文件未全部上传,请耐心等待')
-                return false
-              }
-            }
-          } 
+          var allUpload = this.validFile()
+          if (allUpload) {
+            this.$message.warning('文件未全部上传,请耐心等待')
+            return false
+          }
+          this.form.fileGuids = this.form.systemFileList.map(item => {
+            return item.guid
+          })
           if (!this.form.id) {
             this.$api.addPatentDigProjectFiles(this.form).then(res => {
               if (res.code == 200) {
@@ -123,16 +142,7 @@ export default {
                 this.handleClose()
               }
             })
-          } else {
-            this.$api.edit(this.form).then(res => {
-              if (res.code == 200) {
-                this.$message.success('更新成功')
-                this.$emit('isSuccess', '更新成功')
-                this.handleClose()
-              }
-            })
           }
-
         } else {
           this.$message.error('信息未输入完整')
         }

+ 12 - 3
src/views/patentMining/components/excavateTask/index.vue

@@ -13,7 +13,7 @@
 import Table from '@/views/task/components/table.vue'
 
 export default {
-  props:['id'],
+  props:['id','pathObj'],
   components: {
     // excavateTask
     Table,
@@ -21,13 +21,22 @@ export default {
   data() {
     return {
       obj: {
-        search:{projectId:this.id},
+        search: {
+          projectId: this.id?this.id:'',
+          processId: this.pathObj ? this.pathObj.pathId : '',
+        },
       },
     }
   },
+  watch: {
+    pathObj(val) {
+      if (val) {
+        this.obj.search.processId = val.pathId
+      }
+    },
+  },
   computed: {},
   mounted() {
-
   },
   methods: {
 

+ 56 - 29
src/views/patentMining/components/fileMessage.vue

@@ -34,6 +34,7 @@
                   <span v-html="$commonJS.getColumnData(scope.row, item)"></span>
                 </el-link>
               </div>
+              <div v-else-if="['ifFinal'].includes(item.value)" v-html="$commonJS.getColumnData(scope.row, item , null , {data:ifFinal})"></div>
               <!-- <div v-else-if="['type'].includes(item.value)"
                 v-html="$commonJS.getColumnData(scope.row, item, null, { data: taskType })"></div>
               <div v-else-if="['status'].includes(item.value)"
@@ -41,10 +42,10 @@
               <div v-else v-html="$commonJS.getColumnData(scope.row, item)"></div>
             </template>
           </el-table-column>
-          <el-table-column label="操作" align="center" width="200px">
+          <el-table-column label="操作" align="center" width="100px">
             <template slot-scope="scope">
               <div>
-                <el-button type="primary" size="small" @click="handleEdit(scope.row)">编辑</el-button>
+                <!-- <el-button type="primary" size="small" @click="handleEdit(scope.row)">编辑</el-button> -->
                 <el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
               </div>
             </template>
@@ -63,28 +64,22 @@
 </template>
 
 <script>
-import {optionsData} from './mixins/index2'
+import { optionsData } from './mixins/index2'
 import uploadFile from './dialog/uploadFile.vue'
 export default {
   props: ['id', 'pathObj'],
-  mixins:[optionsData],
+  mixins: [optionsData],
   components: {
     uploadFile
   },
   data() {
     return {
+      ifFinal: {
+        false:'否',
+        true:'是',
+      },
       // 数据源
-      tableData: [
-        {
-          fileName: '加热器',
-          uploader: '朱豪',
-          status: '处理中',
-          uploadTime: '2023-9-28 17:09',
-          type: '',
-          endFile: '否',
-          id: 1
-        }
-      ],
+      tableData: [],
       // table栏位信息
       columnList: [
         {
@@ -130,31 +125,52 @@ export default {
       searchOption: {},
       //排序字段
       sort: [{ "orderBy": "createTime", "orderType": 1 }],
+      // 复制传过来的参数
+      pathObjCopy:JSON.parse(JSON.stringify(this.pathObj)),
     }
   },
   watch: {
-    pathObj(val) {
+    pathObjCopy(val) {
       if (val) {
         this.getList()
       }
     },
   },
-  mounted() {
+  async mounted() {
     // 获取table栏位
-    // this.columnList = await this.$commonJS.getCustomField('projectTask')
+    this.columnList = await this.$commonJS.getCustomField('patentDigProjectFiles')
     // 获取栏位
-    // this.getColumn()
-    this.getList()
+    await this.getColumn()
+    // 获取数据
+    await this.getList()
   },
   methods: {
     // 新增/更新文件列表成功
     isSuccess(val) {
       this.getList()
     },
+    // 获取检索及分组栏位
+    async getColumn() {
+      let params = ['patentDigProjectFiles']
+      await this.$api.getParamsCommon(params).then(res => {
+        if (res.code == 200) {
+          let conditionDTOList = JSON.parse(JSON.stringify(res.data[0].conditionDTOList))
+          // 检索字段
+          this.searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
+            label: 'name',
+            value: 'value',
+            type: 'type',
+          })
+          //为所属流程添加选项
+          var obj = this.searchFiled.find(item => { return item.label == '所属流程' })
+          obj.options=this.pathOptions
+        }
+      })
+    },
     // 获取数据
-    getList() {
+    async getList() {
       let searchOption = {
-        processId:this.pathObj.id || '',//流程节点id
+        processId: this.pathObjCopy?this.pathObjCopy.pathId : '',//流程节点id
         projectId: this.id,//固有检索
         ...this.searchOption
       }
@@ -163,6 +179,7 @@ export default {
         searchQuery: this.$commonJS.objectToString(searchOption || {}),//检索条件
         orderDTOList: this.sort,//排序信息
       }
+      
       this.$api.queryPatentDigProjectFiles(params).then(res => {
         if (res.code == 200) {
           this.tableData = res.data.data
@@ -208,7 +225,7 @@ export default {
     },
     // 上传文件按钮
     uploadFile() {
-      this.$refs.uploadFile.open(null,this.id)
+      this.$refs.uploadFile.open(null, this.id)
     },
     // 编辑文件按钮
     handleEdit(row) {
@@ -219,12 +236,22 @@ export default {
       this.handleDeletes([row.id])
     },
     handleDeletes(ids) {
-      this.$api.dele(params).then(res => {
-        if (res.code == 200) {
-          this.queryParams.current = 1
-          this.getList()
-        }
-      })
+      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$api.deletePatentDigProjectFiles(ids).then(res => {
+          if (res.code == 200) {
+            this.$message.success('删除文件成功')
+            this.queryParams.current = 1
+            this.getList()
+          }
+        })
+      }).catch(() => {
+        this.$message.info('已取消删除')
+      });
+
     },
     // 分页
     handleCurrentChange(val) {

+ 28 - 4
src/views/patentMining/components/mixins/index2.js

@@ -132,7 +132,7 @@ export const personnelLoading = {
     async questionPersonnel() {
       let params = {
         ...this.personnelList.queryParams,
-        name:this.personnelList.name
+        name: this.personnelList.name
       }
       await this.$api.getPermissionPersonnel(params).then(res => {
         if (res.code == 200) {
@@ -158,7 +158,7 @@ export const personnelLoading = {
     },
     // 人员输入框选择
     handleSelectPersonnel(val) {
-      this.form.handler=val.id
+      this.form.handler = val.id
     },
 
 
@@ -223,9 +223,33 @@ export const optionsData = {
     }
   },
   mounted() {
-    
+
+  },
+  methods: {
+
+  },
+}
+
+// 公用js
+export const handleJs = {
+  data() {
+    return {
+
+    }
+  },
+  mounted() {
+
   },
   methods: {
-    
+    //校验文件是否全部上传
+    validFile() {
+      if (this.form.systemFileList && this.form.systemFileList.length > 0) {
+        return this.form.systemFileList.filter(item => {
+          return !item.guid
+        }).length > 0
+      } else {
+        return false
+      }
+    },
   },
 }

+ 319 - 0
src/views/project/patentCollection/components/mixins/index.js

@@ -0,0 +1,319 @@
+export const projectData = {
+  props: {
+    // 视图数据源
+    tableData: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    // 分页信息
+    queryParams: {
+      type: Object,
+      default: () => {
+        return {
+          current: 1,
+          size:10
+        }
+      }
+    },
+    // 栏位
+    column: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    }
+  },
+  data() {
+    return {
+      
+    }
+  },
+  mounted() {
+    
+  },
+  methods: {
+    // 点击专利号
+    handleClick(row,key){},
+  },
+}
+
+export const handleData = {
+  // mixins: [highlight],
+  props: {
+    selected: {
+      type: Array
+    },
+    patentNoList:{
+      type: Array
+    }
+  },
+  data() {
+    return {
+      refresh: true,
+      click: false,
+      projectId:''
+    }
+  },
+  mounted() {
+    
+  },
+  methods: {
+    getViewDom2(row, key, field) {
+      let text = ""
+      const change = row.change
+      text = !change ? row[key][0].text_content : row[key][1].text_content
+      return this.getViewDom(text,field)
+    },
+    getView(row,key,type,prop,data) {
+      var obj = {
+        type: type?type:'String',
+        value: key
+      }
+      var text = this.$commonJS.getColumnData(row, obj,prop,data)
+      return this.getViewDom(text,key)
+    },
+    getViewDom(text, field) {
+      if(!text){
+        return ""
+      }
+      // if (this.contrastList.length > 0) {
+      //   for (let i = 0; i < this.contrastList.length; i++) {
+      //     if (this.contrastList[i].patentNo == this.patent.patentNo) {
+      //       if (this.contrastList[i].scratchField.indexOf(field) != -1) {
+      //         var a = {
+      //           color: this.contrastList[i].color,
+      //           Type: this.contrastList[i].scratchType,
+      //           Id: this.contrastList[i].id,
+      //           column: this.contrastList[i].scratchField,
+      //           index: Number(this.contrastList[i].position),
+      //           text: this.contrastList[i].text,
+      //           remark: this.contrastList[i].remark,
+      //           temNode: text
+      //         }
+      //         text = this.AddClass1(a);
+      //       }
+      //     }
+      //   }
+      // }
+      // if (!this.highlight.enable || !text) {
+      //   return text
+      // }
+      // try {
+
+      //   this.highlight.configs.map(item => {
+      //     const keywords = item.keywords.split(';')
+      //     for (let keyword of keywords) {
+      //       if (!keyword) {
+      //         continue
+      //       }
+      //       let sText = text
+      //       let num = -1
+      //       const rStr = new RegExp(keyword, "g")
+      //       const rHtml = new RegExp("\<.*?\>", "ig")
+      //       const sKey = `<span style="background: ${item.color};color: #fff">${keyword}</span>`
+      //       const aHtml = sText.match(rHtml)
+      //       sText = sText.replace(rHtml, '{~}')
+      //       sText = sText.replace(rStr, sKey)
+      //       sText = sText.replace(/{~}/g, () => {
+      //         num++
+      //         return aHtml[num]
+      //       })
+      //       text = sText
+      //     }
+      //   })
+
+      // } catch (e) {
+      // }
+      return text
+    },
+    //切换原文译文 
+    handleChange(row, key) {
+      switch (key) {
+        case "name":
+          row.change = !row.change
+          break
+        case "abstractStr":
+          row.change2 = !row.change2
+          break
+      }
+    },
+    // 点击专利号进行跳转
+    handleLink(row) {
+      
+      // window.open(router.href, '_blank');
+    },
+
+    // 勾选中专利进行处理
+    changeSelect(patent) {
+      this.click = true
+      const index1 = this.patentNoList.indexOf(patent.patentNo)
+      if (index1 === -1) {
+        if(this.projectId){
+          this.patentNoList.push(patent.patentNo)
+        }else{
+          this.patentNoList.push(patent.applicationNo)
+        }
+        
+      } else {
+        this.patentNoList.splice(index1, 1)
+      }
+      if(patent.id){
+         const index = this.selected.indexOf(patent.id)
+          if (index === -1) {
+            this.selected.push(patent.id)
+          } else {
+            this.selected.splice(index, 1)
+          }
+      }
+     
+      this.$emit('select-change', this.selected)
+      this.$emit('addSelect',patent.applicationNo)
+    },
+  },
+}
+
+export const highlight = {
+ 
+  data() {
+    return {
+      
+    }
+  },
+  methods: {
+    AddClass1(selectObject) {
+      let el = selectObject.temNode;
+      // 将当前页面获取到的字符串进行处理,返回当前页面所有的标签及文本
+      var splitStrings = this.SplitHtmlTag1(el);
+      let bgColor = selectObject.color;
+      // 添加线及高亮
+      let startTag = '<span class="' + selectObject.Id + '" id="' + selectObject.Id + '" style="background-color:' + selectObject.color + '">';
+      if (selectObject.Type == 0) {
+        startTag = '<span class="' + selectObject.Id + '" id="' + selectObject.Id + '" style="border-bottom:2px solid ' + selectObject.color + '">';
+      }
+      if (selectObject.Type == 2) {
+        startTag = '<span class = "' + selectObject.Id + '" id="' + selectObject.Id + '" style = "text-decoration-line: underline;text-decoration-style: wavy ;text-decoration-color: ' + selectObject.color + '">';
+      }
+      // let imgTag = '<span  class="' + selectObject.Id + '" style="background-color:white !important;"><i class="el-icon-location-outline" style="vertical-align: super;background-color:white !important;" onclick="selectMark(\'' + selectObject.Id + '\')"  onmouseenter="mouseenter1(event,\'' + selectObject.Id + '\')"  onmouseleave="mouseleave1(event,\'' + selectObject.Id + '\')"></i></span>';
+      let imgTag = '<span  class="' + selectObject.Id + '" style="background-color:white !important;"><i class="iconfont icon-xinxi3" style="vertical-align: super;background-color:white !important;" onclick="selectMark(\'' + selectObject.Id + '\')"  onmouseenter="mouseenter1(event,\'' + selectObject.Id + '\')"  onmouseleave="mouseleave1(event,\'' + selectObject.Id + '\')"></i></span>';
+      let endTag = '</span>';
+      let elText = '';
+
+      splitStrings.forEach(function (item) {
+        if (item.type == 'text') {
+          elText = elText + item.text;
+        }
+      });
+      let Indexs = [];
+      let i = 0
+      if (selectObject.index < 0) {
+        let pattern = new RegExp(selectObject.text.replace(/[\r\n]/g, "").replace(/\ +/g, ""), "g");
+        while ((match = pattern.exec(elText)) != null) {
+          Indexs[i] = match;
+          i++;
+        }
+      } else {
+        Indexs[i] = [selectObject.text];
+        Indexs[i].index = selectObject.index;
+      }
+      Indexs.forEach(function (match) {
+        let currentIndex = 0;
+        let temSplitStrings = new Array();
+        splitStrings.forEach(function (item) {
+          if (item.type == 'text') {
+            if (item.text) {
+              if (match.index >= currentIndex && match.index < (currentIndex + item.text.length)) {
+                if (selectObject.column.indexOf('权利要求') != -1) {
+                  item.text = item.text.replace(/\r/g, ' ')
+                  if (item.text.match(/\r/g)) {
+                    match.index -= 1
+                  }
+
+                }
+                if (selectObject.column.indexOf('说明书') != -1) {
+                  item.text = item.text.replace(/\r/g, "")
+                }
+                
+                if ((match.index + match[0].length) <= (currentIndex + item.text.length) && item.text.indexOf(match[0]) != -1) {
+
+                  if (match.index > currentIndex) {
+                    temSplitStrings.push({ text: item.text.substring(0, match.index - currentIndex), type: 'text' });
+                  }
+                  temSplitStrings.push({ text: startTag, type: 'tag' });
+                  temSplitStrings.push({ text: match[0], type: 'text' });
+                  temSplitStrings.push({ text: imgTag, type: 'tag' });
+                  // }
+                  temSplitStrings.push({ text: endTag, type: 'tag' });
+
+                  if ((match.index + match[0].length) < (currentIndex + item.text.length)) {
+                    temSplitStrings.push({ text: item.text.substring((match.index + match[0].length) - currentIndex), type: 'text' });
+                  }
+                } else {
+                  if (item.text.indexOf(match[0]) != -1) {
+                    if (match.index > currentIndex) {
+                      temSplitStrings.push({ text: item.text.substring(0, match.index - currentIndex), type: 'text' });
+                    }
+                    if (temSplitStrings.length > 1) {
+                      temSplitStrings.push({ text: startTag, type: 'tag' });
+                    } else {
+                      temSplitStrings.push({ text: startTag, type: 'tag' });
+                    }
+
+                    temSplitStrings.push({ text: item.text.substring(match.index - currentIndex), type: 'text' });
+                    temSplitStrings.push({ text: endTag, type: 'tag' });
+                  } else {
+                    temSplitStrings.push({ text: item.text.substring(0, match.index - currentIndex), type: 'text' });
+                    temSplitStrings.push({ text: startTag, type: 'tag' });
+                    temSplitStrings.push({ text: item.text.substring( match.index - currentIndex,item.text.length), type: 'text' });
+                    temSplitStrings.push({ text: endTag, type: 'tag' });
+                  }
+                }
+              } else {
+                if ((match.index + match[0].length) <= (currentIndex + item.text.length) && (match.index + match[0].length) > currentIndex) {
+
+                  temSplitStrings.push({ text: startTag, type: 'tag' });
+                  temSplitStrings.push({ text: item.text.substring(0, match.index + match[0].length - currentIndex), type: 'text' });
+
+                  temSplitStrings.push({ text: imgTag, type: 'tag' });
+
+                  temSplitStrings.push({ text: endTag, type: 'tag' });
+                  if ((match.index + match[0].length) < (currentIndex + item.text.length)) {
+                    temSplitStrings.push({ text: item.text.substring((match.index + match[0].length - currentIndex)), type: 'text' });
+                  }
+                } else {
+                  if (match.index < currentIndex && (match.index + match[0].length) >= (currentIndex + item.text.length)) {
+
+                    temSplitStrings.push({ text: startTag, type: 'tag' });
+                    temSplitStrings.push(item);
+                    temSplitStrings.push({ text: endTag, type: 'tag' });
+                  } else {
+
+                    temSplitStrings.push(item);
+                  }
+                }
+              }
+
+              currentIndex = currentIndex + item.text.length;
+            } else {
+              temSplitStrings.push(item);
+            }
+          } else {
+            temSplitStrings.push(item);
+          }
+        });
+
+        splitStrings = temSplitStrings;
+      });
+
+      let temInnerHtml = '';
+      splitStrings.forEach(function (item) {
+        temInnerHtml = temInnerHtml + item.text;
+      });
+      return temInnerHtml;
+
+    },
+  },
+}
+
+

+ 343 - 0
src/views/project/patentCollection/components/mixins/index2.js

@@ -0,0 +1,343 @@
+export const patentKeywordsHighlight = {
+ 
+  computed: {
+    highlight() {
+      return this.$store.state.patent.highlight
+    },
+    contrastList() {
+      return this.$store.state.report.contrastList
+    }
+  },
+  mounted() {
+    window.mouseenter1=this.mouseenter1
+     window.mouseleave1=this.mouseleave1
+  },
+  methods: {
+    mouseenter1(e, id) {
+      var dom = document.getElementsByClassName(id)
+      var message = this.getMessage(id)
+      // 普通for循环可以拿到dom节点,forEach是拿不到dom节点
+      for (let i = 0; i < dom.length - 1; i++){
+        dom[i].classList.add('greenColor')
+        this.getChildNodesAdd(dom[i].childNodes)
+      }
+          // e.target是获取当前的,dom获取的是所有的class相同的节点
+        e.target.parentNode.classList.add("pizhuLightHeigh");
+        if (message.remark) {
+          e.target.parentNode.appendChild(this.addPara(message.remark,e));
+        }
+    },
+    // 添加背景色
+    getChildNodesAdd(dom) {
+      if (dom.length > 0) {
+        for (let m = 0; m < dom.length; m++){
+          if (dom[m].nodeType == 1) {
+            dom[m].classList.add('greenColor')
+          }
+          if (dom[m].childNodes.length > 0) {
+            this.getChildNodesAdd(dom[m].childNodes)
+          }
+        }
+      }
+    },
+    // 删除背景色
+    getChildNodesRemove(dom) {
+      if (dom.length > 0) {
+        for (let m = 0; m < dom.length; m++){
+          if (dom[m].nodeType == 1) {
+            dom[m].classList.remove('greenColor')
+          }
+          if (dom[m].childNodes.length > 0) {
+            this.getChildNodesRemove(dom[m].childNodes)
+          }
+        }
+      }
+    },
+    getMessage(Id) {
+      return this.contrastList.find(item => {
+        return item.id == Id
+      })
+    },
+    addPara(val, e) {
+      //创建div标签
+       var p = document.createElement("div");
+      //添加class
+      p.classList.add('showPiZhu')
+      if (e.clientY - 200 < 200 && e.clientX + 200 > document.documentElement.clientWidth) {
+        p.setAttribute('style','left:-200px')
+      }else if ((e.clientX + 200 > document.documentElement.clientWidth && e.clientY + 200 > document.documentElement.clientHeight) || e.clientX + 200 > document.documentElement.clientWidth) {
+         p.setAttribute('style','bottom:25px;left:-200px;') 
+      } else if((e.clientY + 200 > document.documentElement.clientHeight && e.clientX-200 < 200) || (e.clientY + 200 > document.documentElement.clientHeight && e.clientX-200 > 200)) {
+        p.setAttribute('style','bottom:20px;left:10px')
+      }
+      //创建文本节点
+      var text = document.createTextNode(val);
+      //将文本节点追加到元素节点中
+      p.appendChild(text);
+       return p
+  },
+    mouseleave1(e, id) {
+      var dom = document.getElementsByClassName(id)
+      e.target.parentNode.classList.remove("pizhuLightHeigh");
+      var message = this.getMessage(id)
+      if (message.remark) {
+        document.getElementsByClassName('showPiZhu')[0].remove()
+      }
+      for (let i = 0; i < dom.length - 1; i++){
+        dom[i].classList.remove('greenColor')
+        this.getChildNodesRemove(dom[i].childNodes)
+      }
+    },
+    getViewDom1(row, field,key) {
+      if(!row){
+        return '';
+      }
+      var html = ''
+      if(row.length == 1){
+        var str = row[0][key]
+        if(!str){
+          return ''
+        }
+        var arr = str.split(/\r\n/g)
+        arr.forEach(item=>{
+          html = html + `<p class="common"> ${item} </p>`
+        })
+      }else{
+        row.forEach(item => {
+          if(item[key]){
+             html = html + `<p class="common"> ${item[key]} </p>`
+          }
+        
+       })
+      }
+      
+     return this.getViewDom(html,field)
+    },
+    getViewDom(text, field) {
+      if(!text){
+        return ""
+      }
+      if (this.contrastList.length > 0) {
+        for (let i = 0; i < this.contrastList.length; i++) {
+          if (this.contrastList[i].patentNo == this.patent.patentNo) {
+            if (this.contrastList[i].scratchField.indexOf(field) != -1) {
+              var a = {
+                color: this.contrastList[i].color,
+                Type: this.contrastList[i].scratchType,
+                Id: this.contrastList[i].id,
+                column: this.contrastList[i].scratchField,
+                index: Number(this.contrastList[i].position),
+                text: this.contrastList[i].text,
+                remark: this.contrastList[i].remark,
+                temNode: text
+              }
+              text = this.AddClass1(a);
+            }
+          }
+        }
+      }
+
+       
+      if (!this.highlight.enable || !text) {
+        return text
+      }
+      try {
+
+        this.highlight.configs.map(item => {
+          const keywords = item.keywords.split(';')
+          for (let keyword of keywords) {
+            if (!keyword) {
+              continue
+            }
+            let sText = text
+            let num = -1
+            const rStr = new RegExp(keyword, "g")
+            const rHtml = new RegExp("\<.*?\>", "ig")
+            const sKey = `<span style="background: ${item.color};color: #fff">${keyword}</span>`
+            const aHtml = sText.match(rHtml)
+            sText = sText.replace(rHtml, '{~}')
+            sText = sText.replace(rStr, sKey)
+            sText = sText.replace(/{~}/g, () => {
+              num++
+              return aHtml[num]
+            })
+            text = sText
+          }
+        })
+
+      } catch (e) {
+      }
+      return text
+    },
+    SplitHtmlTag1(el) {
+      let temInnerHtml = el.trim();
+      let pattern = /<[^>]+>/g;
+      let Indexs = [];
+      let i = 0
+      var match = null
+      while ((match = pattern.exec(temInnerHtml)) != null) {
+        Indexs[i] = match;
+        i++;
+      }
+      var splitStrings = new Array();
+      i = 0;
+      var currentIndex = 0;
+      for (var index = 0; index < Indexs.length; index++) {
+        if (Indexs[index].index > currentIndex) {
+          splitStrings[i] = { "text": temInnerHtml.substring(currentIndex, Indexs[index].index), "type": "text" };
+          i++;
+          splitStrings[i] = { "text": Indexs[index][0], "type": "tag" };
+          i++;
+        } else {
+          splitStrings[i] = { "text": Indexs[index][0], "type": "tag" };
+          i++;
+        }
+        currentIndex = Indexs[index].index + Indexs[index][0].length;
+      }
+      if (currentIndex < temInnerHtml.length) {
+        splitStrings[i] = { "text": temInnerHtml.substring(currentIndex, temInnerHtml.length), "type": "text" };
+      }
+
+      return splitStrings;
+
+    },
+    AddClass1(selectObject) {
+      let el = selectObject.temNode;
+      // 将当前页面获取到的字符串进行处理,返回当前页面所有的标签及文本
+      var splitStrings = this.SplitHtmlTag1(el);
+      let bgColor = selectObject.color;
+      // 添加线及高亮
+      let startTag = '<span class="' + selectObject.Id + '" id="' + selectObject.Id + '" style="background-color:' + selectObject.color + '">';
+      if (selectObject.Type == 0) {
+        startTag = '<span class="' + selectObject.Id + '" id="' + selectObject.Id + '" style="border-bottom:2px solid ' + selectObject.color + '">';
+      }
+      if (selectObject.Type == 2) {
+        startTag = '<span class = "' + selectObject.Id + '" id="' + selectObject.Id + '" style = "text-decoration-line: underline;text-decoration-style: wavy ;text-decoration-color: ' + selectObject.color + '">';
+      }
+      // let imgTag = '<span  class="' + selectObject.Id + '" style="background-color:white !important;"><i class="el-icon-location-outline" style="vertical-align: super;background-color:white !important;" onclick="selectMark(\'' + selectObject.Id + '\')"  onmouseenter="mouseenter1(event,\'' + selectObject.Id + '\')"  onmouseleave="mouseleave1(event,\'' + selectObject.Id + '\')"></i></span>';
+      let imgTag = '<span  class="' + selectObject.Id + '" style="background-color:white !important;"><i class="iconfont icon-xinxi3" style="vertical-align: super;background-color:white !important;" onclick="selectMark(\'' + selectObject.Id + '\')"  onmouseenter="mouseenter1(event,\'' + selectObject.Id + '\')"  onmouseleave="mouseleave1(event,\'' + selectObject.Id + '\')"></i></span>';
+      let endTag = '</span>';
+      let elText = '';
+
+      splitStrings.forEach(function (item) {
+        if (item.type == 'text') {
+          elText = elText + item.text;
+        }
+      });
+      let Indexs = [];
+      let i = 0
+      if (selectObject.index < 0) {
+        let pattern = new RegExp(selectObject.text.replace(/[\r\n]/g, "").replace(/\ +/g, ""), "g");
+        while ((match = pattern.exec(elText)) != null) {
+          Indexs[i] = match;
+          i++;
+        }
+      } else {
+        Indexs[i] = [selectObject.text];
+        Indexs[i].index = selectObject.index;
+      }
+      Indexs.forEach(function (match) {
+        let currentIndex = 0;
+        let temSplitStrings = new Array();
+        splitStrings.forEach(function (item) {
+          if (item.type == 'text') {
+            if (item.text) {
+              if (match.index >= currentIndex && match.index < (currentIndex + item.text.length)) {
+                if (selectObject.column.indexOf('权利要求') != -1) {
+                  item.text = item.text.replace(/\r/g, ' ')
+                  if (item.text.match(/\r/g)) {
+                    match.index -= 1
+                  }
+
+                }
+                if (selectObject.column.indexOf('说明书') != -1) {
+                  // var b = selectObject.temNode.replace(/<[^>]+>/g, '')
+                  // if (b.substring(0, match.index).indexOf('\r') == -1) {
+                  //   var a = b.substring(0, match.index).match(/\n/g)
+                  //   if (a) {
+                  //     match.index -= a.length
+                  //   }
+                  // }
+                  item.text = item.text.replace(/\r/g, "")
+                }
+                
+                if ((match.index + match[0].length) <= (currentIndex + item.text.length) && item.text.indexOf(match[0]) != -1) {
+
+                  if (match.index > currentIndex) {
+                    temSplitStrings.push({ text: item.text.substring(0, match.index - currentIndex), type: 'text' });
+                  }
+                  temSplitStrings.push({ text: startTag, type: 'tag' });
+                  temSplitStrings.push({ text: match[0], type: 'text' });
+                  temSplitStrings.push({ text: imgTag, type: 'tag' });
+                  // }
+                  temSplitStrings.push({ text: endTag, type: 'tag' });
+
+                  if ((match.index + match[0].length) < (currentIndex + item.text.length)) {
+                    temSplitStrings.push({ text: item.text.substring((match.index + match[0].length) - currentIndex), type: 'text' });
+                  }
+                } else {
+                  if (item.text.indexOf(match[0]) != -1) {
+                    if (match.index > currentIndex) {
+                      temSplitStrings.push({ text: item.text.substring(0, match.index - currentIndex), type: 'text' });
+                    }
+                    if (temSplitStrings.length > 1) {
+                      temSplitStrings.push({ text: startTag, type: 'tag' });
+                    } else {
+                      temSplitStrings.push({ text: startTag, type: 'tag' });
+                    }
+
+                    temSplitStrings.push({ text: item.text.substring(match.index - currentIndex), type: 'text' });
+                    temSplitStrings.push({ text: endTag, type: 'tag' });
+                  } else {
+                    temSplitStrings.push({ text: item.text.substring(0, match.index - currentIndex), type: 'text' });
+                    temSplitStrings.push({ text: startTag, type: 'tag' });
+                    temSplitStrings.push({ text: item.text.substring( match.index - currentIndex,item.text.length), type: 'text' });
+                    temSplitStrings.push({ text: endTag, type: 'tag' });
+                  }
+                }
+              } else {
+                if ((match.index + match[0].length) <= (currentIndex + item.text.length) && (match.index + match[0].length) > currentIndex) {
+
+                  temSplitStrings.push({ text: startTag, type: 'tag' });
+                  temSplitStrings.push({ text: item.text.substring(0, match.index + match[0].length - currentIndex), type: 'text' });
+
+                  temSplitStrings.push({ text: imgTag, type: 'tag' });
+
+                  temSplitStrings.push({ text: endTag, type: 'tag' });
+                  if ((match.index + match[0].length) < (currentIndex + item.text.length)) {
+                    temSplitStrings.push({ text: item.text.substring((match.index + match[0].length - currentIndex)), type: 'text' });
+                  }
+                } else {
+                  if (match.index < currentIndex && (match.index + match[0].length) >= (currentIndex + item.text.length)) {
+
+                    temSplitStrings.push({ text: startTag, type: 'tag' });
+                    temSplitStrings.push(item);
+                    temSplitStrings.push({ text: endTag, type: 'tag' });
+                  } else {
+
+                    temSplitStrings.push(item);
+                  }
+                }
+              }
+
+              currentIndex = currentIndex + item.text.length;
+            } else {
+              temSplitStrings.push(item);
+            }
+          } else {
+            temSplitStrings.push(item);
+          }
+        });
+
+        splitStrings = temSplitStrings;
+      });
+
+      let temInnerHtml = '';
+      splitStrings.forEach(function (item) {
+        temInnerHtml = temInnerHtml + item.text;
+      });
+      return temInnerHtml;
+
+    },
+  }
+}

+ 86 - 47
src/views/project/patentCollection/components/views/Abstract.vue

@@ -1,28 +1,34 @@
 <template>
+  <!-- 摘要视图 -->
   <div class="patent-abstract-list-view">
-    <div class="patent-abstract-card" v-for="(patent, index) in records">
+    <div class="patent-abstract-card" v-for="(patent, index) in tableData" :key="patent.appNo">
       <div class="patent-abstract-card-wrapper">
         <table class="patent-abstract-card-table">
           <tbody>
             <tr>
-              <td v-if="refresh"><el-checkbox :label="patent.id" @change="changeSelect(patent)" :checked="selected.indexOf(patent.id) !== -1 || patentNoList.indexOf(patent.patentNo)!== -1"></el-checkbox></td>
+              <!-- <td v-if="refresh"><el-checkbox :label="patent.id" @change="changeSelect(patent)"
+                  :checked="selected.indexOf(patent.id) !== -1 || patentNoList.indexOf(patent.patentNo) !== -1"></el-checkbox>
+              </td> -->
+              <td v-if="refresh"><el-checkbox :label="patent.id" @change="changeSelect(patent)"></el-checkbox>
+              </td>
               <td>
                 <div class="patent-abstract-index-container">
-                  <span>{{ (index + 1) + ((params.current - 1) * params.size) }}</span>
+                  <span>{{ (index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
+                  <!-- 已读未读 -->
                   <span v-if="projectId">
-                    <el-tag :type="patent.read === 0 ? 'danger' : 'success'" v-if="$permission('/workspace/folder/isRead')" effect="dark" size="small" @click="handleChangeRead(patent)">{{ readType[patent.read] }}</el-tag>
-                    <el-tag type="info" v-else effect="dark" size="small" >{{ readType[patent.read] }}</el-tag>
+                    <!-- patent.read判断已读未读 -->
+                    <el-tag :type="patent.read === 0 ? 'danger' : 'success'"
+                      v-if="$permission('/workspace/folder/isRead')" effect="dark" size="small"
+                      @click="handleChangeRead(patent)">{{ readType[patent.read] }}</el-tag>
+                    <el-tag type="info" v-else effect="dark" size="small">{{ readType[patent.read] }}</el-tag>
                   </span>
-                  
+
                 </div>
-                <!-- <el-popover placement="right-start" width="600" trigger="hover">
-                  <img :src="getPatentAbstractImage(patent.abstractPath)" height="400" width="100%">
-                  <div class="patent-abstract-image-container" slot="reference">
-                    <img :src="getPatentAbstractImage(patent.abstractPath)">
-                  </div>
-                </el-popover> -->
-                <div class="picture text-align_center patent-abstract-image-container" style="">
-                    <el-image v-if="(!projectId && patent.abstractPath2)||projectId" :src="patent.abstractPath2?patent.abstractPath2:getImagePath1(patent)" :preview-src-list="[patent.abstractPath2]" style="margin:0 auto;vertical-align:middle;" :style="{width:patent.imgWidth?patent.imgWidth:'100%',height:patent.imgHeight?patent.imgHeight:'100%'}">
+                <div class="picture text-align_center patent-abstract-image-container">
+                  <el-image v-if="(!projectId && patent.abstractPath2) || projectId"
+                    :src="patent.abstractPath2 ? patent.abstractPath2 : getImagePath1(patent)"
+                    :preview-src-list="[patent.abstractPath2]" style="margin:0 auto;vertical-align:middle;"
+                    :style="{ width: patent.imgWidth ? patent.imgWidth : '100%', height: patent.imgHeight ? patent.imgHeight : '100%' }">
                     <div slot="error" class="image-slot">
                       <el-image :src="getErrorImage(patent)" :preview-src-list="[getErrorImage(patent)]">
                         <div slot="error" class="image-slot">
@@ -34,23 +40,29 @@
 
                 </div>
                 <div class="patent-abstract-pdf-button-container">
-                  <el-button :disabled="!$permission('/workspace/folder/PDFdownload')" class="width_100" size="small" type="primary" @click="handleDownload(patent)">PDF 下载</el-button>
+                  <el-button :disabled="!$permission('/workspace/folder/PDFdownload')" class="width_100" size="small"
+                    type="primary" @click="handleDownload(patent)">PDF 下载</el-button>
                 </div>
               </td>
+              <!-- 专利号 -->
               <td width="850px">
                 <div class="patent-abstract-title">
-                  <el-link :disabled="!$permission('/workspace/details')" :class="$permission('/workspace/details')?'':'jinzhi'" type="success" @click.native="handleLink(patent)">
-                    <span v-html="getViewDom(patent.patentNo)"></span>
+                  <el-link :disabled="!$permission('/workspace/details')"
+                    :class="$permission('/workspace/details') ? '' : 'jinzhi'" type="success"
+                    @click.native="handleLink(patent)">
+                    <span v-html="getView(patent, 'patentNo')"></span>
                   </el-link>
-                  <el-tag class="margin-left_10" type="primary" effect="dark" size="small" v-if="patent.simpleStatus">{{ patent.simpleStatus }}</el-tag>
+                  <el-tag class="margin-left_10" type="primary" effect="dark" size="small" v-if="patent.simpleStatus">{{
+                    patent.simpleStatus }}</el-tag>
                 </div>
                 <div style="font-size: 13px;">
                   <el-row>
                     <el-col :span="24" v-if="t()">
                       <span class="patent-abstract_label">标题:</span>
                       <span class="patent-abstract_text">
-                        <span v-html="getViewDom2(patent, 'name')"></span>
-                        <el-link v-if="projectId" type="primary" @click.native="handleChange(patent, 'name')" style="margin-left: 10px;">
+                        <span v-html="getViewDom2(patent, 'title')"></span>
+                        <el-link v-if="projectId" type="primary" @click.native="handleChange(patent, 'title')"
+                          style="margin-left: 10px;">
                           <span v-if="!patent.change">切换译文</span>
                           <span v-else>切换原文</span>
                         </el-link>
@@ -61,19 +73,19 @@
                     <el-col :span="8" v-if="t()">
                       <span class="patent-abstract_label">申请日:</span>
                       <span class="patent-abstract_text">
-                        <span v-html="getViewDom(patent.applicationDate)"></span>
+                        <span v-html="getView(patent, 'appDate')"></span>
                       </span>
                     </el-col>
                     <el-col :span="8" v-if="t()">
                       <span class="patent-abstract_label">公开日:</span>
                       <span class="patent-abstract_text">
-                        <span v-html="getViewDom(patent.publicDate)"></span>
+                        <span v-html="getView(patent, 'publicDate')"></span>
                       </span>
                     </el-col>
                     <el-col :span="8" v-if="t()">
                       <span class="patent-abstract_label">申请号:</span>
                       <span class="patent-abstract_text">
-                        <span v-html="getViewDom(patent.applicationNo)"></span>
+                        <span v-html="getView(patent, 'appNo')"></span>
                       </span>
                     </el-col>
                   </el-row>
@@ -83,7 +95,7 @@
                       <span class="patent-abstract_text" v-if="patent.applicant">
                         <template v-for="(item, index) in patent.applicant.filter(a => a.dataType === 1)">
                           <el-link type="primary">
-                            <span v-html="getViewDom(item.name)"></span>
+                            <span v-html="getView(item.name)"></span>
                           </el-link>
                           <span class="patent-abstract_semicolon">;</span>
                         </template>
@@ -96,7 +108,7 @@
                       <span class="patent-abstract_text" v-if="patent.applicant">
                         <template v-for="(item, index) in patent.applicant.filter(a => a.dataType === 2)">
                           <el-link type="primary">
-                            <span v-html="getViewDom(item.name)"></span>
+                            <span v-html="getView(item.name)"></span>
                           </el-link>
                           <span class="patent-abstract_semicolon">;</span>
                         </template>
@@ -109,7 +121,7 @@
                       <span class="patent-abstract_text">
                         <template v-for="(item, index) in patent.inventor">
                           <el-link type="primary">
-                            <span v-html="getViewDom(item.name)"></span>
+                            <span v-html="getView(item.name)"></span>
                           </el-link>
                           <span class="patent-abstract_semicolon">;</span>
                         </template>
@@ -122,7 +134,7 @@
                       <span class="patent-abstract_text">
                         <template v-for="(item, index) in patent.ipcList">
                           <el-link type="primary">
-                            <span v-html="getViewDom(item)"></span>
+                            <span v-html="getView(item)"></span>
                           </el-link>
                           <span class="patent-abstract_semicolon">;</span>
                         </template>
@@ -133,9 +145,10 @@
                     <el-col :span="24">
                       <span class="patent-abstract_label">简单同族:</span>
                       <span class="patent-abstract_text">
-                        <template v-for="(item, index) in patent.family.simple">
+                        <!-- <template v-for="(item, index) in patent.family.simple"> -->
+                        <template v-for="(item, index) in patent.simpleFamilyNum">
                           <el-link type="primary" @click.native="handleFamily(item)">
-                            <span v-html="getViewDom(item)"></span>
+                            <span v-html="getView(item)"></span>
                           </el-link>
                           <span class="patent-abstract_semicolon">;</span>
                         </template>
@@ -146,9 +159,10 @@
                     <el-col :span="24">
                       <span class="patent-abstract_label">INPADOC同族:</span>
                       <span class="patent-abstract_text">
-                        <template v-for="(item, index) in patent.family.inpadoc">
+                        <!-- <template v-for="(item, index) in patent.family.inpadoc"> -->
+                        <template v-for="(item, index) in patent.simpleFamilyNum">
                           <el-link type="primary" @click.native="handleFamily(item)">
-                            <span v-html="getViewDom(item)"></span>
+                            <span v-html="getView(item)"></span>
                           </el-link>
                           <span class="patent-abstract_semicolon">;</span>
                         </template>
@@ -159,9 +173,10 @@
                     <el-col :span="24">
                       <span class="patent-abstract_label">PatSnap同族:</span>
                       <span class="patent-abstract_text">
-                        <template v-for="(item, index) in patent.family.patSnap">
+                        <!-- <template v-for="(item, index) in patent.family.patSnap"> -->
+                        <template v-for="(item, index) in patent.simpleFamilyNum">
                           <el-link type="primary" @click.native="handleFamily(item)">
-                            <span v-html="getViewDom(item)"></span>
+                            <span v-html="getView(item)"></span>
                           </el-link>
                           <span class="patent-abstract_semicolon">;</span>
                         </template>
@@ -188,7 +203,7 @@
                       <el-col class="name">{{ field.name }}</el-col>
                       <el-col class="data">
                         <div v-for="data in getColumnValue(patent, field)">
-                          <span v-html="getViewDom(data)"></span>
+                          <span v-html="getView(data)"></span>
                         </div>
                         <el-button v-if="$r(projectId, [1, 2])" type="text" icon="el-icon-edit" @click="handleIndexSetting(patent, field)">编辑</el-button>
                       </el-col>
@@ -205,15 +220,17 @@
 </template>
 
 <script>
-import { commonMixins } from "../../articles/components/mixins"
-import { patentViewList, patentKeywordsHighlight } from '../mixins'
-
+// import { commonMixins } from "../../articles/components/mixins"
+// import { patentViewList, patentKeywordsHighlight } from '../mixins'
+import { projectData, handleData } from '../mixins/index'
 export default {
-  props: ['viewField'],
-  mixins: [patentViewList, patentKeywordsHighlight,commonMixins],
+  mixins: [projectData, handleData],
+  // props: ['viewField'],
+  // mixins: [patentViewList, patentKeywordsHighlight,commonMixins],
   data() {
     return {
       checkList: [],
+      // 已读未读
       readType: {
         1: '已读',
         0: '未读'
@@ -225,14 +242,14 @@ export default {
     }
   },
   watch: {
-    records(val,oldval) {
-      if(val != oldval){
+    records(val, oldval) {
+      if (val != oldval) {
         this.$nextTick(() => {
           this.addRecords()
           this.refreshCheckBox()
         })
       }
-      
+
     }
   },
   computed: {
@@ -247,13 +264,14 @@ export default {
 
   },
   methods: {
+    // 同族事件
     handleFamily(item) {
       this.$api.getPatentIdByPatentNo({ patentNo: item }).then(response => {
         if (response.data === 0) {
           this.$alert('专利暂未收录', '请求错误', {
             confirmButtonText: '确定',
             type: 'error',
-            callback: action => {}
+            callback: action => { }
           });
         } else {
           this.handleLink({ id: response.data })
@@ -274,10 +292,11 @@ export default {
     handleIndexSetting(row, field) {
       this.$emit('index-setting', row, field)
     },
+    // ???????
     t(key) {
-      if (key) {
-        return this.columnList.map(item => item.key).indexOf(key) !== -1
-      }
+      // if (key) {
+      //   return this.columnList.map(item => item.key).indexOf(key) !== -1
+      // }
       return true
     },
     getPatentAbstractImage(path) {
@@ -289,9 +308,11 @@ export default {
     openPatentAbstractImage(abstractPath) {
       // console.log(abstractPath)
     },
+    // pdf下载按钮
     handleDownload(patent) {
       this.$emit('download', patent)
     },
+    // 已读未读
     handleChangeRead(patent) {
       const status = patent.read === 1 ? 0 : 1
       this.$emit('change-read', [patent.id], status)
@@ -305,20 +326,25 @@ export default {
   .patent-abstract-card {
     width: 100%;
     border-bottom: 1px solid #e5e5e5;
+
     .patent-abstract-card-wrapper {
       padding: 10px;
       min-height: 200px;
+
       .patent-abstract-card-table {
         height: 100%;
+
         .patent-abstract-index-container {
           font-size: 13px;
           padding-left: 10px;
           margin-bottom: 10px;
+
           .el-tag {
             margin-left: 10px;
             cursor: pointer;
           }
         }
+
         .patent-abstract-image-container {
           // padding: 10px;
           border: 1px solid #bcc2cc;
@@ -331,52 +357,65 @@ export default {
           //   height: 100%;
           // }
         }
+
         .patent-abstract-pdf-button-container {
           text-align: center;
           margin-top: 10px;
         }
+
         .patent-abstract-title {
           margin-bottom: 5px;
         }
+
         .patent-custom-field {
           line-height: 35px;
           font-size: 14px;
           border-bottom: 1px solid #ebecf0;
+
           .name {
             width: 200px;
             float: left;
           }
+
           .data {
             width: calc(100% - 200px);
             float: right;
           }
         }
+
         .patent-abstract_label {
           color: #495973;
           padding-right: 8px;
         }
+
         .patent-abstract_text {
           .el-link {
             position: relative;
             top: -2px;
           }
         }
+
         .patent-abstract_semicolon {
           padding-left: 5px;
           padding-right: 5px;
           display: inline-block;
           color: #495973;
         }
-        tbody, tr, td {
+
+        tbody,
+        tr,
+        td {
           height: 100%;
           vertical-align: top;
         }
       }
+
       .el-checkbox__label {
         display: none;
       }
     }
   }
+
   .el-card__header {
     font-weight: normal;
     font-size: 14px;

+ 52 - 44
src/views/project/patentCollection/components/views/Picture.vue

@@ -1,38 +1,43 @@
 <template>
+  <!-- 图片视图 -->
   <div class="pic">
     <div class="item" style="padding:10px;display: flex;flex-wrap: wrap;">
-      <!-- <el-row :gutter="24" style="padding: 10px;display: flex;flex-wrap: wrap;">
-      <el-col :span="6" v-for="(item,index) in records" class="c"> -->
-        <el-card  shadow="hover" v-for="(item,index) in records" style="width:200px" >
-          <div slot="header" style="width: 100%; white-space: nowrap;overflow-x: hidden;text-overflow: ellipsis;font-size:12px;" >
-            <div>序号:{{ (index + 1) + ((params.current - 1) * params.size) }}</div>
-            <el-divider></el-divider>
-            <!-- <hr style="background-color: #DCDFE6;"> -->
-           <span v-if="refresh"> <el-checkbox :label="item.id" @change="changeSelect(item)" :checked="selected.indexOf(item.id) !== -1 || patentNoList.indexOf(item.patentNo)!== -1">
-              
-                <el-link  :disabled="!$permission('/workspace/details')" :class="$permission('/workspace/details')?'':'jinzhi'" :type="item.read === 1 ? 'success' : 'danger'" @click.native.prevent="handleLink(item)">
-                  <span v-html="getViewDom(item.patentNo)"></span>
-                </el-link>
-              
-            </el-checkbox>  </span>
-            <el-tooltip effect="dark" :content="item.name" placement="top">
-                <span style="" v-html="getViewDom(item.name)"></span>
-              </el-tooltip>
-          </div>
-          <div class="picture text-align_center" style="height: 200px;width:100%;line-height:200px;">
-              <el-image v-if="(!projectId && item.abstractPath2)||projectId" :src="item.abstractPath2?item.abstractPath2:getImagePath1(item)" :preview-src-list="[item.abstractPath2]" style="margin:0 auto;vertical-align:middle;" :style="{width:item.imgWidth?item.imgWidth:'100%',height:item.imgHeight?item.imgHeight:'100%'}">
-              <div slot="error" class="image-slot">
-                <el-image :src="getErrorImage(item)" :preview-src-list="[getErrorImage(item)]">
-                  <div slot="error" class="image-slot">
-                    <img src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="" style="">
-                  </div>
-                </el-image>
-              </div>
-            </el-image>
+      <el-card shadow="hover" v-for="(item, index) in tableData" style="width:200px">
+        <div slot="header"
+          style="width: 100%; white-space: nowrap;overflow-x: hidden;text-overflow: ellipsis;font-size:12px;">
+          <div>序号:{{ (index + 1) + ((queryParams.current - 1) * queryParams.size) }}</div>
+          <el-divider></el-divider>
+          <span v-if="refresh"> <el-checkbox :label="item.id" @change="changeSelect(item)"
+             >
 
-          </div>
-        </el-card>
-<!--      
+              <el-link :disabled="!$permission('/workspace/details')"
+                :class="$permission('/workspace/details') ? '' : 'jinzhi'" :type="item.read === 1 ? 'success' : 'danger'"
+                @click.native.prevent="handleLink(item)">
+                <span v-html="getView(item,'patentNo')"></span>
+              </el-link>
+
+            </el-checkbox> </span>
+          <el-tooltip effect="dark" :content="getViewDom2(item,'title')" placement="left">
+            <span style="" v-html="getViewDom2(item,'title')"></span>
+          </el-tooltip>
+        </div>
+        <div class="picture text-align_center" style="height: 200px;width:100%;line-height:200px;">
+          <el-image v-if="(!projectId && item.abstractPath2) || projectId"
+            :src="item.abstractPath2 ? item.abstractPath2 : getImagePath1(item)" :preview-src-list="[item.abstractPath2]"
+            style="margin:0 auto;vertical-align:middle;"
+            :style="{ width: item.imgWidth ? item.imgWidth : '100%', height: item.imgHeight ? item.imgHeight : '100%' }">
+            <div slot="error" class="image-slot">
+              <el-image :src="getErrorImage(item)" :preview-src-list="[getErrorImage(item)]">
+                <div slot="error" class="image-slot">
+                  <img src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="" style="">
+                </div>
+              </el-image>
+            </div>
+          </el-image>
+
+        </div>
+      </el-card>
+      <!--      
       </el-col>
     </el-row> -->
     </div>
@@ -40,11 +45,13 @@
 </template>
 
 <script>
-import { commonMixins } from "../../articles/components/mixins"
-import { patentViewList, patentKeywordsHighlight } from '../mixins'
+// import { commonMixins } from "../../articles/components/mixins"
+// import { patentViewList, patentKeywordsHighlight } from '../mixins'
+import { projectData, handleData } from '../mixins/index'
 export default {
+  mixins: [projectData, handleData],
   props: [],
-  mixins:[commonMixins,patentViewList, patentKeywordsHighlight ],
+  // mixins:[commonMixins,patentViewList, patentKeywordsHighlight ],
   data() {
     return {
 
@@ -56,8 +63,8 @@ export default {
     // }
   },
   watch: {
-    records(val,oldval) {
-      if(val != oldval){
+    records(val, oldval) {
+      if (val != oldval) {
         this.$nextTick(() => {
           this.addRecords()
           this.refreshCheckBox()
@@ -75,15 +82,16 @@ export default {
 </script>
 
 <style lang="scss">
- .pic{
-  .el-divider{
+.pic {
+  .el-divider {
     margin: 5px 0px;
   }
-  .el-card__header{
-    padding:5px !important
+
+  .el-card__header {
+    padding: 5px !important
   }
-  .el-card__body{
-    padding:0px !important
+
+  .el-card__body {
+    padding: 0px !important
   }
- }
-</style>
+}</style>

+ 4 - 11
src/views/project/patentCollection/components/views/Table.vue

@@ -1,8 +1,5 @@
 <template>
-  <div class="patent-table-list-view">
-    <!-- <el-table :data="tableData" border style="width: 100%" header-row-class-name="custom-table-header" v-if="showTable"
-      :maxHeight="tableHeight" @sort-change="sortChange" v-el-table-infinite-scroll="getList"
-      :infinite-scroll-distance="10" :infinite-scroll-disabled="disabled"> -->
+  <div class="patent-table-list-view height_100">
     <el-table :data="tableData" border style="width: 100%" header-row-class-name="custom-table-header"  @sort-change="sortChange">
       <el-table-column label="#" width="60" type="index" align="center">
         <template slot-scope="scope">
@@ -27,23 +24,20 @@
 </template>
 
 <script>
-// import { getTableHeight } from '@/views/components/mixins'
+import {projectData} from '../mixins/index'
 export default {
-  mixins: [],
-  props: ['tableData','queryParams','column'],
+  mixins: [projectData],
   components: {
 
   },
   data() {
     return {
-      // tableData: [],
     }
   },
   watch: {
 
   },
   activated() {
-    // this.refreshTable()
   },
   computed: {
 
@@ -56,8 +50,7 @@ export default {
     // console.log(this.columnList);
   },
   methods: {
-    // 点击专利号
-    handleClick(row,key){},
+    
     // 排序
     sortChange({ column, prop, order }) {
       this.$emit('on-sort', { column, prop, order, str })

+ 79 - 50
src/views/project/patentCollection/index.vue

@@ -97,9 +97,9 @@
         <el-main v-loading="loading">
           <div>
             <component ref="patentViewList" :is="viewSelected" @download="handleDownload" @change-read="handleChangeRead"
-              :projectId="projectId" :selected.sync="queryParams.selected"
-              :patentNoList.sync="patentNoList" :column="customList" @index-setting="handleIndexSetting"
-              @on-sort="handleSort" :queryParams="queryParams" :tableData="tableData"></component>
+              :projectId="projectId" :selected.sync="queryParams.selected" :patentNoList.sync="patentNoList"
+              :column="customList" @index-setting="handleIndexSetting" @on-sort="handleSort" :queryParams="queryParams"
+              :tableData="tableData"></component>
           </div>
         </el-main>
         <el-footer class="pagination">
@@ -118,16 +118,16 @@
 <script>
 import { downLoad2, getTreeDataList, getTreeLastChildren, getPatentCountry } from "@/utils"
 import FieldDrawer from '@/views/components/drawer/Field.vue'
-// import PatentAbstractListView from './components/views/Abstract'
+import PatentAbstractListView from './components/views/Abstract'
 import PatentTableListView from './components/views/Table.vue'
-// import PatentPictureListView from './components/views/Picture'
+import PatentPictureListView from './components/views/Picture'
 // import PatentPDFListView from './components/views/PDF.vue'
 export default {
   components: {
     FieldDrawer,
-    // PatentAbstractListView,
+    PatentAbstractListView,
     PatentTableListView,
-    // PatentPictureListView
+    PatentPictureListView
   },
   props: {},
   data() {
@@ -135,32 +135,7 @@ export default {
       //是否隐藏左侧
       showLeft: false,
       //检索字段
-      searchFiled: [
-        {
-          label: "项目名称",
-          value: "name",
-          type: 1,
-          placeholder: "请输入项目名称",
-        },
-        {
-          label: "技术主题",
-          value: "technicalTheme",
-          type: 1,
-          placeholder: "请输入技术主题",
-        },
-        {
-          label: "负责部门",
-          value: "departmentId",
-          type: 3,
-          placeholder: "请选择负责部门",
-        },
-        {
-          label: "内部案卷",
-          value: "innerFile",
-          type: 1,
-          placeholder: "请输入内部案卷",
-        },
-      ],
+      searchFiled: [],
       //检索条件
       searchOption: {
         name: localStorage.searchContent,
@@ -211,18 +186,13 @@ export default {
       //总数
       total: 0,
       //排序
-      sort: [
-        {
-          "orderBy": "createTime",
-          "orderType": 1
-        }
-      ],
+      sort: [{ "orderBy": "createTime", "orderType": 1 }],
       //选择的专利集合
       patentNoList: [],
       //加载
       loading: false,
       // 数据
-      tableData:[],
+      tableData: [],
     };
   },
   watch: {},
@@ -235,23 +205,52 @@ export default {
   created() { },
   async mounted() {
     this.customList = await this.$commonJS.getCustomField('patent')
+    await this.getColumn()
     // 获取专利信息
     this.getList()
   },
   methods: {
+    //获取table栏位及分组字段、检索字段
+    async getColumn() {
+      let params = ['patent']
+      await this.$api.getParamsCommon(params).then(res => {
+        if (res.code == 200) {
+          let conditionDTOList = JSON.parse(JSON.stringify(res.data[0].conditionDTOList))
+          // 搜索字段
+          this.searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
+            label: 'name',
+            value: 'value',
+            type: 'type',
+          })
+        }
+      })
+    },
     //检索
     search(val) {
-
+      let params = {}
+      val.forEach(item => {
+        if (item.type == 3) {
+          params[item.value] = item.searchValue.map(itemValue => {
+            return itemValue.value
+          })
+        } else {
+          params[item.value] = item.searchValue.label
+        }
+      })
+      // 返回字符串
+      this.searchOption = params
+      // 调用查询接口
+      this.queryParams.current = 1
+      this.getList()
     },
     //切换视图
     async handleChangeView(item) {
       this.viewSelected = item.value
       this.queryParams.current = 1
-      if (this.viewSelected == 'PatentPDFListView') {
-        return false
-      }
+      // if (this.viewSelected == 'PatentPDFListView') {
+      //   return false
+      // }
       if (this.viewSelected === 'patent-picture-list-view') {
-
         this.$set(this.queryParams, 'size', 20)
       } else {
         this.queryParams.size = 10
@@ -259,15 +258,20 @@ export default {
       this.getList()
     },
     //获取专利信息
-    getList() {
+    getList(size) {
+      if (size) {
+        this.queryParams.size=size
+      }
       let params = {
         ...this.queryParams,//分页信息
-        projectId:this.id,
+        projectId: this.id,
+        searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
+        orderDTOList: this.sort,//排序信息
       }
       this.$api.QueryPatent(params).then(res => {
         if (res.code == 200) {
           this.tableData = res.data.data
-          this.total=res.data.total
+          this.total = res.data.total
         }
       }).catch(error => {
         this.tableData = []
@@ -275,8 +279,16 @@ export default {
       })
     },
     //排序
-    handleSort(data) {
-      this.queryParams.sort = data
+    handleSort({ column, prop, order }) {
+      //如需要多个字段排序,则不需要清空
+      var params = {
+        sort: this.sort,
+        column,
+        prop,
+        order,
+      }
+      this.sort = this.$commonJS.getSortData(params)
+      this.queryParams.current = 1
       this.getList()
     },
     //分页
@@ -284,6 +296,23 @@ export default {
       this.queryParams.current = val;
       this.getList();
     },
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
     //自定义栏位管理
     handleField() {
       this.$refs.FieldDrawer.open(5)

+ 15 - 0
src/views/report/components/drawer/reportFileDrawer.vue

@@ -0,0 +1,15 @@
+<template>
+  <div>
+
+  </div>
+</template>
+
+<script>
+  export default {
+    
+  }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 101 - 0
src/views/report/components/reportFile/reportFileTable.vue

@@ -0,0 +1,101 @@
+<template>
+  <div class="reportFileTable">
+    <el-container>
+      <el-header style="display:flex;justify-content: space-between;">
+        <div>
+          <mySearch :SearchFields="searchFiled" @search="search" :searchValue="searchOption"></mySearch>
+          <!-- <el-form :inline="true">
+            <el-form-item label="名称">
+              <el-input v-model="form.fileName" size="small" placeholder="请输入文件名称"></el-input>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="" size="small" @click="getList">查询</el-button>
+            </el-form-item>
+          </el-form> -->
+        </div>
+        <div>
+          <el-button type="primary" size="small" @click="handleAdd()">新增</el-button>
+        </div>
+      </el-header>
+      <el-main>
+        <el-table v-loading="loading" :data="tableData" border header-row-class-name="custom-table-header">
+          <el-table-column type="index" label="#" width="55" align="center"></el-table-column>
+          <el-table-column prop="name" label="名称" align="center" show-overflow-tooltip>
+            <template slot-scope="scope" v-if="scope.row.reportFiles">
+              <div>
+                <span>{{ scope.row.name }}</span>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="suffix" label="类型" align="center" show-overflow-tooltip>
+            <template slot-scope="scope" v-if="scope.row.reportFiles">
+              <div>
+                <span>{{ scope.row.reportFiles[0].suffix }}</span>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="reportName" label="所属报告" align="center" show-overflow-tooltip></el-table-column>
+          <el-table-column prop="personName" label="创建人" align="center" show-overflow-tooltip></el-table-column>
+          <el-table-column prop="creationTime" label="创建时间" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{ scope.row.creationTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip></el-table-column>
+          <el-table-column label="操作" align="center" width="150">
+            <template slot-scope="scope">
+              <el-dropdown split-button type="primary" size="small">
+                <P @click="handleEdit(scope.row)">编辑</P>
+
+                <el-dropdown-menu slot="dropdown" class="text-align_center">
+                  <el-dropdown-item @click.native="handleDownload(scope.row)">下载</el-dropdown-item>
+                  <el-dropdown-item @click.native="preview(scope.row.reportFiles[0])">预览</el-dropdown-item>
+                  <el-dropdown-item divided class="color-red"
+                    @click.native="handleDelete(scope.row)">删除</el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="pagination">
+          <el-pagination :current-page.sync="queryParams.current" :page-size="queryParams.size" :total="total"
+            @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
+        </div>
+      </el-main>
+      <el-footer class="footer-common">
+        <el-button @click="close">关 闭</el-button>
+      </el-footer>
+    </el-container>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      // table数据
+      tableData: [],
+      // 分页及总数信息
+      queryParams: {
+        current: 1,
+        size: 10,
+      },
+      total: 0,
+      // 检索字段
+      searchFiled: [],
+      // 检索字符串
+      searchOption: {},
+      //排序字段
+      sort: [{ "orderBy": "createTime", "orderType": 1 }],
+    }
+  },
+  mounted() {
+
+  },
+  methods: {
+
+  },
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 30 - 75
src/views/task/components/table.vue

@@ -75,14 +75,15 @@
 
 <script>
 import { mapGetters } from 'vuex'
-import { column } from '@/views/patentMining/components/mixins/index2'
+import { column,optionsData} from '@/views/patentMining/components/mixins/index2'
 import { taskPatentMining } from './mixins/task'
 import auditRecords from '@/views/patentMining/components/dialog/auditRecords.vue'
 import createTask from '@/views/patentMining/components/dialog/createTask.vue'
 import handleTask1 from '@/views/patentMining/components/dialog/handleTask1.vue'
 import handleTask2 from '@/views/patentMining/components/dialog/handleTask2.vue'
 export default {
-  mixins: [column, taskPatentMining],
+  mixins: [column, optionsData, taskPatentMining],
+  // type区分是从哪里进入
   props: ['type', 'id', 'obj'],
   components: {
     auditRecords,
@@ -93,64 +94,7 @@ export default {
   data() {
     return {
       // table数据
-      tableData: [
-        {
-          name: '加热器专利挖掘1',
-          taskType: '1',
-          createPerson: '朱豪',
-          handlerName: '张三',
-          createTime: '2023-9-28 13:52',
-          endTime: '2023-9-28 18:02',
-          status: '未完成'
-        },
-        {
-          name: '加热器专利挖掘2',
-          taskType: '1',
-          createPerson: '朱豪',
-          handlerName: '朱豪',
-          createTime: '2023-9-28 13:52',
-          endTime: '2023-9-28 18:02',
-          status: '未完成'
-        },
-        {
-          name: '加热器专利挖掘3',
-          taskType: '2',
-          createPerson: '张三',
-          handlerName: '朱豪',
-          createTime: '2023-9-28 13:52',
-          endTime: '2023-9-28 18:02',
-          status: '未完成'
-        },
-        {
-          name: '加热器专利挖掘4',
-          taskType: '3',
-          createPerson: '朱豪',
-          handlerName: '朱豪',
-          createTime: '2023-9-28 13:52',
-          endTime: '2023-9-28 18:02',
-          status: '未完成',
-          taskPath: '创新点梳理',
-          endTime: '2023-10-10',
-        },
-        {
-          name: '加热器专利挖掘5',
-          taskType: '1',
-          createPerson: '张三',
-          handlerName: '朱豪',
-          createTime: '2023-9-28 13:52',
-          endTime: '2023-9-28 18:02',
-          status: '已完成'
-        },
-        {
-          name: '加热器专利挖掘6',
-          taskType: '1',
-          createPerson: '朱豪',
-          handlerName: '张三',
-          createTime: '2023-9-28 13:52',
-          endTime: '2023-9-28 18:02',
-          status: '已完成'
-        },
-      ],
+      tableData: [],
       // 分页及总数信息
       queryParams: {
         current: 1,
@@ -187,6 +131,14 @@ export default {
       },
     }
   },
+  watch: {
+    'obj.search': {  
+      handler(newVal, oldVal) {  
+        this.getList() 
+      },  
+      deep: true, // 设置为deep,可以监听到obj.search对象内部属性的变化  
+    },  
+  },
   computed: {
     ...mapGetters(['webSocket', 'userinfo']),
   },
@@ -194,7 +146,7 @@ export default {
     // 获取table栏位
     this.columnList = await this.$commonJS.getCustomField('projectTask')
     // 获取栏位
-    this.getColumn()
+    await this.getColumn()
     // 获取数据
     this.getList()
   },
@@ -247,10 +199,10 @@ export default {
           this.$refs.auditRecords.open(row)
           break;
         case '2'://取消任务//发起人和审核人可以取消任务,外部人员不能取消任务
-          this.finishClose(row, 5)
+          this.finishClose(row, 1)
           break;
         case '3'://完成任务
-          this.finishClose(row, 3)
+          this.finishClose(row, 0)
           break;
         case '4'://编辑任务
           this.handleEdit(row)
@@ -264,19 +216,20 @@ export default {
     handleEdit(row) {
       this.$refs.createTaskDialog.open(row)
     },
-    // 取消/完成任务
+    // 取消/完成任务//0完成1取消2缺少资料
     finishClose(row, status) {
-      this.finishCloses([row.id], status)
+      // this.finishCloses([row.id], status)
+      this.finishCloses(row.id, status)
     },
-    finishCloses(ids, status) {
+    finishCloses(id, status) {
       let params = {
-        ids: ids,
-        status: status
+        taskId: id,
+        type: status
       }
       var str =''
-      if (status == 3) {
+      if (status == 0) {
         str = '此操作会将任务置为完成,操作不可逆, 是否继续?'
-      } else if (status == 5) {
+      } else if (status == 1) {
         str = '此操作会将任务置为取消,操作不可逆, 是否继续?'
       }
       this.$confirm(str, '提示', {
@@ -284,11 +237,11 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.$api.status(params).then(response => {
+        this.$api.updateTaskStatus(params).then(response => {
           if (response.code == 200) {
-            if (status == 3) {
+            if (status == 0) {
               this.$message.success('完成任务成功')
-            } else if (status == 5) {
+            } else if (status == 1) {
               this.$message.success('取消任务成功')
             }
             this.queryParams.current = 1
@@ -384,7 +337,7 @@ export default {
       }
     },
     // 获取挖掘项目
-    getPatentMining(val) {
+    getPatentMining(row,val) {
       let params = {
         current: 1,
         size: 10,
@@ -460,7 +413,9 @@ export default {
               })
             }
           }
-
+          var obj3 = this.searchFiled.find(item => { return item.label == '所属流程' })
+          obj3.options=this.pathOptions
+          
         }
       })