Browse Source

修改智能化推荐

chuwu 5 years ago
parent
commit
9f6dd3bd15

+ 20 - 4
src/components/config_point/find_keyword.vue

@@ -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(_ => {

+ 5 - 5
src/views/point/config_point/steps/step3.vue

@@ -11,9 +11,9 @@
         <div v-else class="center">
             <i class="iconwushuju iconfont"></i> 暂无数据
         </div>
-        <!-- <div class="center">
+        <div class="right">
                 <pagination :page="pages" @change="changePage"></pagination>
-            </div> -->
+            </div>
         <own-dialog :width="'1000px'" :title=" isDataform ? '根据关键内容批量对应数据字典' : '根据关键内容批量标准化设备标识' " :dialogVisible="isDialogShow" @cancel="close">
             <dialog-main v-if="!isDataform"></dialog-main>
             <steps-main v-if="isDataform"></steps-main>
@@ -56,7 +56,7 @@
                 editData: {}, //编辑数据
                 pages: {
                     size: 50,
-                    sizes: [10, 30, 50, 100],
+                    sizes: [10, 30, 50, 100, 150, 200],
                     total: 0,
                     currentPage: 0
                 },
@@ -155,8 +155,8 @@
                     type: this.protocolType,
                     data: {
                         DataSourceId: this.datasourceId,
-                        // "PageNumber": this.pages.currentPage || 1,
-                        // "PageSize": this.pages.size,
+                        "PageNumber": this.pages.currentPage || 1,
+                        "PageSize": this.pages.size,
                     }
                 }
                 queryPointRela(param, res => {