|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="inventionPointDialog" v-if="show2">
|
|
|
- <div class="mini" :style="miniStyle" @click="changeDom('mini')" v-if="!show" v-drag="getPosition" ref="mini">查新</div>
|
|
|
- <div class="plus" v-else v-drag2="getPosition" ref="plus" :style="plusStyle">
|
|
|
+ <div class="mini" :style="miniStyle" @click="changeDom('mini')" v-show="!show" v-drag="getPosition" ref="mini" :class="!show?'show':''">查新</div>
|
|
|
+ <div class="plus" v-show="show" v-drag2="getPosition" ref="plus" :style="plusStyle" :class="show?'show':''">
|
|
|
<div class="head" ondragstart="return false">
|
|
|
<div>{{ text }}</div>
|
|
|
<div style="width: 20px; height: 20px">
|
|
@@ -11,7 +11,7 @@
|
|
|
<div class="main">
|
|
|
<div class="main_head" ondragstart="return false">
|
|
|
<div>
|
|
|
- <span style="font-size:12px">发明点:</span>
|
|
|
+ <span style="font-size:12px">技术交底书:</span>
|
|
|
<el-button v-if="projectId" style="margin-left:10px" type="text" size="mini" @click="intoProject" >进入项目</el-button>
|
|
|
</div>
|
|
|
<div>
|
|
@@ -21,9 +21,34 @@
|
|
|
<el-button type="text" size="mini" :loading="loading" v-if="btns.indexOf(3)!=-1" @click="submit(3)">保存</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 技术交底书 -->
|
|
|
+ <div class="confession">
|
|
|
+ <div v-if="confession.guid" class="confessionBox" :title="confession.originalName">
|
|
|
+ <div class="confessionName">{{ confession.originalName }}</div>
|
|
|
+ <div class="confessionBtn">
|
|
|
+ <el-button class="understandConfession" type="text" size="mini" @click="understandConfession">AI智能解析</el-button>
|
|
|
+ <!-- <el-button type="text" size="mini" @click="viewConfession">预览</el-button> -->
|
|
|
+ <el-button type="text" size="mini" @click="delConfession">删除</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ ref="uploadConfession"
|
|
|
+ action="#"
|
|
|
+ :auto-upload="false"
|
|
|
+ :show-file-list="false"
|
|
|
+ :on-change="onChangeConfession"
|
|
|
+ :limit="1">
|
|
|
+ <el-button type="text" size="mini">点击上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 发明点输入 -->
|
|
|
<div class="main_input">
|
|
|
<myRichText type="textarea" v-model="technicalCase.inventionPoint" resize="none" customStyle="height:220px;font-size: 14px;color:#606266" :rows="10" placeholder="请输入发明点"></myRichText>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="main_result" v-if="showResult">
|
|
|
<div class="description">{{description[clickType]}}</div>
|
|
|
<div class="result" v-loading="loading">
|
|
@@ -222,7 +247,8 @@ export default {
|
|
|
3:'以下是根据您输入的发明点找到的可能相同的案件,您确认一下是否是相同案件,如果是请相同案件的点击“进入”按钮,如果没有相同的案件就点击“保存”按钮保存输入的发明点'
|
|
|
},
|
|
|
chooseContrastFile:[],
|
|
|
- cWidth:document.body.clientWidth
|
|
|
+ cWidth:document.body.clientWidth,
|
|
|
+ confession:{}
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -312,8 +338,10 @@ export default {
|
|
|
this.technicalCase={
|
|
|
inventionPoint:'',
|
|
|
}
|
|
|
+ this.confession = {}
|
|
|
return
|
|
|
}
|
|
|
+ this.getConfession()
|
|
|
var params = {
|
|
|
projectId:this.projectId
|
|
|
}
|
|
@@ -327,6 +355,79 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //查询报告的技术交底书
|
|
|
+ getConfession(){
|
|
|
+ var params = {
|
|
|
+ projectId:this.projectId
|
|
|
+ }
|
|
|
+ this.$api.queryConfession(params).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ this.confession = response.data || {}
|
|
|
+ }
|
|
|
+ }).catch(error=>{
|
|
|
+ this.confession = {}
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //上传技术交底书
|
|
|
+ onChangeConfession(file){
|
|
|
+ let formData = new FormData()
|
|
|
+ formData.append('sourceId',this.$constants.sourceId)
|
|
|
+ formData.append('files',file.raw)
|
|
|
+ var message = this.$message({
|
|
|
+ message: '文件上传中...',
|
|
|
+ type: 'warning',
|
|
|
+ duration:0
|
|
|
+ });
|
|
|
+ this.$api.uploadFile(formData).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ let guid = response.data[0]
|
|
|
+ this.$refs.uploadConfession.clearFiles()
|
|
|
+ var params = {
|
|
|
+ projectId:this.projectId,
|
|
|
+ fileGuid:guid
|
|
|
+ }
|
|
|
+ this.$api.addConfession(params).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ message.close()
|
|
|
+ this.$message.success('文件上传成功')
|
|
|
+ if(!this.projectId){
|
|
|
+ this.$emit('getProjectId',response.data)
|
|
|
+ }else{
|
|
|
+ this.getConfession()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).catch(error=>{
|
|
|
+ message.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //理解技术交底书
|
|
|
+ understandConfession(){
|
|
|
+ let router = this.$router.resolve({
|
|
|
+ path: '/technicalDisclosure',
|
|
|
+ query: {
|
|
|
+ projectId: this.projectId,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.open(router.href, '_blank')
|
|
|
+ },
|
|
|
+ //查看技术交底书
|
|
|
+ viewConfession(){},
|
|
|
+ //删除技术交底书
|
|
|
+ delConfession(){
|
|
|
+ var params = {
|
|
|
+ projectId:this.projectId,
|
|
|
+ fileGuid:''
|
|
|
+ }
|
|
|
+ this.$api.addConfession(params).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ this.$message.success('文件删除成功')
|
|
|
+ this.getConfession()
|
|
|
+ }
|
|
|
+ }).catch(error=>{
|
|
|
+ })
|
|
|
+ },
|
|
|
//选择关键词
|
|
|
chooseKeyword(item) {
|
|
|
var index = this.checkList.indexOf(item);
|
|
@@ -386,18 +487,25 @@ export default {
|
|
|
// 保存发明点
|
|
|
saveInventionPoint(){
|
|
|
var params = this.technicalCase
|
|
|
+ var api = 'addOrUpdateTechnicalCase'
|
|
|
if(this.projectId){
|
|
|
params.projectId = this.projectId
|
|
|
+ api = 'updateInventionPoint'
|
|
|
}
|
|
|
- this.$api.addOrUpdateTechnicalCase(params).then(response=>{
|
|
|
+ this.$api[api](params).then(response=>{
|
|
|
if(response.code == 200){
|
|
|
this.$message.success('保存成功')
|
|
|
if(!this.technicalCase.projectId){
|
|
|
this.$emit('getProjectId',response.data.projectId)
|
|
|
}
|
|
|
this.$emit('updateInventionPoint')
|
|
|
- this.technicalCase.technicalCaseId = response.data.technicalCaseId
|
|
|
- this.technicalCase.projectId = response.data.projectId
|
|
|
+ if(response.data.technicalCaseId){
|
|
|
+ this.technicalCase.technicalCaseId = response.data.technicalCaseId
|
|
|
+ }
|
|
|
+ if(response.data.projectId){
|
|
|
+ this.technicalCase.projectId = response.data.projectId
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}).catch(error=>{
|
|
|
this.$message.error('保存失败')
|
|
@@ -436,6 +544,7 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
.inventionPointDialog {
|
|
|
z-index: 99999;
|
|
|
+
|
|
|
.mini {
|
|
|
position: fixed;
|
|
|
// top: 0;
|
|
@@ -450,6 +559,10 @@ export default {
|
|
|
font-weight: bold;
|
|
|
cursor: pointer;
|
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
|
|
|
+ opacity: 0;
|
|
|
+ transform: scale(2);
|
|
|
+ visibility: hidden;
|
|
|
+ transition: opacity 0.5s ease,transform 0.5s ease;
|
|
|
}
|
|
|
.plus {
|
|
|
padding: 10px;
|
|
@@ -460,6 +573,10 @@ export default {
|
|
|
width: 350px;
|
|
|
height: auto;
|
|
|
border-radius: 10px;
|
|
|
+ opacity: 0;
|
|
|
+ transform: scale(0.1);
|
|
|
+ visibility: hidden;
|
|
|
+ transition: opacity 0.5s ease,transform 0.5s ease;
|
|
|
.head {
|
|
|
width: 100%;
|
|
|
display: flex;
|
|
@@ -478,6 +595,53 @@ export default {
|
|
|
align-items: center;
|
|
|
line-height: 30px;
|
|
|
}
|
|
|
+
|
|
|
+ .confession{
|
|
|
+ margin: 0 0 10px 0;
|
|
|
+ .confessionBox{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ .confessionBtn{
|
|
|
+ // width:0;
|
|
|
+ // height: 0;
|
|
|
+ // opacity: 0;
|
|
|
+ // pointer-events: none;
|
|
|
+ .understandConfession{
|
|
|
+ font-size: 15px;
|
|
|
+ background: linear-gradient(to right, blue, red);
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ color: transparent;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .confessionName{
|
|
|
+ font-size: 12px;
|
|
|
+ flex:1;
|
|
|
+ // width:calc(100% - 1px);
|
|
|
+ width:calc(100% - 30px);
|
|
|
+ line-height:28px;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow:ellipsis;
|
|
|
+ }
|
|
|
+ &:hover{
|
|
|
+ // color:#66b1ff;
|
|
|
+ transform: scale(1.02) translateY(-2px);
|
|
|
+ transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 1.94);
|
|
|
+ // &> .confessionName{
|
|
|
+ // width:calc(100% - 30px);
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ // &:hover> .confessionBtn{
|
|
|
+ // width:auto;
|
|
|
+ // height: auto;
|
|
|
+ // opacity: 1;
|
|
|
+ // pointer-events: all;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.main_result {
|
|
|
margin-top: 20px;
|
|
|
background: white;
|
|
@@ -512,5 +676,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .show{
|
|
|
+ opacity: 1;
|
|
|
+ transform: scale(1) ;
|
|
|
+ visibility: visible ;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|