Parcourir la source

提交尝试线上调试

Lijy il y a 2 ans
Parent
commit
023bd7c097

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

@@ -593,11 +593,9 @@
                         <el-form-item label="图片上传" v-if="user.companyId == '7' || user.companyId == '10'">
                             <div class="photos">
                                 <div class="photos_img" v-for="(p, ip) in domain.pics" :key="ip">
-                                    <el-image
+                                    <img
                                         style="width: 120px; height: 120px; margin-right:10px;"
-                                        :src="p" 
-                                        :preview-src-list="domain.pics">
-                                    </el-image>
+                                        :src="p" />
                                 </div>
                                 <div @click="addImg(index)" class="photos_img">
                                     <img src="../../assets/image/aacbc.png" />
@@ -2123,48 +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('https://img-s-msn-com.akamaized.net/tenant/amp/entityid/AAOEcdM.img')
-                // 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, '数据')
-                                }
-                            });
-                        }
-                    }
-                })
-                cosno
+                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);