瀏覽代碼

详情页、运行监测

Reiskuchen 5 年之前
父節點
當前提交
f1d1ad81f8
共有 2 個文件被更改,包括 50 次插入34 次删除
  1. 2 2
      ys_vue/src/views/detection/maintenance.vue
  2. 48 32
      ys_vue/src/views/mold/moldDetail.vue

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

@@ -29,11 +29,11 @@
       当前保养状态:
       当前保养状态:
       <span v-if="requirement" style="color: #ff4949;">需要</span>
       <span v-if="requirement" style="color: #ff4949;">需要</span>
       <span v-else style="color: black;">正常</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-button size="small" type="primary" @click="showMaintenance" style="margin-left: 16px;">立即处理</el-button>
     </el-col>
     </el-col>
     <el-col :span="12" style="line-height: 32px;">
     <el-col :span="12" style="line-height: 32px;">
       云模盒告警:{{warning}}
       云模盒告警:{{warning}}
-      <el-button size="small" type="primary" style="float: right;">立即处理</el-button>
+      <el-button size="small" type="primary" style="margin-left: 16px;">立即处理</el-button>
     </el-col>
     </el-col>
 
 
     <!-- 操作记录 -->
     <!-- 操作记录 -->

+ 48 - 32
ys_vue/src/views/mold/moldDetail.vue

@@ -85,7 +85,7 @@
             文档资料
             文档资料
 
 
             <!-- 上传 模具0 时 -->
             <!-- 上传 模具0 时 -->
-            <el-dropdown trigger="click" style="float:right;" v-show="activeTab == 0 && update == 1">
+            <el-dropdown trigger="click" style="float: right;" v-show="activeTab == 0 && update == 1">
                 <el-button size="small" type="primary" :loading="uploading[0]">
                 <el-button size="small" type="primary" :loading="uploading[0]">
                     上传
                     上传
                     <i class="el-icon-arrow-down el-icon--right"></i>
                     <i class="el-icon-arrow-down el-icon--right"></i>
@@ -104,7 +104,7 @@
             </el-button>
             </el-button>
 
 
             <!-- 零件1 新建零件 -->
             <!-- 零件1 新建零件 -->
-            <el-dropdown trigger="click" style="float:right; margin-right: 10px;" v-show=" activeTab == 1 && update == 1">
+            <el-dropdown trigger="click" style="float: right; margin-right: 10px;" v-show=" activeTab == 1 && update == 1">
                 <el-button size="small" type="primary">
                 <el-button size="small" type="primary">
                     新建零件
                     新建零件
                     <i class="el-icon-arrow-down el-icon--right"></i>
                     <i class="el-icon-arrow-down el-icon--right"></i>
@@ -124,7 +124,7 @@
                 </el-dropdown-menu>
                 </el-dropdown-menu>
             </el-dropdown>
             </el-dropdown>
 
 
-            <!-- 上传 试模2 保养3 更新4 时 -->
+            <!-- 上传 试模2 保养3 时 -->
             <el-upload ref="upload"
             <el-upload ref="upload"
                 v-show="(activeTab == 2 || activeTab == 3 || activeTab == 4) && update == 1"
                 v-show="(activeTab == 2 || activeTab == 3 || activeTab == 4) && update == 1"
                 action="customize"
                 action="customize"
@@ -137,16 +137,26 @@
                 <el-button size="small" type="primary" :loading="uploading[1]">上传</el-button>
                 <el-button size="small" type="primary" :loading="uploading[1]">上传</el-button>
             </el-upload>
             </el-upload>
 
 
+            <!-- 更新4 --><!-- 目前还没加入权限 -->
+            <el-button
+                v-show="activeTab == 4"
+                size="small"
+                type="primary"
+                style="float: right;"
+                @click="updateRequest"
+            >申请</el-button>
+            
             <!-- 上传 报废5 时 -->
             <!-- 上传 报废5 时 -->
             <el-button
             <el-button
                 v-show="activeTab == 5 && update == 1"
                 v-show="activeTab == 5 && update == 1"
                 size="small"
                 size="small"
                 type="primary"
                 type="primary"
-                style="float:right;"
+                style="float: right;"
                 @click="centerDialog2Visible = true;"
                 @click="centerDialog2Visible = true;"
             >上传</el-button>
             >上传</el-button>
         </el-col>
         </el-col>
 
 
+        <!-- 文档列表部分 -->
         <el-col :span="24">
         <el-col :span="24">
             <el-tabs v-model="activePage" @tab-click="handleClick">
             <el-tabs v-model="activePage" @tab-click="handleClick">
                 <!-- 模具文档 -->
                 <!-- 模具文档 -->
@@ -329,31 +339,13 @@
                 <el-tab-pane label="模具更新" name="4">
                 <el-tab-pane label="模具更新" name="4">
                     <el-table :data="documents.update" highlight-current-row v-loading="listLoading" style="width: 100%;">
                     <el-table :data="documents.update" highlight-current-row v-loading="listLoading" style="width: 100%;">
                         <el-table-column type="index" width="40"></el-table-column>
                         <el-table-column type="index" width="40"></el-table-column>
