瀏覽代碼

提交尝试线上调试

Lijy 2 年之前
父節點
當前提交
525a2296dc
共有 1 個文件被更改,包括 41 次插入41 次删除
  1. 41 41
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

+ 41 - 41
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -2121,47 +2121,47 @@
             // 图片上传
             addImg(index) {
                 var that = this;
-                if (that.workForm.domains[index].pics == null) {
-                    that.workForm.domains[index].pics = [];
-                    that.workForm.domains[index].iospics = [];
-                }
-                that.workForm.domains[index].pics.push('wxLocalResource://imageidQzpcVXNlcnNcTEpZXERlc2t0b3Bc5oG25pCe5Zu+54mHXGhwLmpwZw==')
-                console.log(that.workForm.domains)
-                // wx.chooseImage({
-                //     count: 3, // 默认9
-                //     sizeType: ['compressed'],
-                //     sourceType: ['album'],
-                //     defaultCameraMode: "batch",
-                //     success: function (res) {
-                //         console.log(res, '数据')
-                //         var localIds = res.localIds;
-                //         if (that.workForm.domains[index].pics == null) {
-                //             that.workForm.domains[index].pics = [];
-                //             that.workForm.domains[index].iospics = [];
-                //         }
-                //         if (that.user.companyId == 7) {
-                //             that.workForm.domains[index].pics = that.workForm.domains[index].pics.concat(localIds); 
-                //         } else {
-                //             that.workForm.domains[index].pics = localIds;
-                //         }
-                //         that.$forceUpdate(); 
-                //         if (that.workForm.domains[index].serverPics == null) {
-                //             that.workForm.domains[index].serverPics = [];
-                //         }
-                //         for (var i=0;i<localIds.length; i++) {
-                //             wx.uploadImage({
-                //                 localId: localIds[i], // 需要上传的图片的本地ID,由chooseImage接口获得
-                //                 isShowProgressTips: 1, // 默认为1,显示进度提示
-                //                 success: function (res) {
-                //                     var serverId = res.serverId; // 返回图片的服务器端ID
-                //                     that.workForm.domains[index].serverPics.push(serverId);
-
-                //                     console.log(that.workForm.domains, '数据')
-                //                 }
-                //             });
-                //         }
-                //     }
-                // })
+                // if (that.workForm.domains[index].pics == null) {
+                //     that.workForm.domains[index].pics = [];
+                //     that.workForm.domains[index].iospics = [];
+                // }
+                // that.workForm.domains[index].pics.push('wxLocalResource://imageidQzpcVXNlcnNcTEpZXERlc2t0b3Bc5oG25pCe5Zu+54mHXGhwLmpwZw==')
+                // console.log(that.workForm.domains)
+                wx.chooseImage({
+                    count: 3, // 默认9
+                    sizeType: ['compressed'],
+                    sourceType: ['album'],
+                    defaultCameraMode: "batch",
+                    success: function (res) {
+                        console.log(res, '数据')
+                        var localIds = res.localIds;
+                        if (that.workForm.domains[index].pics == null) {
+                            that.workForm.domains[index].pics = [];
+                            that.workForm.domains[index].iospics = [];
+                        }
+                        if (that.user.companyId == 7) {
+                            that.workForm.domains[index].pics = that.workForm.domains[index].pics.concat(localIds); 
+                        } else {
+                            that.workForm.domains[index].pics = localIds;
+                        }
+                        that.$forceUpdate(); 
+                        if (that.workForm.domains[index].serverPics == null) {
+                            that.workForm.domains[index].serverPics = [];
+                        }
+                        for (var i=0;i<localIds.length; i++) {
+                            wx.uploadImage({
+                                localId: localIds[i], // 需要上传的图片的本地ID,由chooseImage接口获得
+                                isShowProgressTips: 1, // 默认为1,显示进度提示
+                                success: function (res) {
+                                    var serverId = res.serverId; // 返回图片的服务器端ID
+                                    that.workForm.domains[index].serverPics.push(serverId);
+
+                                    console.log(that.workForm.domains, '数据')
+                                }
+                            });
+                        }
+                    }
+                })
             },
             test(){
                 console.log('test',this.workForm.domains);