소스 검색

合并冲突

jiangniuniu 4 년 전
부모
커밋
9ffbc6f683
32개의 변경된 파일1945개의 추가작업 그리고 323개의 파일을 삭제
  1. 13 5
      App.vue
  2. 2 3
      README.md
  3. 108 0
      components/tm-radio-group/README.md
  4. 88 0
      components/tm-radio-group/radio-group.vue
  5. 92 0
      components/tm-radio-group/radio-select-group.vue
  6. 81 40
      components/tm-radio-group/tm-radio-group.vue
  7. 49 58
      components/tm-tabbar/tm-tabbar.vue
  8. 167 0
      components/tm-upload-img/tm-upload-img.vue
  9. 26 20
      components/uni-segmented-control/uni-segmented-control.vue
  10. 0 1
      main.js
  11. 9 6
      pages/configure/configure.vue
  12. 1 1
      pages/home/home.vue
  13. 18 18
      pages/mission-action/components/assign-mission.vue
  14. 70 0
      pages/mission-action/components/disagree.vue
  15. 185 0
      pages/mission-action/components/pdca-components/do-and-check.vue
  16. 117 0
      pages/mission-action/components/pdca-components/one-textarea.vue
  17. 85 0
      pages/mission-action/components/pdca.vue
  18. 77 0
      pages/mission-action/components/personnel.vue
  19. 88 0
      pages/mission-action/components/write-back.vue
  20. 35 5
      pages/mission-action/mission-action.vue
  21. 53 29
      pages/mission-details/mission-details.vue
  22. 280 0
      pages/mission-details/setting.js
  23. 40 28
      pages/mission/components/list-item.vue
  24. 0 96
      pages/mission/components/mission-list/mission-list.vue
  25. 136 11
      pages/mission/mission.vue
  26. 92 0
      pages/mission/model.js
  27. 29 0
      pages/mission/server.js
  28. 3 1
      pages/model.js
  29. BIN
      static/del-close.png
  30. 0 0
      static/down-icon.png
  31. 0 0
      static/img-icon.png
  32. 1 1
      utils/request.js

+ 13 - 5
App.vue

@@ -36,7 +36,7 @@
 
 <style lang="less">
 	/*每个页面公共css */
-	
+
 	body,
 	uni-app,
 	uni-page,
@@ -46,19 +46,19 @@
 		font-size: 12.5rpx;
 		line-height: 18.75rpx;
 	}
-	
+
 	body,
 	uni-app,
 	uni-page {
 		background-color: #F5F6FA;
 	}
-	
+
 	view,
 	label,
 	scroll-view {
 		box-sizing: border-box;
 	}
-	
+
 	// 底部固定的按钮
 	.fixed-buttom-btn {
 		position: fixed;
@@ -71,10 +71,18 @@
 		width: 100%;
 		height: 75rpx;
 		background-color: #3377FF;
-		
+
 		.btn-text {
+			flex: 1;
 			font-size: 22.5rpx;
 			color: #fff;
+			text-align: center;
+		}
+
+		.btn-text.cancle {
+			line-height: 76.25rpx;
+			background-color: #FFFFFF;
+			color: #3377FF;
 		}
 	}
 </style>

+ 2 - 3
README.md

@@ -7,10 +7,9 @@
 1. 步骤条:tm-steps,详细传参说明在组件内部。
 2. 树形控件:tm-trees。
 3. 底部tabBar:tm-tabbar。
-4. 单选列表组合:tm-radio-group。
+4. 单选列表组合/下拉式单选列表组合:tm-radio-group。使用步骤看tm-radio-group/README.md
 
-### 公共组件的注册方式 
+### 公共组件的注册方式
 ---
  1. 在main.js中全局注册;
  2. 在components目录下创建文件夹=文件名的组件,会自动全局注册,但是需要注意:在模板中使用的名字也必须与定义的名字一致,比如定义了n-navigation/n-navigation.vue组件,必须是<n-navigation></n-navigation>;因为标签推荐kebab-case方式,所以定义的公共组件也推荐这种命名方式
- 

+ 108 - 0
components/tm-radio-group/README.md

@@ -0,0 +1,108 @@
+#### 使用方式
+
+#####  一: 单选列表组合 type="default"(如指派改善任务)
+<!-- 在 template 中使用组件 -->
+```html
+	<tm-radio-group
+    :list="list"
+    label="改善工具"
+    :defaultValue='defaultValue'
+    @change="changeSelect"
+    :setting="{
+      value: 'value',
+      name: 'label'
+    }"
+  />
+```
+<!--  在script中写入 -->
+```js
+	export default {
+		data() {
+			return {
+        // 默认选中
+        defaultValue: 1,
+        // 渲染的原数据
+				list: [
+					{value: 1, label: 'PDCA1'},
+					{value: 2, label: 'PDCA2'},
+					{value: 3, label: 'PDCA3'},
+					{value: 4, label: 'PDCA4'}
+				]
+			}
+		},
+		methods: {
+      /***
+       * 选中状态改变触发
+       * @param {Number | String} selectData 当前选中的值
+			 * @param {Object} selectData 当前选中的整条数据
+			 * @param {Number} index 当前选中下标
+      */
+			changeSelect(selectVal, selectData, index) {
+				this.defaultValue = selectVal;
+			}
+		}
+	}
+```
+
+#####  二: 下拉式单选列表组合 type="select"(如人员架构)
+<!-- 在 template 中使用组件 -->
+```html
+<tm-radio-group
+  type="select"
+  :list="list"
+  :defaultValue='defaultValue'
+  @change="changeSelect"
+  :openkeys="[0]"
+  :setting="{
+    pName: 'pName',
+    child: 'childList',
+    value: 'value',
+    name: 'label'
+  }"
+/>
+```
+<!-- 在script中写入 -->
+```js
+	export default {
+		data() {
+			return {
+       // 默认选中
+       defaultValue: 1,
+       // 渲染的原数据
+       list: [
+          {
+            pValue: 1,
+            pName: '门诊',
+            childList: [
+              {value: 1, label: 'PDCA1'},
+					    {value: 2, label: 'PDCA2'},
+				    	{value: 3, label: 'PDCA3'},
+					    {value: 4, label: 'PDCA4'}
+            ]
+          },
+          {
+            pValue: 2,
+            pName: '分诊',
+            childList: [
+              {value: 11, label: '许玮琛1'},
+					    {value: 22, label: '许玮琛2'},
+				    	{value: 33, label: '许玮琛3'},
+					    {value: 44, label: '许玮琛4'}
+            ]
+          }
+				]
+			}
+		},
+		methods: {
+      /***
+       * 选中状态改变触发
+       * @param {Number | String} selectData 当前选中的值
+			 * @param {Object} selectData 当前选中的整条数据
+			 * @param {Number} index 当前选中下标
+      */
+			changeSelect(selectVal, selectData, index) {
+				this.defaultValue = selectVal;
+			}
+		}
+	}
+```

+ 88 - 0
components/tm-radio-group/radio-group.vue

