Pārlūkot izejas kodu

消息提醒测试

yusheng 1 gadu atpakaļ
vecāks
revīzija
0edd4bdc57
1 mainītis faili ar 36 papildinājumiem un 6 dzēšanām
  1. 36 6
      src/views/saleManage/saleOrder/index.vue

+ 36 - 6
src/views/saleManage/saleOrder/index.vue

@@ -310,7 +310,8 @@
       drawer,
       exceptionList,
       addInvoiceManage,
-      palletManagement,exportButton,
+      palletManagement,
+      exportButton,
       importDialog
     },
     //客户管理数据
@@ -341,7 +342,7 @@
         loading: false, // 加载状态
         processSubmitDialogFlag: false, // 加载状态
         addOrEditDialogFlag1: false,
-        params:{},
+        params: {},
         columns: [
           {
             width: 45,
@@ -368,6 +369,16 @@
             minWidth: 200,
             fixed: 'left'
           },
+          {
+            prop: 'preOrderNo',
+            label: '预销售订单编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            sortable: true,
+            minWidth: 200,
+            fixed: 'left'
+          },
+
           {
             prop: 'progress',
             label: '订单进度',
@@ -524,6 +535,25 @@
     computed: {},
     created() {
       this.requestDict('客户状态');
+      if (!('Notification' in window)) {
+        console.log('此浏览器不支持桌面通知');
+      } else if (Notification.permission === 'granted') {
+        // 如果用户已经授权,直接创建通知
+        var notification = new Notification('标题', {
+          body: '这是通知的内容。'
+        });
+      } else if (Notification.permission !== 'denied') {
+        // 请求权限
+        Notification.requestPermission().then(function (permission) {
+          if (permission === 'granted') {
+          }
+        });
+      }
+      setInterval(() => {
+        var notification = new Notification('标题', {
+          body: '消息提醒1'
+        });
+      }, 2000);
     },
     methods: {
       //更多菜单
@@ -557,11 +587,11 @@
         if (this.contactData.id) {
           where['contactId'] = this.contactData.id;
         }
-        this.params={
+        this.params = {
           pageNum: page,
           size: limit,
           ...where
-        }
+        };
         return getTableList(this.params);
       },
 
@@ -648,8 +678,8 @@
         this.$refs.importDialogRef.open();
       },
       exportFn() {
-        console.log(this.params)
-        exportSaleorder(this.params)
+        console.log(this.params);
+        exportSaleorder(this.params);
       }
     }
   };