Browse Source

Merge branch 'iterationApp' into dev

lex 3 years ago
parent
commit
56a3821fbf

+ 1 - 0
src/views/message/ApprovalAction.vue

@@ -968,6 +968,7 @@ export default {
     },
     },
     async popupSubmit() {
     async popupSubmit() {
       // 判断是否评论
       // 判断是否评论
+      console.log("111", this.showMarksType);
       if (this.showMarksType === "commit") {
       if (this.showMarksType === "commit") {
         if (!this.remarks) {
         if (!this.remarks) {
           return this.$toast("请输入评论内容");
           return this.$toast("请输入评论内容");

+ 10 - 0
src/views/message/api.js

@@ -195,3 +195,13 @@ export function queryCountOfUnread() {
     method: "get",
     method: "get",
   });
   });
 }
 }
+
+// 添加评论
+export function orderComment(data) {
+  return request({
+    baseURL: "/api-oa",
+    url: "/api/v1/work-order/comment",
+    method: "post",
+    data,
+  });
+}

+ 21 - 10
src/views/message/modal/filePreview.vue

@@ -12,14 +12,19 @@
               class="van-icon van-icon-description van-uploader__file-icon"
               class="van-icon van-icon-description van-uploader__file-icon"
             ></i>
             ></i>
             <span
             <span
-              style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width: 1.8rem;"
+              style="
+                white-space: nowrap;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                width: 1.8rem;
+              "
               >{{ item.name || item.url }}</span
               >{{ item.name || item.url }}</span
             >
             >
           </div>
           </div>
           <div class="preview_btn">
           <div class="preview_btn">
-            <van-button @click="downLoadFile2(item.url)" type="info" size="mini"
+            <!-- <van-button @click="downLoadFile2(item.url)" type="info" size="mini"
               >下载</van-button
               >下载</van-button
-            >
+            > -->
             <van-button
             <van-button
               :disabled="!checkFileSuffix(item.url)"
               :disabled="!checkFileSuffix(item.url)"
               v-if="checkFileSuffix(item.url)"
               v-if="checkFileSuffix(item.url)"
@@ -33,17 +38,22 @@
       </template>
       </template>
     </van-field>
     </van-field>
 
 
-    <van-popup position="bottom" v-model="filePreview" style="height: 100%;">
+    <van-popup position="bottom" v-model="filePreview" style="height: 100%">
       <van-sticky>
       <van-sticky>
-        <m-header :backUrl="backUrl" :isFixed="false" name="预览" />
+        <m-header
+          :backUrl="backUrl"
+          :isFixed="false"
+          :appHide="true"
+          name="预览"
+        />
       </van-sticky>
       </van-sticky>
       <div
       <div
         id="previewIframe"
         id="previewIframe"
-        style="height: calc(100vh - 0.44rem);"
+        style="height: calc(100vh - 0.44rem)"
         v-if="filePreview && (fileType == 'xls' || fileType == 'pdf')"
         v-if="filePreview && (fileType == 'xls' || fileType == 'pdf')"
       ></div>
       ></div>
       <div
       <div
-        style="height: calc(100vh - 0.44rem);"
+        style="height: calc(100vh - 0.44rem)"
         v-if="filePreview && fileType == 'doc'"
         v-if="filePreview && fileType == 'doc'"
       ></div>
       ></div>
     </van-popup>
     </van-popup>
@@ -51,7 +61,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import MHeader from "@/components/MHeader";
+import MHeader from "@/components/header";
 import { browser } from "@/common/util";
 import { browser } from "@/common/util";
 import { postMessage } from "@/helpers/native-message";
 import { postMessage } from "@/helpers/native-message";
 export default {
 export default {
@@ -104,6 +114,7 @@ export default {
         message: "下载中...",
         message: "下载中...",
       });
       });
       if (browser().isApp) {
       if (browser().isApp) {
+        this.$toast.clear();
         postMessage(
         postMessage(
           { api: "downloadFile", content: { downloadUrl: file } },
           { api: "downloadFile", content: { downloadUrl: file } },
           () => {
           () => {
@@ -149,11 +160,11 @@ export default {
               encodeURIComponent(file);
               encodeURIComponent(file);
           }
           }
           if (iframe.attachEvent) {
           if (iframe.attachEvent) {
-            iframe.attachEvent("onload", function() {
+            iframe.attachEvent("onload", function () {
               _this.$toast.clear();
               _this.$toast.clear();
             });
             });
           } else {
           } else {
-            iframe.onload = function() {
+            iframe.onload = function () {
               _this.$toast.clear();
               _this.$toast.clear();
 
 
               // setTimeout(() => {
               // setTimeout(() => {