|
@@ -1,36 +1,326 @@
|
|
|
<template>
|
|
|
- <div class="inventionPointDialog">
|
|
|
- <div class="mini">
|
|
|
- 查新
|
|
|
- </div>
|
|
|
- <div class="plus">
|
|
|
- <div class="head"></div>
|
|
|
- <div class="main"></div>
|
|
|
+ <div class="inventionPointDialog" v-if="show2">
|
|
|
+ <div class="mini" :style="miniStyle" @click="changeDom('mini')" v-if="!show" v-drag ref="mini">查新</div>
|
|
|
+ <div class="plus" v-else v-drag2 ref="plus" :style="plusStyle">
|
|
|
+ <div class="head">
|
|
|
+ <div>{{ text }}</div>
|
|
|
+ <div style="width: 20px; height: 20px">
|
|
|
+ <el-image @click="changeDom('plus')" style="width: 100%; height: 100%" :src="require('@/assets/img/收起.png')" fit="contain"></el-image>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="main">
|
|
|
+ <div class="main_head">
|
|
|
+ <span style="font-size:12px">发明点:</span>
|
|
|
+ <div>
|
|
|
+ <el-button type="text" size="mini" :loading="loading" @click="submit(1)">关键词</el-button>
|
|
|
+ <el-button type="text" size="mini" :loading="loading" @click="submit(2)">相似案件</el-button>
|
|
|
+ <el-button type="text" size="mini" :loading="loading" @click="submit(3)">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="main_input">
|
|
|
+ <el-input type="textarea" v-model="inventionPoint" resize="none" :rows="10" placeholder="请输入发明点"></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="main_result" v-if="showResult">
|
|
|
+ <div class="description">{{description[clickType]}}</div>
|
|
|
+ <div class="result">
|
|
|
+ <template v-if="clickType == 1">
|
|
|
+ <div>
|
|
|
+ <div class="keyWord">
|
|
|
+ 中文关键词:
|
|
|
+ <div class="keyWord_content">
|
|
|
+ <el-tag
|
|
|
+ v-for="item in keyWord.CN"
|
|
|
+ :key="item"
|
|
|
+ type=""
|
|
|
+ @click="chooseKeyword(item)"
|
|
|
+ :effect="checkList.indexOf(item) == -1 ? 'plain' : 'dark'"
|
|
|
+ >
|
|
|
+ {{ item }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="keyWord">
|
|
|
+ 英文关键词:
|
|
|
+ <div class="keyWord_content">
|
|
|
+ <el-tag
|
|
|
+ v-for="item in keyWord.EN"
|
|
|
+ :key="item"
|
|
|
+ @click="chooseKeyword(item)"
|
|
|
+ type=""
|
|
|
+ :effect="checkList.indexOf(item) == -1 ? 'plain' : 'dark'"
|
|
|
+ >
|
|
|
+ {{ item }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="foot">
|
|
|
+ <el-button type="primary" size="small">检索</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div>
|
|
|
+ <myCard class="box-card" v-for="(item,index) in tableData" :key="item.id">
|
|
|
+ <div slot="head">
|
|
|
+ <div style="font-size:14px">
|
|
|
+ 序号:{{ (index + 1) }}
|
|
|
+ <span style="margin-left:20px;color:cadetblue;">相似度:{{ item.same }}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-button type="primary" size="mini" @click="clickItem(item)" v-if="clickType == 2">复用结果</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="clickItem(item)" v-if="clickType == 3">进入</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-form label-width="100px">
|
|
|
+ <el-form-item label="发明点:">
|
|
|
+ <div v-html="item.inventionPoint"></div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="创建人:">
|
|
|
+ <div v-html="item.createName"></div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="创建时间:">
|
|
|
+ <div v-html="item.createTime"></div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </myCard>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { startDrag } from '@/utils/direct/drag'
|
|
|
export default {
|
|
|
+ directives:{
|
|
|
+ 'drag':{
|
|
|
+ inserted(el,binding){
|
|
|
+ startDrag(el, el, binding.value);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 'drag2':{
|
|
|
+ inserted(el,binding){
|
|
|
+ startDrag(el.querySelector('.head'), el, binding.value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
components: {},
|
|
|
- props: {},
|
|
|
+ props: {
|
|
|
+ type:{
|
|
|
+ type:String,
|
|
|
+ default:'mini'
|
|
|
+ },
|
|
|
+ position:{
|
|
|
+ type:Object,
|
|
|
+ default:()=>{
|
|
|
+ return {
|
|
|
+ right:0,
|
|
|
+ top:'120px'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ title:{
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ },
|
|
|
+ projectId:{
|
|
|
+
|
|
|
+ },
|
|
|
+ plusStyle:{
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ },
|
|
|
+ miniStyle:{
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
+ show2:true,
|
|
|
+ show: this.type == 'mini'?false:true,
|
|
|
+ text: this.title,
|
|
|
+ inventionPoint:'发明点',
|
|
|
+ tableData:[],
|
|
|
+ loading: false,
|
|
|
+ showResult: false,
|
|
|
+ checkList: [],
|
|
|
+ keyWord: {
|
|
|
+ CN: ["关键词1", "关键词2"],
|
|
|
+ EN: ["keyWord1", "keyWord2"],
|
|
|
+ },
|
|
|
+ clickType: null,
|
|
|
+ description:{
|
|
|
+ 1:"以下是提炼的关键词:",
|
|
|
+ 2:'以下是相似案件:',
|
|
|
+ 3:'以下是根据您输入的发明点找到的可能相同的案件,您确认一下是否是相同案件,如果是请相同案件的点击“进入”按钮,如果没有相同的案件就点击“直接进入”按钮进行检索'
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
|
computed: {},
|
|
|
created() {},
|
|
|
- mounted() {},
|
|
|
- methods: {},
|
|
|
+ mounted() {
|
|
|
+ this.setPosition(this.type)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ setPosition(ref){
|
|
|
+ if(!this.position){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ var dom = this.$refs[ref]
|
|
|
+ if(dom){
|
|
|
+ for(let key in this.position){
|
|
|
+ dom.style[key] = this.position[key]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ open(){
|
|
|
+
|
|
|
+ },
|
|
|
+ changeDom(ref){
|
|
|
+ var dom = this.$refs[ref].getAttribute('drag-flag')
|
|
|
+ if(dom == 'true'){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$set(this,'show',!this.show)
|
|
|
+ this.resize(ref)
|
|
|
+
|
|
|
+ },
|
|
|
+ resize(ref){
|
|
|
+ this.show2 = false
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.show2 = true
|
|
|
+ var ref2 = ref == 'mini'?'plus':'mini'
|
|
|
+ this.setPosition(ref2)
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ //选择关键词
|
|
|
+ chooseKeyword(item) {
|
|
|
+ var index = this.checkList.indexOf(item);
|
|
|
+ if (index == -1) {
|
|
|
+ this.checkList.push(item);
|
|
|
+ } else {
|
|
|
+ this.checkList.splice(index, 1);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //确定
|
|
|
+ submit(type) {
|
|
|
+ this.clickType = type
|
|
|
+ if(type!= 1){
|
|
|
+ this.tableData = [
|
|
|
+ {
|
|
|
+ id:1,
|
|
|
+ number:'5W262525',
|
|
|
+ inventionPoint:'发明点',
|
|
|
+ searchRecords:[
|
|
|
+ {
|
|
|
+ searchRecord:'PA = (深圳市江波龙电子股份有限公司)'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ same:'99%',
|
|
|
+ createName:'管理员',
|
|
|
+ createTime:'2024-09-06 17:04'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:2,
|
|
|
+ number:'5W131553',
|
|
|
+ inventionPoint:'发明点',
|
|
|
+ searchRecords:[
|
|
|
+ {
|
|
|
+ searchRecord:'TI = (石墨烯薄膜)'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ same:'90%',
|
|
|
+ createName:'管理员',
|
|
|
+ createTime:'2024-09-06 17:04'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ this.showResult = true;
|
|
|
+ },
|
|
|
+ clickItem(){},
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-.inventionPointDialog{
|
|
|
- .mini{
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
+.inventionPointDialog {
|
|
|
+ z-index: 99999;
|
|
|
+ .mini {
|
|
|
+ position: fixed;
|
|
|
+ // top: 0;
|
|
|
+ right: 10px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 60px;
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
border-radius: 50%;
|
|
|
+ background: red;
|
|
|
+ color: white;
|
|
|
+ font-weight: bold;
|
|
|
+ cursor: pointer;
|
|
|
+ box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
|
|
|
+ }
|
|
|
+ .plus {
|
|
|
+ padding: 10px;
|
|
|
+ background: white;
|
|
|
+ box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
|
|
|
+ position: fixed;
|
|
|
+ right: 10px;
|
|
|
+ width: 250px;
|
|
|
+ height: auto;
|
|
|
+ border-radius: 10px;
|
|
|
+ .head {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+ .main {
|
|
|
+ .main_head {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .main_result {
|
|
|
+ margin-top: 20px;
|
|
|
+ background: white;
|
|
|
+ .description {
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+ padding: 5px 0;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ .result {
|
|
|
+ margin-top: 10px;
|
|
|
+ height: 300px;
|
|
|
+ overflow: auto;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .keyWord {
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ flex: 1;
|
|
|
+ .keyWord_content {
|
|
|
+ padding: 10px;
|
|
|
+ border: 1px solid var(--bg);
|
|
|
+ height: calc(100% - 50px);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .foot {
|
|
|
+ padding: 5px 0;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|