فهرست منبع

改善者页面流程优化/版本信息弹窗添加支持换行

xieyunhui 4 سال پیش
والد
کامیت
76e1aacdfb

+ 42 - 22
pages/auditItemDetails/auditItemDetails.vue

@@ -53,13 +53,14 @@
 			</view>
 		</view>
 	
-		<view class="bottomMenuGroup">
+		<view class="bottomMenuGroup" v-if="ifShowBotBtn">
 			<view class="menuBtn" @click="goToPrevPage">
 				<image class="threeLineMenuIcon" src="/static/threeLineMenu.png" ></image>
 			</view>
 			<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>
 </template>
 
@@ -80,32 +81,41 @@
 					checkResultRequestList: [],
 					checkPointId: ''
 				},
+				ifShowBotBtn:false,
 				itemBelongGroup:[],
-				itemId:''
+				itemId:'',
+				ifImprover:true
 			};
 		},
 		onLoad: function ({id, checkPointId}) {
-			console.log('22');
+			const roleNum = uni.getStorageSync('nowPermission');		
+			if(roleNum==3)this.ifShowBotBtn = true;
+			if(roleNum==3)this.ifImprover = false;
 			this.checkPointId = checkPointId;
 			this.itemId = id;
 			this.loadItemDetail(id);
-			//接收来自上个页面所传过来的数据
-			const eventChannel = this.getOpenerEventChannel();
-			eventChannel.on('acceptDataFromOpenerPage', (data)=>{
-			    // console.log({data});
-				this.itemBelongGroup =data.data[0].responseList.map((item,index)=>{
-					    return({
-							index:index,
-							id:item['id'],
-						})
+			
+			//只有查核展示底部按钮
+			if(roleNum==3){
+				//接收来自上个页面所传过来的数据
+				const eventChannel = this.getOpenerEventChannel();
+				eventChannel.on('acceptDataFromOpenerPage', (data)=>{
+				    // console.log({data});
+					this.itemBelongGroup =data.data[0].responseList.map((item,index)=>{
+						    return({
+								index:index,
+								id:item['id'],
+							})
+					});
+					//重新导航进页面,删除缓存并设置最新数据
+					uni.removeStorageSync('itemBelongGroup');
+				    uni.setStorageSync('itemBelongGroup',this.itemBelongGroup);
 				});
-				//重新导航进页面,删除缓存并设置最新数据
-				uni.removeStorageSync('itemBelongGroup');
-			    uni.setStorageSync('itemBelongGroup',this.itemBelongGroup);
-			});
-			//手动刷新页面,获取本地缓存
-			const itemBelongGroup = uni.getStorageSync('itemBelongGroup');
-			this.itemBelongGroup = itemBelongGroup;
+				//手动刷新页面,获取本地缓存
+				const itemBelongGroup = uni.getStorageSync('itemBelongGroup');
+				this.itemBelongGroup = itemBelongGroup;
+			}
+			
 		},
 		methods: {
 			getArr(value) {
@@ -121,9 +131,6 @@
 				return this.$store.dispatch({type: 'checkList/commActions', key, data});
 			},
 			goToPrevPage(){
-				// uni.navigateBack({
-				//     delta: 1
-				// });
 				window.history.back();
 			},
 			loadItemDetail(id){
@@ -168,6 +175,19 @@
 
 <style lang="less">
 	.auditItemDetails {
+		.bottomBtn {
+			position: fixed;
+			bottom: 0;
+			width: 100%;
+			height: 75rpx;
+			line-height: 75rpx;
+			text-align: center;
+			font-size: 22.5rpx;
+			font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+			font-weight: 400;
+			color: #FFFFFF;
+			background: #3377FF;
+		}
 		.top-box {
 			position: relative;
 			margin-top: 15rpx;

+ 1 - 1
pages/creatingSituations/components/checkRent.vue

@@ -14,7 +14,7 @@
 					<view class="info">
 						<view class="text">
 							<view>{{item.name}}</view>
-							<view>组长:{{item.groupManagerName}}</view>
+							<view>组长:{{item.groupManagerNames}}</view>
 						</view>
 						<view class="icon" @click="checkedHandle($event, item)">
 							<image :src="`../../static/check-${checkRent.checkedItem.id === item.id ? 'radio' : 'no'}.png`"></image>

+ 22 - 22
pages/home/home.vue

@@ -66,8 +66,9 @@
 					<text>{{journalData.logTitle}}</text>
 					<text>{{journalData.logDate}}</text>
 				</view>
-				<scroll-view scroll-y="true" class="journal-content">
-					{{journalData.logContent}}
+				<scroll-view scroll-y="true" class="journal-content">
+					<textarea class="journal-content-inner" v-html="identifyEnterCode(journalData.logContent)" />
+				<!-- 	{{journalData.logContent}} -->
 				</scroll-view>
 				<button class="journal-ok" @click="journalOk">确定</button>
 			</view>
@@ -78,8 +79,9 @@
 					<text>{{versionData.versionNo}}</text>
 					<text>{{versionData.versionDate}}</text>
 				</view>
-				<scroll-view scroll-y="true" class="journal-content">
-					{{versionData.versionContent}}
+				<scroll-view scroll-y="true" class="journal-content">
+					<textarea class="journal-content-inner" v-html="identifyEnterCode(versionData.versionContent)" />
+					<!-- {{versionData.versionContent}} -->
 				</scroll-view>
 				<button class="journal-ok" @click="ifshowVersionInfo = false">确定</button>
 			</view>
@@ -179,23 +181,7 @@
 				}
 			});
 		},
-		// methods: {
-		// 	logOut() {
-		// 		this.$store.dispatch({
-		// 			type: 'home/commActions',
-		// 			payload: {
-		// 				key: 'logout',
-		// 			}
-		// 		}).then((data) => {
-		// 			if (data) {
-		// 				uni.redirectTo({
-		// 					url: `/pages/login/login?hospSign=${uni.getStorageSync('hospSign')}`
-		// 				});
-		// 			}
-		// 		});
-		// 	},
-			
-		// },
+		
 		created: function() {
 			this.$store.dispatch({
 				type: 'home/commActions',
@@ -250,6 +236,11 @@
 						});
 					}
 				});
