Pārlūkot izejas kodu

添加等级评估菜单

chenminghua 3 gadi atpakaļ
vecāks
revīzija
bf259da59b

+ 93 - 17
src/views/HealthControl/assess/assessconfig.vue

@@ -11,61 +11,76 @@
           </div>
         </div>
         <div class="query-actions">
-          <button class="btn green mg-l-30" @click="onClickAdd">新增</button>
+          <button class="btn green mg-l-30" @click="onClickSearch">搜索</button>
+          <button class="btn green mg-l-30" @click="onClickCreate">新增</button>
         </div>
       </div>
     </div>
-
     <div class="assess-bottom">
       <ComTable :data="tableData" height="85vh"></ComTable>
     </div>
+    <div>
+      <el-dialog
+        title="新增模型"
+        v-model="isvisiable"
+        width="45%"
+        top="15vh"
+        custom-class="modal"
+        :close-on-click-modal="false"
+      >
+        <popup-create :data="editform" :station="stations"/>
+      </el-dialog>
+    </div>
   </div>
 </template>
 
 <script>
 import ComTable from "@/components/coms/table/table-unpage.vue";
+import PopupCreate from "./compoenets/popupcreate.vue";
 
 export default {
-  components: { ComTable },
+  components: { ComTable, PopupCreate },
   data() {
     const that = this;
     return {
       content: "",
+      stations: [],
+      editform: {},
+      isvisiable: false,
       tableData: {
         column: [
           {
             name: "名称",
-            field: "targetname",
+            field: "name",
             is_light: false,
           },
           {
             name: "时间",
-            field: "safecontent",
+            field: "createdate",
             is_light: false,
           },
           {
             name: "场站",
-            field: "describe",
+            field: "wpids",
             is_num: false,
             is_light: false,
           },
           {
             name: "是否启用",
-            field: "principal",
+            field: "isenable",
             is_num: false,
             is_light: false,
           },
           {
             name: "操作",
-            field: "addtime",
             is_num: false,
             is_light: false,
-            width: 10,
+            width: 100,
             template: () => {
               return (
-                "<el-button type='text' style='cursor: pointer;' value='xq'>编辑</el-button>&nbsp" +
-                "<el-button type='text' style='cursor: pointer;' value='ls'>删除</el-button>&nbsp" +
-                "<el-button type='text' style='cursor: pointer;' value='ls'>配置</el-button>&nbsp"
+                "<el-button type='text' style='cursor: pointer;' value='edit'>编辑</el-button>&nbsp" +
+                "<el-button type='text' style='cursor: pointer;' value='delete'>删除</el-button>&nbsp" +
+                "<el-button type='text' style='cursor: pointer;' value='config'>配置</el-button>&nbsp"
               );
             },
             click(e, row) {
@@ -79,21 +94,82 @@ export default {
   },
   created() {
     this.requestList();
+    this.requestStations();
   },
   methods: {
     // 新增按钮
-    onClickAdd() {},
-    // 获取按错内容
+    onClickCreate() {
+      this.isvisiable = true;
+    },
+    // 搜索按钮
+    onClickSearch() {
+      this.requestList();
+    },
+    // 操作按钮
+    onClickOption(e, row) {
+      console.log(row)
+      let that = this;
+      if ("delete" == e.target.getAttribute("value")) {
+        that
+          .$confirm("确认删除?")
+          .then((_) => {
+            that.requestDelete(row);
+          })
+          .catch((_) => {});
+      }
+      if ("edit" == e.target.getAttribute("value")) {
+        that.isvisiable = true
+        that.editform = row;
+      }
+    },
+    // 获取模型数据列表
     requestList() {
       let that = this;
-      this.API.requestData({
+      that.API.requestData({
         method: "GET",
         baseURL: "http://10.155.32.4:8034/",
         subUrl: "/evaluation/modelMainList",
         data: {
-          name: "sdf",
+          name: that.content,
+        },
+        success(res) {
+          if (res.code == 200) that.tableData.data = res.data;
+          for (var i in that.tableData.data) {
+            that.tableData.data[i].createdate = new Date(
+              res.data[i].createdate
+            ).formatDate("yyyy-MM-dd");
+            that.tableData.data[i].isenable =
+              res.data[i].isenable == 1 ? "是" : "否";
+          }
+        },
+      });
+    },
+    requestStations(){
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/windfarmAllAjax",
+        success(res) {
+          let array = [];
+          res.data.forEach((item) => {
+            if (item.id.indexOf("FDC") !== -1) {
+              array.push(item)
+            } 
+          });
+          that.stations = array;
+        },
+      });
+    },
+    // 删除
+    requestDelete(row) {
+      let that = this;
+      that.API.requestData({
+        method: "DELETE",
+        baseURL: "http://10.155.32.4:8034/",
+        subUrl: "/evaluation/delModelMain/" + row.id,
+        success(res) {
+          if (res.code == 200) that.requestList();
         },
-        success(res) {},
       });
     },
   },

+ 186 - 0
src/views/HealthControl/assess/compoenets/popupcreate.vue

@@ -0,0 +1,186 @@
+<template>
+  <div class="assess-create">
+    <div class="top">
+      <div class="query mg-b-8">
+        <div class="query-items flex-column">
+          <div class="query-item flex-row">
+            <div class="lable item-name">模块:</div>
+            <div class="search-input item-content">
+              <el-input v-model="form.name" placeholder="请填写"></el-input>
+            </div>
+          </div>
+          <div class="query-item flex-row">
+            <div class="lable item-name">场站:</div>
+            <div class="search-input item-content">
+              <el-select
+                v-model="form.wpids"
+                @change="onChangeStation(form.wpids)"
+                multiple
+                collapse-tags
+                popper-class="select"
+              >
+                <el-option
+                  v-for="item in stations"
+                  :key="item.label"
+                  :value="item.id"
+                  :label="item.name"
+                >
+                </el-option>
+              </el-select>
+            </div>
+          </div>
+          <div class="query-item flex-row">
+            <div class="lable item-name">日期:</div>
+            <div class="search-input item-content">
+              <el-select
+                v-model="form.timetypes"
+                @change="onChangeStation(form.timetypes)"
+                multiple
+                popper-class="select"
+              >
+                <el-option
+                  v-for="item in dates"
+                  :key="item.label"
+                  :value="item.label"
+                  :label="item.label"
+                >
+                </el-option>
+              </el-select>
+            </div>
+          </div>
+          <div class="query-item flex-row">
+            <div class="lable item-name">是否启用:</div>
+            <div class="search-input item-content">
+              <el-select
+                v-model="form.isenable"
+                @change="onChangeStation(form.isenable)"
+                popper-class="select"
+              >
+                <el-option
+                  v-for="item in enables"
+                  :key="item.value"
+                  :value="item.value"
+                  :label="item.label"
+                >
+                </el-option>
+              </el-select>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom">
+      <button class="btn green mg-l-30" @click="onClickClear">清空</button>
+      <button class="btn green mg-l-30" @click="onClickSave">保存</button>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "popup-create",
+  props: {
+    data: Object,
+    station: Array,
+  },
+  data() {
+    return {
+      form: {},
+      dates: [{ label: "日" }, { label: "月" }, { label: "年" }],
+      stations: [],
+      enables: [
+        { value: "0", label: "否" },
+        { value: "1", label: "是" },
+      ],
+    };
+  },
+  created() {
+    this.stations = this.station;
+    this.form = this.convertArray(this.data);
+  },
+  methods: {
+    onClickClear() {
+      this.form = {};
+    },
+    onClickSave() {
+      this.requestSave();
+    },
+    requestSave() {
+      let that = this;
+      that.API.requestData({
+        method: "POST",
+        baseURL: "http://10.155.32.4:8034/",
+        subUrl: "/evaluation/saveModelMain",
+        data: {
+          name: that.form.name,
+          wpids: that.form.wpids,
+          timetypes: that.form.timetypes,
+          createdate: new Date(),
+          isenable: that.form.isenable,
+        },
+        success(res) {
+          console.log(res);
+        },
+      });
+    },
+    convertArray(form) {
+      if (form.wpids != undefined && form.timetypes != undefined) {
+        form.wpids = form.wpids.split(",");
+        form.timetypes = form.timetypes.split(",");
+      }
+      return form;
+    },
+  },
+  watch: {
+    data(value) {
+      this.form = this.convertArray(value);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.assess-create {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .top {
+    width: 60%;
+    margin-top: 50px;
+    display: flex;
+    flex-direction: column;
+    align-self: center;
+
+    .flex-row {
+      margin-bottom: 20px;
+      display: flex;
+      flex-direction: row;
+    }
+
+    .flex-column {
+      display: flex;
+      flex-direction: column;
+    }
+
+    .item-name {
+      width: 100px;
+      text-align: end;
+    }
+    .item-content {
+      width: 300px;
+    }
+  }
+
+  .bottom {
+    margin: 50px 0;
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+
+    .mg-l-30 {
+      margin-left: 30px;
+    }
+  }
+}
+</style>

+ 225 - 282
src/views/layout/Menu.vue

@@ -88,13 +88,79 @@ export default {
           ],
         },
         {
+          id: "realSearch",
+          text: "数据管理",
+          data: [
+            {
+              text: "原始数据查询",
+              icon: "svg-wind-site",
+              path: "/yssjcx",
+              children: [
+                {
+                  text: "测点数据查询",
+                  icon: "svg-wind-site",
+                  path: "/realSearch",
+                },
+                {
+                  text: "测点历史数据查询",
+                  icon: "svg-wind-site",
+                  path: "/historySearch",
+                },
+              ],
+            },
+            {
+              text: "预警记录",
+              icon: "svg-wind-site",
+              path: "/new",
+              children: [
+                {
+                  text: "预警管理",
+                  icon: "svg-wind-site",
+                  path: "/new/alarmcenter",
+                },
+
+                {
+                  text: "停机事件管理",
+                  icon: "svg-wind-site",
+                  path: "/new/tjsj",
+                },
+                {
+                  text: "限电管理",
+                  icon: "svg-wind-site",
+                  path: "/new/xdgl",
+                },
+                {
+                  text: "升压站报警",
+                  icon: "svg-wind-site",
+                  path: "/alarmCenter/boosterAlarm",
+                },
+                {
+                  text: "SCADA报警",
+                  icon: "svg-wind-site",
+                  path: "/alarmCenter/scadaAlarm",
+                },
+                {
+                  text: "自定义报警",
+                  icon: "svg-wind-site",
+                  path: "/alarmCenter/customAlarm",
+                },
+                {
+                  text: "自定义报警统计",
+                  icon: "svg-wind-site",
+                  path: "/alarmCenter/customStatistics",
+                },
+              ],
+            },
+          ],
+        },
+        {
           id: "performanceAnalysis",
-          text: "增发分析",
+          text: "统计分析",
           data: [
             {
               text: "能效分析",
               icon: "svg-wind-site",
-              path: "/powerCurve",
+              path: "/nxfx",
               children: [
                 {
                   text: "功率曲线拟合",
@@ -136,7 +202,7 @@ export default {
             {
               text: "可靠性分析",
               icon: "svg-wind-site",
-              path: "/new/alarmcenter1",
+              path: "/kxkfx",
               children: [
                                 {
                   text: "预警分析",
@@ -163,7 +229,7 @@ export default {
             {
               text: "风光资源分析",
               icon: "svg-wind-site",
-              path: "/windAnalysis",
+              path: "/fgzyfx",
               children: [
                 {
                   text: "风资源散点",
@@ -175,41 +241,11 @@ export default {
                   path: "/windAnalysis/fx",
                 },
               ],
-            }
-            // {
-            //   text: "单机分析",
-            //   icon: "svg-wind-site",
-            //   path: "/fgzyfx",
-            //   children: [
-            //     {
-            //       text: "单机分析详细",
-            //       icon: "svg-wind-site",
-            //       path: "/new/dj1",
-            //     },
-            //     {
-            //       text: "电量预测",
-            //       icon: "svg-wind-site",
-            //       path: "/new/pf1",
-            //     },
-            //     {
-            //       text: "气象预测",
-            //       icon: "svg-wind-site",
-            //       path: "/new/fs",
-            //     }
-            //   ]
-            // }
-          ],
-        },
-        ,
-        {
-          id: "ztfx",
-          text: "降损分析",
-          data: [
-           
+            },
             {
               text: "专题分析",
               icon: "svg-wind-site",
-              path: "/new/ztfx",
+              path: "/fgzyfx",
               children: [
                 {
                   text: "综合分析",
@@ -282,85 +318,6 @@ export default {
                   path: "/new/zzhcydl",
                 },
               ]
-            }, {
-              text: "对标管理",
-              icon: "svg-matrix",
-              path: "/decision1",
-              children: [
-              
-                {
-                  text: "风机绩效榜",
-                  icon: "svg-wind-site",
-                  path: "/decision1",
-                },
-                {
-                  text: "五项损失率",
-                  icon: "svg-wind-site",
-                  path: "/decision2",
-                },
-                {
-                  text: "场内对标",
-                  icon: "svg-wind-site",
-                  path: "/decision2Cndb",
-                },
-                {
-                  text: "场际对标",
-                  icon: "svg-wind-site",
-                  path: "/decision2Cjdb",
-                },
-                {
-                  text: "项目对标",
-                  icon: "svg-wind-site",
-                  path: "/decision2Xmdb",
-                },
-                {
-                  text: "线路对标",
-                  icon: "svg-wind-site",
-                  path: "/decision2Xldb",
-                },
-                {
-                  text: "性能对标",
-                  icon: "svg-wind-site",
-                  path: "/decision3",
-                },
-                {
-                  text: "值际对标",
-                  icon: "svg-wind-site",
-                  path: "/decision4",
-                },
-                {
-                  text: "单机横向对比",
-                  icon: "svg-matrix",
-                  path: "/decision3db",
-                },{
-                  text: "操作指令统计",
-                  icon: "svg-matrix",
-                  path: "/decision4czzl",
-                },
-                
-              ],
-            }, // 三率管理
-            {
-              text: "三率管理",
-              icon: "svg-matrix",
-              path: "/fwjsl",
-              children: [
-                {
-                  text: "复位及时率",
-                  icon: "svg-wind-site",
-                  path: "/fwjsl",
-                },
-                {
-                  text: "状态转换率",
-                  icon: "svg-wind-site",
-                  path: "/ztzhl",
-                },
-                {
-                  text: "消缺及时率",
-                  icon: "svg-wind-site",
-                  path: "/xqjsl",
-                },
-              ],
             },
             // {
             //   text: "单机分析",
@@ -387,122 +344,25 @@ export default {
           ],
         },
         {
-          id: "realSearch",
-          text: "数据管理",
+          id: "health",
+          text: "健康管理",
           data: [
             {
-              text: "原始数据查询",
-              icon: "svg-wind-site",
-              path: "/realSearch",
-              children: [
-                {
-                  text: "测点数据查询",
-                  icon: "svg-wind-site",
-                  path: "/realSearch",
-                },
-                {
-                  text: "测点历史数据查询",
-                  icon: "svg-wind-site",
-                  path: "/historySearch",
-                },
-              ],
-            },
-            {
-              text: "预警记录",
+              text: "等级评估",
               icon: "svg-wind-site",
-              path: "/new/alarmcenter",
+              path: "/assess",
               children: [
                 {
-                  text: "预警管理",
-                  icon: "svg-wind-site",
-                  path: "/new/alarmcenter",
-                },
-
-                {
-                  text: "停机事件管理",
-                  icon: "svg-wind-site",
-                  path: "/new/tjsj",
-                },
-                {
-                  text: "限电管理",
-                  icon: "svg-wind-site",
-                  path: "/new/xdgl",
-                },
-                {
-                  text: "升压站报警",
-                  icon: "svg-wind-site",
-                  path: "/alarmCenter/boosterAlarm",
-                },
-                {
-                  text: "SCADA报警",
-                  icon: "svg-wind-site",
-                  path: "/alarmCenter/scadaAlarm",
-                },
-                {
-                  text: "自定义报警",
+                  text: "等级评估",
                   icon: "svg-wind-site",
-                  path: "/alarmCenter/customAlarm",
+                  path: "/assess/index",
                 },
                 {
-                  text: "自定义报警统计",
+                   text: "评估配置",
                   icon: "svg-wind-site",
-                  path: "/alarmCenter/customStatistics",
+                  path: "/assess/config",
                 },
-              ],
-            },
-            {
-              text: "专家知识",
-              icon: "svg-wind-site",
-              path: "/knowledge",
-              children: [
-                 {
-              text: "故障知识列表",
-              icon: "svg-matrix",
-              path: "/knowledge",
-            },
-            {
-              text: "安全措施知识",
-              icon: "svg-matrix",
-              path: "/knowledge2",
-            },
-            {
-              text: "排查检修方案",
-              icon: "svg-matrix",
-              path: "/knowledge6",
-            },
-            {
-              text: "预警知识",
-              icon: "svg-matrix",
-              path: "/knowledge7",
-            },
-            {
-              text: "特征参数",
-              icon: "svg-matrix",
-              path: "/knowledge5",
-            },
-            {
-              text: "风险辨识知识",
-              icon: "svg-matrix",
-              path: "/knowledge3",
-            },
-            {
-              text: "作业指导知识",
-              icon: "svg-matrix",
-              path: "/knowledge4",
-            },
-              ],
-            },
-          ],
-        },
-        {
-          id: "health",
-          text: "健康管理",
-          data: [
-            {
-              text: "等级评估",
-              icon: "svg-wind-site",
-              path: "/djpg",
-              
+              ]
             },{
               text: "健康管理",
               icon: "svg-wind-site",
@@ -549,109 +409,192 @@ export default {
           ],
         },
         {
-          id: "personnel",
-          text: "安措管控",
+          id: "decision",
+          text: "决策支持",
           data: [
-           
+            {
+              text: "对标管理",
+              icon: "svg-matrix",
+              path: "/decision/decision1",
+              children: [
+              
+                {
+                  text: "风机绩效榜",
+                  icon: "svg-wind-site",
+                  path: "/decision/decision1",
+                },
+                {
+                  text: "五项损失率",
+                  icon: "svg-wind-site",
+                  path: "/decision/decision2",
+                },
+                {
+                  text: "场内对标",
+                  icon: "svg-wind-site",
+                  path: "/decision/decision2Cndb",
+                },
+                {
+                  text: "场际对标",
+                  icon: "svg-wind-site",
+                  path: "/decision/decision2Cjdb",
+                },
+                {
+                  text: "项目对标",
+                  icon: "svg-wind-site",
+                  path: "/decision/decision2Xmdb",
+                },
+                {
+                  text: "线路对标",
+                  icon: "svg-wind-site",
+                  path: "/decision/decision2Xldb",
+                },
+                {
+                  text: "性能对标",
+                  icon: "svg-wind-site",
+                  path: "/decision/decision3",
+                },
+                {
+                  text: "值际对标",
+                  icon: "svg-wind-site",
+                  path: "/decision/decision4",
+                },
+                {
+                  text: "单机横向对比",
+                  icon: "svg-matrix",
+                  path: "/decision/decision3db",
+                },{
+                  text: "操作指令统计",
+                  icon: "svg-matrix",
+                  path: "/decision/decision4czzl",
+                },
+                
+              ],
+            }
             // ,
             // {
             //   text: "五项损失率",
             //   icon: "svg-matrix",
-            //   path: "/decision2",
+            //   path: "/decision/decision2",
             // },
             // {
             //   text: "场内对标",
             //   icon: "svg-matrix",
-            //   path: "/decision2Cndb",
+            //   path: "/decision/decision2Cndb",
             // },
             // {
             //   text: "场际对标",
             //   icon: "svg-matrix",
-            //   path: "/decision2Cjdb",
+            //   path: "/decision/decision2Cjdb",
             // },
             // {
             //   text: "项目对标",
             //   icon: "svg-matrix",
-            //   path: "/decision2Xmdb",
+            //   path: "/decision/decision2Xmdb",
             // },
             // {
             //   text: "线路对标",
             //   icon: "svg-matrix",
-            //   path: "/decision2Xldb",
+            //   path: "/decision/decision2Xldb",
             // },
             // {
             //   text: "性能对标",
             //   icon: "svg-matrix",
-            //   path: "/decision3",
+            //   path: "/decision/decision3",
             // },
             // {
             //   text: "值际对标",
             //   icon: "svg-matrix",
-            //   path: "/decision4",
+            //   path: "/decision/decision4",
             // }
-            
+            ,
             {
-              text: "安全管控",
+              text: "排行榜",
               icon: "svg-matrix",
-              path: "/new/personnel",
+              path: "/phb",
               children: [
                 {
-                  text: "人员矩阵",
+                  text: "发电效率排行",
                   icon: "svg-wind-site",
-                  path: "/new/personnel",
+                  path: "/powerRank",
                 },
                 {
-                  text: "全局监视",
+                  text: "总发电效率排行",
                   icon: "svg-wind-site",
-                  path: "/new/personnel",
+                  path: "/totalPowerRank",
+                },
+                {
+                  text: "报警排行",
+                  icon: "svg-wind-site",
+                  path: "/warningRank",
                 },
-
               ],
             },
-           
+            // 三率管理
+            {
+              text: "三率管理",
+              icon: "svg-matrix",
+              path: "/slgl",
+              children: [
+                {
+                  text: "复位及时率",
+                  icon: "svg-wind-site",
+                  path: "/fwjsl",
+                },
+                {
+                  text: "状态转换率",
+                  icon: "svg-wind-site",
+                  path: "/ztzhl",
+                },
+                {
+                  text: "消缺及时率",
+                  icon: "svg-wind-site",
+                  path: "/xqjsl",
+                },
+              ],
+            },
+          ],
+        },
+        {
+          id: "knowledge",
+          text: "知识管理",
+          data: [
+            {
+              text: "故障知识列表",
+              icon: "svg-matrix",
+              path: "/knowledge",
+            },
+            {
+              text: "安全措施知识",
+              icon: "svg-matrix",
+              path: "/knowledge2",
+            },
+            {
+              text: "排查检修方案",
+              icon: "svg-matrix",
+              path: "/knowledge6",
+            },
+            {
+              text: "预警知识",
+              icon: "svg-matrix",
+              path: "/knowledge7",
+            },
+            {
+              text: "特征参数",
+              icon: "svg-matrix",
+              path: "/knowledge5",
+            },
+            {
+              text: "风险辨识知识",
+              icon: "svg-matrix",
+              path: "/knowledge3",
+            },
+            {
+              text: "作业指导知识",
+              icon: "svg-matrix",
+              path: "/knowledge4",
+            },
           ],
         },
-        // {
-        //   id: "knowledge",
-        //   text: "知识管理",
-        //   data: [
-        //     {
-        //       text: "故障知识列表",
-        //       icon: "svg-matrix",
-        //       path: "/knowledge",
-        //     },
-        //     {
-        //       text: "安全措施知识",
-        //       icon: "svg-matrix",
-        //       path: "/knowledge2",
-        //     },
-        //     {
-        //       text: "排查检修方案",
-        //       icon: "svg-matrix",
-        //       path: "/knowledge6",
-        //     },
-        //     {
-        //       text: "预警知识",
-        //       icon: "svg-matrix",
-        //       path: "/knowledge7",
-        //     },
-        //     {
-        //       text: "特征参数",
-        //       icon: "svg-matrix",
-        //       path: "/knowledge5",
-        //     },
-        //     {
-        //       text: "风险辨识知识",
-        //       icon: "svg-matrix",
-        //       path: "/knowledge3",
-        //     },
-        //     {
-        //       text: "作业指导知识",
-        //       icon: "svg-matrix",
-        //       path: "/knowledge4",
-        //     },
-        //   ],
-        // },
         {
           id: "bdzcx",
           text: "智能报表",
@@ -660,7 +603,7 @@ export default {
             {
               text: "统计分析",
               icon: "svg-matrix",
-              path: "/tjfx",
+              path: "/bdzcx",
               children: [
                 {
                   text: "统计分析",