sunyanqiang пре 2 година
родитељ
комит
e717c33c46
2 измењених фајлова са 28 додато и 34 уклоњено
  1. 12 10
      src/views/peopleChuRu/bdglLeave/index.vue
  2. 16 24
      src/views/regulations/fileinfo/index11.vue

+ 12 - 10
src/views/peopleChuRu/bdglLeave/index.vue

@@ -543,8 +543,7 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="四级审批人" prop="peopleId4">
-          <!-- <el-input v-model="form.peopleId4" placeholder="请输入四级审批人" /> -->
+        <el-form-item label="四级审批人" prop="peopleId4" style="display: none;">
           <el-select
             v-model="form.peopleId4"
             filterable
@@ -570,7 +569,7 @@
             placeholder="请输入请假人员"
             ref="headerSearchSelect"
             multiple
-            class="ren_yuan"
+            class="ren_yuans"
             filterable
           >
             <el-option
@@ -753,7 +752,7 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="四级审批人" prop="peopleId4">
+        <el-form-item label="四级审批人" prop="peopleId4"  style="display: none;">
           <!-- <el-input v-model="form.peopleId4" placeholder="请输入四级审批人" /> -->
           <el-select
             v-model="form.peopleId4"
@@ -782,7 +781,7 @@
             ref="headerSearchSelect"
             :disabled="xiugai"
             multiple
-            class="ren_yuan"
+            class="ren_yuans"
           >
             <el-option
               v-for="(item, i) in renYuan"
@@ -970,7 +969,7 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="四级审批人" prop="peopleId4">
+        <el-form-item label="四级审批人" prop="peopleId4"  style="display: none;">
           <!-- <el-input v-model="form.peopleId4" placeholder="请输入四级审批人" /> -->
           <el-select
             v-model="form.peopleId4"
@@ -999,7 +998,7 @@
             ref="headerSearchSelect"
             disabled
             multiple
-            class="ren_yuan"
+            class="ren_yuans"
           >
             <el-option
               v-for="(item, i) in renYuan"
@@ -1182,7 +1181,7 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="四级审批人" prop="peopleId4">
+        <el-form-item label="四级审批人" prop="peopleId4"  style="display: none;">
           <el-select
             v-model="form.peopleId4"
             filterable
@@ -1208,7 +1207,7 @@
             ref="headerSearchSelect"
             disabled
             multiple
-            class="ren_yuan"
+            class="ren_yuans"
           >
             <el-option
               v-for="(item, i) in renYuan"
@@ -1422,7 +1421,7 @@
             ref="headerSearchSelect"
             disabled
             multiple
-            class="ren_yuan"
+            class="ren_yuans"
           >
             <el-option
               v-for="(item, i) in renYuan"
@@ -2367,4 +2366,7 @@ export default {
 ::v-deep .el-select__input{
   color:#fff
 }
+.ren_yuans{
+  width: 820px !important;
+}
 </style>

+ 16 - 24
src/views/regulations/fileinfo/a.vue → src/views/regulations/fileinfo/index11.vue

@@ -519,7 +519,8 @@
           class="el-dialog__header"
           :close-on-click-modal="false"
         >
-          <div ref="file"></div>
+          <!-- <div ref="file"></div> -->
+          <iframe :src="imgVisbleURL" frameborder="0" width="100%" height="700%"></iframe>
           <div slot="footer" class="dialog-footer">
             <el-button type="primary" @click="open33 = false">关 闭</el-button>
             <!-- <el-button type="primary" @click="open33 = false">
@@ -751,6 +752,7 @@
         // 点击右侧一级分类进去
         Ids: null,
         last: null,
+        imgVisbleURL:null
       };
     },
   
@@ -940,11 +942,6 @@
         this.queryParams.pageNum = 1,
           this.handleCurrentChangess()
         }
-        // if (row.subclassification == 0) {
-        //   this.parentId = "";
-        //   return;
-        // }
-        // this.queryParams1.pageNum=1;
         // 目录
         listDirectoryinfo({
           parentId: this.parentId,
@@ -1051,16 +1048,6 @@
       submitForm() {
         this.$refs["form"].validate((valid) => {
           if (valid) {
-            // 文件名
-            // this.form.fileName = this.form.file[0].name;
-            // // 路径
-            // this.form.parentDirName = this.form.file[0].url;
-            // // 后缀
-            // this.form.parentDirId = this.form.file[0].houZUI;
-            // // 页数
-            // this.form.theNumberPages = this.form.file[0].pageCount;
-            // // 文件大小
-            // this.form.fileSize = this.form.file[0].fileLength;
             // // 目录名称
             this.form.directoryName = this.form.subclassification;
             this.form.bdglFileInfos = this.moreFile;
@@ -1209,16 +1196,21 @@
       // 阅读按钮操作
       ViewRead(row) {
         if (row.parentDirId == ".docx" || row.parentDirId == ".doc") {
+          // let ext =row.substr(index)
+           let  pdfurl = process.env.VUE_APP_BASE_API + row.parentDirName;
+           let url =+ encodeURIComponent(pdfurl)
+           console.log(url);
+          this.imgVisbleURL=`https://view.officeapps.live.com/op/view.aspx?src=${url}`
           this.open33 = true;
-          axios({
-            method: "get",
-            responseType: "blob", // 设置响应文件格式
-            url: process.env.VUE_APP_BASE_API + row.parentDirName,
-          }).then(({ data }) => {
-            $(".docx").attr("id", "printArea");
+          // axios({
+          //   method: "get",
+          //   responseType: "blob", // 设置响应文件格式
+          //   url: process.env.VUE_APP_BASE_API + row.parentDirName,
+          // }).then(({ data }) => {
+          //   $(".docx").attr("id", "printArea");
   
-            docx.renderAsync(data, this.$refs.file); // 渲染到页面预览
-          });
+          //   docx.renderAsync(data, this.$refs.file); // 渲染到页面预览
+          // });
         } else if (row.parentDirId == ".pdf") {
           this.previewDialog = true;
           this.pdfurl = process.env.VUE_APP_BASE_API + row.parentDirName;