wucl 11 月之前
父節點
當前提交
2ef15880e7

+ 1 - 0
src/components/OnlyOffice/officeFileView.vue

@@ -70,6 +70,7 @@ export default {
         setConfigInfo() {
             this.editorConfig.document.title = this.$route.query.title;
             this.editorConfig.document.url = process.env.VUE_APP_API_SERVER + this.$route.query.url;
+            this.editorConfig.editorConfig.mode = this.$route.query.mode;
             this.editorConfig.editorConfig.callbackUrl = "http://mbs.scdayou.com/api/onlyoffice/callback?originPath=/opt"+this.$route.query.url;
             const lastIndex = this.$route.query.title.lastIndexOf('.');
             this.editorConfig.document.fileType = lastIndex !== -1 ? this.$route.query.title.substring(lastIndex + 1) : null;

+ 60 - 19
src/views/major/detail.vue

@@ -1112,6 +1112,23 @@
                       </el-col>
                    
                   </el-row>
+                  <el-row class="row-style">
+                    <el-col :xs="24" :sm="12" :lg="8" :span="6">
+                      <el-form-item label="产品初稿:" label-width="120px" class="postInfo-container-item">
+                        <span v-for="file in props.row.filePathList" :key="file.name">
+                            <el-link @click="officeFileView(file.name, file.url)">{{ file.name }}</el-link>
+                          </span>
+                      </el-form-item>
+                    </el-col>
+
+                    <el-col :xs="24" :sm="12" :lg="8" :span="6">
+                      <el-form-item label="产品审核稿:" label-width="140px" class="postInfo-container-item">
+                        <span  v-for="file in props.row.filePathList1" :key="file.name">
+                            <el-link @click="officeFileView(file.name, file.url)">{{ file.name }}</el-link>
+                          </span>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
                 </div>
               </el-form>
             </template>
@@ -2592,7 +2609,6 @@
           terminal:false,
           description:null
         },
-        doUpload:false,
         productionFinance: [],
         qrCodeUrl:null
       }
@@ -2602,7 +2618,6 @@
         this.showBtn = this.$route.query.showBtn ==='true';
         this.couldBack = this.$route.query.couldBack ==='true';
         this.reportNo = this.$route.query.reportNo;
-        this.production = this.$route.query.pt;
         this.statementNo = this.$route.query.statementNo;
         this.saveOrderBtn = this.$route.query.saveOrderBtn;
         this.majorId = this.$route.query.id;
@@ -2632,7 +2647,7 @@
           this.getWorkflowLogs();
         }
         if (this.activeTagName === 'producution'){
-          this.getProductions(this.majorId,(this.reportNo==null?this.statementNo:this.reportNo));
+          this.getProductions(this.majorId,this.statementNo,this.reportNo);
         }
         if (this.activeTagName === 'quality'){
           this.getPerformance(this.majorId,(this.reportNo==null?this.statementNo:this.reportNo));
@@ -2666,7 +2681,7 @@
         }
         if (tab.name === 'producution'){
           this.getLandTargetList();
-          this.getProductions(this.majorId,(this.reportNo==null?this.statementNo:this.reportNo));
+          this.getProductions(this.majorId,this.statementNo,this.reportNo);
         }
         // if (tab.name === 'performance'){
         //   if ( this.performance.allots.length==0){