+			},
+			identifyEnterCode(content){
+				 let repalcedContent = content.replace(/(\r\n|\n|\r)/gm, "<br />");
+				 console.log({repalcedContent});
+				 return repalcedContent;
 			},
 			feedbackFunc(){
 				uni.navigateTo({
@@ -333,7 +324,16 @@
 
 		.journal-content {
 			margin: 25rpx 0;
-			max-height: 332.5rpx;
+			max-height: 332.5rpx;
+			.journal-content-inner {
+				width: 462.5rpx;
+				font-size: 22.5rpx;
+				font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+				font-weight: 400;
+				color: #292C33;
+				line-height: 35rpx;
+				word-wrap:break-word;
+			}
 		}
 
 		.journal-ok {

+ 3 - 2
pages/mission-action/components/disagree.vue

@@ -17,10 +17,11 @@
 		</view>
     </scroll-view>
 		<view class="fixed-buttom-btn"
-      v-if="!disabled"
-      @click="sure">
+		  v-if="!disabled"
+		  @click="sure">
 			<text class="btn-text">确定</text>
 		</view>
+		
 	</view>
 </template>
 

+ 122 - 112
pages/mission-action/components/pdca-components/one-textarea.vue

@@ -1,113 +1,123 @@
-<template>
-	<view class="com-plan-content">
-		<view class="title">
-			<text>{{ title }}</text>
-		</view>
-		<view class="item-container">
-			<view class="label-view">
-				<text>{{ label }}</text>
-			</view>
-			<view class="content">
-				<textarea class="textarea"
-          :key="title"
-				  placeholder="请输入"
-					placeholder-style="color: #B8BECC"
-					:maxlength="500"
-					auto-height
-          :value="defaultValue"
-          :disabled="disabled"
-          @input="changeVal"
-				/>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	// 单个多行输入框 (改善计划(Plan)/oneTextarea)
-
-	export default {
-		props: {
-      // 类型 (plan 和 action)
-			type: {
-        type: String,
-        default: 'plan'
-      },
-      // 对策处置默认值
-      defaultValue: {
-        type: String,
-        default: ''
-      },
-      // 是否禁用
-      disabled: {
-        type: Boolean,
-        default: false
-      },
-    },
-    computed: {
-      // 多行文本框标题
-      title() {
-        return this.type === 'plan' ? '改善计划(Plan)' : '对策处置(Action)'
-      },
-        // 多行文本框子标题
-			label() {
-        return this.type === 'plan' ? '改善计划' : '对策处置'
-      }
-    },
-		methods: {
-      changeVal(e) {
-        this.$emit('changeTextare', this.type,  e.target.value);
-      }
-		},
-	}
-</script>
-
-<style lang="less">
-	.com-plan-content {
-		height: 100%;
-		padding-top: 35rpx;
-
-		.title {
-			line-height: 35rpx;
-			padding: 0 25rpx;
-
-			text {
-				font-size: 35rpx;
-				color: #292C33;
-			}
-		}
-
-		.item-container {
-			display: flex;
-			margin-top: 25rpx;
-			padding-left: 25rpx;
-			background-color: #FFFFFF;
-
-			.label-view {
-				width: 175rpx;
-				line-height: 37.5rpx;
-				padding: 25rpx 0;
-
-				>text {
-					font-size: 22.5rpx;
-					color: #666F80;
-				}
-			}
-
-			.content {
-				flex: 1;
-				padding: 25rpx 0;
-
-				.textarea {
-					width: 100%;
-					min-height: 810rpx;
-					padding: 0 25rpx;
-					line-height: 37.5rpx;
-					font-size: 22.5rpx;
-					color: #525866;
-					box-sizing: border-box;
-				}
-			}
-		}
-	}
+<template>
+	<view class="com-plan-content">
+		<view class="title">
+			<text>{{ title }}</text>
+		</view>
+		<view class="item-container">
+			<view class="label-view">
+				<text>{{ label }}</text>
+			</view>
+			<view class="content">
+				<textarea class="textarea" :key="title" placeholder="请输入" placeholder-style="color: #B8BECC"
+					:maxlength="500" auto-height :value="defaultValue" :disabled="disabled" @input="changeVal" />
+			</view>
+		</view>
+		<view class="bottomBtn" @click="goToPrevPage" v-if="disabled">返回改善任务详情</view>
+	</view>
+</template>
+
+<script>
+	// 单个多行输入框 (改善计划(Plan)/oneTextarea)
+
+	export default {
+		props: {
+			// 类型 (plan 和 action)
+			type: {
+				type: String,
+				default: 'plan'
+			},
+			// 对策处置默认值
+			defaultValue: {
+				type: String,
+				default: ''
+			},
+			// 是否禁用
+			disabled: {
+				type: Boolean,
+				default: false
+			},
+		},
+		computed: {
+			// 多行文本框标题
+			title() {
+				return this.type === 'plan' ? '改善计划(Plan)' : '对策处置(Action)'
+			},
+			// 多行文本框子标题
+			label() {
+				return this.type === 'plan' ? '改善计划' : '对策处置'
+			}
+		},
+		methods: {
+			changeVal(e) {
+				this.$emit('changeTextare', this.type, e.target.value);
+			},
+			goToPrevPage(){
+				window.history.back();
+			},
+		},
+	}
+</script>
+
+<style lang="less">
+	.com-plan-content {
+		height: 100%;
+		padding-top: 35rpx;
+
+		.bottomBtn {
+			position: fixed;
+			bottom: 0;
+			width: 100%;
+			height: 75rpx;
+			line-height: 75rpx;
+			text-align: center;
+			font-size: 22.5rpx;
+			font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+			font-weight: 400;
+			color: #FFFFFF;
+			background: #3377FF;
+		}
+
+		.title {
+			line-height: 35rpx;
+			padding: 0 25rpx;
+
+			text {
+				font-size: 35rpx;
+				color: #292C33;
+			}
+		}
+
+		.item-container {
+			display: flex;
+			margin-top: 25rpx;
+			padding-left: 25rpx;
+			background-color: #FFFFFF;
+
+			.label-view {
+				width: 175rpx;
+				line-height: 37.5rpx;
+				padding: 25rpx 0;
+
+				>text {
+					font-size: 22.5rpx;
+					color: #666F80;
+				}
+			}
+
+			.content {
+				flex: 1;
+				padding: 25rpx 0;
+
+				.textarea {
+					width: 100%;
+					min-height: 810rpx;
+					padding: 0 25rpx;
+					line-height: 37.5rpx;
+					font-size: 22.5rpx;
+					color: #525866;
+					box-sizing: border-box;
+				}
+			}
+		}
+	}
 </style>

+ 158 - 153
pages/mission-action/components/write-back.vue

@@ -1,156 +1,161 @@
-<template>
-	<view class="write-back-page">
-		<scroll-view class="scroll-y" scroll-y="true" >
-			<view class="item-box">
-				<view class="label-view">
-					<text>回复内容</text>
-				</view>
-				<textarea class="textarea"
-				  placeholder="请输入"
-					placeholder-style="color: #B8BECC"
-					:maxlength="500"
-          :disabled="disabled"
-          auto-height
-          :value="disabled ? values['textarea'] : value"
-          @input="changeValue"
-				/>
-			</view>
-			<tm-upload-img
-			  :filePaths="filePath"
-				:isMultiple="true"
-        :disabled="disabled"
-				@changeFilePaths="changeFilePaths"
-			/>
-		</scroll-view>
-		<view class="fixed-buttom-btn"
-      v-if="!disabled"
-      @click="sure">
-			<text class="btn-text">确定</text>
+<template>
+	<view class="write-back-page">
+		<scroll-view class="scroll-y" scroll-y="true">
+			<view class="item-box">
+				<view class="label-view">
+					<text>回复内容</text>
+				</view>
+				<textarea class="textarea" placeholder="请输入" placeholder-style="color: #B8BECC" :maxlength="500"
+					:disabled="disabled" auto-height :value="disabled ? values['textarea'] : value"
+					@input="changeValue" />
+			</view>
+			<tm-upload-img :filePaths="filePath" :isMultiple="true" :disabled="disabled"
+				@changeFilePaths="changeFilePaths" />
+		</scroll-view>
+		<view class="fixed-buttom-btn" v-if="!disabled" @click="sure">
+			<text class="btn-text">确定</text>
 		</view>
-	</view>
-</template>
-
-<script>
-	// 改善回复
-	export default {
-     props: {
-      // 是否禁用
-      disabled: {
-        type: Boolean,
-        default: false
-      },
-      // 详情回显的数据
-      values: {
-        type: Object,
-        default: () => {
-          return {}
-        }
-      },
-      // 按钮信息 (包过请求的key)
-      btnInfo: {
-        type: Object,
-        default: () => {
-          return {}
-        }
-      },
-      // 任务详情
-      missionDetails: {
-        type: Object,
-        default: () => {
-          return {}
-        }
-      }
-    },
-		data() {
-			return {
-        value: '',
-				filePath: []
-			}
-		},
-		created() {
-			uni.setNavigationBarTitle({
-				title: '原因'
-      });
-      if(this.disabled) {
-        this.value = this.values['textarea'];
-        this.filePath = this.values['filePath'] ? this.values['filePath'].split(',') : [];
-      }
-		},
-		methods: {
-      changeValue(e) {
-        this.value = e.detail.value;
-      },
-			changeFilePaths(filePath) {
-				this.filePath = filePath;
-      },
-      sure() {
-        let requestParams = {};
-        this.btnInfo.params.map(item => {
-          if(item.valueKey){
-            requestParams[item.paramsKey] = (
-              item.isOutvalueKey
-              ? this.missionDetails
-              : this.btnInfo
-            )[item.valueKey];
-          }else if(item.value){
-            requestParams[item.paramsKey] = item.value;
-          }else {
-             switch(item.paramsKey){
-              case 'imgPath': // 上传图片
-                requestParams[item.paramsKey] = this.filePath.join(',');
-                break;
-              case 'textarea': // 回复内容
-                requestParams[item.paramsKey] = this.value;
-                break;
-              default:
-                requestParams[item.paramsKey] = '';
-                break;
-            }
-          }
-        });
-        this.$emit('comRequest', requestParams);
-      }
+		<view class="bottomBtn" @click="goToPrevPage" v-if="disabled">返回改善任务详情</view>
+	</view>
+</template>
+
+<script>
+	// 改善回复
+	export default {
+		props: {
+			// 是否禁用
+			disabled: {
+				type: Boolean,
+				default: false
+			},
+			// 详情回显的数据
+			values: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			// 按钮信息 (包过请求的key)
+			btnInfo: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			// 任务详情
+			missionDetails: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			}
+		},
+		data() {
+			return {
+				value: '',
+				filePath: []
+			}
+		},
+		created() {
+			uni.setNavigationBarTitle({
+				title: '原因'
+			});
+			if (this.disabled) {
+				this.value = this.values['textarea'];
+				this.filePath = this.values['filePath'] ? this.values['filePath'].split(',') : [];
+			}
+		},
+		methods: {
+			changeValue(e) {
+				this.value = e.detail.value;
+			},
+			goToPrevPage(){
+				window.history.back();
+			},
+			changeFilePaths(filePath) {
+				this.filePath = filePath;
+			},
+			sure() {
+				let requestParams = {};
+				this.btnInfo.params.map(item => {
+					if (item.valueKey) {
+						requestParams[item.paramsKey] = (
+							item.isOutvalueKey ?
+							this.missionDetails :
+							this.btnInfo
+						)[item.valueKey];
+					} else if (item.value) {
+						requestParams[item.paramsKey] = item.value;
+					} else {
+						switch (item.paramsKey) {
+							case 'imgPath': // 上传图片
+								requestParams[item.paramsKey] = this.filePath.join(',');
+								break;
+							case 'textarea': // 回复内容
+								requestParams[item.paramsKey] = this.value;
+								break;
+							default:
+								requestParams[item.paramsKey] = '';
+								break;
+						}
+					}
+				});
+				this.$emit('comRequest', requestParams);
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.write-back-page {
+		height: 100%;
+		padding-top: 15rpx;
+
+		.scroll-y {
+			height: calc(100% - 102rpx);
+
+			.item-box {
+				display: flex;
+				background-color: #FFFFFF;
+				border-bottom: 0.62rpx solid #DADEE6;
+				padding: 25rpx 0;
+				padding-left: 25rpx;
+
+				.label-view {
+					width: 175rpx;
+					line-height: 37.5rpx;
+
+
+					>text {
+						font-size: 22.5rpx;
+						color: #666F80;
+					}
+				}
+
+				.textarea {
+					width: 100%;
+					min-height: 587.5rpx;
+					background-color: #fff;
+					padding: 0 25rpx;
+					line-height: 37.5rpx;
+					font-size: 22.5rpx;
+					color: #525866;
+					box-sizing: border-box;
+				}
+			}
 		}
-	}
-</script>
-
-<style lang="less">
-	.write-back-page {
-		height: 100%;
-		padding-top: 15rpx;
-
-		.scroll-y {
-			height: calc(100% - 102rpx);
-
-			.item-box {
-				display: flex;
-				background-color: #FFFFFF;
-				border-bottom: 0.62rpx solid #DADEE6;
-				padding: 25rpx 0;
-				padding-left: 25rpx;
-
-				.label-view {
-					width: 175rpx;
-					line-height: 37.5rpx;
-
-
-					>text {
-						font-size: 22.5rpx;
-						color: #666F80;
-					}
-				}
-
-				.textarea {
-					width: 100%;
-					min-height: 587.5rpx;
-					background-color: #fff;
-					padding: 0 25rpx;
-					line-height: 37.5rpx;
-					font-size: 22.5rpx;
-					color: #525866;
-					box-sizing: border-box;
-				}
-			}
-		}
-	}
+		.bottomBtn {
+			position: fixed;
+			bottom: 0;
+			width: 100%;
+			height: 75rpx;
+			line-height: 75rpx;
+			text-align: center;
+			font-size: 22.5rpx;
+			font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+			font-weight: 400;
+			color: #FFFFFF;
+			background: #3377FF;
+		}
+	}
 </style>

+ 400 - 358
pages/mission-details/mission-details.vue

@@ -1,359 +1,401 @@
-<template>
-	<view class="mission-details-page">
-		<scroll-view class="scroll-y" scroll-y="true">
-			<list-item :isDetails="true" :task="missionDetails" />
-			<view class="mission-plan">
-				<view class="label">
-					<text>改善进度</text>
-				</view>
-				<view class="plan-box">
-					<template v-for="(item, i) in missionDetails.pfmTaskCirculationList || []">
-						<view class="row" :key="i">
-							<view class="col">
-								<image
-								  class="plan-icon"
-									:src="`/static/${i === taskStepLength ? 'check-radio' : 'check-no'}.png`">
-								</image>
-								<view class="line" v-show="i != taskStepLength"></view>
-							</view>
-						  <view class="col">
-								<view class="title">
-									<text>{{ getContext(item, false, 'row1') }}</text>
-								</view>
-								<view class="sub-box">
-									<view class="sub-title">
-										<text>{{ getContext(item, false, 'row2') }}</text>
-									</view>
-									<view class="sub-title">
-										<text>{{ item.recordTime }}</text>
-									</view>
-								</view>
-                <template v-if="getContext(item, true, 'selectDetails')">
-                  <view class="link-view"
-                    @click="goToDetails(item, getContext(item, true, 'selectDetails'))"
-                  >
-                    <text>{{ getContext(item, true, 'selectDetails').name }}</text>
-								  	<image class="blue-arr" src="/static/blue-arrow.png"></image>
-                  </view>
-                </template>
-						  </view>
-						</view>
-            <view :class="['btn-group', taskBtn.length === 1 ?'btn-one' : '']"
-              v-if="missionDetails.buttonDisplayFlag == 1
-              && missionDetails.pfmTaskCirculationList
-              && i == missionDetails.pfmTaskCirculationList.length - 1"
-            >
-              <template v-for="(btn, i1) in taskBtn">
-                <tm-button
-                  :key="i1"
-                  :type="taskBtn.length === 1 ? 'default' : ( i1 === 0 ? 'pramary' : 'default')"
-                  :btnText="btn.name"
-                  @btnClick="clickBtn(item, btn)"
-                />
-              </template>
-					  </view>
-					</template>
-				</view>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-	// 改善任务
-  import { mapState } from "vuex";
-  import listItem from '../mission/components/list-item.vue';
-  import taskTypeList from './setting.js';
-  import pdcaSetting from './pdcaSetting.js'
-
-	export default {
-    computed: {
-      ...mapState({
-        missionDetails: state => state.mission.missionDetails
-      }),
-      // 进度长度
-      taskStepLength() {
-        return (this.missionDetails.pfmTaskCirculationList || []).length - 1;
-      },
-      // 获取底部按钮
-      taskBtn() {
-        const { buttonDisplayFlag, pfmTaskCirculationList, taskType, checkResult } = this.missionDetails;
-        if(buttonDisplayFlag == 1 && pfmTaskCirculationList && pfmTaskCirculationList.length > 0) {
-          let task = null;
-          if(taskType == 1 || taskType == 3) { // 状态为1, 和3比较特殊,需要再比较checkResult
-            task = taskTypeList.find(item => (item.taskType == taskType && item.checkResult == checkResult));
-          }else {
-            task = taskTypeList.find(item => item.taskType == taskType);
-          }
-          return task ? task.btnList : []
-        }else {
-          return [];
-        }
-      }
-    },
-		data() {
-			return {
-        // 任务id
-        taskId: '',
-        // 跳转详情信息
-        linkTaskDetails: null
-			}
-    },
-    onLoad({ taskId }){
-      this.taskId = taskId;
-    },
-    created() {
-      this.getMissionDetails();
-    },
-		methods: {
-      // 获取改善任务列表
-			getMissionDetails(data) {
-				this.$store.dispatch({
-					type: 'mission/commActions',
-					payload: {
-						key: "getMissionDetails",
-						data: {taskId: this.taskId}
-					}
-				});
-			},
-			// 点击按钮
-			clickBtn(currentInfo, btnInfo) {
-        if(btnInfo.componentName){ // 有组件名,则跳转页面
-          if(btnInfo.componentName === 'pdca'){
-            const { taskType, needApproveFlag } = this.missionDetails;
-            // needApproveFlag: true 需要审核(p)只显示p
-            if(taskType === 8){
-                btnInfo= {
-                ...btnInfo,
-                ...pdcaSetting['pdcaBtnInfo'],
-                pDisabled: true // plan内容禁用
-              };
-            } else if(taskType === 11){
-                btnInfo= {
-                ...btnInfo,
-                ...pdcaSetting[needApproveFlag ? 'pdcaBtnInfo' : 'pdcaBtnInfo2'],
-                pDisabled: needApproveFlag // plan内容是否禁用取决于needApproveFlag
-              };
-            }else if(taskType === 13){ // 制定改善方案p中(需要回显暂存过的数据)
-              btnInfo= {
-                ...btnInfo,
-                ...pdcaSetting['editPBtnInfo'],
-                isEdit: true
-              };
-            }else if(taskType === 15){ // 制定改善方案pdca中(需要回显暂存过的数据)
-              btnInfo= {
-                ...btnInfo,
-                ...pdcaSetting['editPdcaBtnInfo'],
-                isEdit: true,
-                pDisabled: needApproveFlag
-              };
-            }else {
-              // taskType === 4 || taskType === 6 || taskType === 7 || taskType === 9
-              btnInfo= {
-                ...btnInfo,
-                ...pdcaSetting[needApproveFlag ? 'pBtnInfo' : 'pdcaBtnInfo2']
-              };
-            }
-          }
-          uni.navigateTo({
-            url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...btnInfo}))}`
-				  });
-        }else { // 直接调接口
-          let requestParams = {};
-          btnInfo.params.map(item => {
-            if(item.valueKey){
-              requestParams[item.paramsKey] = (
-                item.isOutvalueKey
-                ? this.missionDetails
-                : currentInfo
-              )[item.valueKey];
-            }else if(item.value){
-              requestParams[item.paramsKey] = item.value;
-            }
-          })
-          this.comTaskCirculation(requestParams);
-        }
-      },
-      // 查看详情
-      goToDetails(currentInfo, detailInfo) {
-        if(detailInfo.navigateUrl){ // 跳转其他页面(如查核项详情) 目前hasAnyData都为false
-          const {navigateUrl, key, isOutvalueKey, hasAnyData} = detailInfo;
-          uni.navigateTo({
-            url: `${detailInfo.navigateUrl}?id=${(isOutvalueKey ? this.missionDetails : currentInfo)[detailInfo.key]}&checkPointId=${this.missionDetails.checkPointId}`
-				  });
-        }else {
-          uni.navigateTo({
-            url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...detailInfo}))}`
-				  });
-        }
-      },
-      /***
-       *  解析显示对应的内容
-       *  @param {Object} obj 当前遍历的任务
-			 *  @param {Boolean} isLink 是否需要跳转页面(查看详情)
-			 *  @param {String} rowKey 任务流程中的key
-       */
-      getContext(obj, isLink, rowKey){
-        let currentTypeTask = null;
-        if(obj.taskType == 1) {
-          const { checkResult } = this.missionDetails;
-          currentTypeTask = taskTypeList.find(item => (item.taskType == obj.taskType && item.checkResult == checkResult)) || {};
-        }else {
-          currentTypeTask = taskTypeList.find(item => item.taskType == obj.taskType) || {};
-        }
-        if(isLink) {
-          return currentTypeTask[rowKey];
-        }else {
-          const { hasJoin, name, key, isOutvalueKey} = currentTypeTask[rowKey] || {};
-          if(hasJoin) { // 需要删除*并替换
-            return name ? name.replace(/x/g, (isOutvalueKey ? this.missionDetails : obj)[key] || '') : ''
-          }else {
-            return name || '';
-          }
-        }
-      },
-      // 公共改善任务接口
-      comTaskCirculation(data) {
-        this.$store.dispatch({
-					type: 'mission/commActions',
-					payload: {
-						key: "comTaskCirculation",
-						data
-					}
-				}).then(data1 => {
-          if(data1){
-           this.getMissionDetails();
-          }
-				});
-      }
-		},
-		components: {
-			listItem
-		}
-	}
-</script>
-
-<style lang="less">
-	.mission-details-page {
-		height: 100%;
-		padding-top: 15rpx;
-
-		.scroll-y {
-			height: 100%;
-
-			.mission-plan {
-
-				.label {
-					margin-top: 25rpx;
-					margin-bottom: 15rpx;
-					height: 20rpx;
-					line-height: 20rpx;
-					padding-left: 25rpx;
-
-					text {
-						font-size: 20rpx;
-						color: #666F80;
-					}
-				}
-
-				.plan-box {
-					padding: 25rpx;
-					background-color: #fff;
-
-					.row {
-						display: flex;
-
-						.col {
-
-							.title {
-								display: flex;
-								align-items: center;
-								margin-bottom: 15rpx;
-								height: 25rpx;
-
-							  >text {
-									font-size: 22.5rpx;
-									color: #292C33;
-								}
-							}
-
-							.sub-box {
-								display: flex;
-								flex-direction: column;
-
-								.sub-title {
-									display: flex;
-									align-items: center;
-									margin-bottom: 15rpx;
-									height: 20rpx;
-
-									&:last-child {
-										margin-bottom: 34.37rpx;
-									}
-
-									>text {
-										font-size: 20rpx;
-										color: #666E80;
-									}
-								}
-							}
-
-							&:first-child {
-								display: flex;
-								flex-direction: column;
-								align-items: center;
-								margin-right: 15rpx;
-								width: 25rpx;
-
-								.plan-icon {
-									margin-bottom: 17.5rpx;
-									width: 25rpx;
-									height: 25rpx;
-								}
-
-								.line {
-									width: 5rpx;
-									height: 75rpx;
-									background-color: #E6EAF2;
-								}
-              }
-
-              &:last-child {
-                position: relative;
-                flex: 1;
-
-                .link-view {
-                  position: absolute;
-                  top: 0;
-                  right: 0;
-
-                  >text {
-                    font-size: 17.5rpx;
-										color: #3377FF;
-                  }
-
-									.blue-arr {
-										margin-left: 10rpx;
-										width: 8.12rpx;
-										height: 15.62rpx;
-									}
-                }
-              }
-						}
-					}
-
-					.btn-group {
-						display: flex;
-            justify-content: space-between;
-						padding: 0 25rpx;
-          }
-
-          .btn-one {
-            justify-content: center;
-          }
-				}
-			}
-		}
-	}
-
+<template>
+	<view class="mission-details-page">
+		<scroll-view class="scroll-y" scroll-y="true">
+			<list-item :isDetails="true" :task="missionDetails" />
+			<view class="mission-plan">
+				<view class="label">
+					<text>改善进度</text>
+				</view>
+				<view class="plan-box">
+					<template v-for="(item, i) in missionDetails.pfmTaskCirculationList || []">
+						<view class="row" :key="i">
+							<view class="col">
+								<image class="plan-icon"
+									:src="`/static/${i === taskStepLength ? 'check-radio' : 'check-no'}.png`">
+								</image>
+								<view class="line" v-show="i != taskStepLength"></view>
+							</view>
+							<view class="col">
+								<view class="title">
+									<text>{{ getContext(item, false, 'row1') }}</text>
+								</view>
+								<view class="sub-box">
+									<view class="sub-title">
+										<text>{{ getContext(item, false, 'row2') }}</text>
+									</view>
+									<view class="sub-title">
+										<text>{{ item.recordTime }}</text>
+									</view>
+								</view>
+								<template v-if="getContext(item, true, 'selectDetails')">
+									<view class="link-view"
+										@click="goToDetails(item, getContext(item, true, 'selectDetails'))">
+										<text>{{ getContext(item, true, 'selectDetails').name }}</text>
+										<image class="blue-arr" src="/static/blue-arrow.png"></image>
+									</view>
+								</template>
+							</view>
+						</view>
+						<view :class="['btn-group', taskBtn.length === 1 ?'btn-one' : '']" v-if="missionDetails.buttonDisplayFlag == 1
+              && missionDetails.pfmTaskCirculationList
+              && i == missionDetails.pfmTaskCirculationList.length - 1">
+							<template v-for="(btn, i1) in taskBtn">
+								<tm-button :key="i1"
+									:type="taskBtn.length === 1 ? 'default' : ( i1 === 0 ? 'pramary' : 'default')"
+									:btnText="btn.name" @btnClick="clickBtn(item, btn)" />
+							</template>
+						</view>
+					</template>
+				</view>
+			</view>
+		</scroll-view>
+		<view class="bottomBtn" @click="goBack">{{botBtnText}}</view>
+	</view>
+</template>
+
+<script>
+	// 改善任务
+	import {
+		mapState
+	} from "vuex";
+	import listItem from '../mission/components/list-item.vue';
+	import taskTypeList from './setting.js';
+	import pdcaSetting from './pdcaSetting.js'
+
+	export default {
+		computed: {
+			...mapState({
+				missionDetails: state => state.mission.missionDetails
+			}),
+			// 进度长度
+			taskStepLength() {
+				return (this.missionDetails.pfmTaskCirculationList || []).length - 1;
+			},
+			// 获取底部按钮
+			taskBtn() {
+				const {
+					buttonDisplayFlag,
+					pfmTaskCirculationList,
+					taskType,
+					checkResult
+				} = this.missionDetails;
+				if (buttonDisplayFlag == 1 && pfmTaskCirculationList && pfmTaskCirculationList.length > 0) {
+					let task = null;
+					if (taskType == 1 || taskType == 3) { // 状态为1, 和3比较特殊,需要再比较checkResult
+						task = taskTypeList.find(item => (item.taskType == taskType && item.checkResult == checkResult));
+					} else {
+						task = taskTypeList.find(item => item.taskType == taskType);
+					}
+					return task ? task.btnList : []
+				} else {
+					return [];
+				}
+			}
+		},
+		data() {
+			return {
+				// 任务id
+				taskId: '',
+				botBtnText: '',
+				// 跳转详情信息
+				linkTaskDetails: null
+			}
+		},
+		onLoad(option) {
+			const {
+				taskId,
+				pathName
+			} = option;
+			this.taskId = taskId;
+		
+			this.botBtnText = pathName == 'missionDetails' ? '返回改善任务列表' : '返回改善消息列表'
+		},
+		created() {
+			this.getMissionDetails();
+		},
+		methods: {
+			goBack() {
+				window.history.back();
+			},
+			// 获取改善任务列表
+			getMissionDetails(data) {
+				this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "getMissionDetails",
+						data: {
+							taskId: this.taskId
+						}
+					}
+				});
+			},
+			// 点击按钮
+			clickBtn(currentInfo, btnInfo) {
+				if (btnInfo.componentName) { // 有组件名,则跳转页面
+					if (btnInfo.componentName === 'pdca') {
+						const {
+							taskType,
+							needApproveFlag
+						} = this.missionDetails;
+						// needApproveFlag: true 需要审核(p)只显示p
+						if (taskType === 8) {
+							btnInfo = {
+								...btnInfo,
+								...pdcaSetting['pdcaBtnInfo'],
+								pDisabled: true // plan内容禁用
+							};
+						} else if (taskType === 11) {
+							btnInfo = {
+								...btnInfo,
+								...pdcaSetting[needApproveFlag ? 'pdcaBtnInfo' : 'pdcaBtnInfo2'],
+								pDisabled: needApproveFlag // plan内容是否禁用取决于needApproveFlag
+							};
+						} else if (taskType === 13) { // 制定改善方案p中(需要回显暂存过的数据)
+							btnInfo = {
+								...btnInfo,
+								...pdcaSetting['editPBtnInfo'],
+								isEdit: true
+							};
+						} else if (taskType === 15) { // 制定改善方案pdca中(需要回显暂存过的数据)
+							btnInfo = {
+								...btnInfo,
+								...pdcaSetting['editPdcaBtnInfo'],
+								isEdit: true,
+								pDisabled: needApproveFlag
+							};
+						} else {
+							// taskType === 4 || taskType === 6 || taskType === 7 || taskType === 9
+							btnInfo = {
+								...btnInfo,
+								...pdcaSetting[needApproveFlag ? 'pBtnInfo' : 'pdcaBtnInfo2']
+							};
+						}
+					}
+					uni.navigateTo({
+						url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...btnInfo}))}`
+					});
+				} else { // 直接调接口
+					let requestParams = {};
+					btnInfo.params.map(item => {
+						if (item.valueKey) {
+							requestParams[item.paramsKey] = (
+								item.isOutvalueKey ?
+								this.missionDetails :
+								currentInfo
+							)[item.valueKey];
+						} else if (item.value) {
+							requestParams[item.paramsKey] = item.value;
+						}
+					})
+					this.comTaskCirculation(requestParams);
+				}
+			},
+			// 查看详情
+			goToDetails(currentInfo, detailInfo) {
+				if (detailInfo.navigateUrl) { // 跳转其他页面(如查核项详情) 目前hasAnyData都为false
+					const {
+						navigateUrl,
+						key,
+						isOutvalueKey,
+						hasAnyData
+					} = detailInfo;
+					uni.navigateTo({
+						url: `${detailInfo.navigateUrl}?id=${(isOutvalueKey ? this.missionDetails : currentInfo)[detailInfo.key]}&checkPointId=${this.missionDetails.checkPointId}`
+					});
+				} else {
+					uni.navigateTo({
+						url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...detailInfo}))}`
+					});
+				}
+			},
+			/***
+			 *  解析显示对应的内容
+			 *  @param {Object} obj 当前遍历的任务
+			 *  @param {Boolean} isLink 是否需要跳转页面(查看详情)
+			 *  @param {String} rowKey 任务流程中的key
+			 */
+			getContext(obj, isLink, rowKey) {
+				let currentTypeTask = null;
+				if (obj.taskType == 1) {
+					const {
+						checkResult
+					} = this.missionDetails;
+					currentTypeTask = taskTypeList.find(item => (item.taskType == obj.taskType && item.checkResult ==
+						checkResult)) || {};
+				} else {
+					currentTypeTask = taskTypeList.find(item => item.taskType == obj.taskType) || {};
+				}
+				if (isLink) {
+					return currentTypeTask[rowKey];
+				} else {
+					const {
+						hasJoin,
+						name,
+						key,
+						isOutvalueKey
+					} = currentTypeTask[rowKey] || {};
+					if (hasJoin) { // 需要删除*并替换
+						return name ? name.replace(/x/g, (isOutvalueKey ? this.missionDetails : obj)[key] || '') : ''
+					} else {
+						return name || '';
+					}
+				}
+			},
+			// 公共改善任务接口
+			comTaskCirculation(data) {
+				this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "comTaskCirculation",
+						data
+					}
+				}).then(data1 => {
+					if (data1) {
+						this.getMissionDetails();
+					}
+				});
+			}
+		},
+		components: {
+			listItem
+		}
+	}
+</script>
+
+<style lang="less">
+	.mission-details-page {
+		height: 100%;
+		padding-top: 15rpx;
+
+		.bottomBtn {
+			position: fixed;
+			bottom: 0;
+			width: 100%;
+			height: 75rpx;
+			line-height: 75rpx;
+			text-align: center;
+			font-size: 22.5rpx;
+			font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+			font-weight: 400;
+			color: #FFFFFF;
+			background: #3377FF;
+		}
+
+		.scroll-y {
+			height: 100%;
+            padding-bottom: 87.5rpx;
+			.mission-plan {
+
+				.label {
+					margin-top: 25rpx;
+					margin-bottom: 15rpx;
+					height: 20rpx;
+					line-height: 20rpx;
+					padding-left: 25rpx;
+
+					text {
+						font-size: 20rpx;
+						color: #666F80;
+					}
+				}
+
+				.plan-box {
+					padding: 25rpx;
+					background-color: #fff;
+
+					.row {
+						display: flex;
+
+						.col {
+
+							.title {
+								display: flex;
+								align-items: center;
+								margin-bottom: 15rpx;
+								height: 25rpx;
+
+								>text {
+									font-size: 22.5rpx;
+									color: #292C33;
+								}
+							}
+
+							.sub-box {
+								display: flex;
+								flex-direction: column;
+
+								.sub-title {
+									display: flex;
+									align-items: center;
+									margin-bottom: 15rpx;
+									height: 20rpx;
+
+									&:last-child {
+										margin-bottom: 34.37rpx;
+									}
+
+									>text {
+										font-size: 20rpx;
+										color: #666E80;
+									}
+								}
+							}
+
+							&:first-child {
+								display: flex;
+								flex-direction: column;
+								align-items: center;
+								margin-right: 15rpx;
+								width: 25rpx;
+
+								.plan-icon {
+									margin-bottom: 17.5rpx;
+									width: 25rpx;
+									height: 25rpx;
+								}
+
+								.line {
+									width: 5rpx;
+									height: 75rpx;
+									background-color: #E6EAF2;
+								}
+							}
+
+							&:last-child {
+								position: relative;
+								flex: 1;
+
+								.link-view {
+									position: absolute;
+									top: 0;
+									right: 0;
+
+									>text {
+										font-size: 17.5rpx;
+										color: #3377FF;
+									}
+
+									.blue-arr {
+										margin-left: 10rpx;
+										width: 8.12rpx;
+										height: 15.62rpx;
+									}
+								}
+							}
+						}
+					}
+
+					.btn-group {
+						display: flex;
+						justify-content: space-between;
+						padding: 0 25rpx;
+					}
+
+					.btn-one {
+						justify-content: center;
+					}
+				}
+			}
+		}
+	}
 </style>

+ 1 - 1
pages/mission/components/list-item.vue

@@ -59,7 +59,7 @@
 			gotoDetails(id){
         uni.setStorageSync('taskId', id);
 				uni.navigateTo({
-				  url: `/pages/mission-details/mission-details?taskId=${id}`
+				  url: `/pages/mission-details/mission-details?taskId=${id}&pathName=missionDetails`
 				});
 			}
 		}

+ 1 - 1
pages/mission/mission.vue

@@ -182,7 +182,7 @@
 			toMessagePage(){
 				// this.messageType = false;
 				uni.navigateTo({
-				  url: `/pages/messages/messages`
+				  url: `/pages/messages/messages?pathName=messages`
 				});
 			},
 			// messStatus(){