Prechádzať zdrojové kódy

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

zhuliu 1 rok pred
rodič
commit
df17d79c1d

+ 22 - 0
src/utils/common.js

@@ -1,5 +1,6 @@
 import api from '@/api'
 import router from '../router'
+import { Message } from 'element-ui'
 export default {
   //object转字符串
   objectToString(val) {
@@ -270,4 +271,25 @@ export default {
       }
     )
   },
+  // 校验文件是否全部上传并处理文件的guid
+  allUploadFile(form) {
+    let allUpload = this.validFile(form)
+    if (allUpload) {
+      Message.warning('文件未全部上传,请耐心等待')
+      return false
+    }
+    form.fileGuids = form.systemFileList.map(item => {
+      return item.guid
+    })
+  },
+  //校验文件是否全部上传
+  validFile(form) {
+    if (form.systemFileList && form.systemFileList.length > 0) {
+      return form.systemFileList.filter(item => {
+        return !item.guid
+      }).length > 0
+    } else {
+      return false
+    }
+  },
 }

+ 1 - 0
src/utils/model/menu/index.vue

@@ -108,6 +108,7 @@ export default {
 }
 
 .menuListLi{
+  text-align: center;
   border-bottom: 1px solid #e6e6e6;
   padding: 10px 0 3px 0;
 }

+ 128 - 101
src/utils/model/menu/mixins.js