@@ -2834,18 +2849,12 @@
          if (this.majorId){
             const obj = new Object();
             obj.majorId = this.majorId;
-            obj.statementNo =this.statementNo;
-            if (!this.production){
+            if (this.statementNo){
+              obj.statementNo =this.statementNo;
+            }
+            if (this.reportNo ){
               if (this.feedback.production.includes("REPORT")){
-                obj.reportNo = this.reportNo;
-              }else{
-                obj.letterNo = this.reportNo;
-              }
-            }else{
-              if (this.production === 'STATEMENT'){
-                obj.statementNo = this.reportNo;
-              } else if (this.production === 'REPORT'){
-                obj.reportNo = this.reportNo;
+              obj.reportNo = this.reportNo;
               }else{
                 obj.letterNo = this.reportNo;
               }
@@ -2854,7 +2863,9 @@
             this.$api.majorTarget.list(obj).then(res=>{
               if (res.code === 200){
                   this.evaluateLandData = res.data;
-                  this.statementNo = this.evaluateLandData[0].statementNo
+                  if (this.evaluateLandData.length===1){
+                    this.statementNo = this.evaluateLandData[0].statementNo
+                  }
                   let totalAcreages = [];
                   let totalValues = this.evaluateLandData.map(item=>item.evaluateValue);
                   if (this.major.businessObjectType === '土地'){
@@ -2890,12 +2901,14 @@
           }
         })
       },
-      getProductions(majorId,reportNo){
+      getProductions(majorId,statementNo,reportNo){
+      
           if (majorId){
             let pro = {
               majorId:majorId,
               reportNo:reportNo,
-              sequence:this.currentNode.sequence
+              statementNo:statementNo,
+              sequence:this.currentNode.sequence,
             }
             this.$api.majorProduction.list(pro).then(res=>{
               if (res.code === 200 ){
@@ -3293,7 +3306,35 @@
       },
       showQrCode(url){
         this.qrCodeUrl = url;
-      } 
+      } ,
+      handleAttachmentPreview(file) {
+      // window.open(file.url)
+        this.officeFileView(file.name, file.url);
+      },
+          // 文档预览
+    officeFileView(name, url) {
+      if (name || url) {
+        const route = this.$router.resolve({
+          path: "/office/view/window",
+          query: {
+            // 文档标题
+            title: name,
+            // 文档url地址
+            url: url,
+            mode: 'view'
+          }
+        });
+        // 在新窗口打开页面
+        window.open(route.href, "_blank");
+      } else {
+        this.$notify({
+          title: '失败',
+          message: 'url为空,无法打开,如未保存请保存后再试!',
+          type: 'error',
+          duration: 2000
+        });
+      }
+    },
     },
 
   }

+ 1 - 1
src/views/major/saveFileDoneList.vue

@@ -80,7 +80,7 @@
             <span>{{ row.saveFileDate }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="操作" align="center" width="130">
+        <el-table-column label="操作" align="center" width="130" fixed="right">
           <template slot-scope="{row}">
             <el-button type="text" @click="toDetail(row)">产品详情</el-button>
           </template>

+ 2 - 1
src/views/major/todoDetail.vue

@@ -3492,7 +3492,8 @@ export default {
             // 文档标题
             title: name,
             // 文档url地址
-            url: url
+            url: url,
+            mode: 'edit'
           }
         });
         // 在新窗口打开页面

+ 35 - 4
src/views/personal/readonlyDetail.vue

@@ -797,7 +797,8 @@
               </div>
             </div>
             <el-upload style="position: relative; top: -10px; padding: 10px;"
-              :action="'/api/personalProduction/upload/' + target.id + '/1'" :file-list="statementProd.files" disabled>
+              :action="'/api/personalProduction/upload/' + target.id + '/1'" :file-list="statementProd.files" disabled 
+              :on-preview="handleAttachmentPreview">
               <el-button type="text" style="position: relative; left: 10px;top: -4px;" disabled>手动上传</el-button>
             </el-upload>
 
@@ -818,7 +819,8 @@
               </div>
             </div>
             <el-upload style="position: relative; top: -10px; padding: 10px;"
-              :action="'/api/personalProduction/upload/' + target.id + '/2'" :file-list="technicReportProd.files">
+              :action="'/api/personalProduction/upload/' + target.id + '/2'" :file-list="technicReportProd.files"
+              :on-preview="handleAttachmentPreview">
               <el-button type="text" style="position: relative; left: 10px;top: -4px;" disabled>手动上传</el-button>
             </el-upload>
           </el-card>
@@ -837,7 +839,8 @@
               </div>
             </div>
             <el-upload style="position: relative; top: -10px;padding: 10px;"
-              :action="'/api/personalProduction/upload/' + target.id + '/3'" :file-list="finalReprotProd.files">
+              :action="'/api/personalProduction/upload/' + target.id + '/3'" :file-list="finalReprotProd.files"
+              :on-preview="handleAttachmentPreview">
               <el-button type="text" style="position: relative; left: 10px;top: -4px;" disabled>手动上传</el-button>
             </el-upload>
           </el-card>
@@ -1482,7 +1485,35 @@ export default {
     },
     showQrCode(url){
       this.qrCodeUrl = url;
-    }
+    },
+    handleAttachmentPreview(file) {
+      // window.open(file.url)
+      this.officeFileView(file.name, file.url);
+    },
+    // 文档预览
+    officeFileView(name, url) {
+      if (name || url) {
+        const route = this.$router.resolve({
+          path: "/office/view/window",
+          query: {
+            // 文档标题
+            title: name,
+            // 文档url地址
+            url: url,
+            mode:'view'
+          }
+        });
+        // 在新窗口打开页面
+        window.open(route.href, "_blank");
+      } else {
+        this.$notify({
+          title: '失败',
+          message: 'url为空,无法打开,如未保存请保存后再试!',
+          type: 'error',
+          duration: 2000
+        });
+      }
+    },
   }
 }
 </script>

+ 2 - 1
src/views/personal/todoDetail.vue

@@ -2442,7 +2442,8 @@ export default {
             // 文档标题
             title: name,
             // 文档url地址
-            url: url
+            url: url,
+            mode: 'edit'
           }
         });
         // 在新窗口打开页面