- 平台:
+ 请选择项目:
@@ -16,8 +17,9 @@
:value="item.platformCode"
>
- 站点:
+ 请选择站点:
- 站点查询:
- 站点查询: -->
+
搜索
@@ -86,6 +88,8 @@
DataLength: 0, //分页上显示的数据总条数
Size: 10, //分页上显示的每页的条数
loading: false,
+ Project: "", //平台
+ // searchnum: 1,
ProjectOptions: [
{
platformName: "全部",
@@ -93,11 +97,13 @@
dropSiteList: []
}
],
+ Site: "", //平台
+
SiteOptions: [
- {
- siteName: "全部",
- siteNo: ""
- }
+ // {
+ // siteName: "全部",
+ // siteNo: ""
+ // }
] //平台的数据源
};
},
@@ -112,11 +118,63 @@
this.Page = val;
this.loadDataGridData();
},
+ // 获取平台的站点
+ loadProjectUser(CODE) {
+ this.SiteOptions = [
+ {
+ siteName: "全部",
+ siteNo: ""
+ }
+ ];
+ this.Site = "";
+ for (var i = 0; i < this.ProjectOptions.length; i++) {
+ if (this.ProjectOptions[i].platformCode == CODE) {
+ this.SiteOptions = this.SiteOptions.concat(
+ this.ProjectOptions[i].dropSiteList
+ );
+ return;
+ }
+ }
+ },
+ // 获取所有平台
+ loadAllProject() {
+ this.$http
+ .get(this.nozzle.StationBaseControllerGetPlatFormSiteTree)
+ .then(response => {
+ if (response.data.data.length > 0) {
+ this.ProjectOptions = this.ProjectOptions.concat(
+ response.data.data
+ );
+ this.Project = this.ProjectOptions[0].platformCode;
+ this.loadProjectUser(this.ProjectOptions[0].dropSiteList);
+ } else {
+ this.$message({
+ showClose: true,
+ message: "无项目",
+ type: "warning"
+ });
+ }
+ // this.loadDataGridData();
+ })
+ .catch(response => {
+ this.$message({
+ showClose: true,
+ message: "请求平台失败",
+ type: "warning"
+ });
+ });
+ },
+ // 搜索的请求方法
+ searcher() {
+ this.Page = 1;
+ this.loadDataGridData();
+ },
+
loadDataGridData() {
this.loading = true;
this.$http
.post(this.nozzle.faultInfoGetTempInfo, {
- condition: this.condition,
+ condition: this.Site,
pageNo: this.Page,
pageSize: this.Size
})
@@ -136,6 +194,7 @@
}
},
mounted: function() {
+ this.loadAllProject();
this.loadDataGridData();
}
};