yuwenfen 4 жил өмнө
parent
commit
5d96699fa8

+ 49 - 58
components/tm-tabbar/tm-tabbar.vue

@@ -1,14 +1,14 @@
 <template>
 	<view class="tm-tabbar">
 		<template v-for="item in rolToTabBars">
-			<view 
-			  :class="{'tab-item': true, active: item.pagePath === currentPagePath}" 
-			 :key="item.text"
-			 @click="navigateTo(item.pagePath)" >
-				<image 
-				  class="icon" 
-				  :src="item.pagePath === currentPagePath 
-					  ? item.selectedIconPath 
+			<view
+			  :class="{'tab-item': true, active: item.pagePath === currentPagePath}"
+			  :key="item.text"
+			  @click="navigateTo(item.pagePath)" >
+				<image
+				  class="icon"
+				  :src="item.pagePath === currentPagePath
+					  ? item.selectedIconPath
 						: item.iconPath"
 				></image>
 				<text>{{ item.text }}</text>
@@ -22,22 +22,12 @@
 	 * 底部tabBar
 	 * 芦荟
 	 * 2021.2.1
-	 * props: {
-		 * permission:对应的角色(权限)(1、管理员 2、查核组长 3、查核组员 4、单位负责人 5、改善者)
-		 * }
 	 */
 	export default {
-		props: {
-			// 对应的角色(权限)(1、管理员 2、查核组长 3、查核组员 4、单位负责人 5、改善者)
-			permission: {
-				type: Number,
-				default: () => 0
-			}
-		},
 		data() {
 			return {
 				// 当前路由地址
-				currentPagePath: '', 
+				currentPagePath: '',
 				// tabbar列表(这是最全的)
 				tabBarList: [
 					{
@@ -46,24 +36,24 @@
 						selectedIconPath: '/static/tabbar/creatingSituations-select.png', // 选中时的图片路径
 						pagePath: 'pages/creatingSituations/creatingSituations' // 页面路径
 					},{
-						text: '任务', 
-						iconPath: '/static/tabbar/mission-unselect.png', 
-						selectedIconPath: '/static/tabbar/mission-select.png', 
+						text: '任务',
+						iconPath: '/static/tabbar/mission-unselect.png',
+						selectedIconPath: '/static/tabbar/mission-select.png',
 						pagePath: 'pages/mission/mission'
 					},{
-						text: '配置', 
-						iconPath: '/static/tabbar/setting-unselect.png', 
-						selectedIconPath: '/static/tabbar/setting-select.png', 
+						text: '配置',
+						iconPath: '/static/tabbar/setting-unselect.png',
+						selectedIconPath: '/static/tabbar/setting-select.png',
 						pagePath: 'pages/configure/configure'
 					},{
-						text: '我的', 
-						iconPath: '/static/tabbar/my-unselect.png', 
-						selectedIconPath: '/static/tabbar/my-select.png', 
+						text: '我的',
+						iconPath: '/static/tabbar/my-unselect.png',
+						selectedIconPath: '/static/tabbar/my-select.png',
 						pagePath: 'pages/home/home'
 					},{
-						text: '日历', 
-						iconPath: '/static/tabbar/calendar-unselect.png', 
-						selectedIconPath: '/static/tabbar/calendar-select.png', 
+						text: '日历',
+						iconPath: '/static/tabbar/calendar-unselect.png',
+						selectedIconPath: '/static/tabbar/calendar-select.png',
 						pagePath: 'pages/index/index'
 					}
 				],
@@ -74,31 +64,12 @@
 					{permission: 3, name: '查核组员', tabBarIndexs: [0, 4, 3]},
 					{permission: 4, name: '单位负责人', tabBarIndexs: [0, 1, 3]},
 					{permission: 5, name: '改善者', tabBarIndexs: [1, 3]}
-				]
-			}
-		},
-		computed:{
-			rolToTabBars() {
-				if(this.permission == 0) {
-					return []
-				}else {
-					let current = this.rolList.find(item => item.permission == this.permission) || {};
-					if(current){
-						let tabBars = [];
-					  current.tabBarIndexs.map(index => {
-							tabBars.push(this.tabBarList[index]);
-						});
-						return tabBars;
-					}else {
-						return [];
-					}
-					return []
-				}
+        ],
+        rolToTabBars: [],
 			}
 		},
 		created(){
-			let routes = getCurrentPages()
-      this.currentPagePath = routes[routes.length - 1].route;
+      this.getRolToTabBars();
 		},
 		methods: {
 			// 路由跳转
@@ -107,6 +78,26 @@
 				uni.navigateTo({
 				  url: `/${pagePath}`
 				});
+      },
+      // 获取权限对应的地步导航
+    	getRolToTabBars() {
+        const permission = uni.getStorageSync('nowPermission');
+				if(!permission) {
+					this.rolToTabBars = [];
+				}else {
+          let current = this.rolList.find(item => item.permission == permission) || {};
+					if(current){
+						let tabBars = [];
+					  current.tabBarIndexs.map(index => {
+							tabBars.push(this.tabBarList[index]);
+            });
+            this.rolToTabBars = tabBars;
+					}else {
+						this.rolToTabBars = [];
+					}
+        }
+        let routes = getCurrentPages();
+        this.currentPagePath = routes[routes.length - 1].route;
 			}
 		}
 	}
