shi'sen'yuan 3 년 전
부모
커밋
04f8ae6148

+ 10 - 1
ui/src/views/plant/targetlist/index.vue

@@ -153,7 +153,7 @@
           <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" :placeholder="$t('请选择') + $t('归属部门')" />
         </el-form-item>
         <el-form-item :label="$t('父级目录')" prop="parentId">
-          <treeselect v-model="form.parentId" :options="targetlistOptions" :normalizer="normalizer" :placeholder="$t('请选择') + $t('父级目录')" />
+          <treeselect v-model="form.parentId" :options="targetlistOptions" :normalizer="normalizer" :placeholder="$t('请选择') + $t('父级目录')" @change="changeParentId"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -594,6 +594,15 @@ export default {
       this.upload.title = this.$t('用户导入');
       this.upload.open = true;
     },
+    /** 父级菜单变更 */
+    changeParentId() {
+      console.info("111:" + this.form.parentId)
+      if (this.form.parentId === 0) {
+        this.rules = this.rulesOne
+      }else {
+        this.rules = this.rulesTwo
+      }
+    },
     /** 公司目标按钮操作 */
     handleCompany() {
       this.target.title = this.$t('公司目标');

+ 1 - 1
ui/src/views/sems/specanalysis/ApproveChart.vue

@@ -27,7 +27,7 @@ import {devApproveData} from "@/api/sems/home";
       },
       height: {
         type: String,
-        default: '320px'
+        default: '160px'
       }
     },
     data() {

+ 214 - 0
ui/src/views/sems/specanalysis/centerChart.vue

@@ -0,0 +1,214 @@
+<template>
+  <div>
+    <div class="text-container" :style="{height:height,width:width}">
+      <div class="inner-container">
+        <p class="text"
+           v-for="(text, index) in arr"
+           :key="index"
+           v-on:mouseover="changeActive"
+           v-on:mouseout="removeActive"
+           @click="chooseWarn(text)">
+          {{text}}</p>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {devApproveData} from "@/api/sems/home";
+  const totalDuration = 2000;
+
+  export default {
+    name: "WarnChart",
+    props: {
+      width: {
+        type: String,
+        default: '100%'
+      },
+      height: {
+        type: String,
+        default: '160px'
+      }
+    },
+    data() {
+      return {
+        arr: [],
+        number: 0,
+        // 查询参数
+        queryParams: {},
+      }
+    },
+    computed: {
+      text() {
+        return {
+          id: this.number,
+          val: this.arr[this.number]
+        }
+      }
+    },
+    created() {
+    },
+    mounted() {
+      this.startMove()
+    },
+    methods: {
+      /** 查询报警记录管理列表 */
+      devCenterData(plantIds ,unitIds) {
+        this.loading = true;
+        let params = {
+          'plantIds': plantIds,
+          'unitIds': unitIds
+        }
+        devApproveData(params).then(response => {
+          this.arr = response.data;
+          //设置文字滚动一轮时间
+          let elem = document.querySelector('.inner-container');
+          let state = elem.style['animation'];
+          let time = this.arr.length * 1.5 + 5
+          elem.style['animation'] = 'myMove ' + time + 's linear infinite';
+          //设置文字无缝滚动高度
+          let param = this.arr.length * 60
+          let myFirstkeyframes = "@keyframes myMove{0% {transform: translateY(200px);}100% {transform: translateY(-" + param +"px);}}";
+          let style = document.createElement("style");
+          style.setAttribute("type", "text/css");
+          document.head.appendChild(style);
+          const sheet = style.sheet;
+          sheet.insertRule(myFirstkeyframes, 0);
+          this.loading = false;
+        });
+      },
+      // 鼠标移入
+      changeActive() {
+        let elem = document.querySelector('.inner-container');
+        let state = elem.style['animationPlayState'];
+        elem.style['animationPlayState'] = 'paused';
+      },
+      // 鼠标移出
+      removeActive() {
+        let elem = document.querySelector('.inner-container');
+        let state = elem.style['animationPlayState'];
+        elem.style['animationPlayState'] = 'running';
+      },
+      //点击事件
+      chooseWarn(data) {
+        var warnType = data.split("(")
+        var type = warnType[0];
+        if (type === '安全阀清单') {
+          this.$router.push("/reliability/safetyvavle");
+        }else if (type === "环保批文清单") {
+          this.$router.push("/ehs/environapproval");
+        }else if (type === "消防批文清单") {
+          this.$router.push("/ehs/fireapproval");
+        }else if (type === "安全批文清单") {
+          this.$router.push("/ehs/safetyapproval");
+        }else if (type === "故障管理跟踪") {
+          this.$router.push("/reliability/list");
+        }else if (type === "MSDS管理") {
+          this.$router.push("/ehs/msds");
+        }else if (type === "管线清单") {
+          this.$router.push("/reliability/pipe");
+        }else if (type === "装置程序清单") {
+          this.$router.push("/document/plantproglist");
+        }else if (type === "PPE发放登记") {
+          this.$router.push("/affair/ppe");
+        }else if (type === "压力管道" || type === "锅炉证" || type === "加氢工艺" || type === "裂化工艺") {
+          this.$router.push("/training/workcertificate");
+        }else if (type === "上岗证一览表") {
+          this.$router.push("/training/worklicense");
+        }else if (type === "灭火器") {
+          this.$router.push("/ehs/fireextinguisher");
+        }else if (type === "洗眼器") {
+          this.$router.push("/ehs/eyewasher");
+        }else if (type === "消防水带箱") {
+          this.$router.push("/ehs/firehose");
+        }else if (type === "消防栓") {
+          this.$router.push("/ehs/firehydrant");
+        }else if (type === "高压消防炮") {
+          this.$router.push("/ehs/highpresfire");
+        }else if (type === "自动喷淋系统") {
+          this.$router.push("/ehs/autosprinkler");
+        }else if (type === "消防竖管") {
+          this.$router.push("/ehs/firestandpipe");
+        }
+      },
+      startMove() {
+        if (this.remove === true) {
+          let timer = setTimeout(() => {
+            if (this.number === 3) {
+              this.number = 0;
+            } else {
+              this.number += 1;
+            }
+            this.startMove();
+          }, totalDuration)
+        }
+      },
+    },
+  }
+</script>
+
+<style scoped>
+  .text-container {
+    line-height: 30px;
+    /*border: 1px solid cornflowerblue;*/
+    overflow: hidden;
+  }
+  .text {
+    margin: 0 0 0 10px;
+    cursor: pointer;  /*鼠标悬停变小手*/
+    color: #ffffff;
+  }
+  p:hover {
+    background-color: #296b9bb5;
+  }
+  .inner-container {
+    /*animation: myMove 10s linear infinite;*/
+    animation-fill-mode: forwards;
+  }
+  /*文字无缝滚动*/
+  /*@keyframes myMove {
+    0% {
+      transform: translateY(200px);
+    }
+    100% {
+      transform: translateY(-400px);
+    }
+  }*/
+  /*文字停顿滚动*/
+  @keyframes myMove2 {
+    0% {
+      transform: translateY(0);
+    }
+    10% {
+      transform: translateY(-30px);
+    }
+    20% {
+      transform: translateY(-30px);
+    }
+    30% {
+      transform: translateY(-60px);
+    }
+    40% {
+      transform: translateY(-60px);
+    }
+    50% {
+      transform: translateY(-90px);
+    }
+    60% {
+      transform: translateY(-90px);
+    }
+    70% {
+      transform: translateY(-120px);
+    }
+    80% {
+      transform: translateY(-120px);
+    }
+    90% {
+      transform: translateY(-150px);
+    }
+    100% {
+      transform: translateY(-150px);
+    }
+  }
+
+</style>

+ 49 - 5
ui/src/views/sems/specanalysis/index.vue

@@ -248,6 +248,25 @@
               </div>
             </dv-border-box-12>
           </div>
+          <div class="center">
+            <dv-border-box-12>
+              <div id="centerModule">
+                <div class="bg-color-spec">
+                  <div class="d-flex pt-2 pl-2">
+                    <span style="color:#96d1d5">
+                      <icon name="chart-bar"></icon>
+                    </span>
+                    <div class="d-flex">
+                      <span class="fs-xl text mx-2">{{ $t('当前正在审批') }}</span>
+                    </div>
+                  </div>
+                  <div>
+                    <approve-chart ref="centerChart"/>
+                  </div>
+                </div>
+              </div>
+            </dv-border-box-12>
+          </div>
           <div class="down">
             <dv-border-box-12>
               <div id="finishModule">
@@ -266,7 +285,6 @@
             </dv-border-box-12>
           </div>
         </div>
-
       </div>
     </div>
   </div>
@@ -281,6 +299,7 @@ import ylrqChart from "./YlrqChart";
 import ylgdChart from "./YlgdChart";
 import liftChart from "./LiftChart"
 import approveChart from "./ApproveChart"
+import centerChart from "./centerChart"
 import finishChart from "./FinishChart"
 import {listPlant, listUnit, mylistPlant} from "@/api/system/plant";
 import {devData, devGlPerData} from "@/api/sems/home";
@@ -295,7 +314,8 @@ export default {
     pvChart,
     boilerChart,
     ppChart,
-    ylgdChart
+    ylgdChart,
+    centerChart
   },
   data() {
     return {
@@ -394,6 +414,7 @@ export default {
         this.$refs.ylrqChart.devYlrqSafeData(this.plantIds, this.unitIds);
         this.$refs.ylgdChart.devYlgdSafeData(this.plantIds, this.unitIds);
         this.$refs.approveChart.devApproveData(this.plantIds, this.unitIds);
+        this.$refs.centerChart.devCenterData(this.plantIds, this.unitIds);
         this.devGlPerData()
       });
     },
@@ -414,6 +435,7 @@ export default {
       this.$refs.ylrqChart.devYlrqSafeData(this.plantIds, this.unitIds);
       this.$refs.ylgdChart.devYlgdSafeData(this.plantIds, this.unitIds);
       this.$refs.approveChart.devApproveData(this.plantIds, this.unitIds);
+      this.$refs.centerChart.devCenterData(this.plantIds, this.unitIds);
       this.devGlPerData()
     },
     devData() {
@@ -505,6 +527,14 @@ export default {
   justify-content: space-around;
 }
 
+.center {
+  padding: 0.07rem 0.05rem;
+  padding-bottom: 0;
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+}
+
 .down {
   padding: 0.07rem 0.05rem;
   padding-bottom: 0;
@@ -571,12 +601,26 @@ export default {
 
 #approveModule {
   padding: 0.15rem 0.15rem 0.15rem 0.15rem;
-  height: 4.5rem;
+  height: 2.35rem;
   min-width: 3.75rem;
   border-radius: 0.0625rem;
 
   .bg-color-spec {
-    height: 4.2rem;
+    height: 2.1rem;
+  }
+
+  .text {
+    color: #a9b3d5;
+  }
+}
+
+#centerModule {
+  padding: 0.15rem 0.15rem 0.15rem 0.15rem;
+  height: 2.35rem;
+  border-radius: 0.0625rem;
+
+  .bg-color-spec {
+    height: 2.1rem;
   }
 
   .text {
@@ -587,7 +631,7 @@ export default {
 #finishModule {
   padding-left: 0.1rem;
   padding-right: 0.1rem;
-  height: 3.5rem;
+  height: 3.3rem;
   border-radius: 0.0625rem;
 
   .text {

+ 1 - 1
ui/src/views/training/trainingrecords/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
       <el-form-item :label="$t('姓名')" prop="name">
         <el-input
           v-model="queryParams.name"