فهرست منبع

Merge branch 'master' of http://47.100.37.243:10080/ZHOU/yunsu

sunyadv 5 سال پیش
والد
کامیت
e8a258f2bf

+ 2 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/entity/vo/PartVO.java

@@ -2,6 +2,7 @@ package com.hssx.cloudmodel.entity.vo;
 
 import com.hssx.cloudmodel.entity.MouldFile;
 import com.hssx.cloudmodel.entity.Part;
+import lombok.Data;
 
 /**
  * Author: 吴涛涛 cuiyi@itany.com
@@ -9,6 +10,7 @@ import com.hssx.cloudmodel.entity.Part;
  * Description:<描述>
  * Version: 1.0
  */
+@Data
 public class PartVO extends Part {
     private MouldFile part2dFile;
     private MouldFile part3dFile;

+ 2 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/PartServiceImpl.java

@@ -75,12 +75,14 @@ public class PartServiceImpl extends ServiceImpl<PartMapper, Part> implements Pa
                 // 故从第二行开始遍历拿数据(如果有标题的话,则从第三行开始拿数据)
                 for (int j = 1; j < sheet.getLastRowNum() + 1; j++) {
                     XSSFRow row = sheet.getRow(j);
+                    System.out.println("row====>"+row);
                     //新建零件
                     Part part = new Part();
                     part.setMouldId(mould.getId());
                     // 遍历所有的列,下面的10是excle表格里共有10列即对应了10个字段
                     for (int y = 0; y < 2; y++) {
                         XSSFCell cell = row.getCell(y);
+                        System.out.println("cell====>"+row);
                         cell.setCellType(Cell.CELL_TYPE_STRING);
                         //取出当前列的值
                         String value = cell.getStringCellValue();

+ 3 - 3
ys_vue/src/views/detection/maintenance.vue

@@ -10,13 +10,13 @@
         <el-form-item>
           {{mouldName}}
         </el-form-item>
-        <el-form-item style="float:right;">
+        <!-- <el-form-item style="float:right;">
           保养提醒:
           <el-switch v-model="prompt" active-color="#ff4949"></el-switch>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item style="float: right">
           当前保养状态:
-          <span style="color: #ff4949; margin-right: 16px;">需要</span>
+          <span style="color: #ff4949; margin-right: 16px;">需要N/A</span>
           <el-button size="small" type="primary" v-if="requirement" @click="showMaintenance">立即处理</el-button>
         </el-form-item>
       </el-form>

+ 143 - 70
ys_vue/src/views/message.vue

@@ -1,86 +1,159 @@
 <template>
-    <section>
-        <!--工具条-->
-        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-            <el-form :inline="true">
-                <el-col :span="2">
-                    <el-form-item>全部消息</el-form-item>
-                </el-col>
-            </el-form>
+  <section>
+    <!--工具条-->
+    <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+      <el-form :inline="true">
+        <el-col :span="2">
+          <el-form-item>全部消息</el-form-item>
         </el-col>
-        <div class="message-div" v-for="item in messages">
-            <p>
-                <span class="message-type" v-if="item.noticeType == 0">【审批】</span>
-                <span class="message-type" v-else-if="item.noticeType == 1">【警告】</span>
-                <span class="message-type" v-else-if="item.noticeType == 2">【保养】</span>
-                <span class="message-title">{{item.projectName}}</span>
-                <span class="message-time">{{item.indate}}</span>
-            </p>
-            <p class="message-article">{{item.content}}</p>
-        </div>
-    </section>
+      </el-form>
+    </el-col>
+    <div class="message-div" v-for="item in messages">
+      <p>
+        <span class="message-type" v-if="item.noticeType == 0">【审批】</span>
+        <span class="message-type" v-else-if="item.noticeType == 1">【警告】</span>
+        <span class="message-type" v-else-if="item.noticeType == 2">【保养】</span>
+        <span
+          class="message-title"
+          @click="locationHerf(item.refId, item.noticeType)"
+        >{{item.projectName}}</span>
+        <span class="message-time">{{item.indate}}</span>
+      </p>
+      <p class="message-article">{{item.content}}</p>
+    </div>
+    <!--工具条-->
+    <el-col :span="24" class="toolbar">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :page-sizes="[20 , 50 , 80 , 100 , 200]"
+        :page-size="20"
+        layout="total, sizes, prev, pager, next"
+        :total="total"
+        style="float:right;"
+      ></el-pagination>
+    </el-col>
+  </section>
 </template>
 
 <script>
-    import util from "../common/js/util";
-    export default {
-        data() {
-            return {
-            messages: []
-            };
+import util from "../common/js/util";
+export default {
+  data() {
+    return {
+      messages: [],
+      page: 1,
+      size: 20,
+      total: 0,
+      tableHeight: 0
+    };
+  },
+  methods: {
+    //分页
+    handleCurrentChange(val) {
+      this.page = val;
+      this.loadNotice();
+    },
+    handleSizeChange(val) {
+      this.size = val;
+      this.loadNotice();
+    },
+    //读取消息提示
+    loadNotice() {
+      this.http.post(
+        this.port.notice.list,
+        {
+          pageNum: this.page,
+          pageSize: this.size
         },
-        methods: {
-            //读取消息提示
-            loadNotice() {
-            this.http.post(
-                this.port.notice.list,
-                {},
-                res => {
-                if (res.code == "ok") {
-                    this.messages = res.data.list.list;
-                } else {
-                    this.$message({
-                    message: res.msg,
-                    type: "error"
-                    });
-                }
-                },
-                error => {
-                this.$message({
-                    message: error,
-                    type: "error"
-                });
-                }
-            );
-            }
+        res => {
+          if (res.code == "ok") {
+            this.messages = res.data.list.list;
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error"
+            });
+          }
         },
-        created() {},
-        mounted() {
-            this.loadNotice();
+        error => {
+          this.$message({
+            message: error,
+            type: "error"
+          });
         }
-    };
+      );
+    },
+    //点击消息的跳转
+    locationHerf(id, type) {
+      this.http.post(
+        this.port.notice.read,
+        {
+          id: id
+        },
+        res => {
+          if (res.code == "ok") {
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error"
+            });
+          }
+        },
+        error => {
+          this.$message({
+            message: error,
+            type: "error"
+          });
+        }
+      );
+      if (type == 0) {
+        //审批 跳转到模具详情
+        this.$router.push("/moldList/" + id);
+      } else if (type == 1) {
+        //警告 跳转到运行监测
+        this.$router.push("/detection");
+      } else if (type == 2) {
+        //保养 跳转到运行监测详情
+        this.$router.push("/detection/" + id);
+      }
+    }
+  },
+  created() {
+    let height = window.innerHeight;
+    this.tableHeight = height - 260;
+  },
+  mounted() {
+    this.loadNotice();
+  }
+};
 </script>
 
 <style scoped>
-    .message-div {
-        padding: 5px 0;
-    }
+.message-div {
+  padding: 5px 0;
+}
 
-    .message-div > p {
-        line-height: 25px;
-        margin: 0;
-    }
+.message-div > p {
+  line-height: 25px;
+  margin: 0;
+}
 
-    .message-type {
-        font-weight: 700;
-    }
+.message-type {
+  font-weight: 700;
+}
 
-    .message-time {
-        padding-left: 30px;
-        color: #777;
-    }
+.message-time {
+  padding-left: 30px;
+  color: #777;
+}
 
-    .message-article {
-        color: #555;
-    }
+.message-title {
+  cursor: pointer;
+  color: #409eff;
+}
+
+.message-article {
+  color: #555;
+}
 </style>