zhuliu 2 سال پیش
والد
کامیت
9f49833546

+ 23 - 1
RMS-FrontEnd/src/views/components/articles/components/features.vue

@@ -13,9 +13,10 @@
         <el-table
         :data="tableData"
         border
+        ref="table"
         :span-method="objectSpanMethod"
         v-loading="loading"
-        height="500px"
+        :height="tableHeight - 25"
         style="min-width: 100%; margin-top: 20px;overflow:auto">
 
         <el-table-column prop="pRightName" label="权要"  align="center"  width="200px">
@@ -82,6 +83,7 @@ export default{
     props:["reportId",'patentNo','selectedFeatures','selectedFeaturesId'],
     data() {
         return {
+            tableHeight:null,
             isSelect:false,
             tableData1:[],
             tableData:[],
@@ -104,6 +106,11 @@ export default{
         }
     },
     watch:{
+        tableData(){
+            this.$nextTick(() => {
+                this.setHeight()
+            })
+        },
         'selectedFeatures'(val){
             console.log(val)
             this.row = val
@@ -127,6 +134,21 @@ export default{
         },
     },
     methods: {
+        setHeight() {
+            const offsetTop = window.innerHeight - this.$refs.table.$el.offsetTop - 40
+            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
+            }
+        },
         getRow(row){
             var index = this.row.findIndex(item=>{
                 return item.id == row.id

+ 71 - 32
RMS-FrontEnd/src/views/report/FTO/FTOPage/components/PatentFeatures.vue

@@ -40,9 +40,10 @@
         <el-table
           :data="tableData"
           border
+          ref="table"
           :span-method="objectSpanMethod"
           v-loading="loading"
-          height="550px"
+          :height="tableHeight - 25"
           style="min-width: 100%; margin-top: 20px;overflow:auto">
 
           <el-table-column prop="pRightName" label="权要"  align="center"  width="200px">
@@ -172,6 +173,7 @@
     },
     data() {
       return {
+        tableHeight:null,
         typeFto: this.type,
         coordinationsss:1,
         show: true,
@@ -210,6 +212,11 @@
       }
     },
     watch:{
+      tableData(){
+            this.$nextTick(() => {
+                this.setHeight()
+            })
+        },
       patentNo(val){
         this.patentNo1 = val
         if (this.typeFto==1) {
@@ -241,6 +248,21 @@
       
     },
     methods: {
+      setHeight() {
+            const offsetTop = window.innerHeight - this.$refs.table.$el.offsetTop - 40
+            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
+            }
+        },
       //获取拆分信息
       async getSplitMessage(){
         var a = {
@@ -277,6 +299,23 @@
       },
       //合并
       merge() {
+        var sign = this.row[0].rightId
+        var allow = true
+        this.row.forEach(item => {
+          if(item.rightId!=sign){
+            allow = false
+            return false
+          }
+        });
+        if(!allow){
+          this.$alert('不能合并不同权要的特征','提示',{
+            confirmButtonText: '确定',
+            type:'warning',
+            callback: action => {
+            }
+          })
+          return false;
+        }
         this.keepSure=false
         var str = ''
         var strText=""
@@ -318,37 +357,37 @@
         //只对勾选的进行拆分
         this.keepSure=false
         this.checkList = []//
-        for (let i = 0; i < this.row.length; i++) {
-          let Index = this.tableData1.findIndex(item => {
-            return item.id==this.row[i].id
-          })
-          let tab = {
-            pSignPatentNo: this.row[i].pSignPatentNo,
-            pPatentId: this.row[i].pPatentId,
-            pContent: this.row[i].pContent,
-            pType: this.row[i].pType,
-            pSort: this.row[i].pSort,
-            pReportId: this.row[i].pReportId,
-            pContentOut: this.row[i].pContentOut,
-  
-            id:this.row[i].id+"a",
-            signPatentNo: this.tableData[i].signPatentNo,
-                contentOut:"" ,
-                content: "",
-                rightId: this.tableData[i].rightId,
-                isFinal: this.tableData[i].isFinal,
-                reportId: this.tableData[i].reportId,
-                explainText: "",
-                targetDescription: "",
-                compareDescription: "",
-                compareResult: "",
-                rightName: this.tableData1[i].rightName,
-                rightType: this.tableData1[i].rightType,
-                splitBy: this.tableData1[i].splitBy,
-          }
-          this.tableData1.splice(Index+1,0,tab)
-          // this.splitBySelect(this.splitBy)
-        }  
+        this.row.forEach(ele=>{
+        var Index = this.tableData1.findIndex(item => {
+          return item.id==ele.id
+        })
+        var a = Math.floor((Math.random()*9999)+1000);
+        let tab = {
+          pSignPatentNo: ele.pSignPatentNo,
+          pPatentId: ele.pPatentId,
+          pContent: ele.pContent,
+          pRightName: ele.pRightName,
+          pType: ele.pType,
+          pSort: ele.pSort,
+          pReportId: ele.pReportId,
+          pContentOut: ele.pContentOut,
+
+          id:ele.id+"a"+a,
+          signPatentNo: ele.signPatentNo,
+              contentOut:"" ,
+              content: "",
+              rightId: ele.rightId,
+              isFinal: ele.isFinal,
+              reportId: ele.reportId,
+              explainText: "",
+
+              rightName: ele.rightName,
+              rightType: ele.rightType,
+              splitBy: ele.splitBy,
+        }
+        // console.log(tab)
+        this.tableData1.splice(Index+1,0,tab)
+      }) 
         this.TypeSelect(this.Type)//调用显示权要
         this.row = []
         console.log(this.row);

+ 66 - 22
RMS-FrontEnd/src/views/report/Invalid/InvalidPage/Claims.vue

@@ -37,7 +37,9 @@
       <!-- 表格部分 -->
       <el-table
         :data="tableData"
+        ref="table"
         border
+        :height="tableHeight - 25"
         :span-method="objectSpanMethod"
         v-loading="loading"
         style="min-width: 100%; margin-top: 20px;overflow:auto">
@@ -115,7 +117,7 @@ export default {
       loading: false,
       delArr: [],
       keepSure:true,//保存标识
-
+      tableHeight:null
     }
   },
 
@@ -128,6 +130,21 @@ export default {
     
   },
   methods: {
+    setHeight() {
+      const offsetTop = window.innerHeight - this.$refs.table.$el.offsetTop - 40
+      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
+      }
+    },
     //选中特征
     getFunInfo(row) {
       console.log("row",row)
@@ -142,6 +159,25 @@ export default {
     },
     //合并
     merge() {
+      console.log(this.row)
+      var sign = this.row[0].rightId
+      var allow = true
+      this.row.forEach(item => {
+        if(item.rightId!=sign){
+          allow = false
+          return false
+        }
+      });
+      if(!allow){
+        this.$alert('不能合并不同权要的特征','提示',{
+          confirmButtonText: '确定',
+          type:'warning',
+          callback: action => {
+          }
+        })
+        return false;
+      }
+
       this.keepSure=false
       var str = ''
       var strText=""
@@ -182,36 +218,38 @@ export default {
     split() {
       //只对勾选的进行拆分
       this.keepSure=false
-      this.checkList = []//
-      for (let i = 0; i < this.row.length; i++) {
-        let Index = this.tableData1.findIndex(item => {
-          return item.id==this.row[i].id
+      this.checkList = []
+      this.row.forEach(ele=>{
+        var Index = this.tableData1.findIndex(item => {
+          return item.id==ele.id
         })
+        var a = Math.floor((Math.random()*9999)+1000);
         let tab = {
-          pSignPatentNo: this.row[i].pSignPatentNo,
-          pPatentId: this.row[i].pPatentId,
-          pContent: this.row[i].pContent,
-          pType: this.row[i].pType,
-          pSort: this.row[i].pSort,
-          pReportId: this.row[i].pReportId,
-          pContentOut: this.row[i].pContentOut,
+          pSignPatentNo: ele.pSignPatentNo,
+          pPatentId: ele.pPatentId,
+          pContent: ele.pContent,
+          pRightName: ele.pRightName,
+          pType: ele.pType,
+          pSort: ele.pSort,
+          pReportId: ele.pReportId,
+          pContentOut: ele.pContentOut,
 
-          id:this.row[i].id+"a",
-          signPatentNo: this.tableData[i].signPatentNo,
+          id:ele.id+"a"+a,
+          signPatentNo: ele.signPatentNo,
               contentOut:"" ,
               content: "",
-              rightId: this.tableData[i].rightId,
-              isFinal: this.tableData[i].isFinal,
-              reportId: this.tableData[i].reportId,
+              rightId: ele.rightId,
+              isFinal: ele.isFinal,
+              reportId: ele.reportId,
               explainText: "",
 
-              rightName: this.tableData1[i].rightName,
-              rightType: this.tableData1[i].rightType,
-              splitBy: this.tableData1[i].splitBy,
+              rightName: ele.rightName,
+              rightType: ele.rightType,
+              splitBy: ele.splitBy,
         }
+        // console.log(tab)
         this.tableData1.splice(Index+1,0,tab)
-        // this.splitBySelect(this.splitBy)
-      }  
+      })
       this.TypeSelect(this.Type)//调用显示权要
       this.row = []
       console.log(this.row);
@@ -420,6 +458,7 @@ export default {
         // }
         
       }
+      console.log(keepArr)
       this.$api.KeepPatentRight(keepArr).then(res => {
         console.log(res);
         if (res.code == 200) {
@@ -436,6 +475,11 @@ export default {
    
   },
   watch: {
+    tableData(){
+      this.$nextTick(() => {
+        this.setHeight()
+      })
+    },
     patentNo(val) {
       this.patentNo = val
     },

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

@@ -68,10 +68,34 @@
               <el-button type="primary" @click="ifDialog" >确 定</el-button>
         </span>
     </el-dialog>
-    <el-dialog title="选择审核人" :visible.sync="showPerson" width="1000px"  @close="handleClose2">
+    <el-dialog title="添加审核任务" :visible.sync="showTask" width="500px"  @close="handleCloseTask">
+      <el-form :model="task" :rules="TaskRules" ref="TaskForm" label-width="120px" v-loading="loading">
+        <el-form-item label="任务名称 :" prop="taskName">
+            <el-input v-model="task.taskName" type="text" placeholder="输入主题" />
+          </el-form-item>
+          <el-form-item label="审核人 :" prop="personnelId">
+          <el-select style="width:100%;" ref="select1" v-model="task.personnelId" clearable
+               filterable >
+               <el-option v-for="item in personnelList" :key="item.id" :label="item.personnelName" :value="item.id"></el-option>
+            </el-select>
+            </el-form-item>
+          <el-form-item label="完成日期 :" prop="endTime">
+            <el-date-picker style="width:100%" v-model="task.endTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime"  placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="备注 :" prop="remark">
+            <el-input v-model="task.remark" type="textarea" placeholder="输入备注" />
+          </el-form-item>
+      </el-form>
+     <span slot="footer" class="dialog-footer">
+              <el-button @click="handleCloseTask">取 消</el-button>
+              <el-button type="primary" @click="submitTask" >确 定</el-button>
+        </span>
+    </el-dialog>
+    <!-- <el-dialog title="选择审核人" :visible.sync="showPerson" width="1000px"  @close="handleClose2">
       <Personnel-List @checked="getPerson"></Personnel-List>
     
-    </el-dialog>
+    </el-dialog> -->
     <el-dialog :visible.sync="showFile">
       <div width="1200px">
         <!-- <img width="100%" :src="imageUrl" alt=""> -->
@@ -145,6 +169,8 @@ export default {
         {color: '#1989fa', percentage: 80},
         {color: '#6f7ad3', percentage: 100}
       ],
+      showTask:false,
+      task:{},
       showPercentage:false,
       percentage:0,
       loading:false,
@@ -170,6 +196,11 @@ export default {
         clientId: [{ required: true, message: '请选择委托方', trigger: 'change' },],
         departmentId: [{ required: true, validator:isDepartmentId, trigger: 'change' },],
       },
+      TaskRules:{
+        taskName:[{ required: true, message: '请输入任务名称', trigger: 'blur' },],
+        personnelId: [{ required: true, message: '请选择审核人', trigger: 'change' },],
+        endTime: [{ required: true, message: '请选择日期', trigger: 'change' } ],
+      },
       // 控制弹出框显示隐藏
       showDialog: false,
       Already:[],
@@ -190,6 +221,47 @@ export default {
     this.getDictsFromPAS()
   },
   methods: {
+    handleCloseTask(){
+      // this.$refs.TaskForm.clear()
+      this.task = {}
+      this.showTask = false
+    },
+    submitTask(){
+      this.$refs.TaskForm.validate((valid) => {
+        if (valid) {
+          this.form.status = 0
+        let formData = new FormData()
+          if(this.file){
+            for (var i = 0; i < this.file.length; i++) {
+              formData.append("files", this.file[i]);
+            }
+          }
+        var a = {
+          report:this.form,
+          personIds:[this.task.personnelId],
+          // taskName:this.form.name+'审核',
+          taskName:this.task.taskName,
+          endTime:this.task.endTime,
+          remark:this.task.remark,
+          type:0
+        }
+        formData.append('taskVO',JSON.stringify(a))
+        this.$api.AddTask(formData).then(response=>{
+          if(response.code == 200){
+            this.file = []
+            this.$refs.upload.clearFiles()
+            this.$message.success('报告创建成功并发送审核')
+            this.$emit('getList',true)
+            this.handleCloseTask()
+            this.handleClose()
+          }
+        }).catch(error=>{
+          this.$message.error('报告创建失败')
+          this.handleCloseTask()
+        })
+        }
+      })
+    },
     delFile(id){
       var index = this.form.reportFiles.findIndex(item=>{
         return item.id == id
@@ -330,43 +402,16 @@ export default {
     //   console.log(response)
     // })
    },
-
     //获取审核人
-    getPerson(val){
-      if(val){
-         this.person = val
-        console.log(val)
-        this.form.status = 0
-        let formData = new FormData()
-          if(this.file){
-            for (var i = 0; i < this.file.length; i++) {
-              formData.append("files", this.file[i]);
-            }
-          }
-        var a = {
-          report:this.form,
-          personIds:[val[0].id],
-          taskName:this.form.name+'审核',
-          type:0
-        }
-        formData.append('taskVO',JSON.stringify(a))
-        this.$api.AddTask(formData).then(response=>{
-          if(response.code == 200){
-            this.file = []
-            this.$refs.upload.clearFiles()
-            this.$message.success('报告创建成功并发送审核')
-            this.$emit('getList',true)
-            this.handleClose2()
-            this.handleClose()
-          }
-        }).catch(error=>{
-          this.$message.error('报告创建失败')
-          this.handleClose2()
-        })
-      }else{
-        this.handleClose2()
-      }
-    },
+    // getPerson(val){
+    //   if(val){
+    //      this.person = val
+    //     console.log(val)
+       
+    //   }else{
+    //     this.handleClose2()
+    //   }
+    // },
     // //提交审核
     // submitPerson(){},
     //导入
@@ -452,7 +497,9 @@ export default {
                       closeOnClickModal:false,
                       distinguishCancelAndClose: true,
                     }).then(() => {
-                      this.showPerson = true
+                      // this.showPerson = true
+                      this.showTask = true
+                      this.$set(this.task,'taskName',this.form.name+'审核')
                       // this.$message({
                       //   type: 'success',
                       //   message: '删除成功!'

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

@@ -85,6 +85,7 @@ export default {
         return false
       }
       const offsetBodyHeight = body.offsetHeight
+      console.log(offsetTop,offsetBodyHeight)
       if (this.data.length && offsetBodyHeight < offsetTop) {
         this.tableHeight = offsetBodyHeight + 75
       } else if (!this.data.length) {