Przeglądaj źródła

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

zengyf 2 lat temu
rodzic
commit
d8b2c1e6ce

+ 21 - 12
src/components/main.vue

@@ -665,7 +665,11 @@
     </el-dialog>
 
     <!--通知弹窗-->
-    <el-dialog :visible.sync="centerDialogVisible">
+    <el-dialog 
+    :visible.sync="centerDialogVisible"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    :show-close="false">
       <div style="margin-left: 30px; font-size: 20px">
         <h1>{{ noticedata1.noticetitle }}</h1>
       </div>
@@ -2691,17 +2695,22 @@ export default {
             } else {
               console.log('进入了标记不为0')
               this.badgeshow = false
-              // if(this.$store.state.index==1){
-              //   let data={
-              //     noticetitle:this.noticedata[0].noticetitle,
-              //     noticecontent:this.noticedata[0].noticecontent,
-              //     insertusername:this.noticedata[0].insertusername,
-              //     inserttime:this.noticedata[0].inserttime,
-              //     noticeid:this.noticedata[0].noticeId
-              //   }
-              //   this.noticedata1=data
-              //   this.centerDialogVisible=true;
-              // }
+               let data={
+                  noticetitle:this.noticedata[0].noticetitle,
+                  noticecontent:this.noticedata[0].noticecontent,
+                  insertusername:this.noticedata[0].insertusername,
+                  inserttime:this.noticedata[0].inserttime,
+                  noticeid:this.noticedata[0].noticeId
+                }
+              //判断是否需要弹窗,右边的注释用于控制时间间隔 || window.top.localStorage.getItem("noticeTime")==null || new Date().getTime() - window.top.localStorage.getItem("noticeTime") > 1000*10
+              if(window.top.localStorage.getItem("noticeId")!=data.noticeid){
+                this.noticedata1=data;
+                this.centerDialogVisible=true;
+                window.top.localStorage.setItem('noticeId', data.noticeid)
+                // window.top.localStorage.setItem('noticeTime', new Date().getTime())
+              }else{
+                console.log("暂无新的通知,不展示");
+              }
             }
           } else {
             console.log('进入了标记值为null的值')

+ 2 - 0
src/views/index/components/login.vue

@@ -219,6 +219,8 @@ export default {
                     )
                   }
                 }
+                //清空通知id
+                 window.top.localStorage.setItem('noticeId', null)
               } else {
                 //  登录失败
                 // 提示

+ 24 - 2
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckStatementNew.vue

@@ -70,6 +70,9 @@
       :visible.sync="isShowDetails"
       style="height:600px;width:100%"
       >
+      <div>
+        <el-button icon="el-download" type="primary" @click="exportExcel('详单信息')">导出Excel</el-button>
+      </div>
        <div class="table1">
             <el-table
               :data="visibleList1"
@@ -78,7 +81,7 @@
               border
               style="width: 100%; margin-top: 20px"
               :height="350"
-              id="salesLogisticsStat_saleSteelReports_table"
+              id="details"
               individual-panel
             >
             <el-table-column
@@ -86,7 +89,6 @@
                 label="序号"
                 align="center"
                 :resizable="false"
-                fixed="left"
               >
                 <template slot-scope="scope">{{
                   scope.row.group + 1
@@ -248,6 +250,7 @@
 <script>
 import { getCookie } from '@/utils/util.js'
 import { sjTime } from '@/utils/sharedJsFile'
+import FileSaver from "file-saver";
 export default {
   data(){
     return{
@@ -355,6 +358,25 @@ export default {
           this.getSpanArr1(this.visibleList1);
       })
     },
+    exportExcel(tableTitle){
+      let tables = document.getElementById("details");//此处是拿表格document元素,也可以取父div的ref
+        let table_book = XLSX.utils.table_to_book(tables);
+        console.log("table_book",table_book);
+        var table_write = XLSX.write(table_book, {
+            bookType: "xlsx",
+            bookSST: true,
+            type: "array"
+        });
+        try {
+            FileSaver.saveAs(
+                new Blob([table_write], { type: "application/octet-stream" }),
+                tableTitle+".xlsx"
+            );
+        } catch (e) {
+            if (typeof console !== "undefined") console.log(e, table_write);
+        }
+        return table_write;
+    },
     deleteStatement(row){
       this.$confirm('此操作将永久删除该账单, 是否继续?', '提示',{
         confirmButtonText: '确定',

+ 3 - 6
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -1637,9 +1637,6 @@ export default {
   created() {
     this.orgCode=getCookie('orgCode');
     this.userId=getCookie('userId');
-     this.noticeInterval=setInterval(() => {
-        this.getinformation();
-    }, 1000*10);
     if (this.orgCodeList.includes(getCookie('orgCode'))) {
       this.isShowOperate = true
     }
@@ -1662,9 +1659,9 @@ export default {
         'select',
         'exceptionHandle'
       ]
-      // this.noticeInterval=setInterval(() => {
-      //   this.getinformation();
-      // }, 1000*1);
+      this.noticeInterval=setInterval(() => {
+        this.getinformation();
+      }, 1000*10);
     }
     //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
     this.updateCapacityDebounce = this.debounce(() => {