@@ -118,30 +109,30 @@
 		left: 0;
 		bottom: 0;
 		display: flex;
-		width: 100%; 
+		width: 100%;
 		height: 87.5rpx;
 		border-top: 0.62rpx solid #DADEE6;
 		background-color: #fff;
-		
+
 		.tab-item {
 			display: flex;
 			flex-direction: column;
 			justify-content: center;
 			align-items: center;
 			flex: 1;
-			
+
 			.icon {
 				margin-bottom: 10rpx;
 				width: 27.5rpx;
 				height: 28.75rpx;
 			}
-			
+
 			>text {
 				font-size: 15rpx;
 				color: #3D424D;
 			}
 		}
-		
+
 		.active.tab-item {
 			>text {
 				color: #3377FF;

+ 4 - 3
components/tm-upload-img/tm-upload-img.vue

@@ -109,13 +109,13 @@
 			display: flex;
 			justify-content: space-between;
 			align-items: center;
-			flex: 1;
+			// flex: 1;
 			padding-right: 25rpx;
 
 			.label-view {
 				width: 175rpx;
-				line-height: 37.5rpx;
-				padding: 25rpx 0;
+				line-height: 22.5rpx;
+				padding: 31.25rpx 0;
 
 				text {
 					font-size: 22.5rpx;
@@ -125,6 +125,7 @@
 
 			.placeholder {
 				position: absolute;
+				top: 31.25rpx;
 				left: 175rpx;
 				font-size: 22.5rpx;
 				color: #B8BECC;

+ 1 - 1
pages/configure/configure.vue

@@ -29,7 +29,7 @@
     <view class="sure-button">
       <button @click="sureList">保存</button>
     </view>
-    <tm-tabbar :permission="1" />
+    <tm-tabbar />
   </view>
 </template>
 

+ 1 - 1
pages/home/home.vue

@@ -30,7 +30,7 @@
 				</view>
 			</view>
 		</view>
-		<tm-tabbar :permission="1" />
+		<tm-tabbar />
 	</view>
 </template>
 

+ 78 - 34
pages/mission-action/components/pdca-components/do-and-check.vue

@@ -3,28 +3,46 @@
 		<view class="title">
 			<text>{{ title }}</text>
 		</view>
-		<view class="item-view">
-			<view class="top-action">
-				<text>改善确认(1)</text>
-				<text class="close-text">删除</text>
-			</view>
-			<view class="main">
-				<view class="row">
-					<view class="label-view">
-						<text>{{ label }}</text>
+		<template v-for="(item, i) in list">
+			<view class="item-view">
+				<view class="top-action">
+					<text>改善确认(1)</text>
+					<text class="blue-text">删除</text>
+				</view>
+				<view class="main">
+					<view class="row">
+						<view class="label-view">
+							<text>过程记录</text>
+						</view>
+						<view class="content">
+							<textarea class="textarea"
+						    :key="title"
+							  placeholder="请输入"
+								placeholder-style="color: #B8BECC"
+								:maxlength="-1"
+								auto-height
+							/>
+						</view>
 					</view>
-					<view class="content">
-						<textarea class="textarea"
-					    :key="title"
-						  placeholder="请输入"
-							placeholder-style="color: #B8BECC"
-							:maxlength="-1"
-							auto-height
-					    
-						/>
+					<view class="row row-heigth">
+						<view class="label-view">
+							<text>计划日期</text>
+						</view>
+						<view class="content">
+							<text>选择计划日期</text>
+						</view>
 					</view>
+					<tm-upload-img
+						:filePaths="['/static/img-icon.png', '/static/img-icon.png']"
+					/>
 				</view>
 			</view>
+		</template>
+		<view class="add-btn" @click="addRecord">
+			<text class="blue-text"> 
+			  <text class="big">+</text>
+			  增加一条记录
+			</text>
 		</view>
 	</view>
 </template>
@@ -37,12 +55,7 @@
 			title: {
         type: String,
         default: '执行过程记录(Do)'
-			},
-      // 多行文本框子标题
-			label: {
-        type: String,
-        default: '执行过程记录'
-      }
+			}
     },
     data() {
       return {
@@ -60,7 +73,11 @@
         }else {
           this.actionvalue = e.target.value;
         }
-      }
+      },
+			// 新增一条记录
+			addRecord() {
+				this.list = [...this.list, {gcjl: '', date: '', imgPath: '' }]
+			}
 		},
 	}
 </script>
