|
@@ -1,10 +1,17 @@
|
|
|
<template>
|
|
|
<div class="view-find-word">
|
|
|
- <div class="saga-border">
|
|
|
+ <div class="saga-border" style="position:relative;">
|
|
|
<p class="center">请从下面的原始点位描述中选择"{{type == 'type' ? "设备类型" : "设备参数"}}"关键字</p>
|
|
|
+ <div style="position:absolute;top: 0;right: 20px;">
|
|
|
+ <el-switch
|
|
|
+ @change="changeType(type)"
|
|
|
+ v-model="isSwitch">
|
|
|
+ </el-switch>
|
|
|
+ AI辅助
|
|
|
+ </div>
|
|
|
<div class="h10"></div>
|
|
|
<div>
|
|
|
- <cut-string v-if="!!Description" :string="Description" ref="cutString"></cut-string>
|
|
|
+ <cut-string v-if="!!Description" :string="Description" :closedStr="closedStr" ref="cutString"></cut-string>
|
|
|
<p v-else class="center">已处理到最后一条</p>
|
|
|
</div>
|
|
|
<div class="h10"></div>
|
|
@@ -93,7 +100,9 @@
|
|
|
confirm: "确定"
|
|
|
},
|
|
|
Id: "",
|
|
|
- dataName: ""
|
|
|
+ dataName: "",
|
|
|
+ isSwitch: false,//是否开启开关
|
|
|
+ closedStr: "",//已被选择的数据
|
|
|
}
|
|
|
},
|
|
|
created() {},
|
|
@@ -197,12 +206,19 @@
|
|
|
queryFun({
|
|
|
data: {
|
|
|
DataSourceId: this.datasourceId,
|
|
|
- ProjectId: this.projectId
|
|
|
+ ProjectId: this.projectId,
|
|
|
+ Ai: this.isSwitch
|
|
|
},
|
|
|
type: this.protocolType
|
|
|
}, res => {
|
|
|
if (!!res.Content.length) {
|
|
|
this.Description = res.Content[0].Description
|
|
|
+ //默认已经选择的关键字
|
|
|
+ if(this.type == "type"){
|
|
|
+ this.closedStr = res.Content[0].KeyEquipmentParameter || ''
|
|
|
+ }else{
|
|
|
+ this.closedStr = res.Content[0].KeyEquipmentType || ''
|
|
|
+ }
|
|
|
this.Id = res.Content[0].PointId
|
|
|
//清空已选择的数据
|
|
|
this.$nextTick(_ => {
|