|
@@ -23,7 +23,11 @@
|
|
|
<el-option label="全部显示" value="0"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
- <el-button @click="keep" type="primary" style="float: right;">保存</el-button>
|
|
|
+ <div>
|
|
|
+ <el-button @click="keep" type="primary">保存</el-button>
|
|
|
+ <!-- <el-button @click="finish" type="primary">完成</el-button> -->
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
<template>
|
|
|
<el-table
|
|
@@ -62,56 +66,79 @@
|
|
|
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>
|
|
|
+ <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>
|
|
|
+ <!-- <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"
|
|
|
+ prop="littleDirection"
|
|
|
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>
|
|
|
+ <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>
|
|
|
+ <!-- <el-input type="textarea" style="width:250px" autosize v-model="scope.row.littleDirection"> {{scope.row.littleDirection}}</el-input> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</template>
|
|
|
<div style="margin-top: 20px;">
|
|
|
<p >回避设计总体方向:</p>
|
|
|
- <el-input
|
|
|
+ <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>
|
|
|
+
|
|
|
+ <!-- <el-input
|
|
|
type="textarea"
|
|
|
:autosize="{ minRows: 2, maxRows: 4}"
|
|
|
placeholder="请输入内容(可粘贴图片)"
|
|
|
v-model="textarea1">
|
|
|
- </el-input>
|
|
|
+ </el-input> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {explain} from '@/views/report/components/mixins'
|
|
|
+import { PatentDetails } from '@/views/components/common/mixins';
|
|
|
export default {
|
|
|
- props:['patentNo','reportId','splitBy','splitType'],
|
|
|
+ props: ['patentNo', 'reportId', 'splitBy', 'splitType'],
|
|
|
+ mixins:[explain,PatentDetails],
|
|
|
data() {
|
|
|
return {
|
|
|
tableData:[],
|
|
|
tableData1: [],
|
|
|
checkList: [],
|
|
|
- splitType1:"0",
|
|
|
- splitBy1: "2",//拆分符号0 ',',1';',2','和';'
|
|
|
- Type: "1",
|
|
|
- textarea1: '',
|
|
|
+ splitType1:this.$s.getSession('reportMessage1').splitType?this.$s.getSession('reportMessage1').splitType.toString():"0",//拆分类型0仅拆主权要,1全部拆分
|
|
|
+ splitBy1: this.$s.getSession('reportMessage1').splitBy?this.$s.getSession('reportMessage1').splitBy.toString():"2",
|
|
|
+ Type: "0",
|
|
|
+ textarea1: {},
|
|
|
mergeArr: ['id', 'pRightName'],
|
|
|
mergeObj: {},
|
|
|
typeArr:[1],//显示权要还是全部显示
|
|
|
loading: false,
|
|
|
row: [],
|
|
|
Index_row: [],
|
|
|
- arrIndex: 0,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
this.splitPatentRight()
|
|
|
},
|
|
|
methods: {
|
|
|
+ //完成
|
|
|
+ // finish() {
|
|
|
+
|
|
|
+ // },
|
|
|
//初始拆分
|
|
|
splitPatentRight() {
|
|
|
this.loading = true
|
|
@@ -123,7 +150,11 @@ export default {
|
|
|
ReportId: this.reportId,
|
|
|
}
|
|
|
this.$api.splitPatentRight(PatentRight).then(res => {
|
|
|
- if (res.code==200) {
|
|
|
+ if (res.code == 200) {
|
|
|
+ let a=this.$s.getSession('reportMessage1')
|
|
|
+ a.splitBy=res.data.splitBy.toString()
|
|
|
+ a.splitType = res.data.splitType.toString()
|
|
|
+ this.$s.setSession('reportMessage1',a)
|
|
|
if (res.data.patentRightVos.length>0) {
|
|
|
res.data.patentRightVos.forEach(RightVosItem => {
|
|
|
if (RightVosItem.features.length>0) {
|
|
@@ -143,11 +174,11 @@ export default {
|
|
|
FeaturesItem.explainText=FeaturesItem.contentOut
|
|
|
}
|
|
|
}
|
|
|
- if (!FeaturesItem.hasOwnProperty("direction")) {
|
|
|
- FeaturesItem.direction=FeaturesItem.contentOut
|
|
|
+ if (!FeaturesItem.hasOwnProperty("littleDirection")) {
|
|
|
+ FeaturesItem.littleDirection=FeaturesItem.contentOut
|
|
|
} else {
|
|
|
- if (FeaturesItem.direction=="") {
|
|
|
- FeaturesItem.direction=FeaturesItem.contentOut
|
|
|
+ if (FeaturesItem.littleDirection=="") {
|
|
|
+ FeaturesItem.littleDirection=FeaturesItem.contentOut
|
|
|
}
|
|
|
}
|
|
|
this.tableData1.push(FeaturesItem)
|
|
@@ -229,7 +260,7 @@ export default {
|
|
|
// }
|
|
|
// }
|
|
|
},
|
|
|
- //保存
|
|
|
+ //保存
|
|
|
keep() {
|
|
|
console.log(this.tableData);
|
|
|
let keepArr = [
|
|
@@ -264,48 +295,63 @@ export default {
|
|
|
}
|
|
|
)
|
|
|
}
|
|
|
- let featuresArr = ["signPatentNo", "patentId", "content","type","direction","explainText","contentOut","splitBy","splitType","featuresOrder","id","rightName","isFinal"]
|
|
|
- featuresArr.forEach(item1 => {
|
|
|
- var keepArrIndex = keepArr[j].features.findIndex(item2 => {
|
|
|
- // console.log(item2,item1);
|
|
|
- return item2==item1
|
|
|
- })
|
|
|
- if (keepArrIndex < 0) {
|
|
|
- // console.log(keepArr[j].features);
|
|
|
- keepArr[j].features.push({
|
|
|
- // keepArr[j].features:this.tableData1[i].item1
|
|
|
- })
|
|
|
+ // let featuresArr = ["signPatentNo", "patentId", "content","type","littleDirection","explainText","contentOut","splitBy","splitType","featuresOrder","id","rightName","isFinal"]
|
|
|
+ // featuresArr.forEach(item1 => {
|
|
|
+ // var keepArrIndex = keepArr[j].features.findIndex(item2 => {
|
|
|
+ // // console.log(item2,item1);
|
|
|
+ // return item2.hasOwnProperty(item1)
|
|
|
+ // })
|
|
|
+ // console.log(keepArrIndex);
|
|
|
+ // if (keepArrIndex < 0) {
|
|
|
+ // console.log(item1,keepArr[j].features);
|
|
|
+ // keepArr[j].features.push({
|
|
|
+ // item1:this.tableData1[i].item1,
|
|
|
+ // })
|
|
|
|
|
|
- }
|
|
|
- })
|
|
|
- // keepArr[j].features.push({
|
|
|
- // signPatentNo: this.tableData1[i].signPatentNo,
|
|
|
- // patentId: this.tableData1[i].patentId,
|
|
|
- // content: this.tableData1[i].content,
|
|
|
- // type: this.tableData1[i].type,
|
|
|
- // direction: this.tableData1[i].direction?this.tableData1[i].direction:'',
|
|
|
- // explainText: this.tableData1[i].explainText?this.tableData1[i].explainText:'',
|
|
|
- // contentOut: this.tableData1[i].contentOut,
|
|
|
- // splitBy: this.tableData1[i].splitBy,
|
|
|
- // splitType: this.tableData1[i].splitType,
|
|
|
- // featuresOrder: this.tableData1[i].featuresOrder,
|
|
|
- // id: this.tableData1[i].id,
|
|
|
- // rightName: this.tableData1[i].rightName,
|
|
|
- // isFinal: this.tableData1[i].isFinal,
|
|
|
+ // }
|
|
|
// })
|
|
|
+ keepArr[j].features.push({
|
|
|
+ signPatentNo: this.tableData1[i].signPatentNo,
|
|
|
+ patentId: this.tableData1[i].patentId,
|
|
|
+ content: this.tableData1[i].content,
|
|
|
+ type: this.tableData1[i].type,
|
|
|
+ littleDirection: this.tableData1[i].littleDirection ? this.tableData1[i].littleDirection : '',
|
|
|
+ // littleDirection:
|
|
|
+ reportId: this.tableData1[i].pReportId,
|
|
|
+ explainText: this.tableData1[i].explainText?this.tableData1[i].explainText:'',
|
|
|
+ contentOut: this.tableData1[i].contentOut,
|
|
|
+ splitBy: this.tableData1[i].splitBy,
|
|
|
+ splitType: this.tableData1[i].splitType,
|
|
|
+ featuresOrder: this.tableData1[i].featuresOrder,
|
|
|
+ id: this.tableData1[i].id,
|
|
|
+ rightName: this.tableData1[i].rightName,
|
|
|
+ isFinal: this.tableData1[i].isFinal,
|
|
|
+ })
|
|
|
}
|
|
|
- console.log(this.tableData,keepArr);
|
|
|
- // this.$api.KeepPatentRight(keepArr).then(res => {
|
|
|
- // console.log(res);
|
|
|
- // if (res.code == 200) {
|
|
|
- // this.keepSure = true;
|
|
|
- // this.$message.success("保存成功")
|
|
|
- // }
|
|
|
- // })
|
|
|
+// {
|
|
|
+// "reportId": 0,
|
|
|
+// "avoidDesignLittleDirectionDTOs": [
|
|
|
+// {}
|
|
|
+// ],
|
|
|
+// "wholeDirection": "string"
|
|
|
+// }
|
|
|
+ let keepStr = {
|
|
|
+ reportId: this.reportId,
|
|
|
+ avoidDesignLittleDirectionDTOs: keepArr,
|
|
|
+ wholeDirection:this.textarea1.wholeDirection?this.textarea1.wholeDirection:''
|
|
|
+ }
|
|
|
+ console.log(this.textarea1.wholeDirection);
|
|
|
+ console.log(this.tableData,keepArr,keepStr);
|
|
|
+ this.$api.addAvoidDesignDirection(keepStr).then(res => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("保存成功")
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 获取选中特征信息
|
|
|
getRow(scope) {
|
|
|
- console.log(scope);
|
|
|
+ // console.log(scope);
|
|
|
|
|
|
let Index=this.row.findIndex(item=>{ return item.id==scope.row.id })
|
|
|
if (Index < 0) {
|
|
@@ -347,7 +393,7 @@ export default {
|
|
|
if (rowIndex<this.row.length-1) {
|
|
|
str = str + rowItem.content + ","
|
|
|
str1 = str1 + rowItem.contentOut + ","
|
|
|
- str2 = str2 + rowItem.direction + ","
|
|
|
+ str2 = str2 + rowItem.littleDirection + ","
|
|
|
str3 = str3 + rowItem.explainText + ","
|
|
|
let Index1 = this.tableData1.findIndex(item => { return rowItem.id==item.id })
|
|
|
if (Index1!=-1) {
|
|
@@ -357,14 +403,14 @@ export default {
|
|
|
}else if(rowIndex==this.row.length-1){
|
|
|
str=str+rowItem.content
|
|
|
str1=str1+rowItem.contentOut
|
|
|
- str2=str2+rowItem.direction
|
|
|
+ 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].direction=str2
|
|
|
+ this.tableData1[Index2].littleDirection=str2
|
|
|
this.tableData1[Index2].explainText = str3
|
|
|
console.log(this.tableData1);
|
|
|
}
|
|
@@ -391,7 +437,7 @@ export default {
|
|
|
id: rowItem.id+'a',
|
|
|
content: '',
|
|
|
contentOut:'',
|
|
|
- direction:'',
|
|
|
+ littleDirection:'',
|
|
|
explainText: '',
|
|
|
rightName:rowItem.rightName,
|
|
|
featuresOrder:rowItem.featuresOrder,
|