-                        <el-table-column prop="fileName" label="名称" sortable></el-table-column>
-                        <el-table-column prop="fileSize" label="大小" width="200" sortable></el-table-column>
-                        <el-table-column prop="uploadtor" label="上传者" width="200" sortable></el-table-column>
-                        <el-table-column prop="indate" label="上传时间" width="200" sortable></el-table-column>
-                        <el-table-column label="状态" width="120" sortable>
-                            <template slot-scope="scope">
-                            <span v-if="scope.row.state == -2">生产方审核不通过</span>
-                            <span v-else-if="scope.row.state == -1">资产方审核不通过</span>
-                            <span v-else-if="scope.row.state == 0">待双方审核</span>
-                            <span v-else-if="scope.row.state == 1">待生产方审核</span>
-                            <span v-else-if="scope.row.state == 2">待资产方审核</span>
-                            <span v-else-if="scope.row.state == 3">审核通过</span>
-                            </template>
-                        </el-table-column>
+                        <el-table-column label="申请人" sortable></el-table-column>
+                        <el-table-column label="申请时间" width="200" sortable></el-table-column>
+                        <el-table-column label="状态" width="120" sortable></el-table-column>
                         <el-table-column label="操作" width="200" sortable>
                         <el-table-column label="操作" width="200" sortable>
                             <template slot-scope="scope">
                             <template slot-scope="scope">
-                                <el-button size="small" 
-                                    v-if="approve == 1 && (scope.row.state == 0 || (scope.row.state == 1 && user.subordinateType == 1) || (scope.row.state == 2 && user.subordinateType == 0))" 
-                                    @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
-                                <a :href="scope.row.fileUrl" :download="scope.row.fileName" v-if="download == 1 && scope.row.state == 3">
-                                    <el-button size="small" @click="dowloadfile(scope.row.id)">下载</el-button>
-                                </a>
-                                <el-button size="small" 
-                                    v-if="scope.row.uplodtorId == user.id && scope.row.state <= 0" 
-                                    @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
+                                <el-button size="small" @click="updateApproval(scope.row.id, true)" type="primary">通过</el-button>
+                                <el-button size="small" @click="updateApproval(scope.row.id, false)">拒绝</el-button>
                             </template>
                             </template>
                         </el-table-column>
                         </el-table-column>
                     </el-table>
                     </el-table>
@@ -398,7 +390,7 @@
         <!-- 操作记录 -->
         <!-- 操作记录 -->
         <el-col :span="24" class="title">
         <el-col :span="24" class="title">
             操作记录
             操作记录
-            <el-date-picker style="float: right;" v-model="recordTime" type="datetimerange" placeholder="选择日期时间" @change="changeTime"></el-date-picker>
+            <el-button size="small" type="primary" style="float: right;" @click="centerDialog5Visible = true">导出</el-button>
             </el-col>
             </el-col>
             <el-table :data="operations" highlight-current-row v-loading="listLoading" style="width: 100%;">
             <el-table :data="operations" highlight-current-row v-loading="listLoading" style="width: 100%;">
                 <el-table-column type="index" width="40"></el-table-column>
                 <el-table-column type="index" width="40"></el-table-column>
@@ -444,6 +436,16 @@
             </span>
             </span>
         </el-dialog>
         </el-dialog>
 
 
+        <!-- 批量导出操作记录弹窗 -->
+        <el-dialog title="批量导出操作记录" v-if="centerDialog5Visible" :visible.sync="centerDialog5Visible" width="50" center>
+            <span style="line-height: 40px;">请输入需要导出的时间段</span>
+            <el-date-picker v-model="recordTime" type="datetimerange" placeholder="选择日期时间" style="float: right;"></el-date-picker>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="centerDialog5Visible = false">取消</el-button>
+                <el-button @click="exportRecords">确定</el-button>
+            </span>
+        </el-dialog>
+
         <!-- 单个新增零件弹窗 -->
         <!-- 单个新增零件弹窗 -->
         <el-dialog title="新增零件" v-if="centerDialog3Visible" :visible.sync="centerDialog3Visible" :close-on-click-modal="false" customClass="customWidth">
         <el-dialog title="新增零件" v-if="centerDialog3Visible" :visible.sync="centerDialog3Visible" :close-on-click-modal="false" customClass="customWidth">
             <el-form :model="newParts" label-width="100px" :rules="formRules" ref="newParts" :inline="true" class="demo-form-inline">
             <el-form :model="newParts" label-width="100px" :rules="formRules" ref="newParts" :inline="true" class="demo-form-inline">
@@ -604,6 +606,7 @@
                 centerDialog2Visible: false, //模具界面
                 centerDialog2Visible: false, //模具界面
                 centerDialog3Visible: false, //创建零件界面
                 centerDialog3Visible: false, //创建零件界面
                 centerDialog4Visible: false, //零件文档上传界面
                 centerDialog4Visible: false, //零件文档上传界面
+                centerDialog5Visible: false, //批量导出操作界面
                 editPortVisible: false,//编辑零件界面
                 editPortVisible: false,//编辑零件界面
 
 
                 listLoading: false,
                 listLoading: false,
@@ -1227,10 +1230,23 @@
                 });
                 });
             },
             },
 
 
-            //操作记录部分更改时间
-            changeTime(){
-                //然而现在并没有卵用
-                console.log(this.recordTime);
+            //更新申请
+            updateRequest(){
+                console.log("发起了申请,但什么都没有发生")
+            },
+
+            //更新批准
+            updateApproval(id, approval){
+                if(approval){
+                    console.log("批准通过了" + id + "的申请,但什么都没有发生");
+                }else{
+                    console.log("批准拒绝了" + id + "的申请,但什么都没有发生");
+                }
+            },
+
+            //导出操作记录
+            exportRecords(){
+                console.log("想要导出记录,但什么都没有发生");
             }
             }
         },
         },
         created() {
         created() {