瀏覽代碼

云模盒告警

Reiskuchen 5 年之前
父節點
當前提交
c765ab2336
共有 2 個文件被更改,包括 82 次插入43 次删除
  1. 38 28
      ys_vue/src/views/detection/detection.vue
  2. 44 15
      ys_vue/src/views/detection/maintenance.vue

+ 38 - 28
ys_vue/src/views/detection/detection.vue

@@ -22,35 +22,39 @@
 
     <!--列表-->
     <el-table
-        :data="moulds"
-        :height="tableHeight"
-        highlight-current-row
-        v-loading="listLoading"
-        style="width: 100%;"
+      :data="moulds"
+      :height="tableHeight"
+      highlight-current-row
+      v-loading="listLoading"
+      style="width: 100%;"
     >
-        <el-table-column type="index" width="60"></el-table-column>
-        <el-table-column prop="modelNo" label="模具编号" width="100" sortable></el-table-column>
-        <el-table-column label="模具名称" width="200" sortable>
-            <template slot-scope="scope">
-                <a style="color: #409EFF; cursor: pointer" @click="toMaintenance(scope.row.id)">
-                    {{scope.row.modelName}}
-                </a>
-            </template>
-        </el-table-column>
-        <el-table-column prop="equipmentNo" label="云模盒编号" width="120" sortable></el-table-column>
-        <el-table-column prop="projectName" label="所属项目" width="200" sortable></el-table-column>
-        <el-table-column prop="factoryName" label="制造工厂" width="200" sortable></el-table-column>
-        <el-table-column prop="area" label="位置" width="200" sortable></el-table-column>
-        <el-table-column prop="runTimes" label="运行次数" align="center" width="100" sortable></el-table-column>
-        <el-table-column prop="ocCycle" label="每模平均周期" align="center" width="140" sortable></el-table-column>
-        <el-table-column prop="hillNumber" label="电量" align="center" width="80" sortable></el-table-column>
-        <el-table-column prop="state" label="当前状态" align="center" width="100" sortable></el-table-column>
-        <el-table-column label="模具保养" align="center" fixed="right" width="100">
-            <template slot-scope="scope">
-                <span v-if="scope.row.isMaintain == 1">需要</span>
-                <span v-else>不需要</span>
-            </template>
-        </el-table-column>
+      <el-table-column type="index" width="60"></el-table-column>
+      <el-table-column prop="modelNo" label="模具编号" width="100" sortable></el-table-column>
+      <el-table-column label="模具名称" width="200" sortable>
+        <template slot-scope="scope">
+          <a
+            style="color: #409EFF; cursor: pointer"
+            @click="toMould(scope.row.id)"
+          >{{scope.row.modelName}}</a>
+        </template>
+      </el-table-column>
+      <el-table-column prop="equipmentNo" label="云模盒编号" width="120" sortable></el-table-column>
+      <el-table-column prop="projectName" label="所属项目" width="200" sortable></el-table-column>
+      <el-table-column prop="factoryName" label="制造工厂" width="200" sortable></el-table-column>
+      <el-table-column prop="area" label="位置" width="200" sortable></el-table-column>
+      <el-table-column prop="runTimes" label="运行次数" align="center" width="100" sortable></el-table-column>
+      <el-table-column prop="ocCycle" label="每模平均周期" align="center" width="140" sortable></el-table-column>
+      <el-table-column prop="hillNumber" label="电量" align="center" width="80" sortable></el-table-column>
+      <el-table-column prop="state" label="当前状态" align="center" width="100" sortable></el-table-column>
+      <el-table-column label="云模盒报警N/A" align="center" fixed="right" width="160">低电量、温度过高</el-table-column>
+      <el-table-column label="模具保养" align="center" fixed="right" width="100">
+        <template slot-scope="scope">
+          <a style="color: #409EFF; cursor: pointer" @click="toMaintenance(scope.row.id)">
+            <span v-if="scope.row.isMaintain == 1">需要</span>
+            <span v-else>正常</span>
+          </a>
+        </template>
+      </el-table-column>
     </el-table>
 
     <!--工具条-->
@@ -95,9 +99,15 @@ export default {
       this.size = val;
       this.getMoulds();
     },
+    //跳转到运行监测详情
     toMaintenance(id) {
       this.$router.push("/detection/" + id);
     },
