ZaiZai 1 år sedan
förälder
incheckning
6e3e9510d1

+ 1 - 1
core/api.js

@@ -10,6 +10,6 @@ var api = {
 	},
 	api:"http://114.117.240.184:88/",	//奉建路
 	//api:"http://www.hcxxy.com",		//官方
-    //api:"http://192.168.0.113",		//本地打包
+    //api:"http://192.168.0.116",		//本地打包
 };
 module.exports = api;

+ 3 - 4
manifest.json

@@ -2,8 +2,8 @@
     "name" : "工程档案系统",
     "appid" : "__UNI__0EF1366",
     "description" : "奉建工程系统",
-    "versionName" : "1.3.5",
-    "versionCode" : 135,
+    "versionName" : "1.3.6",
+    "versionCode" : 136,
     "transformPx" : false,
     "networkTimeout" : {
         "request" : 600000 //十分钟请求超时
@@ -153,8 +153,7 @@
                 //解决跨域请求报错
                 "/api" : {
                     "target" : "http://114.117.240.184:88/", //奉建路
-
-                    //"target" : "http://192.168.0.113/", //测试
+                    //"target" : "http://192.168.0.116/", //测试
                     "changeOrigin" : true, //是否跨域
                     "secure" : false, // 设置支持https协议的代理
                     "pathRewrite" : {

+ 4 - 1
pages.json

@@ -679,7 +679,10 @@
         },
         {
             "path": "pages/view/preview/preview",
-            "style": {}
+            "style": {
+                "navigationBarTitleText": "预览PDF",
+                "navigationStyle": "default"
+            }
         }
     ],
     "globalStyle": {

+ 26 - 14
pages/qualityInspection_fj/addInspection.vue

@@ -95,16 +95,18 @@
                 </uni-forms-item>
                 <uni-forms-item label="上传照片" required name="images">
                     <view class="hc-form-up-img-box">
-                        <block v-for="(item, index) in photoImages" :key="index">
-                            <view class="bg-img" @click="viewImage(index)">
-                                <image :src="item" mode="aspectFill"/>
-                                <view class="cu-tag bg-red" @click.stop="delImg(index)">
-                                    <text class='cuIcon-close'/>
+                        <view class="hc-form-img-box">
+                            <block v-for="(item, index) in photoImages" :key="index">
+                                <view class="bg-img" @click="viewImage(index)">
+                                    <image :src="item" mode="aspectFill"/>
+                                    <view class="cu-tag bg-red" @click.stop="delImg(index)">
+                                        <text class='cuIcon-close'/>
+                                    </view>
                                 </view>
+                            </block>
+                            <view class="solids-add" @click="chooseImageTap">
+                                <text class='cuIcon-add'/>
                             </view>
-                        </block>
-                        <view class="solids-add" @click="chooseImageTap">
-                            <text class='cuIcon-add'/>
                         </view>
                         <view class="tip-text">支持JPG/JPEG/PNG</view>
                     </view>
@@ -416,8 +418,9 @@ export default {
         },
         //上传照片
         chooseImageTap() {
-            let photo_files = this.photoFiles, photo_images = this.photoImages;
-            uni.chooseFile({
+            const photo_files = this.photoFiles
+            const photo_images = this.photoImages
+            uni.chooseImage({
                 count: 3,
                 extension: ['.jpg', '.png', '.jpeg'],
                 success: ({tempFiles, tempFilePaths}) => {
@@ -563,11 +566,17 @@ export default {
 }
 .hc-form-up-img-box {
     position: relative;
+    .hc-form-img-box {
+        position: relative;
+        display: flex;
+        align-items: center;
+        flex-wrap: wrap;
+    }
     .bg-img {
         position: relative;
         display: inline-block;
-        height: 160rpx;
-        width: 160rpx;
+        height: 120rpx;
+        width: 120rpx;
         border: 4rpx dashed #eee;
         border-radius: 4rpx;
         image {
@@ -589,8 +598,8 @@ export default {
     }
     .solids-add {
         display: inline-flex;
-        height: 160rpx;
-        width: 160rpx;
+        height: 120rpx;
+        width: 120rpx;
         border: 4rpx dashed #eee;
         border-radius: 4rpx;
         align-items: center;
@@ -600,6 +609,9 @@ export default {
             font-size: 66px;
         }
     }
+    .bg-img + .solids-add {
+        margin-left: 10rpx;
+    }
     .tip-text {
         color: #BBBBBB;
         margin-top: 18rpx;

+ 14 - 4
pages/qualityInspection_fj/qualityInfo.vue

@@ -122,6 +122,10 @@
                 <view class="title">◆ 整改人:</view>
                 <view class="content">{{info.userName}}</view>
             </view>
+            <view class="hc-info-list-item">
+                <view class="title">◆ 工程部位:</view>
+                <view class="content">{{info.relation}}</view>
+            </view>
             <view class="hc-info-list-item">
                 <view class="title">◆ 备注:</view>
                 <view class="content">{{info.remark}}</view>
@@ -132,6 +136,7 @@
                     <text class="cuIcon-titles text-blue"/> 照片
                 </view>
             </view>
+
             <view class="hc-form-img-box">
                 <swiper v-if="info.images.length > 0" class="screen-swiper square-dot" indicator-dots circular :autoplay="false">
                     <swiper-item v-for="(item, index) in info.images" :key="index" @click="previewPicture(index)">
@@ -280,21 +285,22 @@ export default {
         },
         //预览文件
         previewFile({name, url}) {
+            const urls = encodeURIComponent(url)
             const word = ['doc', 'docx', 'pdf', 'xls', 'xlsx']
             const img = ['gif', 'jpg', 'jpeg', 'png', 'bmp', 'webp']
             const suffix = this.getFileSuffix(name)
             if(word.indexOf(suffix) !== -1) {
                 if(suffix === 'pdf') {
                     uni.navigateTo({
-                        url: "/pages/view/preview/preview?previews=" + url
+                        url: "/pages/view/preview/preview?previews=" + urls
                     })
                 } else {
-                    this.openDocFile(url, suffix)
+                    this.openDocFile(urls, suffix)
                 }
             } else if(img.indexOf(suffix) !== -1) {
                 uni.previewImage({
                     current: 1,
-                    urls: [url]
+                    urls: [urls]
                 });
             } else {
                 uni.showToast({
@@ -333,6 +339,7 @@ export default {
         bindRecheckChange(e) {
             const { id } = this.info
             const index = e.detail.value
+            // 状态,整改状态  1 整改中 2 复核中 3已办结  4已撤回(取消整改)  5已被拒  6复核完成 7记录留痕
             this.http.request("/app/qualityModifyInfo/updateStatus",{
                 id: id,
                 opCode: [3, 5][index]
@@ -392,6 +399,7 @@ export default {
             position: relative;
             padding: 20rpx;
             min-height: 66rpx;
+            overflow: hidden;
             &::after {
                 position: absolute;
                 content: '';
@@ -409,8 +417,10 @@ export default {
             .content {
                 position: relative;
                 padding-left: 255rpx;
-                white-space: break-spaces;
                 text-align: right;
+                white-space: break-spaces;
+                hyphens: auto;
+                word-wrap: break-word;
             }
         }
         .hc-form-img-box {

+ 1 - 1
pages/qualityInspection_fj/qualityInspection.vue

@@ -53,7 +53,7 @@
         </view>
         <!--底部按钮-->
         <view style="height: 174rpx;"/>
-        <view class="fixed-bottom" style="z-index: 99999;">
+        <view class="fixed-bottom" style="z-index: 9;">
             <button type="primary" @click="newRecordTap">新增记录</button>
         </view>
     </scroll-view>

+ 64 - 144
pages/view/preview/preview.vue

@@ -1,149 +1,69 @@
 <template>
-	<view>
-		<!-- 顶部 -->
-		<cu-custom bgColor="bg-blue" :isBack="true">
-			<block slot="backText">预览</block>
-			<block slot="content"></block>
-			<block slot="right">
-				<view class=" flex justify-center">
-				 	<button class="margin-top-ssm cu-btn  round bg-blue text-blue">装饰</button>
-				</view>
-			</block>
-		</cu-custom>
-		<!-- <view class="padding content" v-for="(item,index) in fileSrc "> -->
-			<!-- <image  mode="widthFix" :src="item" ></image> -->
-			<!-- <image  mode="widthFix" :src="item"  @tap="ViewImage" :data-url="fileSrc[index]"></image> -->
-		<!-- </view> -->
-		<view class="padding content">
-			<web-view :src="pdf"></web-view>
-		</view>
-		<!-- <view class=" topc text-xssl padding" @click="download()">
-			<image src="/static/task/download.png" class="menuImageTask"></image>
-		</view> -->
-	</view>
+	<web-view :src="pdf"/>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				fileSrc:[],
-				pdf:'',
-			}
-		},
-		onLoad(e) {
-			//this.findImage(e.processId);
-			if(e.previews){
-				this.getPreviews(e.previews);
-			}else if(e.preview){
-				//this.toPreview(e.preview);
-				var pdfurl=e.preview;
-				pdfurl=decodeURIComponent(pdfurl);
-				this.toPreview(pdfurl);
-			}
-			
-			
-			var height = 0; //定义动态的高度变量,如高度为定值,可以直接写
-			uni.getSystemInfo({
-				//成功获取的回调函数,返回值为系统信息
-				success: (sysinfo) => {
-					height = sysinfo.windowHeight - 32; //自行修改,自己需要的高度
-				}
-			});
-			var currentWebview = this.$scope.$getAppWebview(); //获取当前web-view
-			setTimeout(function() {
-				var wv = currentWebview.children()[0];
-				wv.setStyle({ //设置web-view距离顶部的距离以及自己的高度,单位为px
-					top: 35,
-					height: height
-				})
-			}, 1000);
-		},
-		methods: {		
-			findImage(processId){
-				var that =this;
-				that.http.request("/app/previewExcel",{processId:processId}).then(res=>{
-					if(res.datas!=null){
-						that.fileSrc = res.datas;
-					}else{
-						that.$prompt.none("暂无数据");
-					}
-					
-				})
-			},
-			getPreviews(previews){
-				var that =this;
-				that.http.request("/app/showOutViewOfSubmit",{list:previews,storeName:uni.getStorageSync("storeName")}).then(res=>{
-					//console.log(res)
-					if(res.data){
-						//that.pdf = `/hybrid/html/web/viewer.html?file=${res.data}`;
-						var encode=encodeURIComponent(res.data); 
-						that.pdf = `/hybrid/html/web/viewer.html?file=${encode}`;
-						
-						//that.pdf = `/hybrid/html/pdf.html?url=${res.data}`;
-						//that.pdf = res.data;
-						// uni.downloadFile({
-						// 	// 下面一行时拼接预览PDF的地址!!!
-						// 	url: res.data,
-						// 	success: function(res) {
-						// 		var filePath = res.tempFilePath;
-						// 		if (!filePath) return
-						// 		uni.openDocument({
-						// 			filePath: filePath,
-						// 			success: function(res) {
-						// 				console.log(res);
-						// 				console.log('打开文档成功');
-						// 			}
-						// 		});
-						// 	}
-						// });
-					}else{
-						that.$prompt.none("暂无数据");
-					}
-					
-				})
-				//console.log(this.fileSrc)
-			},
-			toPreview(url){
-				//this.pdf = `/hybrid/html/web/viewer.html?file=${url}`;
-				var encode=encodeURIComponent(url);
-				this.pdf = `/hybrid/html/web/viewer.html?file=${encode}`;
-			},
-/* 			ViewImage(e) {
-				uni.previewImage({
-					urls: this.fileSrc,
-					current: e.currentTarget.dataset.url
-				});
-			}, */
-			download(){
-				uni.showLoading({
-					title: '下载中'
-				});
-				uni.saveImageToPhotosAlbum({
-				    filePath: this.fileSrc,
-					success: function() {
-					    uni.hideLoading();
-						uni.showToast({
-							title: '已保存到相册',
-							icon: 'none',
-							duration: 2200
-						});
-					}
-				});						
-			}
-		}
-	}
+export default {
+    data() {
+        return {
+            fileSrc:[],
+            pdf:'',
+        }
+    },
+    onLoad(e) {
+        if(e.previews){
+            this.getPreviews(e.previews);
+        } else if(e.preview){
+            this.toPreview(decodeURIComponent(e.preview));
+        }
+    },
+    methods: {
+        findImage(processId){
+            var that =this;
+            that.http.request("/app/previewExcel", {
+                processId: processId,
+            }).then(res => {
+                if(res.datas != null){
+                    that.fileSrc = res.datas;
+                } else {
+                    that.$prompt.none("暂无数据");
+                }
+            })
+        },
+        getPreviews(previews){
+            var that = this;
+            that.http.request("/app/showOutViewOfSubmit", {
+                list: previews,
+                storeName: uni.getStorageSync("storeName")
+            }).then(res => {
+                if(res.data){
+                    var encode = encodeURIComponent(res.data);
+                    that.pdf = `/hybrid/html/web/viewer.html?file=${encode}`;
+                }else{
+                    that.$prompt.none("暂无数据");
+                }
+            })
+        },
+        toPreview(url){
+            var encode = encodeURIComponent(url);
+            this.pdf = `/hybrid/html/web/viewer.html?file=${encode}`;
+        },
+        download(){
+            uni.showLoading({
+                title: '下载中'
+            });
+            uni.saveImageToPhotosAlbum({
+                filePath: this.fileSrc,
+                success: function() {
+                    uni.hideLoading();
+                    uni.showToast({
+                        title: '已保存到相册',
+                        icon: 'none',
+                        duration: 2200
+                    });
+                }
+            });
+        }
+    }
+}
 </script>
-
-<style>   	
-    	.topc {
-    		position: fixed;
-    		right: 0;
-    		top: 85%;
-    		height: 50px;
-    		line-height: 50px;
-    	}
-		.text-xssl {
-         font-size: 40px;
-       }
-</style>

+ 4 - 0
style/index.css

@@ -84,3 +84,7 @@
         border-radius: 0 8rpx 8rpx 0;
     }
 }
+
+.uni-calendar__mask, .uni-calendar__content {
+    z-index: 9999999 !important;
+}