@@ -0,0 +1,88 @@
+<template>
+	<view class="radio-group-view">
+		<view v-if="label" class="label-view">
+			<text>{{ label }}</text>
+		</view>
+		<view class="radio-group">
+			<template v-for="(item, i) in list">
+				<view class="radio-item" :key="i" @click="toggleSelect(item, i)">
+					<text class="text">{{ item[setting.name] }}</text>
+					<image class="icon"
+					  :src="`/static/${item[setting.value] === defaultValue ? 'check-radio' : 'check-no'}.png`"></image>
+				</view>
+			</template>
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * 单选列表组合
+	 * 芦荟
+	 * 2021.2.2
+	 * props:属性说明看tm-radio-gruop.vue
+	 */
+	export default {
+	  props: ['list', 'defaultValue', 'label', 'setting'],
+		methods: {
+			/**
+			 * 选中变化调用
+			 * @param {Object} selectData 当前选中的对象
+			 * @param {Object} index 当前选中下标
+			 *
+			 * 返回的参数
+			 * selectData[this.setting.value]: 当前选中的值
+			 * selectData: 当前选中的整条数据
+			 * index:      当前选中的下标
+			 */
+			toggleSelect(selectData, index){
+				this.$emit(
+				  'change',
+				  selectData ? selectData[this.setting.value] : '',
+					selectData,
+					index
+				);
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.radio-group-view {
+
+		.label-view {
+			height: 47.5rpx;
+			line-height: 45rpx;
+			padding-left: 25rpx;
+
+			>text {
+				font-size: 22.5rpx;
+				color: #666F80;
+			}
+		}
+
+		.radio-group {
+			padding-left: 25rpx;
+			background-color: #fff;
+
+			.radio-item {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				height: 87.5rpx;
+				border-bottom: 0.62rpx solid #DADEE6;
+				padding-right: 25rpx;
+
+				.text {
+					font-size: 22.5rpx;
+					color: #292C33;
+				}
+
+				.icon {
+					width: 25rpx;
+					height: 25rpx;
+				}
+			}
+		}
+	}
+</style>

+ 92 - 0
components/tm-radio-group/radio-select-group.vue

@@ -0,0 +1,92 @@
+<template>
+	<view class="radio-slect-group">
+    <template v-for="(item, i) in list">
+      <view class="radio-slect-item" :key="i">
+        <view class="p-view" @click="changeOpenKey(i)">
+          <image class="icon"
+            :src="`/static/${isOpen(i) ? 'up-icon' : 'down-icon'}.png`"></image>
+					<text>{{ item[setting.pName] }}</text>
+        </view>
+        <template v-if="isOpen(i)">
+					<view class="child-radio-group">
+						<child-radio-group
+						  :list="item[setting.child] || []"
+						  :defaultValue="defaultValue"
+						  :label="label"
+						  :setting="setting"
+						  @change="toggleSelect"
+						/>
+					</view>
+        </template>
+      </view>
+    </template>
+	</view>
+</template>
+
+<script>
+	/**
+	 * 下拉式单选列表组合
+	 * 芦荟
+	 * 2021.2.3
+	 * props:属性说明看tm-radio-gruop.vue
+	 */
+
+  import childRadioGroup from './radio-group.vue'
+	export default {
+    props: ['list', 'defaultValue', 'label', 'setting', 'openkeys'],
+		created() {
+		},
+		methods: {
+			/**
+			 * 选中变化调用
+			 * @param {Object} selectData 当前选中的对象
+			 * @param {Object} index 当前选中下标
+			 */
+			toggleSelect(selectVal, selectData, index){
+		  	this.$emit('change', selectVal, selectData, index);
+      },
+      changeOpenKey(key) {
+        let openKey = this.openkeys.find(openKey => openKey === key);
+        this.$emit('changeOpenPKey', (openKey || openKey === 0 ? 'close' : 'open'), key)
+      },
+      isOpen(key) {
+        let openKey = this.openkeys.find(openKey => openKey === key);
+        return openKey || openKey === 0
+      }
+    },
+    components: {
+      childRadioGroup
+    }
+	}
+</script>
+
+<style lang="less">
+	.radio-slect-group {
+    background: #ffffff;
+
+		.radio-slect-item {
+
+      .p-view {
+				display: flex;
+				align-items: center;
+        height: 75rpx;
+				padding-left: 25rpx;
+
+				.icon {
+					margin-right: 15rpx;
+					width: 21.25rpx;
+					height: 12.5rpx;
+        }
+
+        >text {
+          font-size: 22.5rpx;
+					color: #292C33;
+        }
+      }
+    }
+		
+		.child-radio-group {
+			padding-left: 62.5rpx;
+		}
+	}
+</style>

+ 81 - 40
components/tm-radio-group/tm-radio-group.vue

@@ -1,39 +1,43 @@
 <template>
 	<view class="tm-radio-group">
-		<view v-if="label" class="label-view">
-			<text>{{ label }}</text>
-		</view>
-		<view class="radio-group">
-			<template v-for="(item, i) in list">
-				<view class="radio-item" :key="i" @click="toggleSelect(item, i)">
-					<text class="text">{{ item[setting.name] }}</text>
-					<image class="icon" 
-					  :src="`/static/${item[setting.value] === defaultValue ? 'check-radio' : 'check-no'}.png`"></image>
-				</view>
-			</template>
-		</view>
+    <component
+      :is="currentComponet"
+      :list="list"
+      :defaultValue="defaultValue"
+      :label="label"
+      :setting="setting"
+      :openkeys="openPkeys"
+      @change="toggleSelect"
+      @changeOpenPKey="changeOpenPKey"
+     />
 	</view>
 </template>
 
 <script>
 	/**
-	 * 单选列表组合
+	 * 单选列表组合/下拉式单选列表组合
 	 * 芦荟
 	 * 2021.2.2
 	 * props:看下面,有注释说明
 	 */
+
+import radioGroup from './radio-group.vue'
+import radioSelectGroup from './radio-select-group.vue'
+
 	export default {
 		props: {
 			// 渲染的数据
 			list: {
 				type: Array,
-				default: []
-			},	
-			// 选中的数据 
+				default: () => {
+          return []
+        }
+			},
+			// 选中的数据
 			defaultValue: {
 				type: Number | String,
 				default: ''
-			},
+      },
 			// 单选列表组合名字
 			label: {
 				type: String,
@@ -41,54 +45,91 @@
 			},
 			// 单选组配置
 			setting: {
-				type: Object, 
-				default: {
-					value: 'value', // 设置当前选中的值(默认取value)
-					name: 'name' // 当前显示的文字(默认取name)
-				}
-			}
-		},
+				type: Object,
+				default: () => {
+          return  {
+            pName: 'pName',   // 父级显示的文字
+            child: 'child',  // 子数据list
+				  	value: 'value', // 设置当前选中的值(默认取value)
+				  	name: 'name' // 当前显示的文字(默认取name)
+				  }
+        }
+      },
+      /**
+       *  单选列表组合 或 下拉式单选列表组合
+       *  default:单选列表组合(如指派改善任务)  默认值
+       *  select:  下拉式单选列表组合(如人员架构)
+       */
+      type: {
+        type: String,
+				default: 'default'
+      },
+      // 默认展开的父级下标(注意: 数组存父级元素下标)
+      openkeys: {
+        type: Array,
+				default: () => {
+          return []
+        }
+      },
+    },
+    computed: {
+      // 当前显示的组件
+      currentComponet() {
+        return this.type === 'default' ? 'radio-group' : 'radio-select-group'
+      }
+    },
+    data() {
+      return {
+        // 展开的父级下标
+        openPkeys: this.openkeys
+      }
+    },
 		methods: {
 			/**
 			 * 选中变化调用
 			 * @param {Object} selectData 当前选中的对象
 			 * @param {Object} index 当前选中下标
-			 * 
+			 *
 			 * 返回的参数
 			 * selectData[this.setting.value]: 当前选中的值
 			 * selectData: 当前选中的整条数据
 			 * index:      当前选中的下标
 			 */
-			toggleSelect(selectData, index){
-				this.$emit(
-				  'change', 
-				  selectData ? selectData[this.setting.value] : '', 
-					selectData, 
-					index
-				);
-			}
-		}
+			toggleSelect(selectVal, selectData, index){
+				this.$emit('change', selectVal, selectData, index);
+      },
+      // 更改父级展开的下标
+      changeOpenPKey(type, key) {
+        this.openPkeys = type === 'open'
+          ? [...this.openPkeys, key]
+          : this.openPkeys.filter(openKey => openKey != key);
+      }
+    },
+    components: {
+      radioGroup,
+      radioSelectGroup
+    }
 	}
 </script>
 
 <style lang="less">
 	.tm-radio-group {
-		
+
 		.label-view {
 			height: 47.5rpx;
 			line-height: 45rpx;
 			padding-left: 25rpx;
-			
+
 			>text {
 				font-size: 22.5rpx;
 				color: #666F80;
 			}
 		}
-		
+
 		.radio-group {
 			padding-left: 25rpx;
 			background-color: #fff;
-			
+
 			.radio-item {
 				display: flex;
 				align-items: center;
@@ -96,12 +137,12 @@
 				height: 87.5rpx;
 				border-bottom: 0.62rpx solid #DADEE6;
 				padding-right: 25rpx;
-				
+
 				.text {
 					font-size: 22.5rpx;
 					color: #292C33;
 				}
-				
+
 				.icon {
 					width: 25rpx;
 					height: 25rpx;

+ 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;

+ 167 - 0
components/tm-upload-img/tm-upload-img.vue

@@ -0,0 +1,167 @@
+<template>
+	<view class="tm-upload-img">
+		<view class="row" @click="uploadPicture">
+			<view class="label-view">
+				<text>上传图片</text>
+			</view>
+			<text class="placeholder" v-show="filePaths.length === 0">点击上传图片</text>
+			<image class="img-icon" src="/static/img-icon.png"></image>
+		</view>
+		<!-- 预览图片 -->
+		<view class="img-preview">
+			<view class="img-item" v-for="(src, i) in filePaths" :key="i">
+				<image :src="src"></image>
+				<image
+				  class="del-close"
+				  src="/static/del-close.png"
+					@click="delImg(i)" />
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * 图片上传(支持单张图片上传 和 多张图片上传)
+	 * 芦荟
+	 * 2021.2.3
+	 * props:属性说明看tm-radio-gruop.vue
+	 */
+
+  import { URL } from "../../utils/requestUrl.js";
+	export default {
+	  props: {
+			// 上传的图片路径列表
+			filePaths: {
+				type: Array,
+				default: () => {
+          return []
+        }
+			},
+			// 是否多选	(默认单选)
+      isMultiple: {
+				type: Boolean,
+				default: false
+			}
+		},
+		methods: {
+			// 上传图片
+			uploadPicture() {
+				uni.chooseImage({
+					count: this.isMultiple ? 0 : 1, // 是否多选
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album'], //从相册选择
+					success: res1 => {
+						let filePathStr = res1.tempFilePaths.join(',');
+						console.log(filePathStr)
+						uni.uploadFile({
+							url: `${URL}/eduscreen/upload/picture`,
+							fileType: 'image',
+							filePath: filePathStr,
+							name: 'file',
+							success: res2 => {
+								if (res2.statusCode == 200) {
+									let data = JSON.parse(res2.data || '{}');
+									if (parseInt(data.meta.code, 10) === 200) {
+										const { viewUrl, picture } = data.body;
+										this.$emit('changeFilePaths', [...this.filePaths, viewUrl])
+										this.picture = picture;
+									} else {
+										uni.showToast({
+											position: 'top',
+											icon: 'none',
+											title: '上传图片失败',
+											duration: 1000
+										});
+									}
+								}
+							},
+							error(e) {
+								uni.showToast({
+									position: 'top',
+									icon: 'none',
+									title: '上传图片失败',
+									duration: 1000
+								});
+							}
+						});
+					},
+					error: e => {
+						console.log('选择图片失败', e);
+					}
+				});
+			},
+			// 删除图片
+			delImg(i) {
+				this.$emit('changeFilePaths',  this.filePaths.filter((item, index) => index != i))
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.tm-upload-img {
+		background-color: #fff;
+		padding-left: 25rpx;
+
+		.row {
+			position: relative;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			// flex: 1;
+			padding-right: 25rpx;
+
+			.label-view {
+				width: 175rpx;
+				line-height: 22.5rpx;
+				padding: 31.25rpx 0;
+
+				text {
+					font-size: 22.5rpx;
+					color: #666F80;
+				}
+			}
+
+			.placeholder {
+				position: absolute;
+				top: 31.25rpx;
+				left: 175rpx;
+				font-size: 22.5rpx;
+				color: #B8BECC;
+			}
+
+			.img-icon {
+				width: 30rpx;
+				height: 25rpx;
+			}
+		}
+
+		.img-preview {
+			display: flex;
+			flex-wrap: wrap;
+
+			.img-item {
+				position: relative;
+				margin-right: 25rpx;
+				margin-bottom: 25rpx;
+				width: 300rpx;
+				height: 225rpx;
+
+				>image {
+					width: 300rpx;
+					height: 225rpx;
+				}
+
+				.del-close {
+					position: absolute;
+					top: -12.5rpx;
+					right: -12.5rpx;
+					width: 37.5rpx;
+					height: 37.5rpx;
+				}
+			}
+		}
+	}
+
+</style>

+ 26 - 20
components/uni-segmented-control/uni-segmented-control.vue

@@ -1,20 +1,24 @@
 <template>
-	<view :class="[styleType === 'text'?'segmented-control--text' : 'segmented-control--button' ]" :style="{ borderColor: styleType === 'text' ? '' : activeColor }"
-	 class="segmented-control">
-		<view v-for="(item, index) in values" :class="[ styleType === 'text'?'segmented-control__item--text': 'segmented-control__item--button' , index === currentIndex&&styleType === 'button'?'segmented-control__item--button--active': '' , index === 0&&styleType === 'button'?'segmented-control__item--button--first': '',index === values.length - 1&&styleType === 'button'?'segmented-control__item--button--last': '' ]"
-		 :key="index" :style="{
-        backgroundColor: index === currentIndex && styleType === 'button' ? activeColor : '',borderColor: index === currentIndex&&styleType === 'text'||styleType === 'button'?activeColor:'transparent'
-      }"
-		 class="segmented-control__item" @click="_onClick(index)">
-			<text :style="{color:
-          index === currentIndex
-            ? styleType === 'text'
-              ? activeColor
-              : '#fff'
-            : styleType === 'text'
-              ? '#000'
-              : activeColor}"
-			 class="segmented-control__text">{{ item }}</text>
+	<view 
+	  :class="[styleType === 'text'?'segmented-control--text' : 'segmented-control--button' ]" 
+	  :style="{ borderColor: styleType === 'text' ? '' : activeColor }"
+	   class="segmented-control">
+		<view :class="[ 
+				    styleType === 'text'?'segmented-control__item--text': 'segmented-control__item--button',
+				    index === currentIndex&&styleType === 'button'?'segmented-control__item--button--active': '' ,
+				    index === 0&&styleType === 'button'?'segmented-control__item--button--first': '',
+				    index === values.length - 1&&styleType === 'button'?'segmented-control__item--button--last': ''
+			    ]"
+			    v-for="(item, index) in values" 
+		      :key="index" 
+					:style="{
+             backgroundColor: index === currentIndex && styleType === 'button' ? activeColor : '',
+						 borderColor: index === currentIndex&&styleType === 'text'||styleType === 'button'?activeColor:'transparent'
+          }"
+		      class="segmented-control__item" @click="_onClick(index)">
+			<text :style="{color: index === currentIndex  ? styleType === 'text'
+						? activeColor : '#fff' : styleType === 'text' ? '#000' : activeColor}"
+			   class="segmented-control__text">{{ item }}</text>
 		</view>
 	</view>
 </template>
@@ -77,8 +81,9 @@
 		box-sizing: border-box;
 		/* #endif */
 		flex-direction: row;
-		height: 36px;
+		height: 52.5rpx;
 		overflow: hidden;
+		background-color: #fff;
 	}
 
 	.segmented-control__item {
@@ -113,12 +118,13 @@
 
 	.segmented-control__item--text {
 		border-bottom-style: solid;
-		border-bottom-width: 3px;
+		border-bottom-width: 3.75rpx;
 	}
 
 	.segmented-control__text {
-		font-size: 16px;
-		line-height: 20px;
+		font-size: 22.5rpx;
+		font-weight: 500;
+		line-height: 52.5rpx;
 		text-align: center;
 	}
 </style>

+ 0 - 1
main.js

@@ -4,7 +4,6 @@ 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 row from "./components/tm-trees/row.vue";
-
 Vue.config.productionTip = false;
 Vue.prototype.$store = store;
 Vue.component('com-date-pick-group', dateTimePickGroup);

+ 9 - 6
pages/configure/configure.vue

@@ -29,7 +29,7 @@
     <view class="sure-button">
       <button @click="sureList">保存</button>
     </view>
-    <tm-tabbar/>
+    <tm-tabbar />
   </view>
 </template>
 
@@ -55,7 +55,7 @@ export default {
       showPopup: false,
       radioVal: null,
       index: null,
-	  timer:null,
+      timer: null,
     };
   },
   created() {
@@ -64,7 +64,8 @@ export default {
   methods: {
     //获取最新配置
     getResultConfig() {
-      this.$store.dispatch({
+      this.$store
+        .dispatch({
           type: "configure/commActions",
           payload: {
             key: "getResultConfig",
@@ -76,7 +77,8 @@ export default {
     },
     //恢复最初配置
     recoveryList() {
-      this.$store.dispatch({
+      this.$store
+        .dispatch({
           type: "configure/commActions",
           payload: {
             key: "getDefault",
@@ -88,7 +90,8 @@ export default {
     },
     //保存配置
     sureList() {
-      this.$store.dispatch({
+      this.$store
+        .dispatch({
           type: "configure/commActions",
           payload: {
             key: "postResultConfig",
@@ -99,7 +102,7 @@ export default {
         })
         .then(() => {
           this.getResultConfig();
-		  clearTimeout(this.timer)
+          clearTimeout(this.timer);
         });
     },
     showConfig() {

+ 1 - 1
pages/home/home.vue

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

+ 18 - 18
pages/mission-action/components/assign-mission/assign-mission.vue → pages/mission-action/components/assign-mission.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="assign-mission">
 		<scroll-view class="scroll-y" scroll-y="true">
-			<tm-radio-group 
+			<tm-radio-group
 			  :list="list"
 				label="改善工具"
 				:defaultValue='defaultValue'
@@ -10,20 +10,20 @@
 				  value: 'value',
 				  name: 'label'
 			  }"
-		/>
-		<view class="switch-box">
-			<text class="label">需要审核改善方案</text>
-			<switch checked="true" style="transform:scale(1.5)" />
-		</view>
-		<tm-radio-group
+		  />
+		  <view class="switch-box">
+			  <text class="label">需要审核改善方案</text>
+			  <switch checked="true" style="transform:scale(1.5)" />
+		  </view>
+		  <tm-radio-group
 			  :list="list"
-				:defaultValue='defaultValue'
-				@change="changeSelect"
-				:setting="{
+			  :defaultValue='defaultValue'
+			  @change="changeSelect"
+			  :setting="{
 				  value: 'value',
 				  name: 'label'
 			  }"
-		/>
+		  />
 		</scroll-view>
 		<view class="fixed-buttom-btn">
 			<text class="btn-text">确定</text>
@@ -39,9 +39,9 @@
 				defaultValue: 1,
 				list: [
 					{value: 1, label: 'PDCA1'},
-					{value: 2, label: 'PDCA2'},
-					{value: 3, label: 'PDCA3'},
-					{value: 4, label: 'PDCA4'}
+					// {value: 2, label: 'PDCA2'},
+					// {value: 3, label: 'PDCA3'},
+					// {value: 4, label: 'PDCA4'}
 				]
 			}
 		},
@@ -61,19 +61,19 @@
 <style lang="less">
 	.assign-mission {
 		height: 100%;
-		
+
 		.scroll-y {
 			height: calc(100% - 87.5rpx);
-			
+
 			.switch-box {
 				display: flex;
 				justify-content: space-between;
 				align-items: center;
-				margin-bottom: 15rpx;
+				margin: 15rpx 0;
 				height: 87.5rpx;
 				background-color: #fff;
 				padding: 0 25rpx;
-				
+
 				.label {
 					font-size: 22.5rpx;
 					color: #292C33;

+ 70 - 0
pages/mission-action/components/disagree.vue

@@ -0,0 +1,70 @@
+<template>
+	<view class="disagree-page">
+    <scroll-view class="scroll-y" scroll-y="true">
+      <view class="textarea-box">
+			  <view class="label-view">
+				  <text>原因</text>
+			  </view>
+			  <textarea class="textarea"
+			    placeholder="请输入"
+			  	placeholder-style="color: #B8BECC"
+			  	:maxlength="-1"
+          auto-height
+			  />
+		</view>
+    </scroll-view>
+		<view class="fixed-buttom-btn">
+			<text class="btn-text">确定</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	// 不认可原因
+	export default {
+		created() {
+			uni.setNavigationBarTitle({
+				title: '原因'
+			});
+		}
+	}
+</script>
+
+<style lang="less">
+	.disagree-page {
+		height: 100%;
+
+    .scroll-y {
+			height: calc(100% - 87.5rpx);
+      padding-top: 15rpx;
+
+      .textarea-box {
+		   	display: flex;
+		   	width: 100%;
+		   	background-color: #fff;
+				padding: 25rpx 0;
+		   	padding-left: 25rpx;
+
+	       .label-view {
+		       width: 175rpx;
+		   		 line-height: 37.5rpx;
+
+		   		>text {
+		   			font-size: 22.5rpx;
+		   			color: #666F80;
+		   		}
+	       }
+
+		   	.textarea {
+          flex: 1;
+          min-height: 768.75rpx;
+		   		padding: 0 25rpx;
+		   		line-height: 37.5rpx;
+		   		font-size: 22.5rpx;
+		   		color: #525866;
+		   		box-sizing: border-box;
+		   	}
+		   }
+		}
+	}
+</style>

+ 185 - 0
pages/mission-action/components/pdca-components/do-and-check.vue

@@ -0,0 +1,185 @@
+<template>
+	<view class="com-plan-content">
+		<view class="title">
+			<text>{{ title }}</text>
+		</view>
+		<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="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>
+
+<script>
+	// 执行过程记录(Do)和 改善确认(Check)
+	export default {
+		props: {
+      // 多行文本框标题
+			title: {
+        type: String,
+        default: '执行过程记录(Do)'
+			}
+    },
+    data() {
+      return {
+        // list长度 控制个数
+        list: [
+					{gcjl: '', date: '', imgPath: '' },
+					{gcjl: '', date: '', imgPath: '' }
+				]
+      }
+    },
+		methods: {
+      changeVal(e) {
+        if(this.label === '改善计划'){
+          this.planvalue = e.target.value;
+        }else {
+          this.actionvalue = e.target.value;
+        }
+      },
+			// 新增一条记录
+			addRecord() {
+				this.list = [...this.list, {gcjl: '', date: '', imgPath: '' }]
+			}
+		},
+	}
+</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;
+			}
+		}
+		
+		.blue-text {
+			font-size: 23.75rpx;
+			color: #3377FF !important;
+			
+			.big {
+				font-size: 28.75rpx;
+			}
+		}
+		
+		.item-view {
+			
+			.top-action {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				margin-top: 25rpx;
+				margin-bottom: 15rpx;
+				height: 22.5rpx;
+				padding: 0 25rpx;
+				
+				text {
+					font-size: 22.5rpx;
+					color: #666F80;
+				}
+			}
+			
+			.main {
+				background-color: #fff;
+				
+				.row {
+					display: flex;
+					border-bottom: 0.62rpx solid #DADEE6;
+					padding-left: 25rpx;
+					
+					.label-view {
+						width: 175rpx;
+						line-height: 22.5rpx;
+						padding: 31.25rpx 0;
+					
+						>text {
+							font-size: 22.5rpx;
+							color: #666F80;
+						}
+					}
+					
+					.content {
+						flex: 1;
+						padding: 25rpx 0;
+					
+						.textarea {
+							width: 100%;
+							min-height: 200rpx;
+							padding: 0 25rpx;
+							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>

+ 117 - 0
pages/mission-action/components/pdca-components/one-textarea.vue

@@ -0,0 +1,117 @@
+<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="-1"
+					auto-height
+          :value="label === '改善计划' ? planvalue : actionvalue"
+          @input="changeVal"
+				/>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// 单个多行输入框 (改善计划(Plan)/oneTextarea)
+
+	export default {
+		props: {
+      // 多行文本框标题
+			title: {
+        type: String,
+        default: '改善计划(Plan)'
+			},
+      // 多行文本框子标题
+			label: {
+        type: String,
+        default: '改善计划'
+      },
+      // 改善计划默认值
+      defaultPlanValue: {
+        type: String,
+        default: ''
+      },
+      // 对策处置默认值
+      defaultactionValue: {
+        type: String,
+        default: ''
+      }
+    },
+    data() {
+      return {
+        planvalue: this.defaultPlanValue, // 改善计划
+        actionvalue: this.defaultactionValue // 对策处置
+      }
+    },
+		methods: {
+      changeVal(e) {
+        if(this.label === '改善计划'){
+          this.planvalue = e.target.value;
+        }else {
+          this.actionvalue = 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;
+				}
+			}
+		}
+	}
+</style>

+ 85 - 0
pages/mission-action/components/pdca.vue

@@ -0,0 +1,85 @@
+<template>
+	<view class="pdca-page">
+		<uni-segmented-control
+		  :current="current"
+			:values="items"
+			@clickItem="onClickItem"
+			style-type="text"
+			active-color="#3377FF" />
+		<view class="content">
+			<scroll-view class="scroll-y" scroll-y="true">
+        <one-textarea
+          v-if="current === 0"
+          :defaultPlanValue="'99999'"
+         />
+				 <do-and-check
+					 v-if="current === 1"
+					/>
+				<view v-if="current === 2">
+						选项卡3的内容
+				</view>
+				<one-textarea
+          v-if="current === 3"
+          title="对策处置(Action)"
+          label="对策处置"
+          :defaultactionValue="'123'"
+         />
+			</scroll-view>
+			<view class="fixed-buttom-btn">
+				<view class="btn-text cancle">
+					<text>取消</text>
+				</view>
+				<view class="btn-text">
+					<text>确定</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// 改善任务PDCA
+	import uniSegmentedControl from "@/components/uni-segmented-control/uni-segmented-control.vue"
+	import oneTextarea from './pdca-components/one-textarea.vue'
+	import doAndCheck from './pdca-components/do-and-check.vue'
+
+	export default {
+		data() {
+			return {
+				items: ['改善计划(P)', '执行过程(D)', '改善确认(C)', '对策处置(A)'],
+        current: 1,
+			}
+		},
+		created() {
+			uni.setNavigationBarTitle({
+				title: '改善计划'
+			});
+		},
+		methods: {
+			onClickItem(e) {
+				if (this.current !== e.currentIndex) {
+					this.current = e.currentIndex;
+				}
+			}
+		},
+		components: {
+			uniSegmentedControl,
+			oneTextarea,
+			doAndCheck
+		}
+	}
+</script>
+
+<style lang="less">
+	.pdca-page {
+		height: 100%;
+
+		.content {
+			height: calc(100% - 141.5rpx);
+
+			.scroll-y {
+				height: 100%;
+			}
+		}
+	}
+</style>

+ 77 - 0
pages/mission-action/components/personnel.vue

@@ -0,0 +1,77 @@
+<template>
+	<view class="personnel-page">
+		<scroll-view class="scroll-y" scroll-y="true">
+			<tm-radio-group
+        type="select"
+			  :list="list"
+				:defaultValue='defaultValue'
+				@change="changeSelect"
+        :openkeys="[0]"
+				:setting="{
+          pName: 'pName',
+          child: 'childList',
+				  value: 'value',
+				  name: 'label'
+			  }"
+			/>
+		</scroll-view>
+		<view class="fixed-buttom-btn">
+			<text class="btn-text">确定</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	// 人员架构
+	export default {
+		data(){
+			return {
+				defaultValue: 1,
+				list: [
+          {
+            pValue: 1,
+            pName: '门诊',
+            childList: [
+              {value: 1, label: 'PDCA1'},
+					    {value: 2, label: 'PDCA2'},
+				    	{value: 3, label: 'PDCA3'},
+					    {value: 4, label: 'PDCA4'}
+            ]
+          },
+          {
+            pValue: 2,
+            pName: '分诊',
+            childList: [
+              {value: 11, label: '许玮琛1'},
+					    {value: 22, label: '许玮琛2'},
+				    	{value: 33, label: '许玮琛3'},
+					    {value: 44, label: '许玮琛4'}
+            ]
+          },
+
+				]
+			}
+		},
+		created() {
+			uni.setNavigationBarTitle({
+				title: '人员架构'
+			});
+    },
+    methods: {
+      changeSelect(selectVal) {
+        this.defaultValue = selectVal
+      }
+    },
+	}
+</script>
+
+<style lang="less">
+	.personnel-page {
+		height: 100%;
+
+		.scroll-y {
+			height: calc(100% - 87.5rpx);
+			padding-top: 15rpx;
+		}
+	}
+</style>

+ 88 - 0
pages/mission-action/components/write-back.vue

@@ -0,0 +1,88 @@
+<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="-1"
+          auto-height
+				/>
+			</view>
+			<tm-upload-img
+			  :filePaths="filePaths"
+				:isMultiple="true"
+				@changeFilePaths="changeFilePaths"
+			/>
+		</scroll-view>
+		<view class="fixed-buttom-btn">
+			<text class="btn-text">确定</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	// 改善回复
+
+	export default {
+		data() {
+			return {
+				filePaths: ['/static/img-icon.png', '/static/img-icon.png']
+			}
+		},
+		created() {
+			uni.setNavigationBarTitle({
+				title: '原因'
+			});
+		},
+		methods: {
+			changeFilePaths(filePaths) {
+				this.filePaths = filePaths;
+			}
+		}
+	}
+</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;
+				}
+			}
+		}
+	}
+</style>

+ 35 - 5
pages/mission-action/mission-action.vue

@@ -1,22 +1,52 @@
 <template>
 	<view class="mission-action-page">
-		<assign-mission />
+		<!-- 指派改善任务 -->
+		<component
+		  :is="currentComponet"
+		/>
 	</view>
 </template>
 
 <script>
-	import assignMission from './components/assign-mission/assign-mission.vue'
+  import { mapState } from "vuex";
+	import assignMission from './components/assign-mission.vue';
+	import disagree from './components/disagree.vue'
+	import personnel from './components/personnel.vue'
+	import writeBack from './components/write-back.vue'
+	import pdca from './components/pdca.vue'
+
 	export default {
+    computed: {
+      ...mapState({
+        missionDetails: state => state.mission.missionDetails
+      })
+    },
 		data() {
 			return {
-				
+				// 当前显示的组件
+				currentComponet: 'write-back',
+				compoentList: [
+					{type: 1, name: '指派改善任务', component: 'assign-mission'},
+					{type: 2, name: '原因', component: 'disagree'},
+					{type: 3, name: '人员架构', component: 'personnel'},
+					{type: 4, name: '改善回复', component: 'write-back'},
+					{type: 5, name: 'PDCA', component: 'pdca'},
+				]
 			}
 		},
+		created() {
+			// console.log(this.compoentList[0].component)
+			// this.currentComponet = this.compoentList[0].component
+		},
 		methods: {
-			
+
 		},
 		components: {
-			assignMission
+			assignMission,
+			disagree,
+			personnel,
+			writeBack,
+			pdca
 		}
 	}
 </script>

+ 53 - 29
pages/mission-details/mission-details.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="mission-details-page">
 		<scroll-view class="scroll-y" scroll-y="true">
-			<list-item :isClose="true" />
+			<list-item :isDetails="true" :task="missionDetails" />
 			<view class="mission-plan">
 				<view class="label">
 					<text>改善进度</text>
@@ -10,8 +10,8 @@
 					<template v-for="(item, i) in list">
 						<view class="row" :key="i">
 							<view class="col">
-								<image 
-								  class="plan-icon" 
+								<image
+								  class="plan-icon"
 									:src="`/static/${i === list.length - 1 ? 'check-radio' : 'check-no'}.png`">
 								</image>
 								<view class="line" v-show="i != list.length -1"></view>
@@ -23,18 +23,18 @@
 								<view class="sub-box">
 									<view class="sub-title">
 										<text>{{ item.subTitle }}</text>
-									</view>	
+									</view>
 									<view class="sub-title">
 										<text>{{ item.date }}</text>
 									</view>
 								</view>
 						  </view>
 						</view>
-						<view class="btn-group" v-if="i === list.length-1">
-							<tm-button type="pramary" btnText="重新发送" />
-							<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,17 +43,41 @@
 
 <script>
 	// 改善任务
-	import listItem from '../mission/components/mission-list/list-item.vue';
+  import { mapState } from "vuex";
+  import listItem from '../mission/components/list-item.vue';
 	export default {
+    computed: {
+      ...mapState({
+        missionDetails: state => state.mission.missionDetails
+      })
+    },
 		data() {
 			return {
         list: [
 					{title: '查核人:王晓雪', subTitle: '发送改善通知,查核结果:主要缺失', date: '2020-11-22 15:30:22'},
 					{title: '单位负责人', subTitle: '发送改善通知,查核结果:主要缺失', date: '2020-11-22 15:30:22'}
-				]
+        ],
+        // 任务id
+        taskId: ''
 			}
-		},
+    },
+    onLoad({ taskId }){
+      this.taskId = taskId;
+    },
+    created() {
+      this.getMissionDetails();
+    },
 		methods: {
+      // 获取改善任务列表
+			getMissionDetails(data) {
+				this.$store.dispatch({
+					type: 'mission/commActions',
+					payload: {
+						key: "getMissionDetails",
+						data: {taskId: this.taskId}
+					}
+				});
+			},
 			// 点击右侧按钮
 			clickRightBtn() {
 				uni.navigateTo({
@@ -62,7 +86,7 @@
 			}
 		},
 		components: {
-			listItem, 
+			listItem
 		}
 	}
 </script>
@@ -71,80 +95,80 @@
 	.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;
@@ -153,7 +177,7 @@
 							}
 						}
 					}
-					
+
 					.btn-group {
 						display: flex;
 						justify-content: space-between;

+ 280 - 0
pages/mission-details/setting.js

@@ -0,0 +1,280 @@
+// 任务流程列表
+const taskTypeList = [
+  {
+    // 任务当前状态
+    taskType: 1,
+    currentPermission: 4, // 当前任务在哪
+    taskName: '创建任务',
+    // 《只针对第一步操作区分按钮是显示 指派改善任务还是改善回复》 1不用管 2 改善回复 3 制定改善方案
+    checkResult: 3,
+    //  底部按钮 (name: 按钮名字, componentName: 点击后跳转的页面, nextPermission:下一步指派给谁)
+    btnList: [
+      {name: '不认可', componentName: 'disagree', nextPermission: 1, nextPermissionName: '管理员'},
+      {name: '指派改善任务', componentName: 'assign-mission', nextPermission: 5, nextPermissionName: '改善者' }
+    ],
+    // 第一行
+    row1: { hasJoin: true, name: '查核人*', key: 'establishEmpName' },
+    // 第二行
+    row2: {hasJoin: true, name: '发送改善通知,查核结果:*', key: 'xx' },
+    // 查看xx详情 (name: 详情名字, componentName: 点击后跳转的页面, disabled: 底部按钮禁用)
+    selectDetails: { name: '查看查核结果详情', componentName: 'disagree', disabled: true }
+  },
+  {
+    taskType: 1,
+    currentPermission: 4,
+    taskName: '创建任务',
+    checkResult: 2,
+    btnList: [
+      {name: '不认可', componentName: 'disagree', nextPermission: 1, nextPermissionName: '管理员'},
+      {name: '改善回复', componentName: 'write-back', nextPermission: 1, nextPermissionName: '管理员' }
+    ],
+     row1: { hasJoin: true, name: '查核人*', key: 'establishEmpName' },
+     row2: {hasJoin: true, name: '发送改善通知,查核结果:*', key: 'xx' },
+    selectDetails: {name: '查看查核结果详情', componentName: 'disagree', disabled: true}
+  },
+  {
+    taskType: 2,
+    currentPermission: 1,
+    taskName: '不认可',
+    checkResult: 1,
+    btnList: [
+      {name: '重新发送', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人'},
+      {name: '发送给其他人', componentName: 'personnel', nextPermission: 4, nextPermissionName: '单位负责人' }
+    ],
+    row1: { hasJoin: true, name: '单位负责人*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '不认可改善通知' },
+    selectDetails: {name: '查看不认可原因详情', componentName: 'disagree', disabled: true}
+  },
+  {
+    taskType: 3,
+    currentPermission: 4,
+    taskName: '重新发送',
+    checkResult: 1,
+    btnList: [
+      {name: '指派改善任务', componentName: 'assign-mission', nextPermission: 4, nextPermissionName: '单位负责人' }
+    ],
+    row1: { hasJoin: true, name: '管理员*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '重新发送改善通知' },
+    selectDetails: {name: '查看原因详情', componentName: 'disagree', disabled: true}
+  },
+  {
+    taskType: 4,
+    checkResult: 1,
+    taskName: '指派改善任务',
+    currentPermission: 5,
+    btnList: [
+      {name: '申请更换改善人', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
+      {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
+    ],
+    row1: { hasJoin: true, name: '单位负责人*', key: 'establishEmpName' },
+    row2: {hasJoin: true, name: '指派*为改善人', key: 'receiveEmpName'},
+    selectDetails: null
+  },
+  {
+    taskType: 5,
+    checkResult: 1,
+    taskName: '改善回复',
+    currentPermission: 1,
+    btnList: [
+      {name: '不通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
+      {name: '通过', componentName: null, nextPermission: null, nextPermission: 4, nextPermissionName: '单位负责人' }
+    ],
+    row1: { hasJoin: true, name: '单位负责人*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '提交了改善回复'},
+    selectDetails: {name: '查看改善回复详情', componentName: 'write-back', disabled: true},
+  },
+  {
+    taskType: 6,
+    checkResult: 1,
+    taskName: '更换改善人',
+    currentPermission: 5,
+    btnList: [
+      {name: '申请更换改善人', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
+      {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
+    ],
+    row1: { hasJoin: true, name: '单位负责人*', key: 'establishEmpName' },
+    row2: {hasJoin: true, name: '指派*为改善人', key: 'receiveEmpName'},
+    selectDetails: null
+  },
+  {
+    taskType: 7,
+    checkResult: 1,
+    taskName: '更换改善人驳回',
+    currentPermission: 5,
+    btnList: [
+      {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
+    ],
+    row1: { hasJoin: true, name: '单位负责人*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '驳回更换改善人的申请'},
+    selectDetails: null
+  },
+  {
+    taskType: 8,
+    checkResult: 1,
+    taskName: '改善计划plan通过',
+    currentPermission: 5,
+    btnList: [
+      {name: '记录改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pdca' }
+    ],
+    row1: { hasJoin: true, name: '单位管理员*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '通过改善计划审核,开始执行改善计划'},
+    selectDetails: {name: '查看改善计划详情', componentName: 'pdca',  pdcaSetting: 'p', disabled: true}
+  },
+  {
+    taskType: 9,
+    checkResult: 1,
+    taskName: '改善计划plan不通过',
+    currentPermission: 5,
+    btnList: [
+      {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' }
+    ],
+    row1: { hasJoin: true, name: '单位管理员*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '建议重新完善改善计划'},
+    selectDetails: {name: '查看原因详情', componentName: 'disagree', disabled: true}
+  },
+  {
+    taskType: 10,
+    checkResult: 1,
+    taskName: '改善方案PDCA通过',
+    currentPermission: 1,
+    btnList: [
+      {name: '不通过', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人' },
+      {name: '通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' }
+    ],
+    row1: { hasJoin: true, name: '单位负责人*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '通过了改善方案(PDCA)'},
+    selectDetails: {name: '查看改善方案详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pacd', disabled: true}
+  },
+  {
+    taskType: 11,
+    checkResult: 1,
+    taskName: '改善方案PDCA不通过',
+    currentPermission: 5,
+    btnList: [
+      {name: '制定改善方案', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p' },
+    ],
+    row1: { hasJoin: true, name: '单位管理员*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '建议重新完善改善计划'},
+    selectDetails: {name: '查看原因详情', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人', disabled: true}
+  },
+  {
+    taskType: 12,
+    checkResult: 1,
+    taskName: '申请更改改善人',
+    currentPermission: 4,
+    btnList: [
+      {name: '更改改善人', componentName: 'assign-mission', nextPermission: 5, nextPermissionName: '改善者' },
+      {name: '驳回请求', componentName: null, nextPermission: 5, nextPermissionName: '改善者' },
+    ],
+    row1: { hasJoin: true, name: '改善人*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '申请更换改善人'},
+    selectDetails: null
+  },
+  {
+    taskType: 13,
+    checkResult: 1,
+    taskName: '制定改善方案',
+    currentPermission: 4,
+    btnList: [
+      {name: '不通过', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人' },
+      {name: '通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
+    ],
+    row1: { hasJoin: true, name: '改善者*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
+    selectDetails: {name: '查看改善计划详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p', disabled: true}
+  },
+  {
+    taskType: 14,
+    checkResult: 1,
+    taskName: '制定改善方案plan',
+    currentPermission: 4,
+    btnList: [
+      {name: '不通过', componentName: 'disagree', nextPermission: 5, nextPermissionName: '改善者' },
+      {name: '通过', componentName: null, nextPermission: 5, nextPermissionName: '改善者' },
+    ],
+    row1: { hasJoin: true, name: '改善者*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
+    selectDetails: {name: '查看改善计划详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p', disabled: true}
+  },
+  {
+    taskType: 15,
+    checkResult: 1,
+    taskName: '改善方案暂停',
+    currentPermission: 4,
+    btnList: [
+      {name: '不通过', componentName: 'disagree', nextPermission: 4, nextPermissionName: '单位负责人' },
+      {name: '通过', componentName: null, nextPermission: 4, nextPermissionName: '单位负责人' },
+    ],
+    row1: { hasJoin: true, name: '改善者*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
+    selectDetails: {name: '查看改善计划详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'p', disabled: true}
+  },
+  {
+    taskType: 16,
+    checkResult: 1,
+    taskName: '记录改善方案plan',
+    currentPermission: 4,
+    btnList: [
+      {name: '不通过', componentName: 'disagree', nextPermission: 5, nextPermissionName: '改善者' },
+      {name: '通过', componentName: null, nextPermission: 1, nextPermissionName: '管理员' },
+    ],
+    row1: { hasJoin: true, name: '改善者*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '提交了改善计划(PLAN)'},
+    selectDetails: {name: '查看改善方案详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pdca', disabled: true}
+  },
+  {
+    taskType: 17,
+    checkResult: 1,
+    taskName: '改善方案plan通过, 改善回复通过',
+    currentPermission: 4,
+    btnList: [],
+    row1: { hasJoin: true, name: '管理员*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '完成改善,本次任务结束'},
+    selectDetails: {name: '查看改善方案详情', componentName: 'pdca', nextPermission: 5, nextPermissionName: '改善者', pdcaSetting: 'pdca', disabled: true}
+  },
+  {
+    taskType: 18,
+    checkResult: 1,
+    taskName: '改善方案plan通过, 改善回复通过',
+    currentPermission: 4,
+    btnList: [
+      {name: '指派改善任务', componentName: 'assign-mission', nextPermission: 4, nextPermissionName: '单位负责人' },
+    ],
+    row1: { hasJoin: true, name: '管理员*', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '改善方案不通过,重新执行改善流程'},
+    selectDetails: {name: '查看原因详情', componentName: 'disagree', disabled: true }
+  },
+];
+
+export default taskTypeList;
+
+/**
+ * 字段描述:
+ * taskType:          // 任务当前状态
+ * currentPermission:  // 当前任务位置在哪 (1、管理员 2、查核组长 3、查核组员 4、单位负责人 5、改善者)
+ * taskName:          // 任务名称
+ * checkResult:       // 《只针对第一步创建任务 区分按钮 显示指派改善任务还是改善回复》 1不用管 2 改善回复 3 制定改善方案
+ * btnList:{ // 底部按钮
+ *   name: // 按钮名字,
+ *   componentName: // 点击后跳转的页面,null直接刷新页面即可
+ *   nextPermission: // 下一步指派给谁id
+ *   nextPermissionName: // 下一步指派给谁
+ *   pdcaSetting: // 跳转pdca的配置: <p: 只能编辑plan, pdca: 都可以编辑>
+ * }
+ * row1: { // 第一行显示的内容
+ *    hasJoin:// 是否需要拼接,
+ *    name:   // 显示的内容 <注意 星号*指占位符, 后面需要被key字段替换的,
+ *    key:    //  要显示的的内容(后端返回的key, 用于替换星号*)
+ *  }
+ * row2: { // 第二行显示的内容
+ *    hasJoin: // 是否需要拼接,
+ *    name:    // 显示的内容 <注意 星号*指占位符, 后面需要被key字段替换的,
+ *    key:     // 要显示的的内容(后端返回的key, 用于替换星号*)
+ *  }
+ * selectDetails {
+ *   name: '查看改善计划详情', // 详情显示的名字
+ *   componentName: 'pdca', // 点击后跳转的页面
+ *   pdcaSetting: 'p', // 当componentName='pdca', 需要判断pdcaSetting='p', 还是‘pdca’
+ *   disabled: true // 底部按钮禁用
+ * }
+ */

+ 40 - 28
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(task.id)">
+		<view v-if="!isDetails && !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 v-show="!isDetails" :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,22 +31,34 @@
 <script>
 	export default {
 		props: {
-			isClose: { // 是否结案
+			// 当前遍历的任务
+			task: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			// 是否结案
+			isComplete: {
+				type: Boolean,
+				default: false
+			},
+			// 是否是详情页面
+			isDetails: {
 				type: Boolean,
 				default: false
 			}
 		},
 		computed: {
 			bgImage(){
-				console.log(`url(~@/static/${!this.isClose ? 'hight' : 'disabled'}-bg.png)`)
-				return `../../../../static/${!this.isClose ? 'hight' : 'disabled'}-bg.png`;
+				return `../../../static/${!this.isComplete ? 'hight' : 'disabled'}-bg.png`;
 			}
 		},
 		methods: {
 			// 跳转详情页面(改善任务)
-			gooDetails(){
+			gotoDetails(id){
 				uni.navigateTo({
-				  url: '/pages/mission-details/mission-details'
+				  url: `/pages/mission-details/mission-details?taskId=${id}`
 				});
 			}
 		}
@@ -57,13 +69,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 +83,7 @@
 			height: 203.75rpx;
 			background-color: #fff;
 			padding: 0 25rpx;
-			
+
 			.top-box {
 				display: flex;
 				flex-direction: column;
@@ -80,23 +92,23 @@
 				margin-top: 35rpx;
 				margin-bottom: 28.12rpx;
 			}
-			
+
 			.title {
-				line-height: 45rpx;
+				line-height: 25rpx;
 				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 +126,7 @@
 				height: 70rpx;
 				border-top: 0.62rpx solid #DADEE6;
 			}
-			
+
 			.bg-box {
 				position: absolute;
 				top: 0;
@@ -124,14 +136,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 +151,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" v-show="completeTaskList.length > 0" @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>

+ 92 - 0
pages/mission/model.js

@@ -0,0 +1,92 @@
+import { commServer } from './server.js';
+
+export default {
+  namespaced: true,
+  state: {
+    // 任务详情
+    missionDetails: {
+      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
+      buttonDisplayFlag: 1,  // 0 不展示 1展示
+      checkResult: 1, // 《只针对第一步操作区分按钮是显示 指派改善任务还是改善回复》 1不用管 2 改善回复 3 制定改善方案
+      pfmTaskCirculationList: [
+        {
+          createTime: "2021-02-03T01:44:42.000+0000", // 创建时间
+          establishEmpId: 1, // 员工id
+          establishEmpName: "管理员",// 发送人员名称
+          id: 1, // 流转记录id
+          receiveEmpId: 1, // 接收人id
+          receiveEmpName: "管理员吧",// 接收人姓名
+          // action
+          taskAction: "", // 改善处置
+          taskId: 1, // 任务id
+          taskPlan: "",// plan整改计划
+          taskType: 0, // 流转状态
+          improveScheme: '', // 改善方案名称
+          approveReason: '审核意见', // 审核意见
+          // do
+          taskDoRequestList: [
+            {
+              taskDoId:"mock",  // 过程记录id
+              taskDoProcess:"mock", // 过程记录内容
+              taskDoPlan:"mock" // 计划日期
+            }
+          ],
+          // check
+          taskCheckRequestList: [
+            {
+              taskCheckId:"mock",  // 改善确认id
+              taskCheckProcess:"mock", // 改善确认记录过程
+              taskCheckPlan:"mock",  // 改善确认计划日期
+              taskCheckEffect:"mock" //改善确认改善效果
+            }
+          ]
+        }
+      ]
+    }
+  },
+  mutations: {
+    changeMissionDetails(state, { data }) {
+      state.missionDetails = data || {};
+    },
+  },
+  actions: {
+    commActions({ commit, state }, { payload }) {
+      // payload = {key,data} // data是请求数据,key是请求接口id
+      return commServer(payload).then(data => {
+        // 查看任务详情
+        if (payload.key === 'getMissionDetails') {
+          commit({
+            type: 'changeMissionDetails',
+            data
+          });
+        }
+        return data
+      });
+    },
+  }
+}

+ 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 - 1
pages/model.js

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

BIN
static/del-close.png


+ 0 - 0
static/down-ion.png → static/down-icon.png


+ 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}`,