Browse Source

任务状态判断参数修改, 下载接口

liuYb 4 years ago
parent
commit
836dac5f51
2 changed files with 22 additions and 24 deletions
  1. 16 20
      src/views/data/InforList.vue
  2. 6 4
      src/views/data/components/InfoListItemDetail.vue

+ 16 - 20
src/views/data/InforList.vue

@@ -78,14 +78,21 @@
                 </td>
                 <td>{{ obj.download > 0 ? "已下载" : "未下载" }}</td>
                 <td>
-                  <span
+                  <!-- <span
                     @click="waitToReport(obj.report, index)"
                     :class="showItemOperation"
                     class="reportStyle"
                     >待办</span
-                  >
+                  > -->
                   <!--  :class="{ reportStyle: obj.report == 0 ? true : false }" -->
-                  <span :class="!showItemOperation">已完成</span>
+                  <!-- <span :class="!showItemOperation">已完成</span> -->
+                  <span
+                    @click="waitToReport(obj.report, index)"
+                    :class="{showItemOperationStyle: obj.report == 1 ? true : false}"
+                    class="reportStyle"
+                    >待办</span
+                  >
+                  <span :class="{showItemOperationStyle: obj.report == 0 ? true : false}">已完成</span>
                 </td>
 
                 <td v-if="operation" :style="trStyle" class="operationStyle">
@@ -226,26 +233,15 @@ export default {
       return this.$route.query && this.$route.query.tag ? true : false;
     },
     showItemOperation: function () {
-      let now = new Date().getTime();
-
-    /*   if (!this.localReport) {
+      console.log(this.localReport)
+      if (!this.localReport) {
         console.log(this.localReport);
         return { showItemOperationStyle: false };
       } else {
         return { showItemOperationStyle: true };
-        if (!this.endDate) {
-          console.log("超出反馈时间");
-          return { showItemOperationStyle: true };
-        } else {
-          let end = Date.parse(new Date(this.endDate));
-          if (now > end) {
-            return { showItemOperationStyle: true };
-          } else {
-            return { showItemOperationStyle: false };
-          }
-        }
-      } */
-      if (!this.endDate) {
+      }
+     /*  let now = new Date().getTime();
+     if (!this.endDate) {
         console.log("超出反馈时间", this.endDate);
         return { showItemOperationStyle: true };
       } else {
@@ -255,7 +251,7 @@ export default {
         } else {
           return { showItemOperationStyle: false };
         }
-      }
+      } */
     },
   },
   methods: {

+ 6 - 4
src/views/data/components/InfoListItemDetail.vue

@@ -57,7 +57,8 @@
         <div class="filesStyle multiDetail">
           <span>附件:</span>
           <div class="filesName">
-            <p style="cursor:pointer"
+            <p
+              style="cursor: pointer"
               v-for="(item, index) in fileData"
               :key="index"
               @click="downloadFile(index)"
@@ -72,7 +73,7 @@
 </template>
 
 <script>
-import { env_url } from "../../../config/env"
+import { env_url } from "../../../config/env";
 
 export default {
   props: {
@@ -132,12 +133,13 @@ export default {
   methods: {
     // 下载附件
     downloadFile: function (index) {
-      let config =
+      /* let config =
         "informationId=" +
         this.fileData[index].informationId +
         "&" +
         "fileId=" +
-        this.fileData[index].id;
+        this.fileData[index].id; */
+      let config = "fileId=" + this.fileData[index].id;
       let url = this.onlineUrl + "/dealerDownload?" + config;
       console.log("下载附件:", config, url);
       window.open(url);