Kaynağa Gözat

回避设计

zhuhao 2 yıl önce
ebeveyn
işleme
3942a65b72

+ 9 - 0
RMS-FrontEnd/src/router/index.js

@@ -94,6 +94,15 @@ const routes = [
         },
         component:() => import('@/views/report/tort/index.vue'),
       },
+      //回避设计
+      {
+        path: '/avoid',
+        name:"avoid",
+        meta:{
+          aside:true
+        },
+        component:() => import('@/views/report/avoid/index.vue'),
+      },
       {
         path:'/patentDetails',
         name:"patentDetails",

+ 253 - 0
RMS-FrontEnd/src/views/report/avoid/avoidPage/avoidDirection.vue

@@ -0,0 +1,253 @@
+<template>
+  <div style="padding:20px">
+    <div>
+      <p>标的专利号:{{ patentNo }}</p>
+    </div>
+    <div style="display: flex; justify-content: space-between;margin:20px 0px 20px 0 ;">
+      <el-button-group>
+        <el-button @click="merge" :disabled="checkList.length>1?false:true">合并</el-button>
+        <el-button @click="split" :disabled="checkList.length>0?false:true">拆分</el-button>
+      </el-button-group>
+      <div>
+        <el-select placeholder="请选择拆分类型" v-model="splitType1" 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="splitBy1" 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="Type" style="margin-left: 10px;" @change="TypeSelect($event)" >
+            <el-option label="仅显示主权要" value="1"></el-option>
+            <el-option label="全部显示" value="0"></el-option>
+        </el-select>
+      </div>
+        <el-button @click="keep" type="primary" style="float: right;">保存</el-button>
+    </div>
+    <template>
+      <el-table
+        :data="tableData"
+        border
+        :span-method="objectSpanMethod"
+        v-loading="loading"
+        style="width: 100%"
+        max-height="1000px">
+          <el-table-column
+            prop="pRightName"
+            label="权要"
+            width="180"
+            align="center">
+            <template slot-scope="scope">
+              <el-tooltip class="item" effect="dark" :content="scope.row.pRightName" 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}}</el-input>
+                </el-checkbox>
+              </el-checkbox-group>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="explainText"
+            label="解释(可粘贴图片)"
+            align="center">
+            <template slot-scope="scope">
+              <el-input type="textarea" style="width:250px" autosize v-model="scope.row.explainText"> {{scope.row.explainText}}</el-input>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="direction"
+            label="回避设计方向(可粘贴图片)"
+            align="center">
+            <template slot-scope="scope">
+              <el-input type="textarea" style="width:250px" autosize v-model="scope.row.direction"> {{scope.row.direction}}</el-input>
+            </template>
+          </el-table-column>
+        </el-table>
+    </template>
+    <div style="margin-top: 20px;">
+      <p >回避设计总体方向:</p>
+      <el-input
+        type="textarea"
+        :autosize="{ minRows: 2, maxRows: 4}"
+        placeholder="请输入内容(可粘贴图片)"
+        v-model="textarea1">
+      </el-input>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props:['patentNo','reportId','splitBy','splitType'],
+  data() {
+    return {
+      tableData:[],
+      tableData1: [],
+      checkList: [],
+      splitType1:"0",
+      splitBy1: "2",//拆分符号0 ',',1';',2','和';'
+      Type: "1",
+      textarea1: '',
+      mergeArr: ['id', 'pRightName'],
+      mergeObj: {},
+      typeArr:[1],//显示权要还是全部显示
+      loading:false,
+    };
+  },
+  mounted() {
+    this.splitPatentRight()
+  },
+  methods: {
+    //初始拆分
+    splitPatentRight() {
+      this.loading = true
+      this.tableData1=[]
+      let PatentRight = {
+        patentNo: this.patentNo,
+        splitType: this.splitType1,
+        splitBy: this.splitBy1,
+        ReportId: this.reportId,
+      }
+      this.$api.splitPatentRight(PatentRight).then(res => {
+        if (res.code==200) {
+          if (res.data.patentRightVos.length>0) {
+            res.data.patentRightVos.forEach(RightVosItem => {
+              if (RightVosItem.features.length>0) {
+                RightVosItem.features.forEach(FeaturesItem => {
+                  FeaturesItem.pRightName=RightVosItem.RightName
+                  FeaturesItem.pSignPatentNo=RightVosItem.signPatentNo
+                  FeaturesItem.pContentOut=RightVosItem.contentOut
+                  FeaturesItem.pContent=RightVosItem.content
+                  FeaturesItem.pReportId=RightVosItem.reportId
+                  FeaturesItem.pPatentId=RightVosItem.patentId
+                  FeaturesItem.pType=RightVosItem.type
+                  FeaturesItem.pSort=RightVosItem.sort
+                  if (!FeaturesItem.hasOwnProperty("explainText")) {
+                    FeaturesItem.explainText=FeaturesItem.contentOut
+                  } else {
+                    if (FeaturesItem.explainText=="") {
+                      FeaturesItem.explainText=FeaturesItem.contentOut
+                    }
+                  }
+                  if (!FeaturesItem.hasOwnProperty("direction")) {
+                    FeaturesItem.direction=FeaturesItem.contentOut
+                  } else {
+                    if (FeaturesItem.direction=="") {
+                      FeaturesItem.direction=FeaturesItem.contentOut
+                    }
+                  }
+                   this.tableData1.push(FeaturesItem)
+                })
+               
+              }
+              
+            })
+          }
+          console.log(this.tableData1);
+          this.TypeSelect(this.Type)
+          this.loading=false
+        }
+      })
+    },
+    // 选择下拉框
+    splitTypeSelect(even) {
+      this.splitType1 = even
+      this.splitPatentRight()
+    },
+    splitBySelect(even) {
+      this.splitBy1 = even
+      this.splitPatentRight()
+    },
+    TypeSelect(even) { 
+      this.typeArr = []
+      if (even==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)
+    },
+    //获取每个元素所需合并的行数
+    getSpanArr(data) {
+      this.row = []
+      this.mergeArr.forEach((key, index1) => {
+        let count = 0;
+        this.mergeObj[key] = [];
+        data.forEach((item, index) => {
+          if (index === 0) {
+            this.mergeObj[key].push(1);
+          } else {
+            if (item[key] === data[index - 1][key] && item[key] !== 'explainText') {
+              this.mergeObj[key][count] += 1;
+              this.mergeObj[key].push(0);
+            } else {
+              count = index;
+              this.mergeObj[key].push(1);
+            }
+          }
+        })
+      })
+    },
+    // 合并行
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeArr.indexOf(column.property) !== -1) {
+        if (this.mergeObj[column.property][rowIndex]) {
+          // console.log("@@",this.mergeObj[column.property][rowIndex]);
+          return [this.mergeObj[column.property][rowIndex], 1]
+        } else {
+          return [0, 0];
+        }
+      }
+        // if (columnIndex === 0) {
+        //   if (rowIndex % 2 === 0) {
+        //     return {
+        //       rowspan: 2,
+        //       colspan: 1
+        //     };
+        //   } else {
+        //     return {
+        //       rowspan: 0,
+        //       colspan: 0
+        //     };
+        //   }
+        // }
+    },
+      //保存
+    keep() { },
+    // 获取选中特征信息
+    getRow(scope) {
+      console.log(scope);
+      
+    },
+    // 特征等合并
+    merge() { 
+      console.log(this.checkList);
+      if (this.checkList.length>1) {
+        // this.checkListL=true
+        this.checkList.forEach(item => {
+          
+        })
+      }
+    },
+    split(){},
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 38 - 0
RMS-FrontEnd/src/views/report/avoid/index.vue

