Quellcode durchsuchen

适配pc/添加版本信息/增加查核评分/app端添加热更新

xieyunhui vor 4 Jahren
Ursprung
Commit
fde92286bf

BIN
.DS_Store


+ 91 - 4
App.vue

@@ -11,8 +11,49 @@
 			// }
 			if (uni.getSystemInfoSync().platform === 'android'){
 				//pad下锁死竖屏
+				// #ifdef APP-PLUS
 				plus.screen.lockOrientation('portrait-primary');
-			}
+				// #endif
+			}
+			
+			
+			
+			
+			/* 条件编译,仅在H5平台生效 */
+			// #ifdef H5
+			uni.getSystemInfo({
+			    success(e){
+			        /* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
+			        if(e.windowWidth>420 && !window.top.isPC && !/iOS|Android/i.test(e.system)){
+						
+					    let hospSign = '';
+						let query = window.location.search.substring(1);
+					    let vars = query.split("=");
+					    for (let i=0;i<vars.length;i++) {
+							
+							   if(vars[i] == 'hospSign'){
+								   hospSign=vars[i+1];
+							   }
+					    }
+						uni.removeStorageSync('hospSign');
+						uni.setStorageSync('hospSign',hospSign);
+					
+						console.log({hospSign,query,vars});
+						
+						
+						const url = decodeURIComponent(`/TracerMethodology/static/html/template.html`);
+						console.log({hospSign,url});
+						window.location.pathname = url;
+							
+						
+			 
+			            /* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
+			            // window.location.pathname = '/static/html/pc.html';
+			        }
+			    }
+			})
+			// #endif		
+	
 		},
 		onShow: function() {
 			// console.log("App Show");
@@ -25,7 +66,8 @@
 			checkArguments() {
 				try {
 					if (uni.getSystemInfoSync().platform === 'android') {
-						// 接收第三方app传递的参数 extra;
+						// 接收第三方app传递的参数 extra;
+						// #ifdef APP-PLUS 
 						if (plus.runtime.arguments) {
 							// patParams: 院区,病区, 床号
 							const {
@@ -35,16 +77,61 @@
 								patParams
 							});
 							uni.setStorageSync('patParams', patParams);
-						}
+						}
+						// #endif
 					}
 				} catch (e) {}
+			},
+			
+
+			update(){  //app更新
+				// // #ifdef APP-PLUS  
+				// plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {  
+				//     uni.request({  
+				//         url: '/update',  
+				//         data: {  
+				//             version: widgetInfo.version,  
+				//             name: widgetInfo.name  
+				//         },  
+				//         success: (result) => {  
+				//             var data = result.data;  
+				//             if (data.update && data.wgtUrl) {  
+				//                 uni.downloadFile({  
+				//                     url: data.wgtUrl,  
+				//                     success: (downloadResult) => {  
+				//                         if (downloadResult.statusCode === 200) {  
+				//                             plus.runtime.install(downloadResult.tempFilePath, {  
+				//                                 force: false  
+				//                             }, function() {  
+				//                                 console.log('install success...');  
+				//                                 plus.runtime.restart();  
+				//                             }, function(e) {  
+				//                                 console.error('install fail...');  
+				//                             });  
+				//                         }  
+				//                     }  
+				//                 });  
+				//             }  
+				//         }  
+				//     });  
+				// });  
+				// // #endif
 			}
 		}
 	};
 </script>
 
 <style lang="less">
-	/*每个页面公共css */
+	/*每个页面公共css */
+
+	
+	/* 条件编译,仅在H5平台生效 */
+	// #ifdef H5
+	body::-webkit-scrollbar,html::-webkit-scrollbar {
+	    display: none;
+	}
+    
+    // #endif
 
 	body,
 	uni-app,

+ 11 - 0
components/README.md

@@ -0,0 +1,11 @@
+## 引入插件
+`在main.js中添加` 
+
+import dropdown from './components/dropdown/dt-dropDown.vue'
+Vue.component('dropdown', dropdown)
+
+
+
+## 使用 
+
+<dropdown :list="list" @onClick="dropDownChange"></dropdown>

+ 476 - 0
components/app-update/app-update.vue

@@ -0,0 +1,476 @@
+<template>
+	<uni-popup ref="popup" type="center" :maskClick="false">
+		<view class="update-wrap">
+			<view class="white-bg"></view>
+			<image src="@/static/images/top_2.png" class="updateCon-img"></image>
+			<view class="updateCon-top">
+				<!-- 发现新版本 -->
+				<text class="update-top-title">发现新版本</text>
+				<text class="update-top-version">V{{update_info.version}}</text>
+			</view>
+
+			<text class="uodate-content" v-if="!update_ing">更新内容:{{update_info.version_note}}</text>
+			<text class="current-version" v-if="!update_ing">当前版本:V{{version}}</text>
+
+			<view class="update-btn" v-if="!update_ing">
+				<view class="update-btn-item update-btn-left" @click="up_close">
+					<!-- 残忍拒绝 -->
+					<text class="update-btn-item-text ">残忍拒绝</text>
+				</view>
+				<view class="update-btn-item" @click="nowUpdate">
+					<!-- 立即升级 -->
+					<text class="update-btn-item-text text-bule">立即升级</text>
+				</view>
+			</view>
+			<!-- 下载进度 -->
+			<view class="sche-wrap" v-if="update_ing">
+				<!-- 更新包下载中 -->
+				<text class="sche-wrap-text">更新包下载中...</text>
+				<view class="sche-bg">
+					<view class="sche-bg-jindu" :style="lengthWidth">
+						<view class="sche-bg-round">
+							<text class="sche-bg-round-text" v-if="schedule">{{schedule}}%</text>
+							<text class="sche-bg-round-text" v-else>{{(downloadedSize/1024/1024 ).toFixed(2)}}M</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</uni-popup>
+
+</template>
+
+<script>
+	import uniPopup from '@/components/uni-popup/uni-popup.vue';
+    import { creatRequest } from '../../utils/request.js';
+	export default {
+		// props:['url'],
+		data() {
+			return {
+				platform: "", //ios or android
+				version: "0.0.0", //当前软件版本
+				is_update: false, // 是否更新
+				is_reques: false, //是否请求中
+
+				update_info: {
+					"type": "2", //1分发平台更新  2安装包/升级包更新
+					"version_note": "", //ios更新备注
+					"version": "0.0.0", //ios版本号
+					"download_url": "", //ios更新新链接
+				},
+                ifCheckAppUpdate:false,
+				is_update: false,
+				schedule: 0,
+				update_ing: false, //点击升级
+				is_down: false,
+				downloadedSize: 0,
+			};
+		},
+		components:{uniPopup},
+		mounted() {
+			const updateRejectStart = uni.getStorageSync('updateRejectStart');
+			const updateRejectCurrent = new Date().getTime();
+			const timeLeft = updateRejectCurrent-(updateRejectStart?updateRejectStart:9999999999999999999999999999);
+			console.log({updateRejectStart,updateRejectCurrent,timeLeft});
+			if(timeLeft>=600000){
+				   this.getSystemInfo() //获取系统新
+			}
+		},
+		watch: {
+		    ifCheckAppUpdate: function(newVal, oldVal) {
+		        //其他业务代码
+				console.log({newVal, oldVal});
+		    }
+		},
+		computed: {
+			// 下载进度计算
+			lengthWidth: function() {
+				return {
+					width: this.schedule * 480 / 100 + "rpx"
+				}
+			}
+		},
+		methods: {
+			// 获取系统信息
+			getSystemInfo() {
+				let vm = this;
+				// 获取手机系统信息
+				uni.getSystemInfo({
+					success: function(res) {
+						vm.platform = res.platform //ios  or android
+					}
+				});
+				// 获取版本号
+				// #ifdef APP-PLUS
+				plus.runtime.getProperty(plus.runtime.appid, function(inf) {
+					vm.version = inf.version
+				});
+				// #endif
+				// #ifdef APP-PLUS
+				vm.getUpdateInfo(); //获取更新信息
+				// #endif
+				// // #ifdef APP-PLUS
+				// plus.runtime.getProperty( plus.runtime.appid, function ( wgtinfo ) {
+				// 		//appid属性
+				// 		var wgtStr = "appid:"+wgtinfo.appid;
+				// 		//version属性
+				// 		wgtStr += "<br/>version:"+wgtinfo.version;
+				// 		//name属性
+				// 		wgtStr += "<br/>name:"+wgtinfo.name;
+				// 		//description属性
+				// 		wgtStr += "<br/>description:"+wgtinfo.description;
+				// 		//author属性
+				// 		wgtStr += "<br/>author:"+wgtinfo.author;
+				// 		//email属性
+				// 		wgtStr += "<br/>email:"+wgtinfo.email;
+				// 		//features 属性
+				// 		wgtStr += "<br/>features:"+wgtinfo.features;
+				// 		console.log( wgtStr );
+				// 	} );
+			    
+    //             // #endif
+			},
+
+			// 获取线上版本信息
+			getUpdateInfo() {
+				let vm = this;
+				const obj = {
+					method: 'GET',
+					url: 'versionInfo/getVersionData'
+				}
+		
+				creatRequest(obj,{versionNo:vm.version}).then(res=>{
+					  console.log({res});
+					  if(res.isNew){
+						  // vm.update_info.type = "1";
+						  vm.update_info.version_note = res.versionContent;
+						  vm.update_info.version = res.versionNo;
+						  vm.update_info.download_url = res.versionUrl;
+					  }else {
+						  
+					  }
+					  
+					  vm.checkUpdate(); ///检查是否更新
+				})
+		
+			},
+			// 检查是否更新
+			checkUpdate() {
+				let vm = this;
+				console.log(vm.version,vm.update_info.version);
+				vm.is_update = vm.compareVersion(vm.version, vm.update_info.version); // 检查是否升级
+				if (vm.is_update) {
+					vm.$refs.popup.open() //显示升级弹窗
+				} else {
+					// 不更新,根据需要做处理
+				}
+			},
+
+			// 取消更新
+			up_close() {
+				console.log('点击取消');
+				// this.$store.commit('setAppUpdateStatus',false);
+				uni.setStorageSync('updateRejectStart',new Date().getTime());
+				this.$refs.popup.close();
+				// plus.os.name == "Android" ? plus.runtime.quit() : plus.ios.import("UIApplication").sharedApplication().performSelector("exit");
+			},
+			// 立即更新
+			nowUpdate() {
+				let vm = this;
+				if(vm.is_reques){
+					return false   //如果正在下载就停止操作
+				}else{
+					vm.is_reques = true
+				}
+				console.log(111111);
+				if (vm.update_info.type == 1) {
+					// 分发平台更新  //调用浏览器打开链接或者分发平台
+					plus.runtime.openURL(vm.update_info.download_url, function() {
+						plus.nativeUI.toast("打开错误");
+					});
+
+					setTimeout(function() {
+						plus.runtime.quit(); //五秒后关闭app
+					}, 5000)
+				} else if (vm.update_info.type == 2) {
+					// 安装包/升级包更新
+					vm.download_wgt()
+				}
+
+			},
+			// 下载升级资源包
+			download_wgt() {
+				let vm = this;
+				plus.nativeUI.showWaiting("下载更新文件..."); //下载更新文件...
+				// const token = uni.getStorageSync('token');
+				let options = {
+					method: "GET",
+				};
+
+				let dtask = plus.downloader.createDownload(vm.update_info.download_url, options);
+				dtask.addEventListener("statechanged", function(task, status) {
+					switch (task.state) {
+						case 1: // 开始  
+							break;
+						case 2: //已连接到服务器  
+							vm.update_ing = true;
+							break;
+						case 3: // 已接收到数据  
+							vm.downloadedSize = task.downloadedSize;
+							let totalSize = 0;
+							if (task.totalSize) {
+								totalSize = task.totalSize //服务器须返回正确的content-length才会有长度
+							}
+							vm.schedule = parseInt(100 * task.downloadedSize / totalSize);
+							break;
+						case 4:
+							vm.installWgt(task.filename); // 安装wgt包  
+							break;
+					}
+				});
+				dtask.start();
+			},
+
+			// 安装文件
+			installWgt(path) {
+				let vm = this;
+				plus.nativeUI.showWaiting("安装更新文件..."); //安装更新文件...
+				plus.runtime.install(path, {}, function() {
+					plus.nativeUI.closeWaiting();
+					// 应用资源更新完成!
+					plus.nativeUI.alert("应用资源更新完成!", function() {
+						plus.runtime.restart();
+					});
+				}, function(e) {
+					plus.nativeUI.closeWaiting();
+					// 安装更新文件失败
+					plus.nativeUI.alert("安装更新文件失败[" + e.code + "]:" + e.message);
+				});
+			},
+			// 对比版本号
+			compareVersion(ov, nv) {
+				if (!ov || !nv || ov == "" || nv == "") {
+					return false;
+				}
+				let b = false,
+					ova = ov.split(".", 4),
+					nva = nv.split(".", 4);
+				for (let i = 0; i < ova.length && i < nva.length; i++) {
+					let so = ova[i],
+						no = parseInt(so),
+						sn = nva[i],
+						nn = parseInt(sn);
+					if (nn > no || sn.length > so.length) {
+						return true;
+					} else if (nn < no) {
+						return false;
+					}
+				}
+				if (nva.length > ova.length && 0 == nv.indexOf(ov)) {
+					return true;
+				} else {
+					return false;
+				}
+			},
+		}
+
+	}
+</script>
+
+<style scoped>
+	/*#ifndef APP-NVUE*/
+	view {
+		display: flex;
+		flex-direction: column;
+		box-sizing: border-box;
+	}
+	/*#endif*/
+
+	.updateBox {
+		background-color: rgba(0, 0, 0, 0.6);
+		z-index: 1000;
+		position: fixed;
+		right: 0px;
+		top: 0;
+		left: 0;
+		bottom: 0;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.update-wrap {
+		width: 580rpx;
+		height: 500rpx;
+		border-radius: 10px;
+		padding-bottom: 0px;
+		position: relative;
+	}
+
+	.white-bg {
+		position: absolute;
+		top: 60rpx;
+		left: 0px;
+		width: 580rpx;
+		height: 440rpx;
+		background-color: #ffffff;
+		border-bottom-left-radius: 30rpx;
+		border-bottom-right-radius: 30rpx;
+	}
+
+	.updateCon-img {
+		position: absolute;
+		top: 0rpx;
+		left: 0px;
+		width: 580rpx;
+		height: 440rpx;
+	}
+
+	.updateCon-top {
+		padding: 70rpx 50rpx;
+		/*#ifndef APP-NVUE*/
+		z-index: 1;
+		/*#endif*/
+	}
+
+	.update-top-title {
+		color: #fff;
+		font-size: 36rpx;
+		font-weight: bold;
+	}
+
+	.update-top-version {
+		color: #fff;
+		font-size: 28rpx;
+		margin-top: 10rpx;
+	}
+
+	.uodate-content {
+		color: #333;
+		font-size: 18px;
+		padding: 0px 50rpx;
+		margin-top: 80rpx;
+		/*#ifndef APP-NVUE*/
+		z-index: 1;
+		/*#endif*/
+	}
+
+	.current-version {
+		text-align: center;
+		margin-top: 10rpx;
+		font-size: 24rpx;
+		color: #666;
+		/*#ifndef APP-NVUE*/
+		z-index: 1;
+		/*#endif*/
+	}
+
+	.update-btn {
+		position: absolute;
+		left: 0px;
+		bottom: 0px;
+		width: 580rpx;
+		height: 80rpx;
+		padding: 0px 50rpx;
+
+		align-items: center;
+		flex-direction: row;
+		border-top-color: #e7e7e7;
+		border-top-style: solid;
+		border-top-width: 1px;
+
+		background-color: #fff;
+		border-bottom-left-radius: 30rpx;
+		border-bottom-right-radius: 30rpx;
+	}
+
+	.update-btn-item {
+		width: 240rpx;
+		height: 80rpx;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.update-btn-left {
+		border-right-color: #e7e7e7;
+		border-right-style: solid;
+		border-right-width: 1px;
+	}
+
+	.update-btn-item-text {
+		text-align: center;
+		font-size: 28rpx;
+		color: #666;
+	}
+
+	.text-bule {
+		color: #045FCF;
+	}
+
+	.sche-wrap {
+		padding: 0px 50rpx 0rpx;
+		height: 100rpx;
+		align-items: center;
+		border-bottom-left-radius: 30rpx;
+		border-bottom-right-radius: 30rpx;
+		flex: 1;
+		justify-content: flex-end;
+	}
+
+	.sche-wrap-text {
+		font-size: 24rpx;
+		color: #666;
+		margin-bottom: 20rpx;
+	}
+
+	.sche-bg {
+		position: relative;
+		background-color: #ccc;
+		height: 20rpx;
+		border-radius: 100px;
+		width: 480rpx;
+		margin-bottom: 30rpx;
+	}
+
+	.sche-bg-jindu {
+		position: absolute;
+		left: 0px;
+		top: 0px;
+		height: 20rpx;
+		background-color: #5775e7;
+		border-radius: 100px;
+	}
+
+	.sche-bg-round {
+		position: absolute;
+		left: 100%;
+		height: 24rpx;
+		width: 24rpx;
+		background-color: #fff;
+		border-color: #fff;
+		border-style: solid;
+		border-width: 10px;
+		border-radius: 100px;
+		transform: translateX(-20rpx) translateY(-10rpx);
+
+	}
+
+	.sche-bg-round-text {
+		font-size: 24rpx;
+		width: 120rpx;
+		text-align: center;
+		transform: translateX(-50rpx) translateY(-40rpx);
+		color: #5775e7;
+	}
+
+	.uodate-close {
+		/* display: flex; */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 50rpx;
+	}
+
+	.uodate-close-img {
+		width: 80rpx;
+		height: 80rpx;
+	}
+</style>

+ 113 - 0
components/dt-dropdown/dt-dropdown.vue

@@ -0,0 +1,113 @@
+<template>
+	<view>
+		<view @click="showShadow" class="dropWrap">{{ list[current] }}<view class="sanjiao"></view></view>
+		<view class="dropdown">
+			<view :class="showIf ? 'dropdown-mask' : 'undropdown-mask'" @click="hideShadow"></view>
+			<!-- <view class="ul" :style="showIf?'height:'+list.length*30+'px':''"> --> 
+			<view class="ul" :style="'--i:'+list.length" :class="showIf?'show':''">  <!-- 不支持就用上面那种 -->
+				<view class="li" v-for="(item, index) in list" :key="index" @click="handlerItem(index)">{{ item }}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'dropdown',
+	props: {
+		list: {
+			type: Array,
+			default: () => []
+		},
+		current: {
+			type: [String, Number],
+			default: 0
+		}
+	},
+	data() {
+		return {
+			showIf: false
+		};
+	},
+	methods: {
+		handlerItem(value) {
+			this.showIf = false
+			this.$emit('onClick', value);
+		},
+		hideShadow() {
+			this.showIf = false;
+		},
+		showShadow() {
+			this.showIf = true;
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.dropWrap {
+	box-sizing: border-box;
+	width:400rpx;
+	height: 26px;
+	border: 1px solid #e8ecef;
+	font-size: 12px;
+	color: #8c9fad;
+	padding: 4px 8px;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	.sanjiao{
+		width: 0;
+		height: 0;
+		border-left: 6px solid transparent;
+		border-right:6px solid transparent;
+		border-top:6px solid #C5CFD5;
+		border-bottom:6px solid transparent;
+		transform: translateY(3px);
+	}
+}
+.dropdown {
+	position: absolute;
+	z-index: 100;
+	.ul {
+		width: 400rpx;
+		position: relative;
+		z-index: 101;
+		list-style: none;
+		background-color: #fff;
+		border-radius: 4rpx;
+		padding-left: 0;
+		box-shadow: 6rpx 6rpx 10rpx rgba(122, 122, 122, 0.2);
+		transition: all 0.2s;
+		height: 0;
+		overflow: hidden;
+		.li {
+			box-sizing: border-box;
+			color: #000;
+			height: 30px;
+			border-bottom: 1px solid #e6eaeb;
+			font-size: 24rpx;
+			line-height: 30px;              //与下面的高度保持一致
+			padding-left: 8px;
+		}
+		.li:last-child {
+			border-bottom: none;
+		}
+	}
+	.show {
+		height: calc( var(--i) * 30px );   //与上面的高度保持一致
+	}
+	.dropdown-mask {
+		top: 0;
+		left: 0;
+		position: fixed;
+		width: 100vw;
+		height: 100vh;
+		z-index: 100;
+		pointer-events: auto;
+	}
+	.undropdown-mask {
+		pointer-events: none;
+	}
+}
+</style>

+ 1 - 1
components/tm-radio-group/radio-select-group.vue

@@ -10,7 +10,7 @@
         <template v-if="isOpen(i)">
 					<view class="child-radio-group">
 						<child-radio-group
-              :pIndex="i"
+                          :pIndex="i"
 						  :list="item[setting.child] || []"
 						  :defaultValue="defaultValue"
 						  :label="label"

+ 4 - 0
components/tm-tabbar/tm-tabbar.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="tm-tabbar">
+		<app-update url="123"  ref="appUpdate" ></app-update>
 		<template v-for="item in rolToTabBars">
 			<view
 			  :class="{'tab-item': true, active: item.pagePath === currentPagePath}"
@@ -23,7 +24,10 @@
 	 * 芦荟
 	 * 2021.2.1
 	 */
+	import appUpdate from "@/components/app-update/app-update.vue"
+	
 	export default {
+	components:{appUpdate},
     props: {
       permission: {
         type: Number | String,

+ 22 - 0
components/uni-popup/message.js

@@ -0,0 +1,22 @@
+export default {
+	created() {
+		if (this.type === 'message') {
+			// 不显示遮罩
+			this.maskShow = false 
+			// 获取子组件对象
+			this.childrenMsg = null
+		}
+	},
+	methods: {
+		customOpen() {
+			if (this.childrenMsg) {
+				this.childrenMsg.open()
+			}
+		},
+		customClose() {
+			if (this.childrenMsg) {
+				this.childrenMsg.close()
+			}
+		}
+	}
+}

+ 25 - 0
components/uni-popup/popup.js

@@ -0,0 +1,25 @@
+import message from './message.js';
+// 定义 type 类型:弹出类型:top/bottom/center
+const config = {
+	// 顶部弹出
+	top:'top',
+	// 底部弹出
+	bottom:'bottom',
+	// 居中弹出
+	center:'center',
+	// 消息提示
+	message:'top',
+	// 对话框
+	dialog:'center',
+	// 分享
+	share:'bottom',
+}
+
+export default {
+	data(){
+		return {
+			config:config
+		}
+	},
+	mixins: [message]
+}

+ 16 - 0
components/uni-popup/share.js

@@ -0,0 +1,16 @@
+export default {
+	created() {
+		if (this.type === 'share') {
+			// 关闭点击
+			this.mkclick = false
+		}
+	},
+	methods: {
+		customOpen() {
+			console.log('share 打开了');
+		},
+		customClose() {
+			console.log('share 关闭了');
+		}
+	}
+}

+ 296 - 0
components/uni-popup/uni-popup.vue

@@ -0,0 +1,296 @@
+<template>
+	<view v-if="showPopup" class="uni-popup" :class="[popupstyle]" @touchmove.stop.prevent="clear">
+		<uni-transition v-if="maskShow" class="uni-mask--hook" :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans" @click="onTap" />
+		<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
+			<view class="uni-popup__wrapper-box" @click.stop="clear">
+				<slot />
+			</view>
+		</uni-transition>
+	</view>
+</template>
+
+<script>
+	import uniTransition from '../uni-transition/uni-transition.vue'
+	import popup from './popup.js'
+	/**
+	 * PopUp 弹出层
+	 * @description 弹出层组件,为了解决遮罩弹层的问题
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [top|center|bottom] 弹出方式
+	 * 	@value top 顶部弹出
+	 * 	@value center 中间弹出
+	 * 	@value bottom 底部弹出
+	 * 	@value message 消息提示
+	 * 	@value dialog 对话框
+	 * 	@value share 底部分享示例
+	 * @property {Boolean} animation = [ture|false] 是否开启动画
+	 * @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗
+	 * @event {Function} change 打开关闭弹窗触发,e={show: false}
+	 */
+
+	export default {
+		name: 'UniPopup',
+		components: {
+			uniTransition
+		},
+		props: {
+			// 开启动画
+			animation: {
+				type: Boolean,
+				default: true
+			},
+			// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
+			// message: 消息提示 ; dialog : 对话框
+			type: {
+				type: String,
+				default: 'center'
+			},
+			// maskClick
+			maskClick: {
+				type: Boolean,
+				default: true
+			}
+		},
+		provide() {
+			return {
+				popup: this
+			}
+		},
+		mixins: [popup],
+		watch: {
+			/**
+			 * 监听type类型
+			 */
+			type: {
+				handler: function(newVal) {
+					this[this.config[newVal]]()
+				},
+				immediate: true
+			},
+			/**
+			 * 监听遮罩是否可点击
+			 * @param {Object} val
+			 */
+			maskClick: {
+				handler: function(val) {
+					this.mkclick = val
+				},
+				immediate: true
+			}
+		},
+		data() {
+			return {
+				duration: 300,
+				ani: [],
+				showPopup: false,
+				showTrans: false,
+				maskClass: {
+					'position': 'fixed',
+					'bottom': 0,
+					'top': 0,
+					'left': 0,
+					'right': 0,
+					'backgroundColor': 'rgba(0, 0, 0, 0.4)'
+				},
+				transClass: {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+				},
+				maskShow: true,
+				mkclick: true,
+				popupstyle: 'top'
+			}
+		},
+		created() {
+			this.mkclick = this.maskClick
+			if (this.animation) {
+				this.duration = 300
+			} else {
+				this.duration = 0
+			}
+		},
+		methods: {
+			clear(e) {
+				// TODO nvue 取消冒泡
+				e.stopPropagation()
+			},
+			open() {
+				this.showPopup = true
+				this.$nextTick(() => {
+					new Promise(resolve => {
+						clearTimeout(this.timer)
+						this.timer = setTimeout(() => {
+							this.showTrans = true
+							// fixed by mehaotian 兼容 app 端
+							this.$nextTick(() => {
+								resolve();
+							})
+						}, 50);
+					}).then(res => {
+						// 自定义打开事件
+						clearTimeout(this.msgtimer)
+						this.msgtimer = setTimeout(() => {
+							this.customOpen && this.customOpen()
+						}, 100)
+						this.$emit('change', {
+							show: true,
+							type: this.type
+						})
+					})
+				})
+			},
+			close(type) {
+				this.showTrans = false
+				this.$nextTick(() => {
+					this.$emit('change', {
+						show: false,
+						type: this.type
+					})
+					clearTimeout(this.timer)
+					// 自定义关闭事件
+					this.customOpen && this.customClose()
+					this.timer = setTimeout(() => {
+						this.showPopup = false
+					}, 300)
+				})
+			},
+			onTap() {
+				if (!this.mkclick) return
+				this.close()
+			},
+			/**
+			 * 顶部弹出样式处理
+			 */
+			top() {
+				this.popupstyle = 'top'
+				this.ani = ['slide-top']
+				this.transClass = {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+				}
+			},
+			/**
+			 * 底部弹出样式处理
+			 */
+			bottom() {
+				this.popupstyle = 'bottom'
+				this.ani = ['slide-bottom']
+				this.transClass = {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+					'bottom': 0
+				}
+			},
+			/**
+			 * 中间弹出样式处理
+			 */
+			center() {
+				this.popupstyle = 'center'
+				this.ani = ['zoom-out', 'fade']
+				this.transClass = {
+					'position': 'fixed',
+					/* #ifndef APP-NVUE */
+					'display': 'flex',
+					'flexDirection': 'column',
+					/* #endif */
+					'bottom': 0,
+					'left': 0,
+					'right': 0,
+					'top': 0,
+					'justifyContent': 'center',
+					'alignItems': 'center'
+				}
+			}
+		}
+	}
+</script>
+<style scoped>
+	@charset "UTF-8";
+
+	.uni-popup {
+		position: fixed;
+		/* #ifndef APP-NVUE */
+		z-index: 99;
+		/* #endif */
+	}
+
+	.uni-popup__mask {
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		background-color: rgba(0, 0, 0, 0.4);
+		opacity: 0;
+	}
+
+	.mask-ani {
+		transition-property: opacity;
+		transition-duration: 0.2s;
+	}
+
+	.uni-top-mask {
+		opacity: 1;
+	}
+
+	.uni-bottom-mask {
+		opacity: 1;
+	}
+
+	.uni-center-mask {
+		opacity: 1;
+	}
+
+	.uni-popup__wrapper {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: absolute;
+	}
+
+	.top {
+		/* #ifdef H5 */
+		top: var(--window-top);
+		/* #endif */
+		/* #ifndef H5 */
+		top: 0;
+		/* #endif */
+	}
+
+	.bottom {
+		bottom: 0;
+	}
+
+	.uni-popup__wrapper-box {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: relative;
+		/* iphonex 等安全区设置,底部安全区适配 */
+		/* #ifndef APP-NVUE */
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+		/* #endif */
+	}
+
+	.content-ani {
+		transition-property: transform, opacity;
+		transition-duration: 0.2s;
+	}
+
+	.uni-top-content {
+		transform: translateY(0);
+	}
+
+	.uni-bottom-content {
+		transform: translateY(0);
+	}
+
+	.uni-center-content {
+		transform: scale(1);
+		opacity: 1;
+	}
+</style>

+ 279 - 0
components/uni-transition/uni-transition.vue

@@ -0,0 +1,279 @@
+<template>
+	<view v-if="isShow" ref="ani" class="uni-transition" :class="[ani.in]" :style="'transform:' +transform+';'+stylesObject" @click="change">
+		<slot></slot>
+	</view>
+</template>
+
+<script>
+	// #ifdef APP-NVUE
+	const animation = uni.requireNativePlugin('animation');
+	// #endif
+	/**
+	 * Transition 过渡动画
+	 * @description 简单过渡动画组件
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=985
+	 * @property {Boolean} show = [false|true] 控制组件显示或隐藏
+	 * @property {Array} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
+	 *  @value fade 渐隐渐出过渡
+	 *  @value slide-top 由上至下过渡
+	 *  @value slide-right 由右至左过渡
+	 *  @value slide-bottom 由下至上过渡
+	 *  @value slide-left 由左至右过渡
+	 *  @value zoom-in 由小到大过渡
+	 *  @value zoom-out 由大到小过渡
+	 * @property {Number} duration 过渡动画持续时间
+	 * @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
+	 */
+	export default {
+		name: 'uniTransition',
+		props: {
+			show: {
+				type: Boolean,
+				default: false
+			},
+			modeClass: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			duration: {
+				type: Number,
+				default: 300
+			},
+			styles: {
+				type: Object,
+				default () {
+					return {}
+				}
+			}
+		},
+		data() {
+			return {
+				isShow: false,
+				transform: '',
+				ani: {
+					in: '',
+					active: ''
+				}
+			};
+		},
+		watch: {
+			show: {
+				handler(newVal) {
+					if (newVal) {
+						this.open()
+					} else {
+						this.close()
+					}
+				},
+				immediate: true
+			}
+		},
+		computed: {
+			stylesObject() {
+				let styles = {
+					...this.styles,
+					'transition-duration': this.duration / 1000 + 's'
+				}
+				let transfrom = ''
+				for (let i in styles) {
+					let line = this.toLine(i)
+					transfrom += line + ':' + styles[i] + ';'
+				}
+				return transfrom
+			}
+		},
+		created() {
+			// this.timer = null
+			// this.nextTick = (time = 50) => new Promise(resolve => {
+			// 	clearTimeout(this.timer)
+			// 	this.timer = setTimeout(resolve, time)
+			// 	return this.timer
+			// });
+		},
+		methods: {
+			change() {
+				this.$emit('click', {
+					detail: this.isShow
+				})
+			},
+			open() {
+				clearTimeout(this.timer)
+				this.isShow = true
+				this.transform = ''
+				this.ani.in = ''
+				for (let i in this.getTranfrom(false)) {
+					if (i === 'opacity') {
+						this.ani.in = 'fade-in'
+					} else {
+						this.transform += `${this.getTranfrom(false)[i]} `
+					}
+				}
+				this.$nextTick(() => {
+					setTimeout(() => {
+						this._animation(true)
+					}, 50)
+				})
+
+			},
+			close(type) {
+				clearTimeout(this.timer)
+				this._animation(false)
+			},
+			_animation(type) {
+				let styles = this.getTranfrom(type)
+				// #ifdef APP-NVUE
+				if (!this.$refs['ani']) return
+				animation.transition(this.$refs['ani'].ref, {
+					styles,
+					duration: this.duration, //ms
+					timingFunction: 'ease',
+					needLayout: false,
+					delay: 0 //ms
+				}, () => {
+					if (!type) {
+						this.isShow = false
+					}
+					this.$emit('change', {
+						detail: this.isShow
+					})
+				})
+				// #endif
+				// #ifndef APP-NVUE
+				this.transform = ''
+				for (let i in styles) {
+					if (i === 'opacity') {
+						this.ani.in = `fade-${type?'out':'in'}`
+					} else {
+						this.transform += `${styles[i]} `
+					}
+				}
+				this.timer = setTimeout(() => {
+					if (!type) {
+						this.isShow = false
+					}
+					this.$emit('change', {
+						detail: this.isShow
+					})
+
+				}, this.duration)
+				// #endif
+
+			},
+			getTranfrom(type) {
+				let styles = {
+					transform: ''
+				}
+				this.modeClass.forEach((mode) => {
+					switch (mode) {
+						case 'fade':
+							styles.opacity = type ? 1 : 0
+							break;
+						case 'slide-top':
+							styles.transform += `translateY(${type?'0':'-100%'}) `
+							break;
+						case 'slide-right':
+							styles.transform += `translateX(${type?'0':'100%'}) `
+							break;
+						case 'slide-bottom':
+							styles.transform += `translateY(${type?'0':'100%'}) `
+							break;
+						case 'slide-left':
+							styles.transform += `translateX(${type?'0':'-100%'}) `
+							break;
+						case 'zoom-in':
+							styles.transform += `scale(${type?1:0.8}) `
+							break;
+						case 'zoom-out':
+							styles.transform += `scale(${type?1:1.2}) `
+							break;
+					}
+				})
+				return styles
+			},
+			_modeClassArr(type) {
+				let mode = this.modeClass
+				if (typeof(mode) !== "string") {
+					let modestr = ''
+					mode.forEach((item) => {
+						modestr += (item + '-' + type + ',')
+					})
+					return modestr.substr(0, modestr.length - 1)
+				} else {
+					return mode + '-' + type
+				}
+			},
+			// getEl(el) {
+			// 	console.log(el || el.ref || null);
+			// 	return el || el.ref || null
+			// },
+			toLine(name) {
+				return name.replace(/([A-Z])/g, "-$1").toLowerCase();
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.uni-transition {
+		transition-timing-function: ease;
+		transition-duration: 0.3s;
+		transition-property: transform, opacity;
+	}
+
+	.fade-in {
+		opacity: 0;
+	}
+
+	.fade-active {
+		opacity: 1;
+	}
+
+	.slide-top-in {
+		/* transition-property: transform, opacity; */
+		transform: translateY(-100%);
+	}
+
+	.slide-top-active {
+		transform: translateY(0);
+		/* opacity: 1; */
+	}
+
+	.slide-right-in {
+		transform: translateX(100%);
+	}
+
+	.slide-right-active {
+		transform: translateX(0);
+	}
+
+	.slide-bottom-in {
+		transform: translateY(100%);
+	}
+
+	.slide-bottom-active {
+		transform: translateY(0);
+	}
+
+	.slide-left-in {
+		transform: translateX(-100%);
+	}
+
+	.slide-left-active {
+		transform: translateX(0);
+		opacity: 1;
+	}
+
+	.zoom-in-in {
+		transform: scale(0.8);
+	}
+
+	.zoom-out-active {
+		transform: scale(1);
+	}
+
+	.zoom-out-in {
+		transform: scale(1.2);
+	}
+</style>

+ 3 - 0
main.js

@@ -1,14 +1,17 @@
+
 import Vue from 'vue'
 import App from './App'
 import { store } from './store/index.js';
 import dateTimePickGroup from './components/date-time-pick-group/date-time-pick-group.vue';
 import dateTimePick from './components/date-time-pick/date-time-pick.vue';
+import dropdown from './components/dt-dropdown/dt-dropdown.vue'
 import row from "./components/tm-trees/row.vue";
 Vue.config.productionTip = false;
 Vue.prototype.$store = store;
 Vue.component('com-date-pick-group', dateTimePickGroup);
 Vue.component('com-date-time-pick', dateTimePick);
 Vue.component('tm-trees-row', row);
+Vue.component('dropdown', dropdown);
 
 App.mpType = 'app'
 

+ 5 - 4
manifest.json

@@ -2,8 +2,8 @@
     "name" : "追踪方法学",
     "appid" : "__UNI__03C4C69",
     "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
+    "versionName" : "0.5.5",
+    "versionCode" : 100,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -96,7 +96,7 @@
     "h5" : {
         "title" : "追踪方法学",
         "router" : {
-            "mode" : "hash",
+            "mode" : "history",
             "base" : "/TracerMethodology/"
         },
         "devServer" : {
@@ -123,7 +123,8 @@
         },
         "networkTimeout" : {
             "request" : 5000
-        }
+        },
+        "template" : ""
     }
 }
 /* 模块配置 *//* 应用发布信息 *//* android打包配置 */

+ 6 - 3
pages.json

@@ -2,7 +2,10 @@
 	"pages": [{
 			"path": "pages/login/login",
 			"style": {
-				"navigationStyle":"custom" 
+				"navigationStyle":"custom",
+				 "h5": {
+				             "titleNView": false
+				  }
 			}
 		},
 		{
@@ -168,7 +171,7 @@
 		}
 	],
 	"globalStyle": {
-		"navigationStyle": "custom",
+		"navigationStyle": "default",
 		"autoBackButton": true,
 		// "homeButton": true,
 		"navigationBarTextStyle": "black",
@@ -178,7 +181,7 @@
 		"app-plus": {
 			"background": "#efeff4"
 		},
-		"rpxCalcMaxDeviceWidth": 9999,
+		"rpxCalcMaxDeviceWidth":9999,
 		"onReachBottomDistance": 184
 	}
 }

+ 30 - 2
pages/auditItemDetails/auditItemDetails.vue

@@ -60,7 +60,7 @@
 			<view class="prevBtn" @click="switchItem(-1)">上一项</view>
 			<view class="nextBtn" @click="switchItem(1)">下一项</view>
 		</view>
-		<view class="bottomBtn" @click="goToPrevPage" v-if="ifImprover">返回改善任务详情</view>
+		<view class="bottomBtn" @click="goToPrevPage" v-if="ifImprover">{{bottomBtnText}}</view>
 	</view>
 </template>
 
@@ -84,10 +84,17 @@
 				ifShowBotBtn:false,
 				itemBelongGroup:[],
 				itemId:'',
-				ifImprover:true
+				ifImprover:true,
+				bottomBtnText:'返回改善任务详情'
 			};
 		},
 		onLoad: function ({id, checkPointId}) {
+			const pages = getCurrentPages();
+			const reversedPageList = pages.reverse();
+			if(reversedPageList[1].route=='pages/checkMainPoints/checkMainPoints'){
+				this.bottomBtnText = '返回查核任务列表'
+			}
+			
 			const roleNum = uni.getStorageSync('nowPermission');		
 			if(roleNum==3)this.ifShowBotBtn = true;
 			if(roleNum==3)this.ifImprover = false;
@@ -131,9 +138,30 @@
 				return this.$store.dispatch({type: 'checkList/commActions', key, data});
 			},
 			goToPrevPage(){
+				console.log('goback');
+				//获取所有页面栈,找出需要的回到的页面栈,返回。
+				const pages = getCurrentPages();
+				const reversed = pages.reverse();
+				const currentPageIndex = 0;
+				console.log({reversed});
 				uni.navigateBack({
 				    delta: 1
 				});
+				if(false){
+					pages.some((item,index)=>{
+						  // console.log('循环');
+						  if(item.route == "pages/checkMainPoints/checkMainPoints"){
+							  let needdelta =index-currentPageIndex;
+							  console.log({needdelta,index,currentPageIndex});
+							  //通知返回目标页面刷新数据
+							  item.ifFromChildPage=true;
+							  uni.navigateBack({
+							      delta: needdelta
+							  });
+							  return true;
+						  }
+					});
+				}
 			},
 			loadItemDetail(id){
 				this.dispatch('checkTaskDetail', {id}).then((data)=>{

+ 454 - 377
pages/checkMainPoints/checkMainPoints.vue

@@ -1,380 +1,457 @@
-<template>
-	<view class="checkMainPoints">
-		<tm-top-menu>
-			<view class="top-search">
-				<view class="search">
-					<input confirm-type="search" 
-						@input="filterFromName" 
-						placeholder="搜索查核要点或查核项" />
-					<image src="../../static/search.png"></image>
-				</view>
-				<view class="top-btn-wrap">
-					<view class="btn-list" v-if="nowPermission == 3">
-						<com-button v-for="(item, index) in btnArr" 
-							:btnText="item.label" 
-							:type="active === item.id ? 'pramary':'default'" 
-							v-on:btnClick="btnClick(item.id)"/>
-					</view>
-					<view class="select-wrap" 
-						v-else-if="nowPermission == 2 || nowPermission == 1" 
-						@click="toggleModal(!showModal)">
-						<text>{{getCheckPointName}}</text>
-						<image :src="`../../static/${showModal?'open':'close'}-icon.png`"></image>
-					</view>
-				</view>
-			</view>
-		</tm-top-menu>
-		<tm-modal v-show="showModal" v-on:click="toggleModal(false)">
-			<view class="content-list">
-				<view class="list-item"
-					v-for="(item, index) in point"
-					:class="{active: checkPointId === item.checkPointId}"
-					@click="checkPointHandle(item.checkPointId)">
-					<text>{{item.checkPointName}}</text>
-					<image class="check-img"
-						v-if="checkPointId === item.checkPointId"
-						src="../../static/checkStatus.png"></image>
-				</view>
-			</view>
-		</tm-modal>
-		<view class="list" v-for="(item, index) in detailList" :key="index">
-			<view class="title" v-if="item.responseList.length > 0">查核要点:{{item.checkPointName}}</view>
-			<view class="item" 
-				v-for="(child, n) in item.responseList" 
-				@click="childClick(child,item.checkPointId)"
-				:key="n">
-				<view class="top-box">
-					<view class="top-box-left">
-						<view class="index-icon">{{n + 1}}</view>
-						<text>{{child.checkItemName}}</text>
-						<!-- <text>ICU病房查看危重病人的抢救全过程(访谈)ICU病房查看危重病人的抢救全过程(访谈)ICU病房查看危重病人的抢救全过程(访谈)的抢救全过程(访谈)</text> -->
-					</view>
-					<image src="../../static/tuli.png" 
-						@tap.stop="goLegendDetails($event ,child.checkItemId, item.checkPointId)"></image>
-				</view>
-				<view class="children">
-					<view class="child">
-						<text>{{child.deptName || '--'}}</text>
-						<text>查核单位</text>
-					</view>
-					<view class="child">
-						<text>{{child.checkModelName || '--'}}</text>
-						<text>查核方式</text>
-					</view>
-					<view class="child">
-						<text>{{child.lastResult || '--'}}</text>
-						<text>上次结果</text>
-					</view>
-					<view class="child">
-						<text>{{child.checkResult || '--'}}</text>
-						<text>本次结果</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<tm-callback-listpage/>
-	</view>
-</template>
-
-<script>
-	import {_stopPropagation} from "../../utils/compatible.js";
-	export default {
-		data() {
-			return {
-				btnArr: [
-					{id: 0, label: '全部'},
-					{id: 1, label: '未查核'},
-					{id: 2, label: '已查核'},
-				],
-				showModal: false,
+<template>
+	<view class="checkMainPoints">
+		<tm-top-menu>
+			<view class="top-search">
+				<view class="search">
+					<input confirm-type="search" @input="filterFromName" placeholder="搜索查核要点或查核项" />
+					<image src="../../static/search.png"></image>
+				</view>
+				<view class="top-btn-wrap">
+					<view class="btn-list" v-if="nowPermission == 3">
+						<com-button v-for="(item, index) in btnArr" :btnText="item.label"
+							:type="active === item.id ? 'pramary':'default'" v-on:btnClick="btnClick(item.id)" />
+					</view>
+					<view class="select-wrap" v-else-if="nowPermission == 2 || nowPermission == 1"
+						@click="toggleModal(!showModal)">
+						<text>{{getCheckPointName}}</text>
+						<image :src="`../../static/${showModal?'open':'close'}-icon.png`"></image>
+					</view>
+				</view>
+			</view>
+		</tm-top-menu>
+		<tm-modal v-show="showModal" v-on:click="toggleModal(false)">
+			<view class="content-list">
+				<view class="list-item" v-for="(item, index) in point"
+					:class="{active: checkPointId === item.checkPointId}" @click="checkPointHandle(item.checkPointId)">
+					<text>{{item.checkPointName}}</text>
+					<image class="check-img" v-if="checkPointId === item.checkPointId"
+						src="../../static/checkStatus.png"></image>
+				</view>
+			</view>
+		</tm-modal>
+		<view class="list" v-for="(item, index) in detailList" :key="index">
+			<view class="title" v-if="item.responseList.length > 0">查核要点:{{item.checkPointName}}</view>
+			<view class="item" v-for="(child, n) in item.responseList" @click="childClick(child,item.checkPointId)"
+				:key="n">
+				<view class="top-box">
+					<view class="top-box-left">
+						<view class="index-icon">{{n + 1}}</view>
+						<text>{{child.checkItemName}}</text>
+						<!-- <text>ICU病房查看危重病人的抢救全过程(访谈)ICU病房查看危重病人的抢救全过程(访谈)ICU病房查看危重病人的抢救全过程(访谈)的抢救全过程(访谈)</text> -->
+					</view>
+					<image src="../../static/tuli.png"
+						@tap.stop="goLegendDetails($event ,child.checkItemId, item.checkPointId)"></image>
+				</view>
+				<view class="children">
+					<view class="child">
+						<text>{{child.deptName || '--'}}</text>
+						<text>查核单位</text>
+					</view>
+					<view class="child">
+						<text>{{child.checkModelName || '--'}}</text>
+						<text>查核方式</text>
+					</view>
+					<view class="child">
+						<text>{{child.lastResult || '--'}}</text>
+						<text>上次结果</text>
+					</view>
+					<view class="child">
+						<text>{{child.checkResult || '--'}}</text>
+						<text>本次结果</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<tm-callback-listpage />
+	</view>
+</template>
+
+<script>
+	import {
+		_stopPropagation
+	} from "../../utils/compatible.js";
+	export default {
+		data() {
+			return {
+				btnArr: [{
+						id: 0,
+						label: '全部'
+					},
+					{
+						id: 1,
+						label: '未查核'
+					},
+					{
+						id: 2,
+						label: '已查核'
+					},
+				],
+				showModal: false,
 				detailList: [],
-				copyDetailList: [],
-				point: [{checkPointId: 'all', checkPointName: '全部要点'}],
-				checkPointId: 'all',
-				nowPermission: uni.getStorageSync('nowPermission'),
-				active: 0,
-				checkId:'',
-				deptId:''
-			};
-		},
-		computed: {
-			getCheckPointName() {
-				let item=this.point.find((item)=> item.checkPointId === this.checkPointId);
-				return item ? item.checkPointName : '';
-			},
-		},
-		onLoad: function ({checkId,deptId}) {
-			this.deptId = deptId;
-			this.checkId = checkId;
-			this.dispatch('checkTaskDetailList', {checkId,deptId}).then((data)=>{
-				if(data) {
-					// console.log({data});
-					this.detailList = data;
-					this.copyDetailList = data;
-					data.map(({checkPointId,checkPointName})=>{
-						this.point.push({checkPointId, checkPointName});
-					});
-				}
-			});
-		},
-		methods: {
-			btnClick(id) {
-				this.active = id;
-				this.filterCompleteFlag(id);
-			},
-			childClick(child, checkPointId) {
-				// 查核者,管理员
-				if(this.nowPermission == 1 || this.nowPermission == 3) { 
-					let str = '',that = this;
-					if(child.checkResult) {
-						// 跳转到查核项详情
-						str = 'auditItemDetails/auditItemDetails';
-					} else {
-						if(this.nowPermission == 1) {
-							uni.showModal({
-							  title: '提示',
-							  content: '请切换至查核者角色再进行查核操作!',
-							  showCancel: false
-							});
-							return;
-						} else {
-							// 跳转到查核结果提交
-							str = 'mainPointsDetail/mainPointsDetail';
-						}
-					}
-					uni.navigateTo({
-						url: `/pages/${str}?id=${child.id}&checkPointId=${checkPointId}`,
-						success: function(res) {
-							const currentGroup = that.detailList.filter(item=>item.checkPointId == checkPointId);
-						    // 通过eventChannel向被打开页面传送数据
-						    res.eventChannel.emit('acceptDataFromOpenerPage', { data: currentGroup });
-						}
-					});
-				}
-			},
-			toggleModal(flage) {
-				this.showModal = flage;
-			},
-			checkPointHandle(id) {
-				this.checkPointId = id;
-				if(id === 'all') {
-					this.detailList = [...this.copyDetailList];
-				} else {
-					this.detailList = this.copyDetailList
-						.filter((item)=> item.checkPointId === id);
-				}
-			},
-			filterCompleteFlag(btnId) {
-				if(btnId === 0) {
-					this.detailList = [...this.copyDetailList];
-				} else {
-					let completeFlag = btnId === 1 ? false : true;
-					this.detailList = this.copyDetailList.map((item)=>{
-						return {
-							...item,
-							responseList: item.responseList
-								.filter((child)=> child.completeFlag === completeFlag)
-						}
-					});
-				}
-			},
-			filterFromName(e) {
-				const {value} = e.detail; 
-				if(value === '') {
-					this.detailList = [...this.copyDetailList];
-				} else {
-					this.detailList = [];
-					this.copyDetailList.map((item)=>{
-						let responseList = item.responseList
-							.filter((child)=> child.checkItemName.indexOf(value) >= 0);
-						if(item.checkPointName.indexOf(value) >= 0) {
-							this.detailList.push({...item});
-						} else if(responseList.length > 0) {
-							this.detailList.push({...item, responseList});
-						}
-					});
-				}
-			},
-			goLegendDetails(e, checkItemId, checkPointId) {
-				_stopPropagation(e);
-				//跳转到图例详情
-				uni.navigateTo({
-					url: `/pages/legendDetails/legendDetails?checkItemId=${checkItemId}&checkPointId=${checkPointId}`
+				ifFromChildPage:false,
+				copyDetailList: [],
+				point: [{
+					checkPointId: 'all',
+					checkPointName: '全部要点'
+				}],
+				checkPointId: 'all',
+				nowPermission: uni.getStorageSync('nowPermission'),
+				active: 0,
+				checkId: '',
+				deptId: ''
+			};
+		},
+		computed: {
+			getCheckPointName() {
+				let item = this.point.find((item) => item.checkPointId === this.checkPointId);
+				return item ? item.checkPointName : '';
+			},
+		},
+		onLoad: function({
+			checkId,
+			deptId
+		}) {
+			this.deptId = deptId;
+			this.checkId = checkId;
+			this.checkTaskDetailList({
+				deptId,
+				checkId
+			});
+		},
+		onShow: function() {	
+			if(this.ifFromChildPage){
+				//页面重新拉取数据
+				this.checkTaskDetailList({
+					'deptId':this.deptId,
+					'checkId':this.checkId
 				});
-			},
-			dispatch(key, data) {
-				return this.$store.dispatch({type: 'checkList/commActions', key, data});
-			},
-		}
-	}
-</script>
-
-<style lang="less">
-	.checkMainPoints {
-		position: relative;
-		padding-top: 105rpx;
-		height: 100%;
-		font-size: 22.5rpx;
-		line-height: 33.75rpx;
-		background-color: #F5F6FA;
-		
-		.top-search {
-			display: flex;
-			flex-direction: row;
-			align-items: center;
-			padding: 25rpx;
-			background-color: #fff;
-			box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
-			.search {
-				position: relative;
-				width: 100%;
-				height: 55rpx;
-				line-height: 55rpx;
-				background-color: #F0F2F7;
-				input {
-					padding: 0 45rpx 0 15rpx;
-					height: 55rpx;
-					line-height: 55rpx;
-					font-size: 22.5rpx;
-				}
-				image {
-					position: absolute;
-					top: 16.87rpx;
-					right: 15rpx;
-					width: 21.25rpx;
-					height: 21.25rpx;
-				}
-			}
-			.top-btn-wrap {
-				padding-left: 25rpx;
-				.btn-list {
-					display: flex;
-					flex-direction: row;
-					.com-button {
-						margin-left: 5rpx;
-						&:first-child {
-							margin-left: 0;
-						}
-					}
-				}
-				.select-wrap {
-					display: flex;
-					flex-direction: row;
-					align-items: center;
-					white-space: nowrap;
-					image {
-						margin-left: 9.37rpx;
-						width: 12.5rpx;
-						height: 12.5rpx;
-					}
-				}
-			}
-		}
-		.content-list {
-			padding-top: 105rpx;
-			width: 100%;
-			background-color: #fff;
-			.list-item {
-				display: flex;
-				flex-direction: row;
-				justify-content: space-between;
-				align-items: center;
-				border-bottom: 1px solid #DADEE6;
-				padding: 0 25rpx;
-				width: 100%;
-				height: 87.5rpx;
-				font-size: 22.5rpx;
-				line-height: 33.75rpx;
-				color: #292C33;
-				.check-img {
-					float: right;
-					width: 19.37rpx;
-					height: 14.37rpx;
-				}
-				&.active {
-					color: #3377FF;
-				}
-			}
-		}
-		.list {
-			.title {
-				padding-left: 25rpx;
-				width: 100%;
-				height: 62.5rpx;
-				line-height: 62.5rpx;
-				color: #666F80;
-			}
-			.item {
-				margin-top: 15rpx;
-				padding: 25rpx 0;
-				min-height: 167.5rpx;
-				background-color: #fff;
-				&:nth-child(2) {
-					margin-top: 0;
-				}
-				.top-box {
-					display: flex;
-					flex-direction: row;
-					justify-content: space-between;
-					align-items: center;
-					
-					.top-box-left {
-						display: flex;
-						flex-direction: row;
-						width: calc(100% - 55rpx);
-						.index-icon {
-							margin-right: 15rpx;
-							border-radius: 0 62.5rpx 62.5rpx 0;
-							width: 50rpx;
-							height: 35rpx;
-							line-height: 35rpx;
-							text-align: center;
-							color: #fff;
-							background-color: #66B2FE;
-						}
-						>text {
-							display: -webkit-box;
-							overflow: hidden;
-							width: calc(100% - 65rpx);
-							text-overflow: ellipsis;
-							-webkit-line-clamp: 2;
-							/*! autoprefixer: off */
-							-webkit-box-orient: vertical;
-						}
-					}
-					image {
-						margin-right: 15rpx;
-						width: 40rpx;
-						height: 40rpx;
-					}
-				}
-				.children {
-					display: flex;
-					flex-direction: row;
-					align-items: center;
-					margin-top: 18.75rpx;
-					.child {
-						display: flex;
-						flex-direction: column;
-						justify-content: center;
-						align-items: center;
-						flex: 1;
-						border-right: 1px solid #DADEE6;
-						text {
-							font-weight: 500;
-							&:last-child {
-								font-size: 17.5rpx;
-								line-height: 26.25rpx;
-								color: #7A8599;
-								font-weight: 400;
-							}
-						}
-						&:last-child {
-							border-right: 0;
-						}
-					}
-				}
-			}
-		}
-	}
+			}
+		},
+		beforeDestroy(){
+			this.ifFromChildPage=false;
+		},
+		methods: {
+			btnClick(id) {
+				this.active = id;
+				this.filterCompleteFlag(id);
+			},
+			checkTaskDetailList({
+				checkId,
+				deptId
+			}) {
+				this.dispatch('checkTaskDetailList', {
+					checkId,
+					deptId
+				}).then((data) => {
+					if (data) {
+						// console.log({data});
+						this.detailList = data;
+						this.copyDetailList = data;
+						data.map(({
+							checkPointId,
+							checkPointName
+						}) => {
+							this.point.push({
+								checkPointId,
+								checkPointName
+							});
+						});
+					}
+				});
+			},
+			childClick(child, checkPointId) {
+				// 查核者,管理员
+				if (this.nowPermission == 1 || this.nowPermission == 3) {
+					let str = '',
+						that = this;
+					if (child.checkResult) {
+						// 跳转到查核项详情
+						str = 'auditItemDetails/auditItemDetails';
+					} else {
+						if (this.nowPermission == 1) {
+							uni.showModal({
+								title: '提示',
+								content: '请切换至查核者角色再进行查核操作!',
+								showCancel: false
+							});
+							return;
+						} else {
+							// 跳转到查核结果提交
+							str = 'mainPointsDetail/mainPointsDetail';
+						}
+					}
+					uni.navigateTo({
+						url: `/pages/${str}?id=${child.id}&checkPointId=${checkPointId}&checkItemId=${child.checkItemId}`,
+						success: function(res) {
+							const currentGroup = that.detailList.filter(item => item.checkPointId ==
+								checkPointId);
+							// 通过eventChannel向被打开页面传送数据
+							res.eventChannel.emit('acceptDataFromOpenerPage', {
+								data: currentGroup
+							});
+						}
+					});
+				}
+			},
+			toggleModal(flage) {
+				this.showModal = flage;
+			},
+			checkPointHandle(id) {
+				this.checkPointId = id;
+				if (id === 'all') {
+					this.detailList = [...this.copyDetailList];
+				} else {
+					this.detailList = this.copyDetailList
+						.filter((item) => item.checkPointId === id);
+				}
+			},
+			filterCompleteFlag(btnId) {
+				if (btnId === 0) {
+					this.detailList = [...this.copyDetailList];
+				} else {
+					let completeFlag = btnId === 1 ? false : true;
+					this.detailList = this.copyDetailList.map((item) => {
+						return {
+							...item,
+							responseList: item.responseList
+								.filter((child) => child.completeFlag === completeFlag)
+						}
+					});
+				}
+			},
+			filterFromName(e) {
+				const {
+					value
+				} = e.detail;
+				if (value === '') {
+					this.detailList = [...this.copyDetailList];
+				} else {
+					this.detailList = [];
+					this.copyDetailList.map((item) => {
+						let responseList = item.responseList
+							.filter((child) => child.checkItemName.indexOf(value) >= 0);
+						if (item.checkPointName.indexOf(value) >= 0) {
+							this.detailList.push({
+								...item
+							});
+						} else if (responseList.length > 0) {
+							this.detailList.push({
+								...item,
+								responseList
+							});
+						}
+					});
+				}
+			},
+			goLegendDetails(e, checkItemId, checkPointId) {
+				_stopPropagation(e);
+				//跳转到图例详情
+				uni.navigateTo({
+					url: `/pages/legendDetails/legendDetails?checkItemId=${checkItemId}&checkPointId=${checkPointId}`
+				});
+			},
+			dispatch(key, data) {
+				return this.$store.dispatch({
+					type: 'checkList/commActions',
+					key,
+					data
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.checkMainPoints {
+		position: relative;
+		padding-top: 105rpx;
+		height: 100%;
+		font-size: 22.5rpx;
+		line-height: 33.75rpx;
+		background-color: #F5F6FA;
+
+		.top-search {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			padding: 25rpx;
+			background-color: #fff;
+			box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
+
+			.search {
+				position: relative;
+				width: 100%;
+				height: 55rpx;
+				line-height: 55rpx;
+				background-color: #F0F2F7;
+
+				input {
+					padding: 0 45rpx 0 15rpx;
+					height: 55rpx;
+					line-height: 55rpx;
+					font-size: 22.5rpx;
+				}
+
+				image {
+					position: absolute;
+					top: 16.87rpx;
+					right: 15rpx;
+					width: 21.25rpx;
+					height: 21.25rpx;
+				}
+			}
+
+			.top-btn-wrap {
+				padding-left: 25rpx;
+
+				.btn-list {
+					display: flex;
+					flex-direction: row;
+
+					.com-button {
+						margin-left: 5rpx;
+
+						&:first-child {
+							margin-left: 0;
+						}
+					}
+				}
+
+				.select-wrap {
+					display: flex;
+					flex-direction: row;
+					align-items: center;
+					white-space: nowrap;
+
+					image {
+						margin-left: 9.37rpx;
+						width: 12.5rpx;
+						height: 12.5rpx;
+					}
+				}
+			}
+		}
+
+		.content-list {
+			padding-top: 105rpx;
+			width: 100%;
+			background-color: #fff;
+
+			.list-item {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
+				align-items: center;
+				border-bottom: 1px solid #DADEE6;
+				padding: 0 25rpx;
+				width: 100%;
+				height: 87.5rpx;
+				font-size: 22.5rpx;
+				line-height: 33.75rpx;
+				color: #292C33;
+
+				.check-img {
+					float: right;
+					width: 19.37rpx;
+					height: 14.37rpx;
+				}
+
+				&.active {
+					color: #3377FF;
+				}
+			}
+		}
+
+		.list {
+			.title {
+				padding-left: 25rpx;
+				width: 100%;
+				height: 62.5rpx;
+				line-height: 62.5rpx;
+				color: #666F80;
+			}
+
+			.item {
+				margin-top: 15rpx;
+				padding: 25rpx 0;
+				min-height: 167.5rpx;
+				background-color: #fff;
+
+				&:nth-child(2) {
+					margin-top: 0;
+				}
+
+				.top-box {
+					display: flex;
+					flex-direction: row;
+					justify-content: space-between;
+					align-items: center;
+
+					.top-box-left {
+						display: flex;
+						flex-direction: row;
+						width: calc(100% - 55rpx);
+
+						.index-icon {
+							margin-right: 15rpx;
+							border-radius: 0 62.5rpx 62.5rpx 0;
+							width: 50rpx;
+							height: 35rpx;
+							line-height: 35rpx;
+							text-align: center;
+							color: #fff;
+							background-color: #66B2FE;
+						}
+
+						>text {
+							display: -webkit-box;
+							overflow: hidden;
+							width: calc(100% - 65rpx);
+							text-overflow: ellipsis;
+							-webkit-line-clamp: 2;
+							/*! autoprefixer: off */
+							-webkit-box-orient: vertical;
+						}
+					}
+
+					image {
+						margin-right: 15rpx;
+						width: 40rpx;
+						height: 40rpx;
+					}
+				}
+
+				.children {
+					display: flex;
+					flex-direction: row;
+					align-items: center;
+					margin-top: 18.75rpx;
+
+					.child {
+						display: flex;
+						flex-direction: column;
+						justify-content: center;
+						align-items: center;
+						flex: 1;
+						border-right: 1px solid #DADEE6;
+
+						text {
+							font-weight: 500;
+
+							&:last-child {
+								font-size: 17.5rpx;
+								line-height: 26.25rpx;
+								color: #7A8599;
+								font-weight: 400;
+							}
+						}
+
+						&:last-child {
+							border-right: 0;
+						}
+					}
+				}
+			}
+		}
+	}
 </style>

+ 1 - 1
pages/configure/configure.vue

@@ -141,7 +141,7 @@ export default {
     }
   }
   .configureCont {
-    height: calc(100vh - 280rpx);
+    height: calc(100vh - 360rpx);
     overflow-y: auto;
   }
   .configure-cont {

+ 14 - 2
pages/login/login.vue

@@ -41,7 +41,19 @@
 			}
 		},
 		onLoad({ hospSign }){
-		  this.hospSign = hospSign;
+			  console.log({hospSign});
+		      if(hospSign){
+				  this.hospSign = hospSign;
+			
+			  }else {
+				  const value = uni.getStorageSync('hospSign');
+				  console.log('hospSign',value);
+				  if(hospSign){
+				  	  this.hospSign = value;
+				  }
+			  }
+			  
+			
 		},
 		methods: {
 			login() {
@@ -54,7 +66,7 @@
 							username: encryption(this.username),
 							password: encryption(this.password),
 							hospSign: this.hospSign
-							// hospSign:'8CJYqxlGIdLEIwaG'
+							// hospSign:'vdQpm2OvmLVTPnXL'
 						}
 					}
 				}).then((data) => {

+ 207 - 39
pages/mainPointsDetail/mainPointsDetail.vue

@@ -1,5 +1,23 @@
 <template>
   <view class="mainPointsDetailPage">
+	<tm-modal v-if="showSelectModal" @click="clickModalhandle">
+		<view class="checkItemResultModal">
+			 <view class="modalContent">
+			 	  <view class="modalBar">请选择查核结果</view>
+				  <scroll-view class="scroll" scroll-y="true" >
+				  	<view v-for="item in checkItemResultList" class="list" :key="item.id" @click="selectResultHandle(item.resultName)" >{{item.resultName}}</view>
+					<!-- <view class="list">无缺失</view>
+					<view class="list">主要缺失</view>
+					<view class="list" >不适用</view>
+					<view class="list">无缺失</view>
+					<view class="list">主要缺失</view>
+					<view class="list" >不适用</view>
+					<view class="list">无缺失</view>
+					<view class="list">主要缺失</view> -->
+				  </scroll-view>
+			 </view>
+		</view>
+	</tm-modal>
     <scroll-view scroll-y="true" class="scroll-y">
       <view class="checkItem">
         <view class="chBg">
@@ -43,14 +61,16 @@
           <view class="checked">
             <view
               class="checked-checkItem"
-              @click="checkedOne(1)"
+			  v-for="item in checkConfiglist"
+			  :key="item.value"
+              @click="checkedOne(item.attr)"
               :style="
-                Index == 1
+                Index == item.attr
                   ? { backgroundColor: '#3377FF', color: '#fff' }
                   : { backgroundColor: '#EBEFF7' }
               "
-              >不适用
-              <view v-if="lastIndex == 1"
+              >{{item.attr}}
+              <view v-if="lastIndex == item.attr"
                 ><image
                   src="../../static/shangci.png"
                   mode=""
@@ -59,7 +79,25 @@
                 <text class="lastName">上次</text></view
               >
             </view>
-            <view
+			<!-- <view
+			  class="checked-checkItem"
+			  @click="checkedOne(1)"
+			  :style="
+			    Index == 1
+			      ? { backgroundColor: '#3377FF', color: '#fff' }
+			      : { backgroundColor: '#EBEFF7' }
+			  "
+			  >不适用
+			  <view v-if="lastIndex == 1"
+			    ><image
+			      src="../../static/shangci.png"
+			      mode=""
+			      class="img"
+			    ></image>
+			    <text class="lastName">上次</text></view
+			  >
+			</view> -->
+            <!-- <view
               class="checked-checkItem"
               @click="checkedOne(2)"
               :style="
@@ -130,7 +168,7 @@
                 ></image>
                 <text class="lastName">上次</text></view
               >
-            </view>
+            </view> -->
           </view>
           <view class="more" @click="toHistory">
             <text>查看改善历史</text>
@@ -154,7 +192,10 @@
           </view>
           <view>
             <view class="talkResult">
-              <text class="seeName">查核结果</text>
+			  <view class="seeResultFloorOne">
+                   <text class="seeName">查核结果</text>
+				   <text v-if="checkItemResultList.length>0" class="threePoint" @click="openSelectModal(i)">⋮</text>
+			  </view>
               <textarea
                 maxlength="300"
                 class="seeTextarea"
@@ -177,7 +218,11 @@
       </view>
       <view v-else class="see">
         <view class="seeResult">
-          <text class="seeName">查核结果</text>
+		  <view class="seeResultFloorOne">
+		  	  <text class="seeName">查核结果</text>
+			  <text class="threePoint" v-if="checkItemResultList.length>0" @click="openSelectModal">⋮</text>
+		  	  <!-- <dropdown :list="checkItemResultList" :current="currentSelect" @onClick="dropDownChange"></dropdown> -->
+		  </view>
           <textarea
             maxlength="300"
             class="seeTextarea"
@@ -220,6 +265,8 @@
 export default {
   data() {
     return {
+	  value:'',
+	  showSelectModal:false,
       data: {}, //详情数据
       lastIndex: null, //上次选中的结果
       Index: null, //点击修改本次选中样式
@@ -232,14 +279,39 @@ export default {
       id: "",
       checkPointId: "",
 	  itemBelongGroup:[],
-	  itemId:''
+	  itemId:'',
+	  currentEditTextAreaIndex:'',
+	  checkItemResultList:[],//查核结果说明下拉列表
+	  currentSelect:'',
+	  checkConfiglist:[],//查核情况可配置列表
     };
   },
   mounted() {
     this.checkTaskDetail(this.id);
     this.getPeizhiList();
+	// this.$refs.pop.open();
   },
   methods: {
+	clickModalhandle(){
+		this.showSelectModal = false;
+	},
+	openSelectModal(index){
+		console.log({index});
+		if(index>=0){
+			 this.currentEditTextAreaIndex = index;
+		}
+		this.showSelectModal = true;
+	},
+    selectResultHandle(val){
+		console.log({val});
+		console.log('currentEditTextAreaIndex',this.currentEditTextAreaIndex);
+		if(this.data.checkModelName == '访谈'){
+			this.talkList[this.currentEditTextAreaIndex].talkResult = val;
+		}else {
+			this.recordList[0].talkResult = val;
+		}
+	    this.showSelectModal = false;
+	},
     checkTaskDetail(id) {
       this.$store.dispatch({
           type: "mainPointsDetail/commActions",
@@ -250,18 +322,20 @@ export default {
             },
           },
         }).then((res) => {
+		  this.id = id;
           if (res) {
             this.data = res;
             if (res && res.lastResult == "不适用") {
-              this.lastIndex = 1;
+              // this.lastIndex = 1;
+			  this.lastIndex = res.lastResult;
             } else if (res && res.lastResult == "无缺失") {
-              this.lastIndex = 2;
+              this.lastIndex = res.lastResult;
             } else if (res && res.lastResult == "主要缺失") {
-              this.lastIndex = 3;
+              this.lastIndex = res.lastResult;
             } else if (res && res.lastResult == "次要缺失") {
-              this.lastIndex = 4;
+              this.lastIndex = res.lastResult;
             } else if (res && res.lastResult == "观察事项") {
-              this.lastIndex = 5;
+              this.lastIndex = res.lastResult;
             } else {
               this.lastIndex = 0;
             }
@@ -280,19 +354,20 @@ export default {
     },
     checkedOne(data) {
       this.Index = data;
-      if (data == 1) {
-        this.data.checkResult = "不适用";
-      } else if (data == 2) {
-        this.data.checkResult = "无缺失";
-      } else if (data == 3) {
-        this.data.checkResult = "主要缺失";
-      } else if (data == 4) {
-        this.data.checkResult = "次要缺失";
-      } else if (data == 5) {
-        this.data.checkResult = "观察事项";
-      } else {
-        this.data.checkResult = "";
-      }
+	  this.data.checkResult = data;
+      // if (data == 1) {
+      //   this.data.checkResult = "不适用";
+      // } else if (data == 2) {
+      //   this.data.checkResult = "无缺失";
+      // } else if (data == 3) {
+      //   this.data.checkResult = "主要缺失";
+      // } else if (data == 4) {
+      //   this.data.checkResult = "次要缺失";
+      // } else if (data == 5) {
+      //   this.data.checkResult = "观察事项";
+      // } else {
+      //   this.data.checkResult = "";
+      // }
     },
     changeFilePaths(filePaths, index) {
       let _recordList = [...this.recordList];
@@ -376,7 +451,10 @@ export default {
           list.push(item);
           params.checkResultRequestList = list;
         }
-
+		const checkConfiglist = JSON.parse(JSON.stringify(this.checkConfiglist))
+  //       console.log({'checkConfiglist':this.checkConfiglist});
+		// console.log(checkConfiglist[0].attr);
+		
         this.$store.dispatch({
             type: "mainPointsDetail/commActions",
             payload: {
@@ -386,13 +464,15 @@ export default {
               },
             },
           }).then((res) => {
+			// console.log({'res':res,'checkConfiglist':this.checkConfiglist});
             if (res) {
-              for (let i = 0; i < this.resultConfigList.length; i++) {
+              for (let i = 0; i < checkConfiglist.length; i++) {
                 if (
-                  this.resultConfigList[i].name == params.checkResult &&
-                  (this.resultConfigList[i].resultType == 2 ||
-                    this.resultConfigList[i].resultType == 3)
+                   checkConfiglist[i].attr == params.checkResult &&
+                  (checkConfiglist[i].resultType == 2 ||
+                    checkConfiglist[i].resultType == 3)
                 ) {
+				console.log('开始提交改善前准备');
                   let param = {
                     situationId: this.data.situationId,
                     situationName: this.data.situationName,
@@ -408,7 +488,9 @@ export default {
                     desicion: 0,
                     taskType: "1",
                     checkId: this.data.checkId,
-                    checkResult: this.resultConfigList[i].id,
+					checkResult:0,
+					newResultType:checkConfiglist[i].resultType,
+                    // checkResult: this.resultConfigList[i].id,
                     receiveEmpId: this.data.receiveEmpId,
                     receiveEmpName: this.data.receiveEmpName,
                     checkDetailId: this.data.id,
@@ -474,6 +556,8 @@ export default {
     },
 	goToPrevPage(){
 		// window.history.back();
+		// const pages = getCurrentPages();
+		// console.log({pages});
 		uni.navigateBack({
 		    delta: 1
 		});
@@ -504,20 +588,46 @@ export default {
 		}
 		let needItemIndex = num>0?current[0].index+1:current[0].index-1;
 		let needItemId = this.itemBelongGroup[needItemIndex].id;
+		// console.log({needItemIndex,needItemId});
 		this.checkTaskDetail(needItemId);	
 	},
-	// // 获取改善任务列表
-	// getMissionList(situationId) {
-		
-	// },
+	// 获取查核项可配置列表
+	getCheckConfigList(checkItemId) {
+		this.$store.dispatch({
+			type: 'mainPointsDetail/commActions',
+			payload: {
+				key:'getCheckItemAttr',
+				data:checkItemId
+			}
+		}).then(data=>{
+			this.checkConfiglist = data
+		})
+	},
+	// 获取查核项结果说明下拉列表
+	getCheckItemResultList(checkItemId) {
+		this.$store.dispatch({
+			type: 'mainPointsDetail/commActions',
+			payload: {
+				key:'getCheckItemResultList',
+				data:checkItemId
+			}
+		}).then(data=>{
+			// console.log({data});
+			this.checkItemResultList = data;
+		})
+	},
   },
-  onLoad({ id, checkPointId }) {
+  onLoad({ id, checkPointId,checkItemId }) {
     this.id = id;
     this.checkPointId = checkPointId;
+	
+	this.getCheckConfigList(checkItemId);
+	this.getCheckItemResultList(checkItemId);
+	
 	//接收来自上个页面所传过来的数据
 	const eventChannel = this.getOpenerEventChannel();
 	eventChannel.on('acceptDataFromOpenerPage', (data)=>{
-	    console.log({data});
+	    // console.log({data});
 		this.itemBelongGroup =data.data[0].responseList.map((item,index)=>{
 			    return({
 					index:index,
@@ -541,6 +651,38 @@ export default {
   // min-height: 75rpx;
   // overflow-y: auto;
   height: 100%;
+  
+  .checkItemResultModal {
+	  display: flex;
+	  height: 100%;
+	  justify-content: center;
+	  align-items: center;
+	  .modalContent {
+		   width: 90%;
+		   height:500rpx;
+		   border-radius: 20rpx;
+		   background-color: #FFFFFF;
+		   .modalBar{
+			   display: flex;
+			   justify-content: center;
+			   align-items: center;
+			   height: 80rpx;
+			   color: #4E78FF;
+			   font-size: 22.5rpx;
+			   border-bottom: 0.1rpx solid #E5E5E5;
+		   }
+		   .scroll {
+			   height: calc(100% - 80rpx);
+			   .list {
+				   display: flex;
+				   height: 80rpx;
+				   justify-content: center;
+				   align-items: center;
+				   border-bottom: 0.1rpx solid #E5E5E5;
+			   }
+		   }
+	  }
+  }
   .scroll-y {
     height: calc(100% - 75rpx);
   }
@@ -691,6 +833,19 @@ export default {
       padding-top: 32.5rpx;
       // height: 200rpx;
       border-bottom: 1px solid #dadee6;
+	  .seeResultFloorOne {
+		  display: flex;
+		  flex-direction: row;
+		  justify-content:space-between;
+		  align-items: center;
+		  margin-bottom: 25rpx;
+		  padding-right: 25rpx;
+		  .threePoint {
+			  padding-left: 12.5rpx;
+			  font-size: 20rpx;
+			  font-weight:700;
+		  }
+	  }
       .seeName {
         width: 175rpx;
         font-size: 22.5rpx;
@@ -733,6 +888,19 @@ export default {
       padding-top: 32.5rpx;
       border-bottom: 1px solid #dadee6;
       background-color: #fff;
+	  .seeResultFloorOne {
+	  		  display: flex;
+	  		  flex-direction: row;
+	  		  justify-content:space-between;
+	  		  align-items: center;
+	  		  margin-bottom: 25rpx;
+	  		  padding-right: 25rpx;
+	  		  .threePoint {
+	  			  padding-left: 12.5rpx;
+	  			  font-size: 20rpx;
+	  			  font-weight:700;
+	  		  }
+	  }
       .seeName {
         width: 175rpx;
         font-size: 22.5rpx;

+ 25 - 0
pages/mainPointsDetail/server.js

@@ -11,9 +11,34 @@ const requestList = {
 	  method: 'POST',
 	  url: 'checkTask/saveCheckTaskDetail'
 	},
+	//获取查核配置选项
+	getCheckItemAttr:{
+		method: 'GET',
+		url: 'resultConfig/getCheckItemAttr'
+	},
+	//获取查核结果说明下拉菜单
+	getCheckItemResultList:{
+		method: 'GET',
+		url: 'resultConfig/getCheckItemResult'
+	}
 };
 
 export const commServer = ({ key, data }) => {
+  if(key=='getCheckItemAttr'){
+	  let obj = {
+		  method: 'GET',
+		  url: `resultConfig/getCheckItemAttr/${data}`
+	  };
+	  return creatRequest(obj);
+  }
+  if(key=='getCheckItemResultList'){
+  	  let obj = {
+  		  method: 'GET',
+  		  url: `resultConfig/getCheckItemResult/${data}`
+  	  };
+  	  return creatRequest(obj);
+  }
+  
   let obj = requestList[key];
   return creatRequest(obj, data);
 }

+ 8 - 0
pages/situationsCenter/situationsCenter.vue

@@ -1,5 +1,6 @@
 <template>
   <view class="situationsCenter-page">
+	<!-- <app-update url="123"  ref="appUpdate" ></app-update> -->
     <view class="calender-remind" @click="toMessagePage">
       <image
         :src="`/static/message-${messageType ? 'unread' : 'read'}.png`"
@@ -96,6 +97,7 @@
 <script>
 import websocket from "../../utils/ws.js"; //引入websocket
 import {wsURL} from "../../utils/requestUrl.js";
+// import appUpdate from "@/components/app-update/app-update.vue"
 
 export default {
   data() {
@@ -111,11 +113,13 @@ export default {
       isInitWs: null,
       messageType: null,
       num: 1,
+	  // showUpdatePop:false,
       timer: null,
       // ws接口参数
       initParams: {}
     };
   },
+  // components:{appUpdate},
   created: function () {
     this.nowPermission = uni.getStorageSync("nowPermission");
     this.init(true);
@@ -139,6 +143,10 @@ export default {
   // 		  }
   // 	  }
   // },
+  mounted() {
+	      // console.log(this.$refs);
+       //    this.$refs.app_update.update();  //调用子组件 检查更新
+  },
   methods: {
     openSearchBar() {
       this.isSearchBarShow = true;

+ 3 - 3
pages/suggestionsFeedback/suggestionsFeedback.vue

@@ -16,7 +16,7 @@
 			<text class="row-name">* 反馈类型</text>
 			<view class="row-value">
 				<picker @change="bindPickerChange" :value="index" :range="fallbackTypelist">
-					<view class="uni-input">{{fallbackTypelist[index]}}</view>
+					<view class="uni-input">{{selectedFeedbackType}}</view>
 				</picker>
 			</view>
 			<image class="icon-more" src="/static/images/icon-more.png"></image>
@@ -112,7 +112,7 @@
 						}
 					}
 				}).then((data) => {
-					// console.log(data)
+					console.log(data)
 					this.fallbackTypelist = data;
 					this.selectedFeedbackType = data[0];
 				});
@@ -129,7 +129,7 @@
 				 }
 			},
 			bindPickerChange: function(e) {
-				this.selectedFeedbackType = e.target.value
+				this.selectedFeedbackType = this.fallbackTypelist[e.target.value];
 			},
 			commitFeedback(){
 				const data = {

+ 25 - 0
static/html/pc.html

@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+    <head>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge">
+        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+        <title>
+            <%= htmlWebpackPlugin.options.title %>
+        </title>
+        <script>
+            document.addEventListener('DOMContentLoaded', function() {
+                    window.innerWidth = Math.min(window.innerWidth, 375)
+                    document.documentElement.style.fontSize = window.innerWidth / 20 + 'px'
+            })
+        </script>
+        <link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
+    </head>
+    <body>
+        <noscript>
+            <strong>Please enable JavaScript to continue.</strong>
+        </noscript>
+        <div id="app"></div>
+        <!-- built files will be auto injected -->
+    </body>
+</html>

+ 122 - 0
static/html/template.html

@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<html lang=zh-CN>
+    <head>
+        <meta charset="utf-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge">
+        <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
+   
+        <style type="text/css">
+            body{
+                margin: 0;
+                background-color: #f3f3f3;
+            }
+            iframe{
+                width: 375px;
+                height: 667px;
+                background-color: #fff;
+                box-sizing: content-box;
+                border: none;
+            }
+			
+            @media screen and (min-width: 450px) {
+                iframe {
+                    position: fixed;
+                    top: 0;
+                    right: 0;
+                    bottom: 0;
+                    left: 0;
+                    margin: auto;
+                    border: rgba(0,0,0,0.7) solid 2px;
+                    border-radius: 4px;
+                }
+            }
+        </style>
+        <script type="text/javascript">
+            window.isPC = true;
+            window.onload = function(){
+                /* 监听电脑浏览器窗口尺寸改变 */	
+                window.onresize = function(){
+                    /* 窗口宽度 小于或等于420px 时,跳转回H5页面 */
+                    if(window.innerWidth <= 420){
+						console.log('window.innerWidth <= 420');
+                        window.location.pathname = '/TracerMethodology';
+ 
+                    /* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
+                    // window.location.pathname = '';
+                    }
+                }
+            }
+        </script>
+    </head>
+    <body>
+      <!-- <iframe id="frame" ></iframe> -->
+        <!--
+            若你的项目未设置根目录(默认为 / 时),则使用下方代码
+            <iframe src="/"></iframe>
+        -->
+    </body>
+	<script type="text/javascript">
+		// console.log('iframe',document.getElementById('frame'));
+		function createIframe(id,url,width,height,onLoadCallback,timeOut,timeOutCallback){
+		    var timeOutVar = setTimeout(function(){
+		        clearTimeout(timeOutVar);
+		        timeOutCallback.apply(this, arguments);
+		        return ;
+		    }, timeOut);
+		    var iframe = document.createElement("iframe");
+		    iframe.id=id;
+		    iframe.width=width;
+		    iframe.height=height;
+		    iframe.src=url;
+		    if (iframe.attachEvent){
+		        iframe.attachEvent("onload", function(){
+		                clearTimeout(timeOutVar);
+		            onLoadCallback.apply(this, arguments);
+		        });
+		    } else {
+		        iframe.onload = function(){
+		                clearTimeout(timeOutVar);
+		            onLoadCallback.apply(this, arguments);
+		        };
+		    }
+		    document.body.appendChild(iframe);
+		    return iframe;
+		}
+		
+		function onLoadCallback(){
+			console.log('onLoadCallback');
+		}
+		
+		function timeOutCallback(){
+			console.log('timeOutCallback');
+		}
+		
+		let hospSign = '';
+		let query = window.location.search.substring(1);
+		let vars = query.split("=");
+		for (let i=0;i<vars.length;i++) {
+			
+			   if(vars[i] == 'hospSign'){
+				   hospSign=vars[i+1];
+			   }
+		}
+		
+		
+		
+		localStorage.removeItem('hospSign');
+		localStorage.setItem('hospSign',hospSign);
+		
+		let url = `/TracerMethodology?hospSign=${hospSign}`;
+		
+		console.log({hospSign,query,url});
+		
+		createIframe(
+		     'frame',
+			 url,
+			 '100%',
+			 onLoadCallback,
+			 1000,
+			 timeOutCallback
+		);
+	</script>
+</html>

BIN
static/images/top_2.png


+ 1 - 1
store/index.js

@@ -9,7 +9,7 @@ import module from '../pages/model.js'
 Vue.use(Vuex)
 
 export const store = new Vuex.Store({
-	state: { },
+	state: {ifCheckAppUpdate:false},
 	mutations,
 	actions,
 	modules: {

+ 4 - 1
store/mutations.js

@@ -1,3 +1,6 @@
 export const mutations = {
-	
+	//控制app更新
+	setAppUpdateStatus(state,val){
+		   state.ifCheckAppUpdate = val;
+	}
 }

+ 2 - 2
utils/requestUrl.js

@@ -9,9 +9,9 @@
 // const base = '192.168.51.80:8801/imed/pfm/';
 // export const URL = '192.168.51.80:8801/imed/pfm/'; // 本地
 // export const URL = '192.168.38.174:8088/imed/pfm/';
-export const URL = '192.168.1.45:8088/imed/pfm/'; //内网
+// export const URL = '192.168.1.45:8088/imed/pfm/'; //内网
 // export const URL = 's1.nsloop.com:5137/imed/pfm/';  // 外网
-// export const URL = '121.43.139.179:8801/imed/pfm/';  // 云端服务1
+export const URL = '121.43.139.179:8801/imed/pfm/';  // 云端服务1
 // export const URL = '172.18.116.20:8801/imed/pfm/';  // 云端服务2
 export const wsURL = (hiId, user, permission) => {
 	return `ws://${URL}websocket/${hiId}/${user}/${permission}`;