@@ -80,6 +97,15 @@
 			}
 		}
 		
+		.blue-text {
+			font-size: 23.75rpx;
+			color: #3377FF !important;
+			
+			.big {
+				font-size: 28.75rpx;
+			}
+		}
+		
 		.item-view {
 			
 			.top-action {
@@ -95,24 +121,20 @@
 					font-size: 22.5rpx;
 					color: #666F80;
 				}
-				
-				.close-text {
-					font-size: 20rpx;
-					color: #3377FF;
-				}
 			}
 			
 			.main {
-				padding-left: 25rpx;
 				background-color: #fff;
 				
 				.row {
 					display: flex;
+					border-bottom: 0.62rpx solid #DADEE6;
+					padding-left: 25rpx;
 					
 					.label-view {
 						width: 175rpx;
-						line-height: 37.5rpx;
-						padding: 25rpx 0;
+						line-height: 22.5rpx;
+						padding: 31.25rpx 0;
 					
 						>text {
 							font-size: 22.5rpx;
@@ -128,14 +150,36 @@
 							width: 100%;
 							min-height: 200rpx;
 							padding: 0 25rpx;
-							line-height: 38.5rpx;
+							line-height: 38rpx;
 							font-size: 22.5rpx;
 							color: #525866;
 							box-sizing: border-box;
 						}
+						
+						>text {
+							font-size: 22.5rpx;
+							color: #B8BECC;
+						}
+					}
+				}
+				
+				.row-heigth {
+					
+					.label-view {
+						line-height: 22.5rpx;
+						padding: 31.25rpx 0;
 					}
 				}
 			}
 		}
+		
+		.add-btn {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 75rpx;
+			background-color: #fff;
+			border-top: 0.62rpx solid #DADEE6;
+		}
 	}
 </style>

+ 5 - 5
pages/mission-details/mission-details.vue

@@ -30,11 +30,11 @@
 								</view>
 						  </view>
 						</view>
