diff --git a/src/App.vue b/src/App.vue index c54eada..f3f7bf4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -194,7 +194,8 @@ /* 弹窗 Dialog A */ .el-dialog { - background: #2c3642 !important; + background: #000000 !important; + border: 1px solid rgb(102, 177, 255); } .el-dialog__title { color: aqua !important; diff --git a/src/App.vue b/src/App.vue index c54eada..f3f7bf4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -194,7 +194,8 @@ /* 弹窗 Dialog A */ .el-dialog { - background: #2c3642 !important; + background: #000000 !important; + border: 1px solid rgb(102, 177, 255); } .el-dialog__title { color: aqua !important; diff --git a/src/components/configure/AlarmConfiguration.vue b/src/components/configure/AlarmConfiguration.vue index a9cc6ec..1c1aee1 100644 --- a/src/components/configure/AlarmConfiguration.vue +++ b/src/components/configure/AlarmConfiguration.vue @@ -1,27 +1,24 @@ @@ -47,12 +123,14 @@ return { SiteOptions: [ { - siteName: "测试项目1", - serial: "01" - }, - { - siteName: "测试项目2", - serial: "02" + //数据格式 + + name: "全部项目", + shortName: "全部项目", + latitude: "定位坐标", + longitude: "定位坐标", + zoomLevel: "8", + platformCode: "" } ], //渲染项目下拉框的数据 ProjectNo: "", //所选择的项目的项目编号 @@ -61,93 +139,159 @@ ACPage: 1, //分页默认显示页 ACDatagridDataLength: 0, //分页上显示的数据总条数 ACSize: 10, //分页上显示的每页的条数 - ACPageHide: this.ACDatagridDataLength > 10 ? false : true //分页默认不显示 当页数大于1 的时候在显示 + dialogVisible: false, //一级弹窗的默认状态, + SiteSel: "", //点击的站点 + YZValue: "", //因子模糊搜索 + YZTableData: [], //表格数据 + YZPage: 1, //分页默认显示页 + YZDatagridDataLength: 0, //分页上显示的数据总条数 + YZSize: 10, //分页上显示的每页的条数 + dialogVisible2: false, //二级弹窗的状态 + Dialog2warnType: "", //级别 + Dialog2JB: [ + { warnType: 1, warnTypeDesc: "预警" }, + { warnType: 2, warnTypeDesc: "报警" } + ], //级别选项 + Dialog2compareWay: "", //级别 + Dialog2YSF: [ + { compareWay: ">", name: "大于" }, + { compareWay: "<", name: "小于" } + ], //级别选项 + Dialog2factors: "", //因子 + Dialog2YZ: [], //因子选项 + warnValue: "" //线值 }; }, methods: { - selectV(No) {}, + selectV() { + this.LoadAllProject(); + }, //分页 ACSizeChange(val) { // 改变每页的条数 this.ACSize = val; - // this.loadDataGridData(); + this.loadGridData(); }, ACCurrentChange(val) { //改变页数 this.ACPage = val; - // this.loadDataGridData(); + this.loadGridData(); + }, + // 获取所有平台 + LoadAllProject() { + this.$http + .post(this.nozzle.sysPlatformListPlatform, { + data: {} + }) + .then(response => { + if (response.data.code === 200) { + this.SiteOptions = this.SiteOptions.concat( + response.data.data.records + ); + this.loadGridData(); + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); + }, + // 根据平台获取已配置的预警报警线 可选填站点 + loadGridData() { + this.TableData = []; + let params = { + current: this.ACPage, + size: this.ACSize, + data: { + platformCode: this.ProjectNo, //平台编号,可不传 + stName: this.ACValue //模糊查询,可不传 + } + }; + this.$http + .post(this.nozzle.sysSiteListStationBaseWithPage, params) + .then(response => { + if (response.data.code === 200) { + this.TableData = response.data.data.records; + this.ACDatagridDataLength = response.data.data.total; + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); + }, + // 查看详情 + details(index, rows) { + this.dialogVisible = true; + this.SiteSel = rows.stCode; + this.loadGridDataYZ(); + }, + //分页 + YZSizeChange(val) { + // 改变每页的条数 + this.YZSize = val; + this.loadGridDataYZ(); + }, + YZCurrentChange(val) { + //改变页数 + this.YZPage = val; + this.loadGridDataYZ(); + }, + // 加载因子数据 + loadGridDataYZ() { + this.YZTableData = []; + let params = { + current: this.YZPage, + size: this.YZSize, + data: { + siteNo: this.SiteSel, //站点编号,可不传 + fuzzyQuery: this.YZValue //模糊搜索 + } + }; + this.$http + .post(this.nozzle.warnConfigListWarnConfig, params) + .then(response => { + if (response.data.code === 200) { + this.YZTableData = response.data.data.records; + this.YZDatagridDataLength = response.data.data.total; + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); + }, + // 点击编辑因子状态 + Edit(index, rows) { + this.dialogVisible2 = true; + }, + // 请求未分配的因子 + loadSiteNoYinz() { + let params = { + data: { + stCode: this.SiteSel, //站点编号,可不传 + } + }; + this.$http + .post(this.nozzle.warnConfigListWarnConfig, params) + .then(response => { + if (response.data.code === 200) { + this.YZTableData = response.data.data.records; + this.YZDatagridDataLength = response.data.data.total; + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); } }, mounted: function() { - this.ProjectNo = this.SiteOptions[0].serial; - this.TableData = [ - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - } - ]; - this.ACDatagridDataLength = 13; + this.LoadAllProject(); } }; @@ -175,4 +319,70 @@ margin-top: 10px; background: rgba(53, 53, 53, 0.5); } +/* 弹窗 */ +#DialogSearch { + width: 100%; + height: 60px; + line-height: 60px; + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + box-sizing: border-box; + text-align: left; +} +#DialogSearch .el-input { + width: 250px; + margin: 0 10px; +} +#DialogCentent { + width: 100%; + height: 600px; +} +/* 内层弹窗 */ +.Dialog2List { + width: 100%; + height: 60px; + line-height: 60px; + box-sizing: border-box; + text-align: center; +} +.Dialog2List .el-input { + width: 217px; +} +.Dialog2ListName { + display: inline-block; + width: 60px; + height: 60px; + line-height: 60px; + color: white; + text-align: center; +} +.Dialog2ListButton { + height: 40px; + width: 100px; + display: inline-block; + line-height: 40px; + border-radius: 2px; + text-decoration: none; + color: rgb(0, 111, 255); + background: rgba(255, 255, 255, 0); + border: 1px solid rgb(0, 111, 255); + margin: 0 30px; +} +.Dialog2ListButton2 { + height: 40px; + width: 100px; + display: inline-block; + line-height: 40px; + border-radius: 2px; + text-decoration: none; + color: white; + background: rgb(0, 111, 255); + border: 1px solid rgb(0, 111, 255); + margin: 0 30px; +} + + + \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index c54eada..f3f7bf4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -194,7 +194,8 @@ /* 弹窗 Dialog A */ .el-dialog { - background: #2c3642 !important; + background: #000000 !important; + border: 1px solid rgb(102, 177, 255); } .el-dialog__title { color: aqua !important; diff --git a/src/components/configure/AlarmConfiguration.vue b/src/components/configure/AlarmConfiguration.vue index a9cc6ec..1c1aee1 100644 --- a/src/components/configure/AlarmConfiguration.vue +++ b/src/components/configure/AlarmConfiguration.vue @@ -1,27 +1,24 @@ @@ -47,12 +123,14 @@ return { SiteOptions: [ { - siteName: "测试项目1", - serial: "01" - }, - { - siteName: "测试项目2", - serial: "02" + //数据格式 + + name: "全部项目", + shortName: "全部项目", + latitude: "定位坐标", + longitude: "定位坐标", + zoomLevel: "8", + platformCode: "" } ], //渲染项目下拉框的数据 ProjectNo: "", //所选择的项目的项目编号 @@ -61,93 +139,159 @@ ACPage: 1, //分页默认显示页 ACDatagridDataLength: 0, //分页上显示的数据总条数 ACSize: 10, //分页上显示的每页的条数 - ACPageHide: this.ACDatagridDataLength > 10 ? false : true //分页默认不显示 当页数大于1 的时候在显示 + dialogVisible: false, //一级弹窗的默认状态, + SiteSel: "", //点击的站点 + YZValue: "", //因子模糊搜索 + YZTableData: [], //表格数据 + YZPage: 1, //分页默认显示页 + YZDatagridDataLength: 0, //分页上显示的数据总条数 + YZSize: 10, //分页上显示的每页的条数 + dialogVisible2: false, //二级弹窗的状态 + Dialog2warnType: "", //级别 + Dialog2JB: [ + { warnType: 1, warnTypeDesc: "预警" }, + { warnType: 2, warnTypeDesc: "报警" } + ], //级别选项 + Dialog2compareWay: "", //级别 + Dialog2YSF: [ + { compareWay: ">", name: "大于" }, + { compareWay: "<", name: "小于" } + ], //级别选项 + Dialog2factors: "", //因子 + Dialog2YZ: [], //因子选项 + warnValue: "" //线值 }; }, methods: { - selectV(No) {}, + selectV() { + this.LoadAllProject(); + }, //分页 ACSizeChange(val) { // 改变每页的条数 this.ACSize = val; - // this.loadDataGridData(); + this.loadGridData(); }, ACCurrentChange(val) { //改变页数 this.ACPage = val; - // this.loadDataGridData(); + this.loadGridData(); + }, + // 获取所有平台 + LoadAllProject() { + this.$http + .post(this.nozzle.sysPlatformListPlatform, { + data: {} + }) + .then(response => { + if (response.data.code === 200) { + this.SiteOptions = this.SiteOptions.concat( + response.data.data.records + ); + this.loadGridData(); + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); + }, + // 根据平台获取已配置的预警报警线 可选填站点 + loadGridData() { + this.TableData = []; + let params = { + current: this.ACPage, + size: this.ACSize, + data: { + platformCode: this.ProjectNo, //平台编号,可不传 + stName: this.ACValue //模糊查询,可不传 + } + }; + this.$http + .post(this.nozzle.sysSiteListStationBaseWithPage, params) + .then(response => { + if (response.data.code === 200) { + this.TableData = response.data.data.records; + this.ACDatagridDataLength = response.data.data.total; + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); + }, + // 查看详情 + details(index, rows) { + this.dialogVisible = true; + this.SiteSel = rows.stCode; + this.loadGridDataYZ(); + }, + //分页 + YZSizeChange(val) { + // 改变每页的条数 + this.YZSize = val; + this.loadGridDataYZ(); + }, + YZCurrentChange(val) { + //改变页数 + this.YZPage = val; + this.loadGridDataYZ(); + }, + // 加载因子数据 + loadGridDataYZ() { + this.YZTableData = []; + let params = { + current: this.YZPage, + size: this.YZSize, + data: { + siteNo: this.SiteSel, //站点编号,可不传 + fuzzyQuery: this.YZValue //模糊搜索 + } + }; + this.$http + .post(this.nozzle.warnConfigListWarnConfig, params) + .then(response => { + if (response.data.code === 200) { + this.YZTableData = response.data.data.records; + this.YZDatagridDataLength = response.data.data.total; + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); + }, + // 点击编辑因子状态 + Edit(index, rows) { + this.dialogVisible2 = true; + }, + // 请求未分配的因子 + loadSiteNoYinz() { + let params = { + data: { + stCode: this.SiteSel, //站点编号,可不传 + } + }; + this.$http + .post(this.nozzle.warnConfigListWarnConfig, params) + .then(response => { + if (response.data.code === 200) { + this.YZTableData = response.data.data.records; + this.YZDatagridDataLength = response.data.data.total; + } else { + message(response); + } + }) + .catch(response => { + message(response); + }); } }, mounted: function() { - this.ProjectNo = this.SiteOptions[0].serial; - this.TableData = [ - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - }, - { - siteName: "测试项目1", - siteNo: "01", - siteUser: "01" - } - ]; - this.ACDatagridDataLength = 13; + this.LoadAllProject(); } }; @@ -175,4 +319,70 @@ margin-top: 10px; background: rgba(53, 53, 53, 0.5); } +/* 弹窗 */ +#DialogSearch { + width: 100%; + height: 60px; + line-height: 60px; + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + box-sizing: border-box; + text-align: left; +} +#DialogSearch .el-input { + width: 250px; + margin: 0 10px; +} +#DialogCentent { + width: 100%; + height: 600px; +} +/* 内层弹窗 */ +.Dialog2List { + width: 100%; + height: 60px; + line-height: 60px; + box-sizing: border-box; + text-align: center; +} +.Dialog2List .el-input { + width: 217px; +} +.Dialog2ListName { + display: inline-block; + width: 60px; + height: 60px; + line-height: 60px; + color: white; + text-align: center; +} +.Dialog2ListButton { + height: 40px; + width: 100px; + display: inline-block; + line-height: 40px; + border-radius: 2px; + text-decoration: none; + color: rgb(0, 111, 255); + background: rgba(255, 255, 255, 0); + border: 1px solid rgb(0, 111, 255); + margin: 0 30px; +} +.Dialog2ListButton2 { + height: 40px; + width: 100px; + display: inline-block; + line-height: 40px; + border-radius: 2px; + text-decoration: none; + color: white; + background: rgb(0, 111, 255); + border: 1px solid rgb(0, 111, 255); + margin: 0 30px; +} + + + \ No newline at end of file diff --git a/src/util/project.js b/src/util/project.js index 8038fef..379c68e 100644 --- a/src/util/project.js +++ b/src/util/project.js @@ -12,7 +12,19 @@ "platEquipmentGetEquipStatistics":"/plat/equipment/getEquipStatistics",//站点状况预览图-----获取平台拥有设备类型、数量统计 "sysPlatformGetSiteStateStatistics":"/sys/platform/getSiteStateStatistics",//站点状况预览图-----平台近七日站点状态统计 "warnLogGetWarnLogOfPlatform":"/warn/log/getWarnLogOfPlatform",//站点状况预览图-----查询该平台各站点各因子最新的报警数据 - "listStationBase":"sys/site/listStationBase",//所有站点 + "listStationBase":"/sys/site/listStationBase",//所有站点无分页 + "sysSiteListStationBaseWithPage":"/sys/site/listStationBaseWithPage",//所有站点有分页 + "sysSiteListStationBaseWithPage":"/warn/config/listNonConfig",//获取选择站点未配置但已分配的因子 + "warnConfigListWarnConfig":"/warn/config/listWarnConfig",//查询站点已配置的预警报警线 + "warnConfigGetSiteWarn":"/warn/config/getSiteWarn",//获取站点预警线 + "warnConfigInsertWarnConfig":"/warn/config/insertWarnConfig",//新增报警线 + "warnConfigUpdateWarnConfig":"/warn/config/updateWarnConfig",//修改警戒线 + "warnConfigDeleteWarnConfig":"/warn/config/deleteWarnConfig",//删除警戒线 + "warnLogListWarnLog":"/warn/log/listWarnLog",//查询报警日志 + "warnRuleListPushRule":"/warn/rule/listPushRule",//查询报警推送规则 + "warnRuleInsertWarnPushRule":"/warn/rule/insertWarnPushRule",//新增推送规则 + "warnRuleInsertUpdateWarnPushRule":"/warn/rule/updateWarnPushRule",//修改推送规则 + "warnRuleInsertDeleteWarnPushRule":"/warn/rule/deleteWarnPushRule",//删除推送规则 }; for (let item in nozzle) {