|
@@ -5,7 +5,7 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
icon="el-icon-refresh"
|
|
|
- class="handle-refresh mr10"
|
|
|
+ class="handle-refresh"
|
|
|
@click="OnPullNodes"
|
|
|
>刷新</el-button>
|
|
|
<span>
|
|
@@ -13,10 +13,15 @@
|
|
|
<span class="handle-waring" style="margin:0 10px">{{pagination.total}}</span> ]条数据
|
|
|
</span>
|
|
|
</div>
|
|
|
- <div style="display:flex;flex-direction:row;margin-bottom:10px">
|
|
|
- <el-input placeholder="描述" v-model="pagination.name" class="mr10" clearable></el-input>
|
|
|
- <div class="wdiv">
|
|
|
- <el-select v-model="pagination.pointtype" placeholder="I/O类型" clearable>
|
|
|
+ <div style="display:flex;flex-direction:row;margin-bottom:10px;">
|
|
|
+ <el-input placeholder="描述" v-model="pagination.name" class="wdiv searchParamsstyle" clearable></el-input>
|
|
|
+ <div>
|
|
|
+ <el-select
|
|
|
+ class="wdiv searchParamsstyle"
|
|
|
+ v-model="pagination.pointtype"
|
|
|
+ placeholder="I/O类型"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in $store.state.bindingsetting.IO"
|
|
|
:key="item"
|
|
@@ -25,15 +30,14 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
-
|
|
|
- <el-input placeholder="I/O类型" v-model="pagination.pointtype" class="mr10" clearable></el-input>
|
|
|
- <el-input placeholder="工艺环节" v-model="pagination.part" class="mr10" clearable></el-input>
|
|
|
+ <el-input placeholder="工艺环节" v-model="pagination.part" class="wdiv searchParamsstyle" clearable></el-input>
|
|
|
<el-button
|
|
|
icon="el-icon-search"
|
|
|
type="primary"
|
|
|
size="mini"
|
|
|
width="100"
|
|
|
- @click="OnPullNodes"
|
|
|
+ @click="OnSerch"
|
|
|
+ class="searchParamsstyle"
|
|
|
>查询</el-button>
|
|
|
</div>
|
|
|
</el-row>
|
|
@@ -68,8 +72,12 @@
|
|
|
</template>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-.wdiv{
|
|
|
- width: 100px;
|
|
|
+.wdiv {
|
|
|
+ width: 200px;
|
|
|
+}
|
|
|
+.searchParamsstyle {
|
|
|
+ width: 150px;
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
</style>
|
|
|
|
|
@@ -78,44 +86,52 @@
|
|
|
import { nodes } from "@/network/network"
|
|
|
|
|
|
export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- nodetable:[],
|
|
|
- pagination:{
|
|
|
- pagenum: 1,
|
|
|
- pagesize: 30,
|
|
|
- name: "",
|
|
|
- pointtype:"",
|
|
|
- part: "",
|
|
|
- total: 0,
|
|
|
- }
|
|
|
- }
|
|
|
+ data()
|
|
|
+ {
|
|
|
+ return {
|
|
|
+ nodetable: [],
|
|
|
+ pagination: {
|
|
|
+ pagenum: 1,
|
|
|
+ pagesize: 30,
|
|
|
+ name: "",
|
|
|
+ pointtype: "",
|
|
|
+ part: "",
|
|
|
+ total: 0,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted()
|
|
|
+ {
|
|
|
+ this.OnPullNodes();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ OnPageChange(nextPageIndex)
|
|
|
+ {
|
|
|
+ console.log(this.pagination)
|
|
|
+ this.pagination.pagenum = nextPageIndex;
|
|
|
+ this.OnPullNodes();
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.OnPullNodes();
|
|
|
+ OnSerch()
|
|
|
+ {
|
|
|
+ this.pagination.pagenum = 1;
|
|
|
+ this.OnPullNodes();
|
|
|
},
|
|
|
- methods: {
|
|
|
- OnPageChange(nextPageIndex)
|
|
|
- {
|
|
|
- console.log(this.pagination)
|
|
|
- this.pagination.pagenum=nextPageIndex;
|
|
|
- this.OnPullNodes();
|
|
|
- },
|
|
|
- OnPullNodes()
|
|
|
- {
|
|
|
- this.pagination.total=0;
|
|
|
- console.log(this.pagination);
|
|
|
- nodes.pull(this.pagination,res=>{
|
|
|
- console.log(res.data);
|
|
|
- this.nodetable=res.data.data.dataList;
|
|
|
- this.pagination.total=res.data.data.total;
|
|
|
- });
|
|
|
- },
|
|
|
- formatter(row, column)
|
|
|
- {
|
|
|
- return row.address;
|
|
|
- }
|
|
|
+ OnPullNodes()
|
|
|
+ {
|
|
|
+ this.pagination.total = 0;
|
|
|
+ console.log(this.pagination);
|
|
|
+ nodes.pull(this.pagination, res =>
|
|
|
+ {
|
|
|
+ console.log(res.data);
|
|
|
+ this.nodetable = res.data.data.dataList;
|
|
|
+ this.pagination.total = res.data.data.total;
|
|
|
+ });
|
|
|
},
|
|
|
+ formatter(row, column)
|
|
|
+ {
|
|
|
+ return row.address;
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
|
|
|
}
|