|
@@ -1,31 +1,52 @@
|
|
|
<template>
|
|
|
<div class="view-find-word">
|
|
|
- <div>
|
|
|
+ <div class="saga-border">
|
|
|
<p class="center">请从下面的原始点位描述中选择"{{title == 'type' ? "设备类型" : "设备参数"}}"关键字</p>
|
|
|
<div class="h10"></div>
|
|
|
- <cut-string :string="Description" ref="cutString"></cut-string>
|
|
|
+ <div>
|
|
|
+ <cut-string v-if="!!Description" :string="Description" ref="cutString"></cut-string>
|
|
|
+ <p v-else class="center">已处理到最后一条</p>
|
|
|
+ </div>
|
|
|
+ <div class="h10"></div>
|
|
|
+ <div class="center">
|
|
|
+ <el-button :disabled="!Description" @click="getCutString">此条无法识别</el-button>
|
|
|
+ <el-button :disabled="!Description" @click="getCutString">继续发现关键字</el-button>
|
|
|
+ </div>
|
|
|
<div class="h10"></div>
|
|
|
- <el-button @click="getCutString">此条无法识别</el-button>
|
|
|
- <el-button @click="getCutString">继续发现关键字</el-button>
|
|
|
</div>
|
|
|
+ <div class="h10"></div>
|
|
|
<div class="find-data">
|
|
|
- <div class="left-view">
|
|
|
+ <div class="left-view saga-border">
|
|
|
<doughnut v-if="!!sum" width="200" height="200" :renderData="echartsData"></doughnut>
|
|
|
<div v-else class="center">暂无数据</div>
|
|
|
</div>
|
|
|
<div class="right-view saga-border">
|
|
|
-
|
|
|
+ <div class="find-tags" v-for="tag in tagList">
|
|
|
+ <el-tag
|
|
|
+ :key="title == 'type' ? tag.EquipmentType : tag.EquipmentType"
|
|
|
+ @click="changeName(tag)"
|
|
|
+ closable>
|
|
|
+ {{title == 'type' ? tag.EquipmentType + "(" + tag.PointCount + ")" : tag.EquipmentType + "(" + tag.PointCount + ")"}}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <my-dialog :dialogVisible="reNameDialog" :footer="footer" @cancel="reNameDialog = false" title="重命名" :isAppendBody="true">
|
|
|
+ <h3 class="center">{{name}}</h3>
|
|
|
+ <el-input v-model="newName" placeholder="请输入新名称"></el-input>
|
|
|
+ </my-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import cutString from "components/config_point/cut_string"
|
|
|
import doughnut from "components/echarts/doughnut"
|
|
|
+ import myDialog from "components/el_pack/dialog"
|
|
|
import {
|
|
|
findKeysWord,
|
|
|
findKeysWordType,
|
|
|
- queryDataSourceCount
|
|
|
+ queryDataSourceCount,
|
|
|
+ queryEqTypeList,
|
|
|
+ queryEqParamList
|
|
|
} from "fetch/point_http"
|
|
|
import {
|
|
|
mapGetters,
|
|
@@ -45,14 +66,23 @@
|
|
|
},
|
|
|
components: {
|
|
|
cutString,
|
|
|
- doughnut
|
|
|
+ doughnut,
|
|
|
+ myDialog
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
title: "",
|
|
|
Description: "",
|
|
|
echartsData: [],
|
|
|
- sum: 0
|
|
|
+ sum: 0,
|
|
|
+ tagList: [],
|
|
|
+ reNameDialog: false,
|
|
|
+ name: "",
|
|
|
+ newName: "",
|
|
|
+ footer:{
|
|
|
+ cancel: "取消",
|
|
|
+ confirm: "确定"
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {},
|
|
@@ -61,6 +91,18 @@
|
|
|
getCutString() {
|
|
|
console.log(this.$refs.cutString.getData())
|
|
|
},
|
|
|
+ //点击事件,重命名
|
|
|
+ changeName(tag){
|
|
|
+ console.log(tag,"tag")
|
|
|
+ this.reNameDialog = true
|
|
|
+ this.newName = ""
|
|
|
+ if(this.type == "type"){
|
|
|
+ this.name = tag.EquipmentType
|
|
|
+ }else{
|
|
|
+ this.name = tag.EquipmentType
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //获取文字
|
|
|
changeType() {
|
|
|
let queryFun
|
|
|
if (this.type == "type") {
|
|
@@ -75,39 +117,61 @@
|
|
|
},
|
|
|
type: this.protocolType
|
|
|
}, res => {
|
|
|
- this.Description = res.Content.Description
|
|
|
+ if (!!res.Content) {
|
|
|
+ this.Description = res.Content.Description
|
|
|
+ } else {
|
|
|
+ this.Description = ""
|
|
|
+ }
|
|
|
console.log(res)
|
|
|
})
|
|
|
- this.findDataForSource()
|
|
|
+ this.getDataForSource()
|
|
|
+ this.getbeenFoundList()
|
|
|
},
|
|
|
//查询数据源数据
|
|
|
- findDataForSource() {
|
|
|
+ getDataForSource() {
|
|
|
queryDataSourceCount({
|
|
|
Filters: {
|
|
|
- projectId: this.projectId,
|
|
|
Id: this.datasourceId
|
|
|
}
|
|
|
}, res => {
|
|
|
console.log(res, "res")
|
|
|
let data = res.Content[0]
|
|
|
- this.echartsData = [
|
|
|
+ this.echartsData = [{
|
|
|
+ name: "无法识别-" + data.Ignorestandard,
|
|
|
+ value: data.Ignorestandard
|
|
|
+ },
|
|
|
{
|
|
|
- name: "无法识别-" + data.Ignorestandard,
|
|
|
- value: data.Ignorestandard
|
|
|
- },
|
|
|
- {
|
|
|
- name: "未识别-" + data.Notstandard,
|
|
|
- value: data.Notstandard
|
|
|
- },
|
|
|
- {
|
|
|
- name: "已识别-" + data.Notrelated,
|
|
|
- value: data.Notrelated
|
|
|
- }
|
|
|
+ name: "未识别-" + data.Notstandard,
|
|
|
+ value: data.Notstandard
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "已识别-" + data.Notrelated,
|
|
|
+ value: data.Notrelated
|
|
|
+ }
|
|
|
]
|
|
|
this.sum = data.Sum
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ //查询标签列表
|
|
|
+ getbeenFoundList() {
|
|
|
+ let getListFetch;
|
|
|
+ if (this.type == "type") {
|
|
|
+ getListFetch = queryEqTypeList
|
|
|
+ } else {
|
|
|
+ getListFetch = queryEqParamList
|
|
|
+ }
|
|
|
+ console.log(getListFetch)
|
|
|
+ getListFetch({
|
|
|
+ data: {
|
|
|
+ ProjectId: this.projectId,
|
|
|
+ DataSourceId: this.datasourceId
|
|
|
+ },
|
|
|
+ type: this.protocolType
|
|
|
+ }, res => {
|
|
|
+ console.log(res, 'getListFetch')
|
|
|
+ this.tagList = res.Content
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -120,15 +184,21 @@
|
|
|
height: 300px;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
- .right-view{
|
|
|
+ .right-view {
|
|
|
width: calc(100% - 305px);
|
|
|
+ padding: 5px;
|
|
|
+ box-sizing: border-box;
|
|
|
height: 300px;
|
|
|
overflow-y: auto;
|
|
|
- display: inline-block;
|
|
|
+ float: right;
|
|
|
}
|
|
|
}
|
|
|
.h10 {
|
|
|
height: 10px;
|
|
|
}
|
|
|
+ .find-tags{
|
|
|
+ display: inline-block;
|
|
|
+ margin: 8px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|