杜迪迪 3 months ago
parent
commit
b7be3a5ed5

BIN
src/assets/images/none.png


+ 12 - 0
src/views/flows/fwsp.vue

@@ -235,6 +235,8 @@
 import { getFwYbjInfo } from "@/api/liucheng";
 import { getFwYbjInfo } from "@/api/liucheng";
 import { ElMessage } from "element-plus";
 import { ElMessage } from "element-plus";
 import { useDict } from "@/utils/dict";
 import { useDict } from "@/utils/dict";
+import print from "print-js";
+
 export default {
 export default {
   // directives: {
   // directives: {
   //   htmlToPaper: VueHtmlToPaper,
   //   htmlToPaper: VueHtmlToPaper,
@@ -299,6 +301,16 @@ export default {
       //   }
       //   }
       // });
       // });
     },
     },
+    printY() {
+      setTimeout(function () {
+        print({
+          printable: "printContent", //打印区域id
+          type: "html", //打印类型是html
+          scanStyles: false,
+          targetStyles: ["*"],
+        });
+      }, 500);
+    },
   },
   },
 };
 };
 </script>
 </script>

+ 10 - 1
src/views/liucheng/todowork/formView/Received.vue

@@ -470,7 +470,10 @@
                 @click="openYbj"
                 @click="openYbj"
                 >预览</el-button
                 >预览</el-button
               > -->
               > -->
-              <el-button v-print="print" plain type="primary">打印</el-button>
+              <!-- v-print="print" -->
+              <el-button @click="printHtml" plain type="primary"
+                >打印</el-button
+              >
               <el-row :gutter="24">
               <el-row :gutter="24">
                 <el-col :span="6"></el-col>
                 <el-col :span="6"></el-col>
                 <el-col :span="12">
                 <el-col :span="12">
@@ -621,6 +624,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
 import { getJToken, getToken } from "@/utils/auth";
 import { getJToken, getToken } from "@/utils/auth";
 import { getInfo } from "@/api/login";
 import { getInfo } from "@/api/login";
 import { listType } from "@/api/archive/type";
 import { listType } from "@/api/archive/type";
+import print from "print-js";
 
 
 const { proxy } = getCurrentInstance();
 const { proxy } = getCurrentInstance();
 
 
@@ -743,6 +747,11 @@ function confirmEvent(item, index) {
     outMessageParams.value.messageFileList.splice(index, 1);
     outMessageParams.value.messageFileList.splice(index, 1);
   });
   });
 }
 }
+function printHtml() {
+  setTimeout(() => {
+    proxy.$refs.dispatchRef.printY();
+  }, 500);
+}
 //删除附件
 //删除附件
 function delFile(item, index) {}
 function delFile(item, index) {}
 function closeDialog(done) {
 function closeDialog(done) {

+ 16 - 0
src/views/official/components/Received.vue

@@ -40,6 +40,21 @@
                 >打开本地文档
                 >打开本地文档
               </el-button>
               </el-button>
             </el-form-item>
             </el-form-item>
+            <el-form-item label="紧急程度:" prop="emergencyDegree">
+              <el-select
+                :disabled="isEdit"
+                style="width: 19vw"
+                v-model="outMessageParams.emergencyDegree"
+                placeholder="请输入紧急程度"
+              >
+                <el-option
+                  v-for="dict of urgent_type"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                />
+              </el-select>
+            </el-form-item>
             <el-form-item label="发文单位:" prop="outUnit">
             <el-form-item label="发文单位:" prop="outUnit">
               <el-input
               <el-input
                 v-model="outMessageParams.outUnit"
                 v-model="outMessageParams.outUnit"
@@ -277,6 +292,7 @@ import {
   deptTreeSelect,
   deptTreeSelect,
 } from "@/api/system/user";
 } from "@/api/system/user";
 const { fw_unit } = proxy.useDict("fw_unit");
 const { fw_unit } = proxy.useDict("fw_unit");
+const { urgent_type } = proxy.useDict("urgent_type");
 const { receive_type } = proxy.useDict("receive_type");
 const { receive_type } = proxy.useDict("receive_type");
 const { sw_open_type } = proxy.useDict("sw_open_type");
 const { sw_open_type } = proxy.useDict("sw_open_type");
 const { no_open_reason } = proxy.useDict("no_open_reason");
 const { no_open_reason } = proxy.useDict("no_open_reason");

+ 17 - 4
src/views/official/components/swViewPdf.vue

@@ -26,16 +26,28 @@
     </div>
     </div>
     <div class="app-container" style="margin-top: -45px">
     <div class="app-container" style="margin-top: -45px">
       <el-row :gutter="20" style="min-height: 82vh; max-height: 90vh">
       <el-row :gutter="20" style="min-height: 82vh; max-height: 90vh">
-        <el-col
-          :span="18"
-          style="background-color: #9ca1a7; margin-top: 10px; padding: 20px"
-        >
+        <el-col :span="18">
           <iframe
           <iframe
+            v-if="iframeSrc"
             style="overflow: scroll; width: 100%; height: 100%"
             style="overflow: scroll; width: 100%; height: 100%"
             :src="iframeSrc"
             :src="iframeSrc"
             ref="iframeRef"
             ref="iframeRef"
           >
           >
           </iframe>
           </iframe>
+          <div
+            style="
+              border: 1px solid #eee;
+              height: 100%;
+              padding-top: 20vh;
+              background-color: #f5f7fa;
+            "
+            v-else
+          >
+            <el-empty
+              description='请单击右侧"上传正文"按钮上传文件'
+              :image="emptyImage"
+            />
+          </div>
         </el-col>
         </el-col>
         <el-col :span="3">
         <el-col :span="3">
           <el-form
           <el-form
@@ -276,6 +288,7 @@ import { onMounted, reactive, ref } from "vue";
 import { saveReceived } from "@/api/office/received";
 import { saveReceived } from "@/api/office/received";
 import { useRoute, useRouter } from "vue-router";
 import { useRoute, useRouter } from "vue-router";
 import { ElMessage } from "element-plus";
 import { ElMessage } from "element-plus";
+import emptyImage from "@/assets/images/none.png";
 const { lw_unit } = proxy.useDict("lw_unit");
 const { lw_unit } = proxy.useDict("lw_unit");
 const { sw_open_type } = proxy.useDict("sw_open_type");
 const { sw_open_type } = proxy.useDict("sw_open_type");
 import { Base64 } from "js-base64";
 import { Base64 } from "js-base64";