@@ -1,114 +1,141 @@
 import { downLoad2 } from '@/utils'
 export const File = {
-    methods: {
-        downLoad(item){
-            downLoad2(item.url) 
-        },
-        preview(row){
-            var item = JSON.parse(JSON.stringify(row))
-            var arr = ['png','jpeg','bmp','jpg']
-            if(arr.includes(item.suffix)){
-                var FileUrl = this.$p + item.url
-                var isPicture = 1
-            }else if(item.suffix == 'pdf'){
-                var FileUrl = this.$p + item.url
-                var isPicture = 0
-            }else{
-                var FileUrl =  `http://${this.$c.hostname}:8012/onlinePreview?url=`+ btoa(encodeURIComponent(this.$p + item.url))
-                var isPicture = 0
-            }
-            const router = this.$router.resolve({
-                path: '/checkFile',
-                query: {
-                    row: JSON.stringify(item),
-                    FileUrl: FileUrl,
-                    isPicture:isPicture
-                }
-            })
-            window.open(router.href, '_blank');
-        },
-        delFile(item){
-            this.$emit('delFile',item.id)
+  methods: {
+    downLoad(item) {
+      downLoad2(item.guid)
+      // downLoad2(item.url)
+    },
+    // 预览
+    preview(data) {
+      let guid = data.guid
+      var item = JSON.parse(JSON.stringify(data))
+
+      var arr = ['png', 'jpeg', 'bmp', 'jpg']
+      if (arr.includes(item.type)) {
+        var FileUrl = this.$commonJS.checkViewer(guid)
+        var isPicture = 1
+      } else {
+        let http = '139.224.24.90'
+        var url = this.$commonJS.checkViewer(guid)
+        var FileUrl = `http://${http}:8012/onlinePreview?url=` + btoa(encodeURIComponent(url + '&fullfilename=test.' + item.type))
+        var isPicture = 0
+      }
+      // return
+      const router = this.$router.resolve({
+        path: '/checkFile',
+        query: {
+          row: JSON.stringify(item),
+          FileUrl: FileUrl,
+          isPicture: isPicture
         }
+      })
+      window.open(router.href, '_blank');
     },
+    // preview(row){
+    //     var item = JSON.parse(JSON.stringify(row))
+    //     var arr = ['png','jpeg','bmp','jpg']
+    //     if(arr.includes(item.suffix)){
+    //         var FileUrl = this.$p + item.url
+    //         var isPicture = 1
+    //     }else if(item.suffix == 'pdf'){
+    //         var FileUrl = this.$p + item.url
+    //         var isPicture = 0
+    //     }else{
+    //         var FileUrl =  `http://${this.$c.hostname}:8012/onlinePreview?url=`+ btoa(encodeURIComponent(this.$p + item.url))
+    //         var isPicture = 0
+    //     }
+    //     const router = this.$router.resolve({
+    //         path: '/checkFile',
+    //         query: {
+    //             row: JSON.stringify(item),
+    //             FileUrl: FileUrl,
+    //             isPicture:isPicture
+    //         }
+    //     })
+    //     window.open(router.href, '_blank');
+    // },
+    delFile(item) {
+      this.$emit('delFile', item.id)
+    }
+  },
 }
 
 export const File2 = {
   methods: {
-      downLoad(row){ 
-        var item = JSON.parse(JSON.stringify(row))
-        var href = ''
-        if(item.originalName){
-            href = `http://${this.$c.hostname}:8801/fileManager/downloadSystemFile?fileId=${item.id}`
-        }else{
-            href = `/api/report/api/download/downloadFile?url=${encodeURIComponent(item.url)}` 
-        }
-        const anchor = document.createElement('a');
-        const fileName = 'download';
-        if ('download' in anchor) {
-          anchor.href = href;
-          anchor.setAttribute("download", fileName);
-          anchor.className = "download-js-link";
-          anchor.innerHTML = "downloading...";
-          anchor.style.display = "none";
-          document.body.appendChild(anchor);
-          setTimeout(function () {
-            anchor.click();
-            document.body.removeChild(anchor);
-          }, 66);
-          return true;
-        }
-      },
-      preview(row){
-        var item = JSON.parse(JSON.stringify(row))
-        if(item.originalName){
-            item.url = `http://${this.$c.hostname}:8801/fileManager/downloadSystemFile?fileId=${item.id}`
-            var arr = ['png','jpeg','bmp','jpg']
-            if(arr.includes(item.suffix)){
-                var FileUrl = item.url
-                var isPicture = 1
-            }else if(item.suffix == 'pdf'){
-                var FileUrl = item.url
-                var isPicture = 0
-            }else{
-                var FileUrl =  `http://${this.$c.hostname}:8012/onlinePreview?url=`+ btoa(encodeURIComponent(item.url+ '&fullfilename=test.'+item.suffix))
-                var isPicture = 0
-            }
-            const router = this.$router.resolve({
-                path: '/checkFile',
-                query: {
-                    row: JSON.stringify(item),
-                    FileUrl: FileUrl,
-                    isPicture:isPicture
-                }
-            })
-            window.open(router.href, '_blank');
-            return false
+    downLoad(row) {
+      var item = JSON.parse(JSON.stringify(row))
+      var href = ''
+      if (item.originalName) {
+        href = `http://${this.$c.hostname}:8801/fileManager/downloadSystemFile?fileId=${item.id}`
+      } else {
+        href = `/api/report/api/download/downloadFile?url=${encodeURIComponent(item.url)}`
+      }
+      const anchor = document.createElement('a');
+      const fileName = 'download';
+      if ('download' in anchor) {
+        anchor.href = href;
+        anchor.setAttribute("download", fileName);
+        anchor.className = "download-js-link";
+        anchor.innerHTML = "downloading...";
+        anchor.style.display = "none";
+        document.body.appendChild(anchor);
+        setTimeout(function () {
+          anchor.click();
+          document.body.removeChild(anchor);
+        }, 66);
+        return true;
+      }
+    },
+    preview(row) {
+      var item = JSON.parse(JSON.stringify(row))
+      if (item.originalName) {
+        item.url = `http://${this.$c.hostname}:8801/fileManager/downloadSystemFile?fileId=${item.id}`
+        var arr = ['png', 'jpeg', 'bmp', 'jpg']
+        if (arr.includes(item.suffix)) {
+          var FileUrl = item.url
+          var isPicture = 1
+        } else if (item.suffix == 'pdf') {
+          var FileUrl = item.url
+          var isPicture = 0
+        } else {
+          var FileUrl = `http://${this.$c.hostname}:8012/onlinePreview?url=` + btoa(encodeURIComponent(item.url + '&fullfilename=test.' + item.suffix))
+          var isPicture = 0
         }
-          var arr = ['png','jpeg','bmp','jpg']
-          if(arr.includes(item.suffix)){
-              var FileUrl = this.$rImg + item.url
-              var isPicture = 1
-          }else if(item.suffix == 'pdf'){
-              var FileUrl = this.$rImg + item.url
-              var isPicture = 0
-          }else{
-              var FileUrl =  `http://${this.$c.hostname}:8012/onlinePreview?url=`+ btoa(encodeURIComponent(this.$rImg + item.url))
-              var isPicture = 0
+        const router = this.$router.resolve({
+          path: '/checkFile',
+          query: {
+            row: JSON.stringify(item),
+            FileUrl: FileUrl,
+            isPicture: isPicture
           }
-          const router = this.$router.resolve({
-              path: '/checkFile',
-              query: {
-                  row: JSON.stringify(item),
-                  FileUrl: FileUrl,
-                  isPicture:isPicture,
-                  reportId:true
-              }
-          })
-          window.open(router.href, '_blank');
-      },
-      delFile(item){
-          this.$emit('delFile',item.id)
+        })
+        window.open(router.href, '_blank');
+        return false
       }
+      var arr = ['png', 'jpeg', 'bmp', 'jpg']
+      if (arr.includes(item.suffix)) {
+        var FileUrl = this.$rImg + item.url
+        var isPicture = 1
+      } else if (item.suffix == 'pdf') {
+        var FileUrl = this.$rImg + item.url
+        var isPicture = 0
+      } else {
+        var FileUrl = `http://${this.$c.hostname}:8012/onlinePreview?url=` + btoa(encodeURIComponent(this.$rImg + item.url))
+        var isPicture = 0
+      }
+      const router = this.$router.resolve({
+        path: '/checkFile',
+        query: {
+          row: JSON.stringify(item),
+          FileUrl: FileUrl,
+          isPicture: isPicture,
+          reportId: true
+        }
+      })
+      window.open(router.href, '_blank');
+    },
+    delFile(item) {
+      this.$emit('delFile', item.id)
+    }
   },
 }

+ 1 - 11
src/views/patentMining/components/dialog/addAndEditProject.vue

@@ -679,17 +679,7 @@ 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
-              }
-            }
-          }
+          this.$commonJS.allUploadFile(this.form)
           if (this.form.scenarioIds && this.form.scenarioIds.length > 0) {
             var scenarioIds = JSON.parse(JSON.stringify(this.form.scenarioIds))
           }

+ 2 - 12
src/views/patentMining/components/dialog/handleTask2.vue

@@ -145,18 +145,8 @@ export default {
     },
     // 保存
     async handleSave(type) {
-      // 判断文件是否都上传完毕
-      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
-          }
-        }
-      }
+    // 判断文件是否都上传完毕
+    this.$commonJS.allUploadFile(this.form)
       this.form.taskId = this.row.id
       await this.$api.addTaskAuditResult(this.form).then(res => {
         if (res.code == 200) {

+ 5 - 18
src/views/patentMining/components/dialog/uploadFile.vue

@@ -33,11 +33,11 @@
 </template>
 
 <script>
-import { optionsData, handleJs } from '../mixins/index2'
+import { optionsData } from '../mixins/index2'
 import examine from '@/views/components/dialog/examine.vue'
 
 export default {
-  mixins: [optionsData, handleJs],
+  mixins: [optionsData],
   components: {
     examine,
   },
@@ -79,14 +79,8 @@ export default {
     examine() {
       this.$refs.form.validate((valid) => {
         if (valid) {
-          var allUpload = this.validFile()
-          if (allUpload) {
-            this.$message.warning('文件未全部上传,请耐心等待')
-            return false
-          }
-          this.form.fileGuids = this.form.systemFileList.map(item => {
-            return item.guid
-          })
+          // 判断文件是否都上传完毕
+          this.$commonJS.allUploadFile(this.form)
           this.$refs.examine.open(null, 7)
         }
       })
@@ -126,14 +120,7 @@ export default {
       this.$refs.form.validate((valid) => {
         if (valid) {
           // 判断文件是否都上传完毕
-          var allUpload = this.validFile()
-          if (allUpload) {
-            this.$message.warning('文件未全部上传,请耐心等待')
-            return false
-          }
-          this.form.fileGuids = this.form.systemFileList.map(item => {
-            return item.guid
-          })
+          this.$commonJS.allUploadFile(this.form)
           if (!this.form.id) {
             this.$api.addPatentDigProjectFiles(this.form).then(res => {
               if (res.code == 200) {

+ 1 - 11
src/views/patentMining/components/handleExamine/handleExamine.vue

@@ -113,17 +113,7 @@ export default {
     // 审核确认
     sure() {
       // 判断文件是否都上传完毕
-      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
-          }
-        }
-      } 
+      this.$commonJS.allUploadFile(this.form)
       if (this.form.nextAuditor) {
         if (this.form.nextAuditor.includes('@')) {//是邮箱为false
           this.form.ifInner = false

+ 0 - 23
src/views/patentMining/components/mixins/index2.js

@@ -230,26 +230,3 @@ export const optionsData = {
   },
 }
 
-// 公用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
-      }
-    },
-  },
-}

+ 61 - 0
src/views/report/avoid/components/avoidDirection.vue

@@ -0,0 +1,61 @@
+<template>
+  <div style="padding:20px" class="height_100">
+    <el-container>
+      <el-header>
+        <div>
+          <p> 标的专利号:<el-link type="primary" @click="toPatentDetails(patentNo)">{{ patentNo }}</el-link> </p>
+        </div>
+      </el-header>
+      <el-main class="height_100">
+
+        <!-- 拆分特征公用组件 -->
+        <splitPage></splitPage>
+
+        <!-- 回避设计总体方向 -->
+        <div style="margin-top: 20px;">
+          <p>回避设计总体方向:</p>
+          <div>
+            <div style="min-height:60px;outline: #dcdfe6;border:1px solid #DCDFE6;border-radius:5px;padding: 10px;"
+              id="preview" class="edit-box" contenteditable="true" placeholder="请输入回避设计总体方向(可粘贴图片)"
+              v-html="textarea1.wholeDirection" @input="saveValue($event.target.innerHTML)"
+              @click="saveValue($event.target.innerHTML)" @blur="getValue(textarea1, 'wholeDirection')"
+              v-on:paste="handlePaste($event, textarea1, 'wholeDirection')">
+            </div>
+          </div>
+        </div>
+      </el-main>
+    </el-container>
+
+
+
+
+  </div>
+</template>
+
+<script>
+import splitPage from './splitPage.vue';
+export default {
+  props: ['patentNo', 'reportId', 'splitBy', 'splitType'],
+  components: {
+    splitPage,
+  },
+  data() {
+    return {
+    };
+  },
+  watch: {
+  },
+  mounted() {
+
+  },
+  methods: {
+    // 跳转专利详情(放在公用js)
+    toPatentDetails(patentNo) {
+      
+    },
+
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 265 - 0
src/views/report/avoid/components/splitPage.vue

@@ -0,0 +1,265 @@
+<template>
+  <!-- 权要拆分类型等 -->
+  <div>
+    <div style="display: flex; justify-content: space-between;margin:20px 0px 20px 0 ;">
+      <el-button-group>
+        <el-button @click="merge">合并</el-button>
+        <el-button @click="split">拆分</el-button>
+      </el-button-group>
+      <div>
+        <el-select placeholder="请选择拆分类型" v-model="splitType" style="margin-left: 50px;" @change="splitTypeSelect($event)">
+          <el-option label="仅拆主权要" value="0"></el-option>
+          <el-option label="全部拆分" value="1"></el-option>
+        </el-select>
+        <el-select placeholder="请选择拆分符号" v-model="splitBy" style="margin-left: 10px;" @change="splitBySelect($event)">
+          <el-option label="逗号拆分" value="0"></el-option>
+          <el-option label="分号拆分" value="1"></el-option>
+          <el-option label="逗号和分号拆分" value="2"></el-option>
+        </el-select>
+        <el-select placeholder="请选择显示类型" v-model="showType" style="margin-left: 10px;" @change="typeSelect($event)">
+          <el-option label="全部显示" value="0"></el-option>
+          <el-option label="仅显示主权要" value="1"></el-option>
+        </el-select>
+      </div>
+      <div>
+        <el-button @click="keep" type="primary">保存</el-button>
+      </div>
+    </div>
+
+    <template>
+      <el-table :data="tableData" border ref="table" :span-method="objectSpanMethod" v-loading="loading"
+        style="width: 100%" :height="tableHeight">
+        <el-table-column prop="pRightName" label="权要" width="180" align="center">
+          <template slot-scope="scope">
+            <el-tooltip class="item" effect="dark" :content="scope.row.pContent" placement="top">
+              <span>{{ scope.row.pRightName }}</span>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+        <el-table-column prop="content" label="特征" width="300" align="center">
+          <template slot-scope="scope">
+            <el-checkbox-group v-model="checkList">
+              <el-checkbox :label="scope.row.id" @change="getRow(scope)" style="display: flex;align-items: center;">
+                <el-input type="textarea" style="width:250px" autosize v-model="scope.row.content">
+                  {{ scope.row.content.trim() }}</el-input>
+              </el-checkbox>
+            </el-checkbox-group>
+          </template>
+        </el-table-column>
+        <el-table-column prop="explainText" label="解释(可粘贴图片)" align="center">
+          <template slot-scope="scope">
+            <div style="width:100%;outline: #dcdfe6;border:1px solid #DCDFE6;border-radius:5px" id="preview"
+              contenteditable="true" v-html="scope.row.explainText" @input="saveValue($event.target.innerHTML)"
+              @click="saveValue($event.target.innerHTML)" @blur="getValue(scope.row, 'explainText')"
+              v-on:paste="handlePaste($event, scope.row, 'explainText')">
+
+            </div>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column prop="littleDirection" label="回避设计方向(可粘贴图片)" align="center">
+          <template slot-scope="scope">
+            <div style="width:100%;outline: #dcdfe6;border:1px solid #DCDFE6;border-radius:5px" id="preview"
+              contenteditable="true" v-html="scope.row.littleDirection" @input="saveValue($event.target.innerHTML)"
+              @click="saveValue($event.target.innerHTML)" @blur="getValue(scope.row, 'littleDirection')"
+              v-on:paste="handlePaste($event, scope.row, 'littleDirection')">
+
+            </div>
+
+          </template>
+        </el-table-column> -->
+      </el-table>
+    </template>
+
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    // 数据源
+    tableData: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    // 是否可读
+    isRead: {
+      type: Boolean,
+      default: true
+    },
+    //拆分下拉框的数据
+    splitSelect: {
+      type: Object,
+      default: () => {
+        return {
+          splitType: 0,
+          splitBy: 2,
+          showType: 0,
+        }
+      }
+    },
+    // 栏位参数 
+    column: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    }
+  },
+  data() {
+    return {
+      splitType: "0",//拆分类型0仅拆主权要,1全部拆分
+      splitBy: "2",//拆分符号0逗号拆分,1分号拆分,2逗号和分号拆分
+      showType: "0",//显示类型0全部显示1仅显示主权要
+      typeArr: [1],//显示权要还是全部显示
+      // 表格的loading
+      loading: false,
+      // 表格的高度
+      tableHeight: 0,
+      // 勾选中的特征
+      checkList:[],
+    }
+  },
+  mounted() {
+
+  },
+  methods: {
+    // 
+    // 保存
+    keep(){},
+    // 选择拆分类型
+    splitTypeSelect(val) {
+      this.splitType = val
+    },
+    // 选择拆分符号
+    splitBySelect(val) {
+      this.splitBy = val
+    },
+    // 选择显示类型
+    typeSelect(val) {
+      this.typeArr = []
+      if (val == 1) {
+        this.typeArr.push(1)
+      } else {
+        this.typeArr.push(1, 0)
+      }
+      // this.tableData = this.tableData1.filter(item => {
+      //   return this.typeArr.includes(item.pType)
+      // })
+      // this.getSpanArr(this.tableData)
+      // this.keep()
+    },
+    // 特征等合并
+    merge() {
+      // console.log(this.checkList,this.row);
+      if (this.row.length > 1) {
+        var str = ''
+        var str1 = ''
+        var str2 = ''
+        var str3 = ''
+        for (let i = 0; i < this.row.length - 1; i++) {
+          if (this.row[i].rightId != this.row[i + 1].rightId) {
+            this.$alert("不能跨权要合并特征", "提示", {
+              type: 'warning',
+              confirmButtonText: '确定',
+            })
+            return false
+          } else {
+            let Index_rowArr = this.row.sort((a, b) => {
+              return a.$index - b.$index
+            })
+            // console.log(this.Index_row,Index_rowArr);
+            if (Index_rowArr[i + 1].$index - Index_rowArr[i].$index != 1) {
+              this.$alert("非相邻不能合并特征", "提示", {
+                type: 'warning',
+                confirmButtonText: '确定',
+              })
+              return false
+            }
+          }
+        }
+        this.row.forEach((rowItem, rowIndex) => {
+          // console.log(rowItem,rowIndex);
+          if (rowIndex < this.row.length - 1) {
+            str = str + rowItem.content.trim()
+            str1 = str1 + rowItem.contentOut.trim()
+            str2 = str2 + rowItem.littleDirection
+            str3 = str3 + rowItem.explainText
+            let Index1 = this.tableData1.findIndex(item => { return rowItem.id == item.id })
+            if (Index1 != -1) {
+              this.tableData1.splice(Index1, 1)
+            }
+          } else if (rowIndex == this.row.length - 1) {
+            str = str + rowItem.content.trim()
+            str1 = str1 + rowItem.contentOut.trim()
+            str2 = str2 + rowItem.littleDirection
+            str3 = str3 + rowItem.explainText
+          }
+          let Index2 = this.tableData1.findIndex(item => { return item.id == rowItem.id })
+          if (Index2 != -1) {
+            this.tableData1[Index2].content = str
+            this.tableData1[Index2].contentOut = str1
+            this.tableData1[Index2].littleDirection = str2
+            this.tableData1[Index2].explainText = str3
+          }
+
+        })
+        this.TypeSelect(this.Type)
+        this.row = []
+        this.checkList = []
+      }
+    },
+    // 拆分
+    split() {
+      //不能同时拆分
+      if (this.row.length > 0) {
+        if (this.row.length > 1) {
+          this.$alert("不能同时拆分多个特征", "提示", {
+            type: 'warning',
+            confirmButtonText: '确定',
+          })
+          return false
+        }
+        var rowId = Math.floor((Math.random() * 9999) + 1000);
+        this.row.forEach((rowItem, rowIndex) => {
+          var splitAdd = {
+            id: rowItem.id + rowId + "a",
+            content: '',
+            contentOut: '',
+            littleDirection: '',
+            explainText: '',
+            rightName: rowItem.rightName,
+            featuresOrder: rowItem.featuresOrder,
+            splitBy: rowItem.splitBy,
+            splitType: rowItem.splitType,
+            signPatentNo: rowItem.signPatentNo,
+            rightId: rowItem.rightId,
+            rightType: rowItem.rightType,
+            isFinal: rowItem.isFinal,
+            partnerId: rowItem.partnerId,
+            reportId: rowItem.reportId,
+
+            pRightName: rowItem.pRightName,
+            pSignPatentNo: rowItem.pSignPatentNo,
+            pContentOut: rowItem.pContentOut,
+            pContent: rowItem.pContent,
+            pReportId: rowItem.pReportId,
+            pPatentId: rowItem.pPatentId,
+            pType: rowItem.pType,
+            pSort: rowItem.pSort,
+
+          }
+          let Index2 = this.tableData1.findIndex(item => { return rowItem.id == item.id })
+          this.tableData1.splice(Index2 + 1, 0, splitAdd)
+        })
+        this.TypeSelect(this.Type)
+        this.row = []
+        this.checkList = []
+      }
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 24 - 0
src/views/report/avoid/index.vue

@@ -0,0 +1,24 @@
+<template>
+  <!-- 回避设计 -->
+  <div>
+
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+
+    }
+  },
+  mounted() {
+
+  },
+  methods: {
+
+  },
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 13 - 11
src/views/report/components/dialog/addAndEditReport.vue

@@ -816,17 +816,19 @@ export default {
         if (valid) {
           this.form.type = 2//项目类型(1专利数据库 2报告 3专利挖掘项目)
           // 判断文件是否都上传完毕
-          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
-              }
-            }
-          }
+          this.$commonJS.allUploadFile(this.form)
+          // // 判断文件是否都上传完毕
+          // 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
+          //     }
+          //   }
+          // }
           // 事件及调查类型处理
           if (this.form.scenarioIds && this.form.scenarioIds.length > 0) {
             var scenarioIds = JSON.parse(JSON.stringify(this.form.scenarioIds))

+ 315 - 0
src/views/report/components/matter/addMatters.vue

@@ -0,0 +1,315 @@
+<template>
+  <div>
+    <div v-if="type == 1">
+      <!-- 单个后续事项 -->
+      <el-form :model="formData[0]" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+        <el-form-item label="名称" prop="followUpName">
+          <el-input v-model="formData[0].followUpName" autocomplete="off" placeholder="请输入后续跟进事项名称"></el-input>
+        </el-form-item>
+        <el-form-item label="描述" prop="remark">
+          <el-input type="textarea" :rows="1" v-model="formData[0].remark" autocomplete="off"
+            placeholder="请输入后续跟进事项描述"></el-input>
+        </el-form-item>
+        <el-form-item label="处理人" prop="agent">
+          <el-input v-model="formData[0].agent" placeholder="请输入后续跟进事项处理人"></el-input>
+        </el-form-item>
+        <el-form-item label="协办人" prop="assistPerson">
+          <el-input v-model="formData[0].assistPerson" placeholder="请输入后续跟进事项协办人"></el-input>
+        </el-form-item>
+        <el-form-item label="期限" prop="timeLimit">
+          <el-date-picker style="width: 100%" v-model="formData[0].timeLimit" type="datetime"
+            value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <div style="display:flex;justify-content:center"
+            v-if="formData[0].status != '已完成' && $reportPermission(reportId, [0, 1])">
+            <el-button type="primary" @click="submitForm()" size="small" style="width:100px"
+              :loading="btnLoading">保存</el-button>
+            <el-button @click="resetForm()" size="small" style="width:100px">取消</el-button>
+          </div>
+
+        </el-form-item>
+      </el-form>
+    </div>
+    <div v-else :class="reportId ? 'item1' : 'item2'">
+      <!-- 多个后续事项 -->
+      <el-table :data="formData" style="width: 100%" class="twj-table">
+        <el-table-column prop="followUpName" label="名称" align="center" min-width="150px">
+          <template slot="header">
+            <div>
+              <span>名称<span style="color:red;"> *</span></span>
+            </div>
+          </template>
+          <template slot-scope="scope">
+            <div>
+              <el-input v-model="scope.row.followUpName" autocomplete="off" placeholder="请输入名称"></el-input>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="remark" label="描述" align="center" width="250px">
+          <template slot-scope="scope">
+            <div>
+              <el-input type="textarea" :rows="1" v-model="scope.row.remark" autocomplete="off"
+                placeholder="请输入描述"></el-input>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="agent" label="处理人" align="center" min-width="150px">
+          <template slot-scope="scope">
+            <div>
+              <el-input v-model="scope.row.agent" placeholder="请输入处理人"></el-input>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="assistPerson" label="协办人" align="center" min-width="150px">
+          <template slot-scope="scope">
+            <div>
+              <el-input v-model="scope.row.assistPerson" placeholder="请输入协办人"></el-input>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="timeLimit" label="期限" align="center" min-width="150px">
+          <template slot-scope="scope">
+            <div>
+              <el-date-picker style="width: 100%" v-model="scope.row.timeLimit" type="datetime"
+                value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间">
+              </el-date-picker>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="100px">
+          <template slot-scope="scope">
+            <div>
+              <i @click="addRow(scope)" class="el-icon-plus btn"></i>
+              <i @click="deleteRow(scope)" v-if="scope.$index != 0" class="el-icon-close btn"></i>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="display:flex;justify-content: center;margin-top:20px"
+        v-if="reportId && (sign != false && sign != true)">
+        <el-button type="primary" @click="submitForm1()" size="small" style="width:100px"
+          :loading="btnLoading">保存</el-button>
+        <el-button size="small" @click="resetForm()" style="width:100px">取消</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  props: ["type", "reportId", 'sign', 'row'],
+  data() {
+    return {
+      // 保存按鈕的loading
+      btnLoading: false,
+      // 后续事项的数据
+      formData: [
+        {
+          reportId: this.reportId,
+          followUpName: '',
+          remark: '',
+          agent: '',
+          assistPerson: '',
+          timeLimit: ''
+        }
+      ],
+      // 后续事项的校验规则
+      rules: {
+        followUpName: [{ required: true, message: '请输入后续跟进事项名称', trigger: "blur", },],
+      },
+    };
+  },
+  watch: {
+    type() {
+      this.getType()
+    },
+    sign(val) {
+      if (val) {
+        this.$emit('value', this.formData)
+      }
+    },
+  },
+  mounted() {
+    this.getType()
+  },
+  methods: {
+    //获取type类型
+    getType() {
+      if (this.row) {
+        this.formData = [this.row]
+        return false
+      }
+      if (this.type == 2) {
+        for (var i = 0; i < 2; i++) {
+          this.formData.push(
+            {
+              reportId: this.reportId,
+              followUpName: '',
+              remark: '',
+              agent: '',
+              assistPerson: '',
+              timeLimit: ''
+            }
+          )
+        }
+      } else {
+        this.formData = [
+          {
+            reportId: this.reportId,
+            followUpName: '',
+            remark: '',
+            agent: '',
+            assistPerson: '',
+            timeLimit: ''
+          }
+        ]
+      }
+    },
+    //添加后续跟进事项
+    submitForm() {
+      this.$refs.ruleForm.validate((valid) => {
+        if (valid) {
+          this.btnLoading = true
+          if (this.row) {
+            this.$api.updateMatters(this.formData).then(response => {
+              if (response.code == 200) {
+                this.btnLoading = false
+                this.$message.success('后续跟进事项更新成功')
+                this.resetForm()
+              }
+            }).catch(error => {
+              this.btnLoading = false
+              this.$message.error('后续跟进事项更新失败')
+            })
+          } else {
+            this.$api.addMatters(this.formData).then(response => {
+              if (response.code == 200) {
+                this.btnLoading = false
+                this.$message.success('后续跟进事项添加成功')
+                this.resetForm()
+              }
+            }).catch(error => {
+              this.btnLoading = false
+              this.$message.error('后续跟进事项添加失败')
+            })
+          }
+
+        } else {
+          return false;
+        }
+      });
+    },
+    submitForm1() {
+      try {
+        var list = []
+        var b = false
+        var keyList = {
+          followUpName: '',
+          remark: '',
+          agent: '',
+          assistPerson: '',
+          timeLimit: ''
+        }
+        this.formData.forEach(item => {
+          var a = false
+          for (let key in keyList) {
+            if (item[key] != '' && item[key] != null) {
+              a = true
+            }
+          }
+          if (a == true) {
+            if (item.followUpName != '') {
+              b = true
+              list.push(item)
+            } else {
+              b = false
+              throw new Error()
+            }
+          }
+        })
+        this.$api.addMatters(list).then(response => {
+          if (response.code == 200) {
+            this.btnLoading = false
+            this.$message.success('后续跟进事项添加成功')
+            this.resetForm()
+          }
+        }).catch(error => {
+          this.btnLoading = false
+          this.$message.error('后续跟进事项添加失败')
+        })
+      } catch (e) {
+        this.$message.error('后续跟进事项名称不能为空')
+      }
+
+    },
+    //取消
+    resetForm() {
+      if (this.type == 1) {
+        this.$refs.ruleForm.resetFields();
+      }
+      this.formData = [
+        {
+          followUpName: '',
+          remark: '',
+          agent: '',
+          assistPerson: '',
+          timeLimit: ''
+        }
+      ]
+      this.$emit('dialog', false)
+
+    },
+    //添加跟进事项
+    addRow() {
+      this.formData.push(
+        {
+          reportId: this.reportId,
+          followUpName: '',
+          remark: '',
+          agent: '',
+          assistPerson: '',
+          timeLimit: ''
+        }
+      )
+    },
+    //删除跟进事项
+    deleteRow(row) {
+      this.formData.splice(row.$index, 1)
+    },
+  },
+};
+</script>
+<style>
+.twj-table td.el-table__cell,
+.twj-table th.el-table__cell.is-leaf {
+  border: none
+}
+
+.twj-table::before {
+  background-color: transparent;
+}
+</style>
+<style lang="scss" scoped>
+.item1 {
+  max-height: 500px;
+  overflow: auto;
+}
+
+.item2 {
+  max-height: 350px;
+  overflow: auto;
+}
+
+.btn {
+  color: black;
+  margin-left: 10px;
+  font-size: 18px;
+  text-align: center;
+  cursor: pointer;
+}
+
+.btn:hover {
+  color: aqua;
+}
+</style>

+ 533 - 0
src/views/report/components/matter/remarryMatter.vue

@@ -0,0 +1,533 @@
+<template>
+  <!-- 后续事项 -->
+  <div class="height_100">
+    <el-container>
+      <el-header style="display: flex;justify-content: flex-end;">
+        <div v-if="$reportPermission(reportId, [0, 1])">
+          <el-dropdown trigger="click" split-button type="primary" size="small" @command="handleCommand($event)">
+            <span @click="handleClick(1)">添加后续事项</span>
+            <el-dropdown-menu slot="dropdown" class="text-align_center">
+              <el-dropdown-item command="1">添加后续事项</el-dropdown-item>
+              <el-dropdown-item command="2">批量添加后续事项</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </div>
+      </el-header>
+      <el-main class="height_100">
+        <el-table v-loading="tableLoading" :data="tableData" style="width: 100%;" border
+          header-row-class-name="custom-table-header" @sort-change="sortChange">
+
+          <el-table-column label="#" align="center" width="80px">
+            <template slot-scope="scope">
+              <div>
+                {{ (queryParams.current - 1) * queryParams.size + scope.$index + 1 }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column v-for="item in columnList" :key="item.value" :prop="item.value"
+            :render-header="$commonJS.renderHeaderMethods" :label="item.name" sortable="custom" align="center">
+            <template slot-scope="scope">
+              <div v-if="['name'].includes(item.value)">
+                <el-tooltip :content="$commonJS.getColumnData(scope.row, item)" placement="top">
+                  <span v-html="$commonJS.getColumnData(scope.row, item)"></span>
+                </el-tooltip>
+              </div>
+              <div v-else v-html="$commonJS.getColumnData(scope.row, item)"></div>
+            </template>
+          </el-table-column>
+
+          <el-table-column label="操作" align="center" width="150px">
+            <template slot-scope="scope">
+              <div>
+                <el-dropdown trigger="click" split-button type="primary" size="small"
+                  @command="handleCommand1($event, scope.row)">
+                  <span @click="edit(scope.row)">{{ scope.row.status == '进行中' && $reportPermission(reportId, [0, 1]) ?
+                    '编辑' :
+                    '查看' }}</span>
+                  <el-dropdown-menu slot="dropdown" class="text-align_center">
+                    <el-dropdown-item command="1"
+                      v-if="scope.row.status == '进行中' && $reportPermission(reportId, [0, 1])">登记结果</el-dropdown-item>
+                    <el-dropdown-item command="2" v-else>查看结果</el-dropdown-item>
+                    <el-dropdown-item command="3" divided class="color-red"
+                      v-if="$reportPermission(reportId, [0, 1])">删除</el-dropdown-item>
+                  </el-dropdown-menu>
+                </el-dropdown>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-main>
+      <el-footer style="display: flex;justify-content: flex-end;align-items:center;">
+        <div>
+          <el-pagination background layout="total,prev, pager, next,jumper" :total="total"
+            @current-change="handleCurrentChange" :current-page="queryParams.current" :page-size="queryParams.size">
+          </el-pagination>
+        </div>
+      </el-footer>
+    </el-container>
+
+    <!-- 编辑、查看后续事项弹窗 -->
+    <el-dialog :title="title" :visible.sync="dialogVisible" :width="type == 1 ? '800px' : '1100px'" :before-close="close">
+      <div>
+        <addMatter :type="type" :reportId="reportId" :row="row" @dialog="getDialog"></addMatter>
+      </div>
+    </el-dialog>
+
+    <!-- 登记结果弹窗 -->
+    <el-dialog title="登记结果" :visible.sync="registerVisible" :width="registerForm.type == 1 ? '1100px' : '500px'"
+      :before-close="closeRegister">
+      <div>
+        <div style="display:flex;justify-content:flex-end;margin-bottom:10px">
+          <el-button type="primary" size="small" v-if="registerForm.type == 2" @click="editRegister">{{
+            registerForm.edit ? '保存' : '编辑' }}</el-button>
+        </div>
+
+        <el-form :model="registerForm" label-width="100px">
+          <el-form-item label="结论:" prop="conclusion">
+            <el-input v-if="registerForm.type == 1 || registerForm.edit == true" v-model="registerForm.conclusion"
+              type="textarea" autocomplete="off" placeholder="请输入结论"></el-input>
+            <span v-else>{{ registerForm.conclusion }}</span>
+          </el-form-item>
+          <el-form-item label="上传附件:">
+            <div v-if="registerForm.systemFileList" class="upload-file">
+              <div v-for="(item, index) in registerForm.systemFileList" :key="index"
+                style="margin:0;display:flex;justify-content:space-around;">
+                <p
+                  style="margin:0;width:calc(100% - 40px);overflow: hidden;white-space: nowrap;text-overflow:ellipsis;cursor: pointer">
+                  {{ item.name ? item.name + '.' + item.suffix : item.fileName }}</p>
+                <Menu :data="item" @delFile="delFile"></Menu>
+              </div>
+            </div>
+            <template>
+              <div v-if="registerForm.type == 1 || registerForm.edit == true">
+                <myUpload :file-list="registerForm.systemFileList" @on-change="onchangeFile" @on-remove="onRemove"
+                  style="height: 185px;" :autoUpload="true"></myUpload>
+              </div>
+            </template>
+          </el-form-item>
+        </el-form>
+        <p v-if="registerForm.type == 1" style="margin-left:10px">后续事项:</p>
+        <addMatter :type="type" :reportId="reportId" :sign="matterSign" @value="getMatter" v-if="registerForm.type == 1">
+        </addMatter>
+      </div>
+      <div slot="footer" class="dialog-footer" v-if="registerForm.type == 1 || registerForm.edit == true">
+        <el-button @click="closeRegister">取 消</el-button>
+        <el-button type="primary" @click="submitRegister" :loading="btnLoading">确 定</el-button>
+      </div>
+      <div slot="footer" class="dialog-footer" v-else>
+        <el-button @click="closeRegister">关 闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import addMatter from './addMatters.vue'
+import Menu from '@/utils/model/menu/index.vue'
+export default {
+  components: {
+    addMatter,
+    Menu
+  },
+  props: ['reportId'],
+  data() {
+    return {
+      // 表格字段
+      columnList: [
+        {
+          name: "名称",
+          type: "String",
+          value: "followUpName",
+        },
+        {
+          name: "描述",
+          type: "String",
+          value: "remark",
+        },
+        {
+          name: "期限",
+          type: "String",
+          value: "timeLimit",
+        },
+        {
+          name: "处理人",
+          type: "String",
+          value: "agent",
+        },
+        {
+          name: "协办人",
+          type: "String",
+          value: "assistPerson",
+        },
+        {
+          name: "创建人",
+          type: "String",
+          value: "createPersonName",
+        },
+        {
+          name: "创建时间",
+          type: "DataTime",
+          value: "createTime",
+        },
+        {
+          name: "完成时间",
+          type: "DataTime",
+          value: "finishTime",
+        },
+        {
+          name: "状态",
+          type: "String",
+          value: "status",
+        },
+      ],
+      // 状态
+      status: {},
+      // 表格数据
+      tableData: [],
+      // 表格的loading
+      tableLoading: false,
+      // 表格高度
+      tableHeight: null,
+      // 表格分页的信息
+      queryParams: {
+        size: 10,
+        current: 1,
+      },
+      // 表格总条数
+      total: 0,
+      //排序字段
+      sort: [{ "orderBy": "createTime", "orderType": 1 }],
+      // 后续事项的弹窗名
+      title: '',
+      // 控制后续事项显示关闭
+      dialogVisible: false,
+      // 后续事项弹窗打开时传的信息
+      row: null,
+      // 控制登记结果弹窗显示关闭
+      registerVisible: false,
+      // 登记结果中的给后续事项传的判断值
+      matterSign: false,
+      // 登记结果弹窗中确定按钮loading
+      btnLoading: false,
+      // 控制显示后续事项的数量,1一个后续事项2多个后续事项
+      type: 1,
+      // 登记结果的数据
+      registerForm: {
+        systemFileList: [],
+      },
+    }
+  },
+  mounted() {
+    // 获取table栏位
+    // this.columnList = await this.$commonJS.getCustomField('projectTask')
+    // this.getList()
+  },
+  methods: {
+    //设置表格高度
+    setHeight() {
+      const offsetTop = window.innerHeight - this.$refs.table.$el.offsetTop - 200
+      const body = document.querySelector('.el-table__body')
+      if (!body) {
+        return false
+      }
+      const offsetBodyHeight = body.offsetHeight
+      if (this.tableData.length && offsetBodyHeight < offsetTop) {
+        this.tableHeight = offsetBodyHeight + 75
+      } else if (!this.tableData.length) {
+        this.tableHeight = null
+      } else {
+        this.tableHeight = offsetTop
+      }
+      this.tableHeight = this.tableHeight > 300 ? this.tableHeight : 300
+    },
+    // 排序
+    sortChange({ column, prop, order }) {
+      //如需要多个字段排序,则不需要清空
+      var params = {
+        sort: this.sort,
+        column,
+        prop,
+        order,
+      }
+      this.sort = this.$commonJS.getSortData(params)
+      this.queryParams.current = 1
+      this.getList()
+    },
+    //查询后续跟进事项
+    getList() {
+      let params = {
+        ...this.queryParams,//分页信息
+        // searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
+        orderDTOList: this.sort,//排序信息
+      }
+      this.tableLoading = true
+      this.$api.queryMatters(params).then(response => {
+        if (response.code == 200) {
+          this.tableData = response.data.list
+          this.total = response.data.total
+          this.tableLoading = false
+        }
+      }).catch(error => {
+        this.tableData = []
+        this.total = 0
+        this.tableLoading = false
+      })
+    },
+    // 分页
+    handleCurrentChange(val) {
+      this.queryParams.current = val
+      this.getList()
+    },
+    //新增后续跟进事项的选项
+    handleCommand(e) {
+      switch (e) {
+        case '1':
+          this.handleClick(1)
+          break;
+        case '2':
+          this.handleClick(2)
+          break;
+      }
+    },
+    //打开新增后续跟进事项弹窗
+    handleClick(type) {
+      if (type == 1) {
+        this.title = '添加后续跟进事项'
+      } else if (type == 2) {
+        this.title = '批量添加后续跟进事项'
+      }
+      this.type = type
+      this.dialogVisible = true
+    },
+    //打开编辑后续跟进事项弹窗
+    edit(row) {
+      this.title = '查看后续跟进事项'
+      if (row.status == '进行中') {
+        this.title = '编辑后续跟进事项'
+      }
+      this.type = 1
+      this.row = JSON.parse(JSON.stringify(row))
+      this.dialogVisible = true
+    },
+    //关闭弹窗
+    close() {
+      this.row = null
+      // this.type = null
+      this.dialogVisible = false
+    },
+    //获取弹窗状态
+    getDialog(val) {
+      this.close()
+      // this.getList()
+    },
+    //表格下拉菜单
+    handleCommand1(e, row) {
+      switch (e) {
+        case '1'://登记结果
+          this.registerResult(row, 1)
+          break;
+        case '2'://查看结果
+          this.registerResult(row, 2)
+          break;
+        case '3'://删除表格数据
+          this.deleteRegister(row)
+          break;
+      }
+    },
+    //打开登记结果弹窗
+    registerResult(row, type) {
+      this.type = 2
+      this.registerForm = JSON.parse(JSON.stringify(row))
+      this.registerForm.type = type
+      if (!this.registerForm.systemFileList) {
+        this.$set(this.registerForm, 'systemFileList', [])
+      }
+      this.registerVisible = true
+    },
+    //获取需要删除的事项
+    deleteRegister(row) {
+      if (row) {
+        var ids = [row.id]
+      } else {
+
+      }
+      this.$confirm('此操作将永久删除, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.deleteMatters(ids)
+      }).catch(() => {
+        this.$message.info('取消操作')
+      });
+
+    },
+    //删除事项
+    deleteMatters(ids) {
+      this.$api.deleteMatters(ids).then(response => {
+        if (response.code == 200) {
+          this.$message.success('删除成功')
+          this.getList()
+        }
+      }).catch(error => {
+        this.$message.error('删除失败')
+      })
+    },
+
+
+    // 上传的文件监听
+    onchangeFile(file, fileList) {
+      if (file.guid) {
+        let index = this.registerForm.systemFileList.findIndex(item => {
+          return item.uid == file.uid
+        })
+        if (index != -1) {
+          this.registerForm.systemFileList.splice(index, 1, file)
+        }
+      } else {
+        this.registerForm.systemFileList.push(file.raw)
+      }
+
+    },
+    // 删除上传的文件
+    onRemove(file, fileList) {
+      let index = this.registerForm.systemFileList.findIndex(item => {
+        return item.uid == file.uid
+      })
+      if (index != -1) {
+        this.registerForm.systemFileList.splice(index, 1)
+      }
+    },
+    //查看未上传的文件
+    handlePreview(file) {
+      var item = {
+        name: file.name,
+        suffix: '',
+        downLoad: true
+      }
+      var index = file.raw.type.lastIndexOf('/')
+      var type = file.raw.type.substring(index + 1, file.raw.type.length)
+      var arr = ['png', 'jpeg', 'bmp', 'jpg']
+      if (arr.includes(type)) {
+        var FileUrl = URL.createObjectURL(file.raw)
+        var isPicture = 1
+      } else if (type == 'pdf') {
+        var FileUrl = URL.createObjectURL(file.raw)
+        var isPicture = 0
+      } else {
+        return false
+      }
+      const router = this.$router.resolve({
+        path: '/checkFile',
+        query: {
+          row: JSON.stringify(item),
+          FileUrl: FileUrl,
+          isPicture: isPicture
+        }
+      })
+      window.open(router.href, '_blank');
+    },
+    //移除已保存的文件
+    delFile(id) {
+      var index = this.registerForm.systemFileList.findIndex(item => {
+        return item.id == id
+      })
+      if (index != -1) {
+        this.registerForm.systemFileList.splice(index, 1)
+        if (this.registerForm.type == 2 && !this.registerForm.edit) {
+          this.submitRegister()
+        }
+      }
+    },
+
+    //关闭登记结果弹窗
+    closeRegister() {
+      // this.type = null
+      this.registerForm = {
+        systemFileList: []
+      }
+      if (this.registerForm.type == 1 || this.registerForm.edit) {
+        this.$refs.upload.clearFiles()
+      }
+
+      this.registerVisible = false
+    },
+    //获取后续事项
+    getMatter(val) {
+      this.matterSign = false
+      this.btnLoading = true
+      try {
+        var keyList = {
+          followUpName: '',
+          remark: '',
+          agent: '',
+          assistPerson: '',
+          timeLimit: ''
+        }
+        var list = []
+        val.forEach(item => {
+          var a = false
+          for (let key in keyList) {
+            if (item[key] != '' && item[key] != null) {
+              a = true
+            }
+          }
+          if (a == true) {
+            if (item.followUpName != '') {
+              list.push(item)
+            } else {
+              throw new Error()
+            }
+          }
+        })
+        if (list.length == 0) {
+          return false
+        }
+        this.registerForm.followUps = list
+        this.submitRegister1()
+      } catch (e) {
+        this.$message.error('后续事项名称不能为空')
+        this.registerForm.followUps = [{}]
+        this.btnLoading = false
+      }
+    },
+    //编辑事项结果
+    editRegister() {
+      this.$set(this.registerForm, 'edit', !this.registerForm.edit)
+    },
+    //更新后续跟进事项结果
+    submitRegister() {
+      this.matterSign = true
+      this.$nextTick(() => {
+        // this.btnLoading = true
+        if (this.registerForm.followUps && this.registerForm.followUps.length > 0) {
+          this.registerForm.followUps = []
+        } else {
+          this.submitRegister1()
+        }
+      })
+
+    },
+    // 提交结果,调用api
+    submitRegister1() {
+      // 判断文件是否都上传完毕
+      this.$commonJS.allUploadFile(this.registerForm)
+      if (this.registerForm.type == 1) {
+        this.registerForm.systemFileList = []
+      }
+      this.registerForm.followUpId = this.registerForm.id
+      this.$api.register(this.registerForm).then(response => {
+        if (response.code == 200) {
+          this.btnLoading = false
+          this.getList()
+          if (this.registerForm.type != 2 || this.registerForm.edit) {
+            this.closeRegister()
+          }
+
+        }
+      }).catch(error => {
+        this.btnLoading = false
+      })
+    }
+  },
+}
+</script>

+ 2 - 18
src/views/report/components/reportFile/reportFileTable.vue

@@ -156,27 +156,11 @@ export default {
     // this.getList()
   },
   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
-      }
-    },
+  
     // 弹窗确定
     submit() {
       // 判断文件是否都上传完毕
-      var allUpload = this.validFile()
-      if (allUpload) {
-        this.$message.warning('文件未全部上传,请耐心等待')
-        return false
-      }
-      this.form.fileGuids = this.form.systemFileList.map(item => {
-        return item.guid
-      })
+      this.$commonJS.allUploadFile(this.form)
       
       this.$refs.form.validate((valid) => {
         if (valid) {