Forráskód Böngészése

Merge branch 'yx' of http://61.161.152.110:10101/r/electronic-map into yx

yangxiao 3 éve
szülő
commit
b7c79e9a2f

+ 10 - 0
src/router/index.js

@@ -208,6 +208,16 @@ const routes = [
     name: 'wtSaturability',
     component: () => import('../views/wtSaturability/index.vue'),
   },
+  {
+    path: '/knowledge',
+    name: 'knowledge1',
+    component: () => import('../views/Knowledge/Knowledge1.vue'),
+  },  
+  {
+    path: '/knowledge2',
+    name: 'knowledge2',
+    component: () => import('../views/Knowledge/Knowledge2.vue'),
+  }
 ]
 
 const router = createRouter({

+ 19 - 5
src/views/HealthControl/HealthTab1.vue

@@ -46,7 +46,7 @@
             <div class="info">
               <p>推荐理由:{{ item.reason }}</p>
               <p>推荐检修时间:{{new Date(item.recodedate).formatDate("yyyy-MM-dd hh:mm:ss")}}</p>
-              <p>推荐时间对应风速:{{ item.speed }}</p>
+              <p>推荐时间对应风速:{{ item.speed }} m/s</p>
               <p>判断时间:{{new Date(item.createdate).formatDate("yyyy-MM-dd hh:mm:ss")}}</p>
               <div class="actions mg-t-16">
                 <button class="btn success" @click="onClickCofirm(item)">
@@ -138,19 +138,28 @@ export default {
     },
     // 健康推荐提交
     onClickCofirm(item) {
-      // this.requestOption("recommen/confirpush", item.rid);
+      let that = this;
+      that.$confirm('确认提交?').then(_=> {
+        that.requestOption("recommen/confirpush", item.rid);
+      }).catch(_=>{})
     },
     // 健康推荐取消
     onClickIgnore(item) {
-      // this.requestOption("recommen/ignorepush", item.rid);
+      this.requestOption("recommen/ignorepush", item.rid);
     },
     // 健康推荐提交全部
     onClickCofirmAll() {
-      // this.requestOptionAll("recommen/confirpushAll");
+      let that = this;
+      that.$confirm('确认全部提交?').then(_=> {
+        that.requestOptionAll("recommen/confirpushAll");
+      }).catch(_=>{})
     },
     // 健康推荐取消全部
     onClickIgnoreAll() {
-      // this.requestOptionAll("recommen/ignorepushAll");
+      let that = this;
+      that.$confirm('确认全部取消?').then(_=> {
+        that.requestOptionAll("recommen/ignorepushAll");
+      }).catch(_=>{})
     },
     // 健康报告推荐
     requestRecommen(url) {
@@ -379,6 +388,11 @@ export default {
           p {
             margin: 0;
             line-height: 2;
+            overflow:hidden; 
+            text-overflow:ellipsis;
+            display:-webkit-box; 
+            -webkit-box-orient:vertical;
+            -webkit-line-clamp:2; 
           }
 
           .actions {

+ 6 - 1
src/views/HealthControl/HealthTab2.vue

@@ -34,7 +34,7 @@
             <div class="info">
               <p>推荐理由:{{ item.reason }}</p>
               <p>推荐检修时间:{{ new Date(item.recodedate).formatDate("yyyy-MM-dd hh:mm:ss") }}</p>
-              <p>推荐时间对应风速:{{ item.speed }}</p>
+              <p>推荐时间对应风速:{{ item.speed }} m/s</p>
               <p>判断时间:{{ new Date(item.createdate).formatDate("yyyy-MM-dd hh:mm:ss")}}</p>
             </div>
           </div>
@@ -254,6 +254,11 @@ export default {
           p {
             margin: 0;
             line-height: 2;
+            overflow:hidden; 
+            text-overflow:ellipsis;
+            display:-webkit-box; 
+            -webkit-box-orient:vertical;
+            -webkit-line-clamp:2; 
           }
 
           .actions {

+ 2 - 2
src/views/HealthControl/healthLineChart2.vue

@@ -52,8 +52,8 @@ export default {
       tableData: {
         column: [
           { name: "部件名称",field: "name" },
-          { name: "MTBF",field: "v1", is_num: true },
-          { name: "MTTR",field: "v2", is_num: true },
+          { name: "MTBF(h)",field: "v1", is_num: true },
+          { name: "MTTR(h)",field: "v2", is_num: true },
           { name: "损失电量(kw/h)",field: "v3",is_num: true },
           { name: "当前状态",field: "v4",
             template: function(data) {

+ 208 - 0
src/views/Knowledge/Knowledge1.vue

@@ -0,0 +1,208 @@
+<template>
+  <div class="knowledge-1">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">故障等级:</div>
+          <div class="search-input">
+            <el-select
+              v-model="level"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+            >
+              <el-option
+                v-for="item in faultLevels"
+                :key="item"
+                :label="item"
+                :value="item"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">停机类型:</div>
+          <div class="search-input">
+            <el-select
+              v-model="type"
+              placeholder="请选择"
+              popper-class="select"
+            >
+              <el-option
+                v-for="item in downTypes"
+                :key="item"
+                :label="item"
+                :value="item"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">查询内容:</div>
+          <div class="search-input">
+            <el-input v-model="content" placeholder="请输入查询内容"></el-input>
+          </div>
+        </div>
+      </div>
+      <div class="query-actions" style="margin-right: 800px">
+        <button class="btn green" @click="onClickSearch">搜索</button>
+      </div>
+    </div>
+    <div class="table-box">
+      <ComTable :data="tableData" height="85vh"></ComTable>
+    </div>
+    <div class="dialog-box">
+      <el-dialog
+        title="详细信息"
+        v-model="dialogVisible"
+        custom-class="modal"
+        :close-on-click-modal="false"
+      >
+        <know-info :data="infoData"></know-info>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import ComTable from "@com/coms/table/table.vue";
+import KnowInfo from "./knowinfo.vue";
+
+export default {
+  components: { ComTable, KnowInfo },
+  data() {
+    const that = this;
+    return {
+      faultLevels: ["1级", "2级", "3级", "4级", "5级"], // 故障等级
+      downTypes: ["正常停机", "快速停机", "紧急停机"], // 停机类型
+      level: "",
+      type: "",
+      content: "",
+      tableData: {
+        column: [
+          {
+            name: "故障编码",
+            field: "code",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "故障名称",
+            field: "name",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "故障类别",
+            field: "category",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "故障级别",
+            field: "faultlevel",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "停机类型",
+            field: "halttype",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "设备类型",
+            field: "devicemodel",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "故障标识",
+            field: "faultid",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "操作",
+            field: "",
+            is_num: false,
+            is_light: false,
+            template() {
+              return "<el-button type='text' style='cursor: pointer;'>详细信息</el-button>";
+            },
+            click(e, row) {
+              that.getInformation(row);
+            },
+          },
+        ],
+        data: [],
+      },
+      infoData: "",
+      dialogVisible: false,
+    };
+  },
+  created() {
+    this.level = this.faultLevels[0];
+    this.type = this.downTypes[0];
+    this.requestInfoList();
+  },
+  methods: {
+    // 搜索按钮
+    onClickSearch() {
+      this.requestInfoList();
+    },
+    // 查看详细信息
+    getInformation(item) {
+      this.dialogVisible = true;
+      this.infoData = item;
+    },
+    // 获取故障知识列表
+    requestInfoList() {
+      let that = this;
+      this.API.requestData({
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034/",
+        subUrl: "/experienceBase/gzzs",
+        data: {
+          gzjb: that.level.substring(0, 1),
+          tjlx: that.type,
+          cxnr: that.content,
+          pageNum: 1,
+          pageSize: 1000,
+        }, // 请求所携带参数,默认为空,可缺省
+        success(res) {
+          if (res.code == 200) {
+            that.tableData.data = res.data;
+          }
+        },
+      });
+    },
+  },
+};
+</script>
+
+<style lang="less" scope>
+@titleGray: #9ca5a8;
+@rowGray: #606769;
+@darkBack: #536268;
+.knowledge-1 {
+  .el-select {
+    width: 200px;
+  }
+  .el-input {
+    width: 200px;
+  }
+  .dialog-box {
+    height: 100%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  .el-dialog {
+    min-width: 500px;
+    min-height: 500px;
+  }
+}
+</style>

+ 135 - 0
src/views/Knowledge/Knowledge2.vue

@@ -0,0 +1,135 @@
+<template>
+  <div class="knowledge-2">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">查询内容:</div>
+          <div class="search-input">
+            <el-input v-model="content" placeholder="请输入查询内容"></el-input>
+          </div>
+        </div>
+      </div>
+      <div class="query-actions" style="margin-right: 1500px">
+        <button class="btn green" @click="onClickSearch">搜索</button>
+      </div>
+    </div>
+    <div>
+      <ComTable :data="tableData"></ComTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import ComTable from "@com/coms/table/table.vue";
+
+export default {
+  components: { ComTable },
+  data() {
+    return {
+      content: "",
+      tableData: {
+        column: [
+          {
+            name: "序号",
+            field: "id",
+            is_num: true,
+            is_light: false,
+          },
+          {
+            name: "按错内容",
+            field: "safecontent",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "故障按错内容描述",
+            field: "describe",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "负责人",
+            field: "principal",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "添加时间",
+            field: "addtime",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "类型",
+            field: "type",
+            is_num: false,
+            is_light: false,
+          },
+          {
+            name: "其他",
+            field: "other",
+            is_num: false,
+            is_light: false,
+          },
+        ],
+        data: [],
+      },
+    };
+  },
+  created() {
+    this.requestSafeList();
+  },
+  methods: {
+    // 搜索按钮
+    onClickSearch() {
+      this.requestSafeList();
+    },
+    // 获取按错内容
+    requestSafeList() {
+      let that = this;
+      this.API.requestData({
+        method: "GET",
+        baseURL: "http://10.155.32.4:8034/",
+        subUrl: "/experienceBase/aqcszs",
+        data: {
+          name: that.content,
+          pageNum: 1,
+          pageSize: 1000,
+        }, // 请求所携带参数,默认为空,可缺省
+        success(res) {
+          if (res.code == 200) {
+            that.tableData.data = [];
+            let data = res.data;
+            for (var i = 0; i < data.length; i++) {
+              let obj = {
+                id: i + 1,
+                safecontent: data[i].safecontent,
+                describe: data[i].describe,
+                principal: data[i].principal,
+                addtime: new Date(data[i].addtime).formatDate("yyyy-MM-dd"),
+                type: data[i].type,
+                other: data[i].other,
+              };
+              that.tableData.data.push(obj);
+            }
+          }
+        },
+      });
+    },
+  },
+};
+</script>
+
+<style lang="less" scope>
+@titleGray: #9ca5a8;
+@rowGray: #606769;
+@darkBack: #536268;
+.knowledge-2 {
+  .el-select {
+    width: 200px;
+  }
+  .el-input {
+    width: 200px;
+  }
+}
+</style>

+ 0 - 0
src/views/Knowledge/Knowledge3.vue


+ 79 - 0
src/views/Knowledge/knowinfo.vue

@@ -0,0 +1,79 @@
+<template>
+  <div class="know-info">
+    <table class="table-card">
+      <tr>
+        <th>故障代码</th>
+        <td>{{ infoObj.code }}</td>
+        <th>故障标识</th>
+        <td>{{ infoObj.faultid }}</td>
+      </tr>
+      <tr>
+        <th>停机类型</th>
+        <td>{{ infoObj.halttype }}</td>
+        <th>故障名称</th>
+        <td>{{ infoObj.name }}</td>
+      </tr>
+      <tr>
+        <th>故障原因</th>
+        <td colspan="3">{{ infoObj.cause }}</td>
+      </tr>
+      <tr>
+        <th>处理方法</th>
+        <td colspan="3">{{ infoObj.treatmentmeasure }}</td>
+      </tr>
+    </table>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "know-info",
+  props: {
+    data: Object,
+  },
+  data() {
+    return {
+      infoObj: "",
+    };
+  },
+
+  mounted() {
+    this.infoObj = this.data;
+  },
+
+  watch: {
+    data(value) {
+      this.infoObj = value;
+      console.log(value);
+    },
+  },
+};
+</script>
+
+
+<style lang="less" scoped>
+.know-info {
+  .table-card {
+    border-collapse: collapse;
+    width: 100%;
+    color: @white;
+
+    tr {
+      font-size: 12px;
+      th {
+        width: 120px;
+        height: 60px;
+        border: 0.093vh solid @darkgray;
+        line-height: 27px;
+        padding: 0 4px;
+      }
+      td {
+        height: 60px;
+        border: 0.093vh solid @darkgray;
+        line-height: 27px;
+        padding: 0 4px;
+      }
+    }
+  }
+}
+</style>

+ 12 - 1
src/views/layout/Menu.vue

@@ -232,7 +232,18 @@ export default {
         {
           id: "knowledge",
           text: "知识管理",
-          data: [],
+          data: [
+            {
+              text: "故障知识列表",
+              icon: "svg-matrix",
+              path: "/knowledge",
+            },
+            {
+              text: "安全措施知识",
+              icon: "svg-matrix",
+              path: "/knowledge2",
+            },
+          ],
         },
         {
           id: "report",