+    //跳转到模具详情
+    toMould(id) {
+      this.$router.push("/moldList/" + id);
+    },
+    //获取模具信息
     getMoulds(keyWord) {
       this.listLoading = true;
       if (keyWord == null) {

+ 44 - 15
ys_vue/src/views/detection/maintenance.vue

@@ -12,23 +12,35 @@
           保养提醒:
           <el-switch v-model="prompt" active-color="#ff4949"></el-switch>
         </el-form-item>-->
-        <el-form-item style="float: right">
-          当前保养状态:
-          <span v-if="requirement" style="color: #ff4949; margin-right: 16px;">需要</span>
-          <span v-else style="color: black; margin-right: 16px;">不需要</span>
-          <el-button size="small" type="primary" v-if="requirement" @click="showMaintenance">立即处理</el-button>
+
+        <el-form-item class="state" style="float: right;">
+          当前状态:
+          <span v-if="mouldState == 0">静止</span>
+          <span v-else-if="mouldState == 1">运行</span>
+          <!-- 因为目前还不知道mouldState的意义 -->
+          <span v-else>不明</span>
         </el-form-item>
       </el-form>
     </el-col>
+    <!-- v-if="requirement" -->
+    <!-- 模具处理 -->
+    <el-col :span="24" class="title">模具处理</el-col>
+    <el-col :span="12" style="line-height: 32px;">
+      当前保养状态:
+      <span v-if="requirement" style="color: #ff4949;">需要</span>
+      <span v-else style="color: black;">正常</span>
+      <el-button size="small" type="primary" @click="showMaintenance" style="float: right; margin-right: 16px;">立即处理</el-button>
+    </el-col>
+    <el-col :span="12" style="line-height: 32px;">
+      云模盒告警:{{warning}}
+      <el-button size="small" type="primary" style="float: right;">立即处理</el-button>
+    </el-col>
 
+    <!-- 操作记录 -->
+    <el-col :span="24" class="title">操作记录</el-col>
     <!--列表-->
-    <el-table
-      :data="records"
-      highlight-current-row
-      :height="tableHeight"
-      v-loading="listLoading"
-      style="width: 100%;"
-    >
+    <!-- :height="tableHeight" -->
+    <el-table :data="records" highlight-current-row v-loading="listLoading" style="width: 100%;">
       <el-table-column type="index" width="60"></el-table-column>
       <el-table-column prop="maintainUserName" label="保养人" width="100" sortable></el-table-column>
       <el-table-column prop="maintainType" label="保养方案" sortable></el-table-column>
@@ -41,7 +53,11 @@
           >
             <!-- 大图加载 -->
             <div class="demo-image__preview">
-              <el-image style="width: 100px; height: 100px" :src="scope.row.fileUrl" :preview-src-list="scope.row.fileUrl"></el-image>
+              <el-image
+                style="width: 100px; height: 100px"
+                :src="scope.row.fileUrl"
+                :preview-src-list="scope.row.fileUrl"
+              ></el-image>
             </div>
           </a>
         </template>
@@ -146,9 +162,13 @@ export default {
       mouldId: null,
       //模具名字
       mouldName: null,
+      //模具状态
+      mouldState: 0,
       options: [{ value: "aaa", label: "123" }, { value: "bbb", label: "456" }],
       //记录
       records: [],
+      //警告信息
+      warning: "低电量、过热",
       //标题栏过滤器
       filters: {
         name: "",
@@ -257,6 +277,7 @@ export default {
         res => {
           if (res.code == "ok") {
             this.mouldName = res.data.vo.modelName;
+            this.mouldState = res.data.vo.state;
             this.requirement = res.data.vo.isMaintain == 1;
           } else {
             this.$message({
@@ -326,8 +347,8 @@ export default {
     }
   },
   created() {
-    let height = window.innerHeight;
-    this.tableHeight = height - 260;
+    // let height = window.innerHeight;
+    // this.tableHeight = height - 260;
   },
   mounted() {
     this.mouldId = this.$route.params.id; //传到当前页面的模具编号
@@ -338,6 +359,14 @@ export default {
 </script>
 
 <style scoped>
+.title {
+  padding-left: 10px;
+  padding-bottom: 0px;
+  margin: 20px 0;
+  font-size: 16px;
+  line-height: 24px;
+  border-left: 1px #20a0ff solid;
+}
 .toolbar .el-form-item {
   font-size: 14px;
   vertical-align: middle;