-						<view class="btn-group" v-if="i === list.length-1">
-							<tm-button type="pramary" btnText="不认可" @btnClick="clickRightBtn" />
-							<tm-button btnText="指派改善任务" @btnClick="clickRightBtn" />
-						</view>
 					</template>
+					<view class="btn-group">
+						<tm-button type="pramary" btnText="不认可" @btnClick="clickRightBtn" />
+						<tm-button btnText="指派改善任务" @btnClick="clickRightBtn" />
+					</view>
 				</view>
 			</view>
 		</scroll-view>
@@ -43,7 +43,7 @@
 
 <script>
 	// 改善任务
-	import listItem from '../mission/components/mission-list/list-item.vue';
+	import listItem from '../mission/components/list-item.vue';
 	export default {
 		data() {
 			return {

+ 34 - 26
pages/mission/components/mission-list/list-item.vue → pages/mission/components/list-item.vue

@@ -1,28 +1,28 @@
 <template>
-	<view class="mission-list-item" @click="gooDetails">
-		<view v-if="!isClose" class="time">
-			<text class="com-text">2020-11-26 15:33:08</text>
+	<view class="mission-list-item" @click="gotoDetails">
+		<view v-if="!isComplete" class="time">
+			<text class="com-text">{{ task.recordTime }}</text>
 		</view>
 		<view class="card">
 	    <view class="top-box">
-				<view :class="['bg-box', isClose ? 'disabled-bg' : 'hight-bg']">
-					<text>{{isClose ? '改善结案' : '改善中'}}</text>
+				<view :class="['bg-box', isComplete ? 'disabled-bg' : 'hight-bg']">
+					<text>{{isComplete ? '改善结案' : '改善中'}}</text>
 				</view>
-	    	<text class="title">柜子上方50cm不能遮住喷水器</text>
+	    	<text class="title">{{ task.checkPointName }}</text>
 	    	<view class="row">
 	    		<view class="col">
 	    			<image class="com-icon" src="/static/search-icon.png"></image>
-	    			<text class="com-text">第3/9次查核计划</text>
-	    		</view>	
+	    			<text class="com-text">{{ task.checkPlan }}</text>
+	    		</view>
 	    		<view class="col">
 	    			<image class="com-icon" src="/static/location-icon.png"></image>
-	    			<text class="com-text">分诊处(门诊)</text>
+	    			<text class="com-text">{{ task.deptName }}</text>
 	    		</view>
 	    	</view>
 	    </view>
 			<view class="bottom-box">
-				<text class="com-text">情境名称:环境设施安全</text>
-				<text class="com-text">改善人:张晴晴</text>
+				<text class="com-text">情境名称:{{ task.situationName }}</text>
+				<text class="com-text">改善人:{{ task.improveEmpName }}</text>
 			</view>
 		</view>
 	</view>
@@ -31,20 +31,28 @@
 <script>
 	export default {
 		props: {
-			isClose: { // 是否结案
+			// 当前遍历的任务
+			task: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			// 是否结案
+			isComplete: {
 				type: Boolean,
 				default: false
 			}
 		},
 		computed: {
 			bgImage(){
-				console.log(`url(~@/static/${!this.isClose ? 'hight' : 'disabled'}-bg.png)`)
-				return `../../../../static/${!this.isClose ? 'hight' : 'disabled'}-bg.png`;
+				console.log(`url(~@/static/${!this.isComplete ? 'hight' : 'disabled'}-bg.png)`)
+				return `../../../static/${!this.isComplete ? 'hight' : 'disabled'}-bg.png`;
 			}
 		},
 		methods: {
 			// 跳转详情页面(改善任务)
-			gooDetails(){
+			gotoDetails(){
 				uni.navigateTo({
 				  url: '/pages/mission-details/mission-details'
 				});
@@ -57,13 +65,13 @@
 	.mission-list-item {
 		margin-bottom: 25rpx;
 		overflow: hidden;
-		
+
 		.time {
 			height: 47.5rpx;
 			line-height: 45rpx;
 			padding-left: 25rpx;
 		}
-		
+
 		.card {
 			position: relative;
 			display: flex;
@@ -71,7 +79,7 @@
 			height: 203.75rpx;
 			background-color: #fff;
 			padding: 0 25rpx;
-			
+
 			.top-box {
 				display: flex;
 				flex-direction: column;
@@ -80,23 +88,23 @@
 				margin-top: 35rpx;
 				margin-bottom: 28.12rpx;
 			}
-			
+
 			.title {
 				line-height: 45rpx;
 				font-size: 25rpx;
 				font-weight: bold;
 				color: #292C33;
 			}
-			
+
 			.row {
 				display: flex;
 				align-items: center;
-				
+
 				.col {
 					display: flex;
 					align-items: center;
 					height: 20rpx;
-					
+
 					&:first-child {
 						margin-right: 50rpx;
 					}
@@ -114,7 +122,7 @@
 				height: 70rpx;
 				border-top: 0.62rpx solid #DADEE6;
 			}
-			
+
 			.bg-box {
 				position: absolute;
 				top: 0;
@@ -124,14 +132,14 @@
 				background-size: 100% 100%;
 				padding-left: 12.5rpx;
 				text-align: center;
-				
+
 				>text {
 					line-height: 35rpx;
 					font-size: 17.5rpx;
 					color: #fff;
 				}
 			}
-			
+
 			.hight-bg {
 				background-image: url('~@/static/hight-bg.png');
 			}
@@ -139,7 +147,7 @@
 				background-image: url('~@/static/disabled-bg.png');
 			}
 		}
-		
+
 		.com-text {
 			font-size: 22.5rpx;
 			color: #666F80;

+ 0 - 96
pages/mission/components/mission-list/mission-list.vue

@@ -1,96 +0,0 @@
-<template>
-	<view class="mission-list">
-		<scroll-view class="scroll-y" scroll-y="true">
-			<list-item />
-			<list-item />
-			<view class="completed-box">
-				<view class="btn-box">
-					<view class="btn" @click="toggleBtn">
-						<image class="icon" :src="`/static/${btnSetting.icon}.png`"></image>
-						<text class="text">
-						  {{ btnSetting.name }}
-						</text>
-					</view>
-				</view>
-				<list-item :isClose="true" v-if="showCloseList" />
-			</view>
-		</scroll-view>
-		<tm-tabbar :permission="1" />
-	</view>
-</template>
-
-<script>
-	// 任务列表
-	import listItem from './list-item.vue';
-	export default {
-		data(){
-			return {
-				// 是否展开历史任务
-				showCloseList: false,
-				btnSetting: {
-					icon: 'up-icon', // 图标名
-					name: '展示历史任务' // 按钮显示名字
-				},
-				closeList: [1, 2, 3]
-			}
-		},
-		watch: {
-			showCloseList(newVal, oldVal) {
-				if(newVal != oldVal){
-					this.btnSetting.icon = newVal ? 'up-icon' : 'down-ion';
-					this.btnSetting.name = newVal ? '收起历史任务' : '展示历史任务';
-				}
-			}
-		},
-		methods: {
-			toggleBtn() {
-				this.showCloseList = !this.showCloseList
-			}
-		},
-		components: {
-			listItem
-		}
-	}
-</script>
-
-<style lang="less">
-	.mission-list {
-		height: 100%;
-		padding-top: 15rpx;
-		
-		.scroll-y {
-			height: calc(100% - 87.5rpx);
-			
-			.completed-box {
-				
-				.btn-box {
-					display: flex;
-					justify-content: center;
-					margin-bottom: 25rpx;
-					height: 50rpx;
-					
-					.btn {
-						display: flex;
-						justify-content: center;
-						align-items: center;
-						width: 225rpx;
-						height: 50rpx;
-						border-radius: 37.5rpx;
-						border: 1.25rpx solid #98A1B3;
-						
-						.icon {
-							margin-right: 6.25rpx;
-							width: 21.25rpx;
-							height: 12.5rpx;
-						}
-						
-						.text {
-							font-size: 22.5rpx;
-							color: #98A1B3;
-						}
-					}
-				}
-			}
-		}
-	}
-</style>

+ 136 - 11
pages/mission/mission.vue

@@ -1,32 +1,157 @@
 <template>
 	<view class="mission-page">
-	  <!-- 任务列表 -->
-	  <mission-list />
-		
+	 	<scroll-view class="scroll-y" scroll-y="true">
+			<list-item
+				v-for="(item, i) in improvingTaskList"
+				:key="item.id"
+				:task="item"
+			/>
+			<view class="completed-box">
+				<view class="btn-box">
+					<view class="btn" @click="toggleBtn">
+						<image class="icon" :src="`/static/${btnSetting.icon}.png`"></image>
+						<text class="text">
+						  {{ btnSetting.name }}
+						</text>
+					</view>
+				</view>
+				<template v-if="showCloseList">
+					<list-item
+						v-for="(item, i) in completeTaskList"
+						:key="item.id"
+						:task="item"
+						:isComplete="true"
+					/>
+				</template>
+			</view>
+		</scroll-view>
+		<tm-tabbar />
 	</view>
 </template>
 
 <script>
-	// 任务
-	import missionList from './components/mission-list/mission-list.vue'
+	// 任务列表
+	import listItem from './components/list-item.vue';
 	export default {
-		data() {
+		data(){
 			return {
-				
+				// 是否展开历史任务
+				showCloseList: false,
+				btnSetting: {
+					icon: 'up-icon', // 图标名
+					name: '展示历史任务' // 按钮显示名字
+				},
+				// 改善中任务
+				improvingTaskList: [
+					// {
+					// 	appointFlag: false, // 已指派标志, 0 未指派 1已指派
+					// 	checkGroupId: 1, // 查核组id
+					// 	checkGroupName: "测试群组", // 查核组名称
+					// 	checkId: 1,
+					// 	checkItemId: 1, // 查核项目id
+					// 	checkItemName: "测试点", // 查核项目名称
+					// 	checkPlan: "第1/3次查核计划", // 查核计划
+					// 	checkPointId: 1, // 查核要点id
+					// 	checkPointName: "测试", // 查核要点名称(查核项)
+					// 	createDate: "2021-02-03T01:44:09.000+0000", // 任务创建时间
+					// 	createEmpId: 1, //创建人
+					// 	createEmpName: "管理员", // 创建人姓名
+					// 	delFlag: false,
+					// 	deptId: 1, // 单位id
+					// 	deptName: "测试部门", // 单位名称
+					// 	desicion: "", // 改善工具:0,进行PDCA改善 1,暂不改善
+					// 	endFlag: false, // 完结标识
+					// 	id: 1, // 任务id
+					// 	needApproveFlag: false, // 需要审核标志
+					// 	recordTime: "2021-02-03 09:44:17", // 最终修改时间
+					// 	situationId: 1, // 情景id
+					// 	situationName: "测试情景", // 情景名称
+					// 	taskType: 0, // 任务当前状态
+          //   updateTime: "2021-02-03T01:44:17.000+0000", // 修改时间 (发送时间)
+          //   improveEmpName: '', //改善人
+          //   improveEmpId: '', //改善人id
+					// }
+				],
+				// 历史任务
+				completeTaskList: [],
 			}
 		},
+		created() {
+			this.getMissionList()
+		},
 		methods: {
-			
+			toggleBtn() {
+				let flag = !this.showCloseList;
+				this.showCloseList = flag;
+				this.btnSetting = {
+					icon: flag ? 'up-icon' : 'down-icon',
+					name: flag ? '收起历史任务' : '展示历史任务'
+				}
+			},
+			// 获取改善任务列表
+			getMissionList(data) {
+				this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "getMissionList",
+						data
+					}
+				}).then(data => {
+					if(data) {
+						this.improvingTaskList = data.improvingTaskResponses || [];
+						this.completeTaskList = data.improveCompleteResponses || [];
+					}
+				}) ;
+				/** 请求参数 data
+				 * situationId: 情境id 当管路员或者查核者通过情境进入任务列表时 必传
+				 * checkItemId 单位负责人通过 查核要点进入改善任务列表时 必传
+				 */
+			}
 		},
 		components: {
-			missionList
+			listItem
 		}
 	}
 </script>
 
 <style lang="less">
  .mission-page {
-	 height: 100%;
-	 overflow: hidden;
+   height: 100%;
+   padding-top: 15rpx;
+
+   	.scroll-y {
+			height: calc(100% - 87.5rpx);
+
+			.completed-box {
+
+				.btn-box {
+					display: flex;
+					justify-content: center;
+					margin-bottom: 25rpx;
+					height: 50rpx;
+
+					.btn {
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						width: 225rpx;
+						height: 50rpx;
+						border-radius: 37.5rpx;
+						border: 1.25rpx solid #98A1B3;
+
+						.icon {
+							margin-right: 6.25rpx;
+							width: 21.25rpx;
+							height: 12.5rpx;
+						}
+
+						.text {
+							font-size: 22.5rpx;
+							color: #98A1B3;
+						}
+					}
+				}
+			}
+		}
  }
 </style>

+ 18 - 0
pages/mission/model.js

@@ -0,0 +1,18 @@
+import { commServer } from './server.js';
+
+export default {
+  namespaced: true,
+  state: {
+  },
+  mutations: {
+    changeBaseInfo(state, { baseInfo }) {
+      state.baseInfo = baseInfo;
+    },
+  },
+  actions: {
+  	commActions({ commit, state }, { payload }) {
+  		// payload = {key,data} // data是请求数据,key是请求接口id
+  		return commServer(payload);
+  	},
+  }
+}

+ 29 - 0
pages/mission/server.js

@@ -0,0 +1,29 @@
+import {
+	creatRequest
+} from '../../utils/request.js';
+
+const requestList = {
+	// 改善任务列表
+	getMissionList: {
+		method: 'GET',
+		url: 'imed/pfm/improverTask/list'
+	},
+	// 改善任务详情
+	getMissionDetails: {
+		method: 'GET',
+		url: 'imed/pfm/improverTask/detail'
+	},
+	// 查询部门人员树 (通用接口)
+	getEmpDeptTree: {
+		method: 'GET',
+		url: 'imed/pfm/common/empDeptTree'
+	}
+};
+
+export const commServer = ({
+	key,
+	data
+}) => {
+	let obj = requestList[key];
+	return creatRequest(obj, data);
+}

+ 3 - 0
pages/model.js

@@ -1,6 +1,9 @@
 import login from './login/model.js';
 import configure from './configure/model.js';
+import mission from './mission/model.js';
+
 export default module = {
   login,
   configure,
+	mission,
 }

+ 0 - 0
static/mission/上传图片.png → static/img-icon.png


+ 1 - 1
utils/request.js

@@ -47,7 +47,7 @@ function request(url, options, additional) {
   openCloseLoading(additional, true);
   // 模拟token,做登录的同学将这行代码移到登录成功函数中.
 
-  // uni.setStorageSync('token', 'MjU2OzE2MTE2MjIxODYwNjM7OGJjMTA2ZjNhMzMyNGUxOTRhMmFlMGExOThjMzA5OGE=');
+  uni.setStorageSync('token', 'gfkZlq36bBPefzvIoukl5exPJ5/jkil2gi9fNPTABSk=');
   const token = uni.getStorageSync('token');
   return uni.request({
     url: `${BASE_URL}${url}`,