|
@@ -1,16 +1,21 @@
|
|
|
<template>
|
|
|
<div id="handsonStep2">
|
|
|
<div class="btns-view">
|
|
|
- <el-button>AI自动识别</el-button>
|
|
|
- <el-button @click="discern(1)">批量识别设备类型关键字</el-button>
|
|
|
- <el-button @click="discern(2)">批量识别设备参数关键字</el-button>
|
|
|
- <el-button @click="examine">检查&微调</el-button>
|
|
|
- <el-button @click="reset">刷新</el-button>
|
|
|
- <el-button @click="saveData">保存</el-button>
|
|
|
+ <el-button type="primary">AI自动识别</el-button>
|
|
|
+ <el-button type="primary" @click="discern(1)">批量识别设备类型关键字</el-button>
|
|
|
+ <el-button type="primary" @click="discern(2)">批量识别设备参数关键字</el-button>
|
|
|
+ <el-button type="primary" @click="examine">检查&微调</el-button>
|
|
|
+ <div style="float:right;">
|
|
|
+ <el-button type="primary" @click="reset">刷新</el-button>
|
|
|
+ <el-button type="primary" @click="saveData">保存</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div id="handsontableSteps1">
|
|
|
<handsontable-component ref="handsontable"></handsontable-component>
|
|
|
</div>
|
|
|
+ <div class="center">
|
|
|
+ <pagination :page="pages" @change="changePage"></pagination>
|
|
|
+ </div>
|
|
|
<own-dialog :width="'60%'" :title="title" :dialogVisible="isDialogShow" @cancel="close">
|
|
|
<find-keyword ref="findKeyword" :type="type" @change="changeHand"></find-keyword>
|
|
|
</own-dialog>
|
|
@@ -38,6 +43,7 @@
|
|
|
updatePoint
|
|
|
} from "@/fetch/point_http"
|
|
|
import findKeyword from "@/components/config_point/find_keyword"
|
|
|
+ import pagination from "@/components/common/myPagination"
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -50,6 +56,16 @@
|
|
|
type: "",
|
|
|
examineDialog: false,
|
|
|
changeFlag: true,
|
|
|
+ pages: {
|
|
|
+ size: 10,
|
|
|
+ sizes: [10, 30, 50, 100],
|
|
|
+ total: 0,
|
|
|
+ currentPage: 0
|
|
|
+ },
|
|
|
+ oldPage: {
|
|
|
+ currentPage: 0,
|
|
|
+ size: 10
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -78,12 +94,35 @@
|
|
|
this.$confirm("表格数据尚未保存,确定刷新吗?").then(_ => {
|
|
|
this.saveData()
|
|
|
}).catch(_ =>{
|
|
|
+ this.pages.currentPage = this.oldPage.currentPage
|
|
|
+ this.pages.size = this.oldPage.size
|
|
|
this.getData()
|
|
|
})
|
|
|
}else{
|
|
|
this.getData()
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ //页面发生更改
|
|
|
+ changePage() {
|
|
|
+ if (!this.changeFlag) {
|
|
|
+ //发生更改,提示是否保存
|
|
|
+ this.$confirm('存在数据未保存, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.getData()
|
|
|
+ }).catch(() => {
|
|
|
+ this.pages.currentPage = this.oldPage.currentPage
|
|
|
+ this.pages.size = this.oldPage.size
|
|
|
+ return false
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.getData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* @param num 代表着1类型2参数
|
|
|
*
|
|
@@ -173,10 +212,14 @@
|
|
|
Filters: {
|
|
|
DatasourceId: this.datasourceId,
|
|
|
},
|
|
|
- "PageNumber": 1,
|
|
|
- "PageSize": 50,
|
|
|
+ "PageNumber": this.pages.currentPage || 1,
|
|
|
+ "PageSize": this.pages.size,
|
|
|
}
|
|
|
}
|
|
|
+ this.oldPage = {
|
|
|
+ size: this.pages.size,
|
|
|
+ currentPage: this.pages.currentPage
|
|
|
+ }
|
|
|
queryPoint(param, res => {
|
|
|
console.log(res)
|
|
|
settings = {
|
|
@@ -188,6 +231,7 @@
|
|
|
maxRows: res.Content.length
|
|
|
}
|
|
|
this.hot = this.$refs.handsontable.init(settings)
|
|
|
+ this.pages.total = res.Total
|
|
|
console.log(this.hot)
|
|
|
})
|
|
|
},
|
|
@@ -199,19 +243,22 @@
|
|
|
handsontableComponent,
|
|
|
ownDialog,
|
|
|
findKeyword,
|
|
|
- examineMain
|
|
|
+ examineMain,
|
|
|
+ pagination
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
#handsonStep2 {
|
|
|
- height: 100%;
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-flow:column;
|
|
|
.btns-view {
|
|
|
- height: 50px;
|
|
|
- vertical-align: middle;
|
|
|
+ height: 40px;
|
|
|
+ line-height: 40px;
|
|
|
}
|
|
|
#handsontableSteps1 {
|
|
|
- height: calc(100% - 50px);
|
|
|
+ flex: 1;
|
|
|
overflow: hidden;
|
|
|
position: relative;
|
|
|
}
|