sunyadv 5 years ago
parent
commit
a9cd13f806
1 changed files with 20 additions and 3 deletions
  1. 20 3
      ys_vue/src/views/mold/moldDetail.vue

+ 20 - 3
ys_vue/src/views/mold/moldDetail.vue

@@ -210,12 +210,14 @@
                         </el-table-column>
                         <el-table-column prop="part3dFile.fileName" label="3D图档" width="200" sortable>
                             <template slot-scope="scope" v-if="scope.row.part3dFile != null">
-                                <a class="download" :href="scope.row.part3dFile.fileUrl" target="_blank">{{scope.row.part3dFile.fileName}}</a> 
+                                <a v-if="scope.row.state == 3 && download == 1" class="download" :href="scope.row.part3dFile.fileUrl" target="_blank">{{scope.row.part3dFile.fileName}}</a> 
+                                <span v-else>{{scope.row.part2dFile.fileName}}</span>
                             </template>
                         </el-table-column>
                         <el-table-column prop="part2dFile.fileName" label="2D图档" width="200" sortable>
                             <template slot-scope="scope" v-if="scope.row.part2dFile != null">
-                                <a class="download" :href="scope.row.part2dFile.fileUrl" :download="scope.row.part2dFile.fileName">{{scope.row.part2dFile.fileName}}</a>
+                                <a v-if="scope.row.state == 3 && download == 1" class="download" :href="scope.row.part2dFile.fileUrl" :download="scope.row.part2dFile.fileName">{{scope.row.part2dFile.fileName}}</a>
+                                <span v-else>{{scope.row.part2dFile.fileName}}</span>
                             </template>
                         </el-table-column>
                         <el-table-column prop="indate" label="上传时间" width="200" align="center" sortable></el-table-column>
@@ -430,7 +432,16 @@
 
         <!-- 审批弹窗 -->
         <el-dialog title="审批" :visible.sync="centerDialogVisible" width="450px">
-            <a :href="this.fileUrl" :download="this.activeFileName"><el-link type="primary">{{this.activeFileName}}</el-link></a>
+            <a v-if="this.activeFileName != null" :href="this.fileUrl" :download="this.activeFileName"><el-link type="primary">{{this.activeFileName}}</el-link></a>
+            <div v-else>
+                <div v-if="this.part2dFile != null">
+                    2D:<a :href="this.part2dFile.fileUrl" :download="this.part2dFile.fileName"><el-link type="primary">{{this.part2dFile.fileName}}</el-link></a>
+                </div>
+                </br>
+                <div v-if="this.part2dFile != null">
+                    3D:<a :href="this.part3dFile.fileUrl" :download="this.part3dFile.fileName"><el-link type="primary">{{this.part3dFile.fileName}}</el-link></a>
+                </div>
+            </div>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="check(false)">不通过</el-button>
                 <el-button type="primary" @click="check(true)">通过</el-button>
@@ -647,6 +658,8 @@
                 activeArticleId: null,
                 activeFileName: null,
                 fileUrl: null,
+                part2dFile: null,
+                part3dFile: null,
                 
                 boxes: [],
                 companys: [],
@@ -915,12 +928,16 @@
 
             //打开审批窗口
             checkOpenPort(row) {
+                this.part2dFile = null;
+                this.part3dFile = null;
                 if(row.part2dFile != null) {
                     this.twoId = row.part2dFile.id
+                    this.part2dFile = row.part2dFile;
                 }
 
                 if(row.part3dFile != null) {
                     this.threeId = row.part3dFile.id
+                    this.part3dFile = row.part3dFile;
                 }
                 this.activeArticleId = null;
                 this.activeFileName = null;