Parcourir la source

Merge branch 'V0.0.5' of http://10.87.21.221:8000/jzyd_yyds/soc_web into V0.0.5

jiawuxian il y a 1 an
Parent
commit
9ea35c9062

BIN
src/assets/icons/home/安全检查.png


BIN
src/assets/icons/home/教育培训.png


BIN
src/assets/icons/home/来访审批.png


BIN
src/assets/icons/home/隐患整改.png


BIN
src/assets/icons/home/隐患问题.png


BIN
src/assets/icons/home/预案演练.png


+ 47 - 9
src/views/core/accessPlan/index.vue

@@ -736,14 +736,52 @@ export default {
             let msg = "";
             if (request.planStatus == 1) {
               if(request.isComplete==true){
-                msg =  "因不存在已完成任务,本次修改内容将立即生效,是否确认提交?";
+              if (request.planCycle==0) {
+                this.$modal
+         .confirm("因存在已完成任务,无周期任务如需修改,请删除后重新下发”。")
+         .then(() => {
+             
+                this.open = false;
+                this.getList();
+
+              })
+              }else{
+                msg =  "因不存在已完成任务,本次修改内容将立即生效";
+                this.$modal
+              .confirm(msg)
+              .then(function () {
+                return updatePlan(request);
+              })
+              .then(() => {
+                this.$modal.msgSuccess("编辑成功");
+                this.open = false;
+                this.getList();
+
+              })
+              .catch(() => {
+              });
+              }
+              
               }else{
-                msg = "因存在已完成任务,本次修改内容将下周期生效,是否确认提交?";
+                msg = "因存在已完成任务,本次修改内容将下周期生效";
+                this.$modal
+              .confirm(msg)
+              .then(function () {
+                return updatePlan(request);
+              })
+              .then(() => {
+                this.$modal.msgSuccess("编辑成功");
+                this.open = false;
+                this.getList();
+
+              })
+              .catch(() => {
+              });
               }
+              
             }else{
               msg = "是否确认修改?";
-            }
-            this.$modal
+              this.$modal
               .confirm(msg)
               .then(function () {
                 return updatePlan(request);
@@ -756,13 +794,9 @@ export default {
               })
               .catch(() => {
               });
+            }
 
 
-            // updatePlan(this.form).then((response) => {
-            //   this.$modal.msgSuccess("修改成功");
-            //   this.open = false;
-            //   this.getList();
-            // });
           } else {
             addPlan(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
@@ -913,6 +947,10 @@ export default {
         if (row.planCycle==0) {
            this.$modal
          .confirm("存在已完成任务,无周期任务不允许撤回,如需删除下发任务请点击“删除”。")
+         .then(() => {
+          this.getList();
+       
+        })
         }else{
           this.$modal
         .confirm("因存在已完成任务,撤回后下周期起将不再生成任务")

+ 27 - 5
src/views/index.vue

@@ -20,7 +20,8 @@
             <el-col :xs="24" :sm="24" :md="12"  :lg="12" v-for="(v,i) in dataList" :key="i">
               <div class="card-panel">
                 <div class="card-panel-icon-wrapper icon-people">
-                  <svg-icon icon-class="example" class-name="card-panel-icon" />
+<!--                  <svg-icon icon-class="example" class-name="card-panel-icon" />-->
+                  <img class="card-item-icon" :src="require(`../assets/icons/home/${v.taskTypeText}.png`)" alt="">
                   <div class="card-icon-text">
                     {{v.taskTypeText}}
                   </div>
@@ -29,7 +30,10 @@
                   <div class="card-panel-text">
                     {{v.statusText}}
                   </div>
-                  <count-to :start-val="0" :end-val="v.nums" :duration="3000" class="card-panel-num" />
+                  <span v-if="!v.nums" style="font-size: 20px;">0</span>
+                  <span v-else @click="clickNum(v)" >
+                     <count-to :start-val="0" :end-val="v.nums" :duration="3000" class="card-panel-num" />
+                  </span>
                 </div>
               </div>
             </el-col>
@@ -120,6 +124,9 @@ export default {
   },
   methods: {
     imageUrl,
+    clickNum(item){
+      console.log(item,'666')
+    },
     showMsg(v){
       this.show = true;
       this.selectMsg = v;
@@ -163,11 +170,17 @@ export default {
     border-radius: 4px;
     box-shadow: none;
   }
+  .el-tabs--border-card{
+    border: none;
+  }
   .chart-wrapper{
     .el-card__body{
       padding: 0;
     }
   }
+  .card-panel-num{
+    color:#1ea8e9;
+  }
 }
 </style>
 <style lang="scss" scoped>
@@ -184,6 +197,7 @@ export default {
   margin: 0 0 10px 0;
   padding-left: 4px;
   color:#fff;
+  line-height: 26px;
   font-weight: bold;
   letter-spacing: 2px;
   background: linear-gradient(to right, #71bfe3, #fff);
@@ -194,9 +208,17 @@ export default {
   }
 }
 .tab-panel{
-  height: 455px;
+  height: 457px;
   overflow: auto;
 }
+//css 透明的属性=
+.card-item-icon{
+  width: 50px;
+  height: 50px;
+  &:hover{
+    opacity:.8;
+  }
+}
 .msg-item{
   font-size: 15px;
   padding: 0 10px;
@@ -241,7 +263,7 @@ export default {
     }
   }
   &:hover{
-    background-color: #1ea8e9;
+    background-color: #6eb9ec;
     color:#fff;
     transition: all .38s ease-out;
   }
@@ -252,7 +274,6 @@ export default {
     display: flex;
     flex:1;
     justify-content: space-between;
-    cursor: pointer;
     font-size: 12px;
     color: #666;
     background: #fff;
@@ -303,6 +324,7 @@ export default {
 
       .card-panel-num {
         font-size: 20px;
+        cursor: pointer;
       }
     }
   }