@@ -0,0 +1,38 @@
+<template>
+  <div>
+    <avoid-Direction :patentNo="patentNo" :reportId="reportId" :splitBy="splitBy" :splitType="splitType"></avoid-Direction>
+  </div>
+</template>
+
+<script>
+import avoidDirection from '@/views/report/avoid/avoidPage/avoidDirection.vue'
+export default {
+  components: {
+    avoidDirection
+  },
+  data() {
+    return {
+
+    }
+  },
+  computed: {
+    patentNo() {
+      return this.$route.query.patentNo
+    },
+    reportId() {
+      return this.$route.query.id
+    },
+    splitBy() {
+      return this.$route.query.splitBy
+    },
+    splitType() {
+      return this.$route.query.splitType
+    },
+  },
+  
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

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

@@ -162,10 +162,13 @@ export default {
       }
     }
     const isTime = (rule, value, callback) => {
-      let a = Date.parse(new Date)
+      if (this.isEndTime) {
+        this.isEndTimes = Date.parse(new Date)
+      }
+      
       let b = Date.parse(value)
       if (value) {
-        if (b<a) {
+        if (b<this.isEndTimes) {
           callback(new Error('禁止选择现在及以前时间,请重新选择'))
         } else {
           callback()
@@ -217,7 +220,9 @@ export default {
       // 控制弹出框显示隐藏
       showDialog: false,
       Already:[],
-      load_text:''
+      load_text: '',
+      isEndTime:true,
+      isEndTimes:null,
     };
   },
   computed: {
@@ -238,8 +243,10 @@ export default {
       // this.$refs.TaskForm.clear()
       this.task = {}
       this.showTask = false
+      this.isEndTime=true
     },
-    submitTask(){
+    submitTask() {
+      this.isEndTime=false
       this.$refs.TaskForm.validate((valid) => {
         if (valid) {
           this.form.status = 0

+ 9 - 3
RMS-FrontEnd/src/views/report/components/sendCollaboration.vue

@@ -118,11 +118,13 @@ export default {
       }, 100);
     };
     const isTime = (rule, value, callback) => {
-      let a = Date.parse(new Date)
+      if (this.isEndTime) {
+        this.isEndTimes = Date.parse(new Date)
+      }
       let b = Date.parse(value)
-      console.log(a,b);
+      console.log(this.isEndTimes,b);
       if (value) {
-        if (b<a) {
+        if (b<this.isEndTimes) {
           callback(new Error('禁止选择现在及以前时间,请重新选择'))
         } else {
           callback()
@@ -178,6 +180,8 @@ export default {
         // collaborator: [],
         syneryCCLists: [],
       },
+      isEndTime:true,
+      isEndTimes:null,
       clientRules: {
         handlePersonIds: [{ required: true, validator: isCollaborator, trigger: 'change' },],
         taskName: [{ required: true, message: "请输入主题", trigger: "blur" },],
@@ -211,6 +215,7 @@ export default {
   // 点击子组件personnelList中确定按钮,像父级发送数据,父级通过getCheck接收存入到checked数组中(数据是对象)
   methods: {
     sendMessage() {
+      this.isEndTime=false
       // this.queryParams.clientForm=this.clientForm
       this.$refs.clientForm.validate((valid) => {
         if (valid) {
@@ -402,6 +407,7 @@ export default {
       this.createdPersonnel = false
     },
     close() {
+      this.isEndTime=true
       // this.$emit('getClientInformation', this.clientInformation)
       this.visibleCollaboration = false
       this.clientForm = {}

+ 12 - 0
RMS-FrontEnd/src/views/report/index.vue

@@ -316,6 +316,18 @@ export default {
             window.open(routerReport3.href, '_blank');//open方法中添加_blank属性打开新窗口页面
             break;
         case 5:
+        var routerReport4 = this.$router.resolve({
+              path: "/avoid",
+              query: {
+                id: val.id,
+                patentNo: val.signPatentNo,
+                splitType:val.splitType,
+                splitBy: val.splitBy,
+                personId:val.personId,
+              }
+            })
+            window.open(routerReport4.href, '_blank');//open方法中添加_blank属性打开新窗口页面
+            break;
         case 6:
 
       }