|
@@ -22,6 +22,9 @@
|
|
<p v-if="id">{{data.name}}</p>
|
|
<p v-if="id">{{data.name}}</p>
|
|
<!-- 4-18 需求变更 -->
|
|
<!-- 4-18 需求变更 -->
|
|
<input v-else type="text" v-model="data.name" placeholder="请输入术语" maxlength="50" @blur="handleBlur(1)">
|
|
<input v-else type="text" v-model="data.name" placeholder="请输入术语" maxlength="50" @blur="handleBlur(1)">
|
|
|
|
+ <div v-if="searchType ==='standard'" class="similarBox">
|
|
|
|
+
|
|
|
|
+ </div>
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
<input type="text" v-model="data.spell" placeholder="请输入拼音" maxlength="50" @input="handlePinyin($event,1)">
|
|
<input type="text" v-model="data.spell" placeholder="请输入拼音" maxlength="50" @input="handlePinyin($event,1)">
|
|
@@ -52,7 +55,7 @@
|
|
<span v-else>{{data.type}}</span>
|
|
<span v-else>{{data.type}}</span>
|
|
</td>
|
|
</td>
|
|
<td class="desc">
|
|
<td class="desc">
|
|
- <input v-model="data.remark" placeholder="请输入术语说明" maxlength="120"></input>
|
|
|
|
|
|
+ <input v-model="data.remark" placeholder="请输入术语说明" maxlength="120"/>
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
</table>
|
|
</table>
|
|
@@ -72,7 +75,7 @@
|
|
<td :title="item.name&&item.name.length>9?item.name:''">
|
|
<td :title="item.name&&item.name.length>9?item.name:''">
|
|
<!-- 使用原生input,输入限制 -->
|
|
<!-- 使用原生input,输入限制 -->
|
|
<!-- <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small" @input.native="handleInput(2,index)"></el-input> -->
|
|
<!-- <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small" @input.native="handleInput(2,index)"></el-input> -->
|
|
- <input type="text" v-model="item.name" :title="item.name" placeholder="请输入术语" maxlength="50" @blur="handleBlur(2,index,99)" >
|
|
|
|
|
|
+ <input type="text" v-model="item.name" :title="item.name" placeholder="请输入术语" maxlength="50" @blur="handleBlur(2,index,99)" />
|
|
</td>
|
|
</td>
|
|
<!-- <td v-if="!item.isEdit">
|
|
<!-- <td v-if="!item.isEdit">
|
|
{{item.spell}}
|
|
{{item.spell}}
|
|
@@ -100,7 +103,7 @@
|
|
<span v-else>{{data.type}}</span>
|
|
<span v-else>{{data.type}}</span>
|
|
</td>
|
|
</td>
|
|
<td class="desc">
|
|
<td class="desc">
|
|
- <input v-model="item.remark" placeholder="请输入术语说明" maxlength="120"></input>
|
|
|
|
|
|
+ <input v-model="item.remark" placeholder="请输入术语说明" maxlength="120" />
|
|
</td>
|
|
</td>
|
|
<td class="desc">
|
|
<td class="desc">
|
|
{{item.isConcept == 1?"标准词":"同义词"}}
|
|
{{item.isConcept == 1?"标准词":"同义词"}}
|
|
@@ -143,6 +146,9 @@
|
|
<!-- 使用原生input,输入限制 -->
|
|
<!-- 使用原生input,输入限制 -->
|
|
<!-- <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small" @input.native="handleInput(2,index)"></el-input> -->
|
|
<!-- <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small" @input.native="handleInput(2,index)"></el-input> -->
|
|
<input type="text" v-model="item.name" placeholder="请输入术语" maxlength="50" @blur="handleBlur(2,index)">
|
|
<input type="text" v-model="item.name" placeholder="请输入术语" maxlength="50" @blur="handleBlur(2,index)">
|
|
|
|
+ <div v-if="index === searchIndex && searchType ==='similar'" class="similarBox">
|
|
|
|
+
|
|
|
|
+ </div>
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
<input type="text" v-model="item.spell" placeholder="请输入拼音" maxlength="50" @input="handlePinyin($event,3,index)">
|
|
<input type="text" v-model="item.spell" placeholder="请输入拼音" maxlength="50" @input="handlePinyin($event,3,index)">
|
|
@@ -151,7 +157,7 @@
|
|
{{data.type}}
|
|
{{data.type}}
|
|
</td>
|
|
</td>
|
|
<td class="desc">
|
|
<td class="desc">
|
|
- <input v-model="item.remark" placeholder="请输入术语说明" maxlength="120"></input>
|
|
|
|
|
|
+ <input v-model="item.remark" placeholder="请输入术语说明" maxlength="120" />
|
|
</td>
|
|
</td>
|
|
<td v-if="id">
|
|
<td v-if="id">
|
|
<span @click="deleLine(index)" class="delete">删除</span>
|
|
<span @click="deleLine(index)" class="delete">删除</span>
|
|
@@ -258,6 +264,9 @@ import pinyin from '../../js/Convert_Pinyin.js';
|
|
dioType:'', //默认展示一类
|
|
dioType:'', //默认展示一类
|
|
deptList:[], //更多信息-科室
|
|
deptList:[], //更多信息-科室
|
|
dept:'', //默认展示全科
|
|
dept:'', //默认展示全科
|
|
|
|
+ SimilarList: [], //相似词列表
|
|
|
|
+ searchIndex: -1, //展示哪个的同义词
|
|
|
|
+ searchType: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
@@ -429,7 +438,11 @@ import pinyin from '../../js/Convert_Pinyin.js';
|
|
let data = this.data;
|
|
let data = this.data;
|
|
data.spell = pinyin.getCamelChars(data.name);
|
|
data.spell = pinyin.getCamelChars(data.name);
|
|
this.unfit = false;
|
|
this.unfit = false;
|
|
|
|
+ this.searchType = 'standard'
|
|
|
|
+ this.getSimilarList()
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
}else if(type==2){
|
|
}else if(type==2){
|
|
// 修改时术语名称、拼音和类型均不能修改
|
|
// 修改时术语名称、拼音和类型均不能修改
|
|
if(flg == 99){
|
|
if(flg == 99){
|
|
@@ -446,6 +459,8 @@ import pinyin from '../../js/Convert_Pinyin.js';
|
|
let current = this.allwords[index];
|
|
let current = this.allwords[index];
|
|
current.spell = pinyin.getCamelChars(current.name);
|
|
current.spell = pinyin.getCamelChars(current.name);
|
|
this.unfit = false;
|
|
this.unfit = false;
|
|
|
|
+ this.searchType = 'similar';
|
|
|
|
+ this.searchIndex = index;
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
if(this.synonymous[index].name && !pattern.test(this.synonymous[index].name)){
|
|
if(this.synonymous[index].name && !pattern.test(this.synonymous[index].name)){
|
|
@@ -459,6 +474,8 @@ import pinyin from '../../js/Convert_Pinyin.js';
|
|
let current = this.synonymous[index];
|
|
let current = this.synonymous[index];
|
|
current.spell = pinyin.getCamelChars(current.name);
|
|
current.spell = pinyin.getCamelChars(current.name);
|
|
this.unfit = false;
|
|
this.unfit = false;
|
|
|
|
+ this.searchType = 'similar';
|
|
|
|
+ this.searchIndex = index;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -475,6 +492,14 @@ import pinyin from '../../js/Convert_Pinyin.js';
|
|
}
|
|
}
|
|
// e.target.value = e.target.value.replace(/[^a-zA-Z]/g,'');
|
|
// e.target.value = e.target.value.replace(/[^a-zA-Z]/g,'');
|
|
},
|
|
},
|
|
|
|
+ getSimilarList(){
|
|
|
|
+ const param = {
|
|
|
|
+ inputWord: this.data.name
|
|
|
|
+ }
|
|
|
|
+ api.getSimilarList(param).then((res) =>{
|
|
|
|
+ console.log('res',res)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
addSpan(type){
|
|
addSpan(type){
|
|
let singleSpan = {
|
|
let singleSpan = {
|
|
name:'',
|
|
name:'',
|
|
@@ -820,4 +845,11 @@ import pinyin from '../../js/Convert_Pinyin.js';
|
|
/deep/ .marT{
|
|
/deep/ .marT{
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
}
|
|
}
|
|
|
|
+ .similarBox {
|
|
|
|
+ position: absolute;
|
|
|
|
+ background: #fff;
|
|
|
|
+ width: 200px;
|
|
|
|
+ height: 200px;
|
|
|
|
+ border: 1px solid #000;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|