浏览代码

拉取代码

jiangniuniu 4 年之前
父节点
当前提交
7a3a6a38cb

+ 1 - 1
components/tm-tabbar/tm-tabbar.vue

@@ -68,7 +68,7 @@
 					{permission: 1, name: '管理员', tabBarIndexs: [0, 1, 2, 3]}, // tabBarIndexs:tabBarList种对应的下标
 					{permission: 2, name: '查核组长', tabBarIndexs: [0, 4, 3]},
 					{permission: 3, name: '查核组员', tabBarIndexs: [0, 4, 3]},
-					{permission: 4, name: '单位负责人', tabBarIndexs: [0, 1, 3]},
+					{permission: 4, name: '单位负责人', tabBarIndexs: [1, 3]},
 					{permission: 5, name: '改善者', tabBarIndexs: [1, 3]}
         ],
         rolToTabBars: [],

+ 1 - 1
pages/auditItemDetails/auditItemDetails.vue

@@ -40,7 +40,7 @@
 			</view>
 			<view class="box-item">
 				<view>查核时间</view>
-				<view>{{item.completeTimeStr}}</view>
+				<view>{{detail.completeTimeStr}}</view>
 			</view>
 			<view class="box-item">
 				<view>图片展示</view>

+ 4 - 4
pages/checkMainPoints/checkMainPoints.vue

@@ -9,14 +9,14 @@
 					<image src="../../static/search.png"></image>
 				</view>
 				<view class="top-btn-wrap">
-					<view class="btn-list" v-if="permissions.includes(3)">
+					<view class="btn-list" v-if="nowPermission == 3">
 						<com-button v-for="(item, index) in btnArr" 
 							:btnText="item.label" 
 							:type="active === item.id ? 'pramary':'default'" 
 							v-on:btnClick="btnClick(item.id)"/>
 					</view>
 					<view class="select-wrap" 
-						v-else-if="permissions.includes(2) || permissions.includes(1)" 
+						v-else-if="nowPermission == 2 || nowPermission == 1" 
 						@click="toggleModal(!showModal)">
 						<text>{{getCheckPointName}}</text>
 						<image :src="`../../static/${showModal?'open':'close'}-icon.png`"></image>
@@ -88,7 +88,7 @@
 				copyDetailList: [],
 				point: [{checkPointId: 'all', checkPointName: '全部要点'}],
 				checkPointId: 'all',
-				permissions: uni.getStorageSync('permissions'),
+				nowPermission: uni.getStorageSync('nowPermission'),
 				active: 0
 			};
 		},
@@ -116,7 +116,7 @@
 			},
 			childClick(child) {
 				// 查核者,管理员
-				if(this.permissions.includes(1) || this.permissions.includes(3)) { 
+				if(this.nowPermission == 1 || this.nowPermission == 3) { 
 					let str = '';
 					if(child.checkResult) {
 						// 跳转到查核项详情

+ 2 - 3
pages/creatingSituations/components/checkMap.vue

@@ -66,10 +66,9 @@
 			init: function() {
 				const {checkedItem} = this.checkRent;
 				const {depType} = this.condition;
-				const {checkRent, condition, checkMap} = this.editConfig;
 				// 编辑的时候不用获取数据
-				if(this.editConfig && checkRent && depType === condition.depType && checkedItem.id === checkRent.checkedItem.id) {
-					this.commit('checkMap', checkMap);
+				if(this.editConfig && this.editConfig.checkRent && depType === this.editConfig.condition.depType && checkedItem.id === this.editConfig.checkRent.checkedItem.id) {
+					this.commit('checkMap', this.editConfig.checkMap);
 				} else if(this.needReload) { // 点击上一步不用获取数据
 					if(!checkedItem.points) return;
 					let checkPointIds = checkedItem.points.map(({id})=> id);

+ 7 - 4
pages/creatingSituations/components/checkMapDetail.vue

@@ -122,9 +122,11 @@
 			.content {
 				width: 100%;
 				color: #292C33;
-				line-height: 87.5rpx;
 				.content-title {
-					height: 87.5rpx;
+					display: flex;
+					flex-direction: row;
+					align-items: center;
+					min-height: 87.5rpx;
 					font-size: 22.5rpx;
 					font-weight: 500;
 				}
@@ -134,15 +136,16 @@
 						display: flex;
 						flex-direction: row;
 						justify-content: space-between;
+						align-items: center;
 						border-top: 1px solid #DADEE6;
-						height: 87.5rpx;
+						min-height: 87.5rpx;
 						.check-icon-wrap {
 							display: flex;
 							flex-direction: row;
 							justify-content: center;
 							align-items: center;
 							width: 75rpx;
-							height: 100%;
+							height: 87.5rpx;
 							image {
 								width: 25rpx;
 								height: 25rpx;

+ 0 - 1
pages/creatingSituations/creatingSituations.vue

@@ -157,7 +157,6 @@
 						}
 					})
 				}).then((data)=>{
-					console.log(data);
 					if(data) {
 						uni.navigateTo({
 							url: '/pages/situationsCenter/situationsCenter'

+ 1 - 1
pages/editCheckList/model.js

@@ -4,7 +4,7 @@ export default {
   namespaced: true,
   state: {
      // 查核列表
-     checkList: []
+     checkList: [],
   },
   mutations: {
 		comChangeState(state, {key, data}) {

+ 28 - 26
pages/login/login.vue

@@ -34,7 +34,7 @@
 					{permission: 1, name: '管理员', pagePath: 'pages/situationsCenter/situationsCenter'}, // targetIndexs:targetList种对应的下标
 					{permission: 2, name: '查核组长',pagePath: 'pages/situationsCenter/situationsCenter'},
 					{permission: 3, name: '查核组员', pagePath: 'pages/situationsCenter/situationsCenter'},
-					{permission: 4, name: '单位负责人', pagePath: 'pages/situationsCenter/situationsCenter'},
+					{permission: 4, name: '单位负责人', pagePath: 'pages/mission/mission'},
 					{permission: 5, name: '改善者', pagePath: 'pages/mission/mission'}
 				]
 			}
@@ -89,31 +89,33 @@
 	.login-page {
 		height: 100%;
 		background-color: #FFFFFF;
-
-		.pic{
-			 height: 281.25rpx;
-			 width: 430rpx;
-			 float: right;
-		}
-		.title-top{
-			 height: 45rpx;
-			 font-size: 45rpx;
-			 font-weight: bold;
-			 margin-top: 250rpx;
-			 margin-left: 62.5rpx;
-			 font-family: SourceHanSansCN-Bold, SourceHanSansCN;
-			 color: #2E2F33;
-			 float: left;
-		}
-		.title-buttom{
-			 height: 45rpx;
-			 font-size: 45rpx;
-			 font-family: SourceHanSansCN-Bold, SourceHanSansCN;
-			 font-weight: bold;
-			 color: #2E2F33;
-			 float: left;
-			 margin-left: 62.5rpx;
-			 margin-top: 40rpx;
+		.top-box {
+			display: flex;
+			flex-direction: column;
+			padding-left: 62.5rpx;
+			.pic{
+				position: absolute;
+				top: 0;
+				right: 0;
+			  width: 430rpx;
+				height: 281.25rpx;
+			}
+			.title-top{
+				height: 45rpx;
+				font-size: 45rpx;
+				font-weight: bold;
+				margin-top: 250rpx;
+				font-family: SourceHanSansCN-Bold, SourceHanSansCN;
+				color: #2E2F33;
+			}
+			.title-buttom{
+				 margin-top: 40rpx;
+				 height: 45rpx;
+				 font-size: 45rpx;
+				 font-family: SourceHanSansCN-Bold, SourceHanSansCN;
+				 font-weight: bold;
+				 color: #2E2F33;
+			}
 		}
 		.main-content{
 			 margin-top: 37.5rpx;

+ 2 - 0
pages/mission-action/components/assign-mission.vue

@@ -100,6 +100,8 @@
               ? this.missionDetails
               : this.btnInfo
             )[item.valueKey];
+          }else if(item.value){
+            requestParams[item.paramsKey] = item.value;
           }else {
             switch(item.paramsKey){
               case 'desicion':

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

@@ -82,6 +82,8 @@
               ? this.missionDetails
               : this.btnInfo
             )[item.valueKey];
+          }else if(item.value){
+            requestParams[item.paramsKey] = item.value;
           }else {
             requestParams[item.paramsKey] = this.value;
           }

+ 6 - 1
pages/mission-action/components/pdca.vue

@@ -159,7 +159,7 @@
           improveScheme // 改善方案名称
         };
         this.btnInfo.params && this.btnInfo.params.map(item => {
-          if(item.valueKey && !item.isEdit){
+         if(item.valueKey && !item.isEdit){
             requestParams[item.paramsKey] = (
               item.isOutvalueKey
               ? this.missionDetails
@@ -198,6 +198,11 @@
             }
           }
         });
+        if(improveScheme){ // 提交
+          requestParams['taskType'] = this.pdcaSetting === 'p' ? 14 : 16;
+        }else { // 暂存
+          requestParams['taskType'] = this.pdcaSetting === 'p' ? 13 : 15;
+        }
         this.$emit('comRequest', requestParams);
         improveScheme && this.toggleModalVisibile();
       },

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

@@ -70,6 +70,8 @@
               ? this.missionDetails
               : this.btnInfo
             )[item.valueKey];
+          }else if(item.value){
+            requestParams[item.paramsKey] = item.value;
           }else {
             switch(item.paramsKey){
               case 'receiveEmpId':

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

@@ -92,6 +92,8 @@
               ? this.missionDetails
               : this.btnInfo
             )[item.valueKey];
+          }else if(item.value){
+            requestParams[item.paramsKey] = item.value;
           }else {
              switch(item.paramsKey){
               case 'imgPath': // 上传图片

+ 6 - 4
pages/mission-details/mission-details.vue

@@ -80,7 +80,7 @@
         const { buttonDisplayFlag, pfmTaskCirculationList, taskType, checkResult } = this.missionDetails;
         if(buttonDisplayFlag == 1 && pfmTaskCirculationList && pfmTaskCirculationList.length > 0) {
           let task = null;
-          if(taskType == 1) { // 状态为1比较特殊,需要再比较checkResult
+          if(taskType == 1 || taskType == 3) { // 状态为1, 和3比较特殊,需要再比较checkResult
             task = taskTypeList.find(item => (item.taskType == taskType && item.checkResult == checkResult));
           }else {
             task = taskTypeList.find(item => item.taskType == taskType);
@@ -116,7 +116,7 @@
 					}
 				});
 			},
-			// 点击右侧按钮
+			// 点击按钮
 			clickBtn(currentInfo, btnInfo) {
         if(btnInfo.componentName){ // 有组件名,则跳转页面
           if(btnInfo.componentName === 'pdca'){
@@ -147,6 +147,8 @@
                 ? this.missionDetails
                 : currentInfo
               )[item.valueKey];
+            }else if(item.value){
+              requestParams[item.paramsKey] = item.value;
             }
           })
           this.comTaskCirculation(requestParams);
@@ -182,9 +184,9 @@
         if(isLink) {
           return currentTypeTask[rowKey];
         }else {
-          const { hasJoin, name, key} = currentTypeTask[rowKey] || {};
+          const { hasJoin, name, key, isOutvalueKey} = currentTypeTask[rowKey] || {};
           if(hasJoin) { // 需要删除*并替换
-            return name ? name.replace(/x/g, (obj[key] || '')) : ''
+            return name ? name.replace(/x/g, (isOutvalueKey ? this.missionDetails : obj)[key] || '') : ''
           }else {
             return name || '';
           }

+ 1 - 1
pages/mission-details/pdcaSetting.js

@@ -1,6 +1,6 @@
 const baseSetting = [
   { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-  { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+  // { paramsKey: 'taskType', value: null }, // 状态值 13, 14, 15, 16(13/15暂存)
   { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
   { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
 ];

+ 52 - 24
pages/mission-details/setting.js

@@ -11,7 +11,7 @@ const taskTypeList = [
         componentName: 'disagree', // 点击后跳转的组件名
         params: [ // 接口保存的参数配置(paramsKey: 参数名, valueKey: 使用详情接口key, 为null, 表示当前组件可自输入, isOutvalueKey: 是否详情接一级key, 不是则在当前任务状态中找key(如pfmTaskCirculationList下面))
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 2 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'adminId', isOutvalueKey: true }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'adminName', isOutvalueKey: true }, // 接收人姓名
           { paramsKey: 'approveReason', valueKey: null } // 不认可原因
@@ -22,7 +22,7 @@ const taskTypeList = [
         componentName: 'assign-mission',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 4 }, // 状态值
           { paramsKey: 'appointFlag', valueKey: 'appointFlag', isOutvalueKey: true }, // 已指派标志, 0 未指派 1已指派
           { paramsKey: 'desicion', valueKey: null }, // 改善方案 目前只有pdca
           { paramsKey: 'receiveEmpId', valueKey: null }, // 指派人
@@ -68,7 +68,7 @@ const taskTypeList = [
         componentName: 'disagree',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 2 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'adminId', isOutvalueKey: true }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'adminName', isOutvalueKey: true }, // 接收人姓名
           { paramsKey: 'approveReason', valueKey: null }, // 不认可原因
@@ -79,7 +79,7 @@ const taskTypeList = [
         componentName: 'write-back',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 5 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'receiveEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'adminName', isOutvalueKey: true }, // 接收人姓名
           { paramsKey: 'approveReason', valueKey: null }, // 不认可原因
@@ -111,7 +111,7 @@ const taskTypeList = [
         componentName: 'disagree',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 3}, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
           { paramsKey: 'approveReason', valueKey: null } // 不认可原因
@@ -123,7 +123,7 @@ const taskTypeList = [
         keys: null,
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 1 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: null }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: null } // 接收人姓名
         ]
@@ -142,14 +142,14 @@ const taskTypeList = [
   {
     taskType: 3,
     taskName: '重新发送',
-    checkResult: 1,
+    checkResult: 3,
     btnList: [
       {
         name: '指派改善任务',
         componentName: 'assign-mission',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 4 }, // 状态值
           { paramsKey: 'appointFlag', valueKey: 'appointFlag', isOutvalueKey: true }, // 已指派标志, 0 未指派 1已指派
           { paramsKey: 'desicion', valueKey: null }, // 改善方案 目前只有pdca
           { paramsKey: 'receiveEmpId', valueKey: null }, // 指派人
@@ -168,6 +168,34 @@ const taskTypeList = [
       labelKey: 'textarea'
     }
   },
+  {
+    taskType: 3,
+    taskName: '重新发送',
+    checkResult: 2,
+    btnList: [
+      {
+        name: '改善回复',
+        componentName: 'write-back',
+        params: [
+          { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
+          { paramsKey: 'taskType', value: 5 }, // 状态值
+          { paramsKey: 'receiveEmpId', valueKey: 'receiveEmpId', isOutvalueKey: false }, // 接收人id
+          { paramsKey: 'receiveEmpName', valueKey: 'adminName', isOutvalueKey: true }, // 接收人姓名
+          { paramsKey: 'approveReason', valueKey: null }, // 不认可原因
+          { paramsKey: 'improveUrl', valueKey: null } // 图片地址
+        ]
+      }
+    ],
+    row1: { hasJoin: true, name: '管理员x', key: 'establishEmpName' },
+    row2: {hasJoin: false, name: '重新发送改善通知' },
+    selectDetails: {
+      name: '查看原因详情',
+      key: 'approveReason',
+      componentName: 'disagree',
+      disabled: true,
+      labelKey: 'textarea'
+    }
+  },
   {
     taskType: 4,
     checkResult: 1,
@@ -178,7 +206,7 @@ const taskTypeList = [
         componentName: null,
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 12 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false } // 接收人姓名
         ]
@@ -210,7 +238,7 @@ const taskTypeList = [
         componentName: null,
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 1 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
         ]
@@ -220,7 +248,7 @@ const taskTypeList = [
         componentName: null,
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 17 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
         ]
@@ -249,7 +277,7 @@ const taskTypeList = [
         componentName: null,
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 12 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false } // 接收人姓名
         ]
@@ -282,7 +310,7 @@ const taskTypeList = [
         // pdcaSetting: 'p',
         // params: [
         //   { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-        //   { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+        //   { paramsKey: 'taskType', value: 3 }, // 状态值
         //   { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
         //   { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
         //   { paramsKey: 'taskPlan', valueKey: null } // plan
@@ -364,7 +392,7 @@ const taskTypeList = [
         componentName: 'disagree',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 18}, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 接收人姓名
           { paramsKey: 'approveReason', valueKey: 'approveReason', isOutvalueKey: false } // 原因
@@ -375,7 +403,7 @@ const taskTypeList = [
         componentName: null,
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 17 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false } // 接收人姓名
         ]
@@ -436,7 +464,7 @@ const taskTypeList = [
         componentName: 'assign-mission',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 6}, // 状态值
           { paramsKey: 'appointFlag', valueKey: 'appointFlag', isOutvalueKey: true }, // 已指派标志, 0 未指派 1已指派
           { paramsKey: 'desicion', valueKey: null }, // 改善方案 目前只有pdca 0
           { paramsKey: 'receiveEmpId', valueKey: null }, // 指派人
@@ -449,7 +477,7 @@ const taskTypeList = [
         componentName: null,
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 7 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
           { paramsKey: 'approveReason', valueKey: null } // 原因
@@ -470,7 +498,7 @@ const taskTypeList = [
         componentName: null,
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 12}, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false } // 接收人姓名
         ]
@@ -496,7 +524,7 @@ const taskTypeList = [
         componentName: 'disagree',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 9 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
           { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false }, // 改善plan
@@ -508,7 +536,7 @@ const taskTypeList = [
         componentName: null,
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 8 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
           { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false } // 改善plan
@@ -537,7 +565,7 @@ const taskTypeList = [
         componentName: null,
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 12 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false } // 接收人姓名
         ]
@@ -563,7 +591,7 @@ const taskTypeList = [
         componentName: 'disagree',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 11 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'establishEmpId', isOutvalueKey: false }, // 指派人
           { paramsKey: 'receiveEmpName', valueKey: 'establishEmpName', isOutvalueKey: false }, // 指派人姓名
           { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false }, // 改善plan
@@ -578,7 +606,7 @@ const taskTypeList = [
         componentName: null,
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 10 }, // 状态值
           { paramsKey: 'receiveEmpId', valueKey: 'adminId', isOutvalueKey: true }, // 接收人id
           { paramsKey: 'receiveEmpName', valueKey: 'adminName', isOutvalueKey: true }, // 接收人姓名
           { paramsKey: 'taskPlan', valueKey: 'taskPlan', isOutvalueKey: false }, // 改善plan
@@ -636,7 +664,7 @@ const taskTypeList = [
         componentName: 'assign-mission',
         params: [
           { paramsKey: 'id', valueKey: 'id', isOutvalueKey: true }, // 任务id
-          { paramsKey: 'taskType', valueKey: 'taskType', isOutvalueKey: false }, // 状态值
+          { paramsKey: 'taskType', value: 4 }, // 状态值
           { paramsKey: 'appointFlag', valueKey: 'appointFlag', isOutvalueKey: true }, // 已指派标志, 0 未指派 1已指派
           { paramsKey: 'desicion', valueKey: null }, // 改善方案 目前只有pdca
           { paramsKey: 'receiveEmpId', valueKey: null }, // 指派人

+ 43 - 27
pages/planList/components/modal.vue

@@ -1,10 +1,15 @@
 <template>
-	<view class="modal-page" v-show="showModal">
+	<view class="modal-page">
 		<view class="modal-box">
 			<image class="pic" src="../../../static/hint.png"></image>
 			<text class="text">您的分配工作量较大,建议使用批量分配功能</text>
-			<view class="btn" @click="hide">
-				<text class="btn-text">确定</text>
+			<view class="btn-wrap">
+				<view class="btn" @click="isBatchHandle(false)">
+					<text class="btn-text">取消</text>
+				</view>
+				<view class="btn" @click="isBatchHandle(true)">
+					<text class="btn-text">确定</text>
+				</view>
 			</view>
 		</view>
 	</view>
@@ -15,15 +20,11 @@
 	export default {
 		data() {
 			return {
-				showModal:false,//是否显示弹框
 			}
 		},
 		methods: {
-			show(){
-				this.showModal=true;
-			},
-			hide(){
-				this.showModal=false;
+			isBatchHandle(flage) {
+				this.$emit('callback', flage);
 			}
 		},
 	}
@@ -31,21 +32,23 @@
 
 <style lang="less">
 	.modal-page{
-		height: 100%;
-		width: 100%;
+		display: flex;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
 		position: fixed;
 		top: 0rpx;
 		left: 0rpx;
+		height: 100%;
+		width: 100%;
 		background: rgba(0,0,0,0.5);
 		.modal-box{
-			height: 317.5rpx;
-			width: 562.5rpx;
 			background: #FFFFFF;
       border-radius: 24px;
       overflow: hidden;
-			position: fixed;
-			top: 441.25rpx;
-			left: 93.75rpx;
+			position: relative;
+			height: 317.5rpx;
+			width: 562.5rpx;
 
 			.pic{
 				height: 80rpx;
@@ -63,19 +66,32 @@
 				top: 170rpx;
 				left: 56.25rpx;
 			}
-			.btn{
-				height: 75rpx;
-				width: 562.5rpx;
-				background: #3377FF;
+			.btn-wrap {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
 				position: absolute;
 				bottom: 0rpx;
-				text-align: center;
-				.btn-text{
-					font-size: 22.5rpx;
-					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-					font-weight: 400;
-					color: #FFFFFF;
-					line-height: 75rpx;
+				border-top: 1px solid #DADEE6;
+				width: 100%;
+				.btn{
+					height: 75rpx;
+					width: 50%;
+					background: #3377FF;
+					text-align: center;
+					.btn-text{
+						font-size: 22.5rpx;
+						font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+						font-weight: 400;
+						color: #FFFFFF;
+						line-height: 75rpx;
+					}
+					&:first-child {
+						background-color: #fff;
+						.btn-text {
+							color: #292C33;
+						}
+					}
 				}
 			}
 		}

+ 1 - 2
pages/planList/model.js

@@ -2,8 +2,7 @@ import { commServer } from './server.js';
 
 export default {
   namespaced: true,
-  state: {
-  },
+  state: {},
   mutations: {},
   actions: {
 		commActions({ commit, state }, { payload }) {

+ 13 - 8
pages/planList/planList.vue

@@ -12,7 +12,7 @@
 					</view>
 				</view>
 				<view class="row2">
-					<text class="TobeDistributed">剩余1个单位待分配</text>
+					<text class="TobeDistributed">剩余{{item.toDistribute}}个单位待分配</text>
 					<text class="startEndTime">起止时间:{{item.startDate}} ~ {{item.endDate}}</text>
 				</view>
 			</view>
@@ -20,7 +20,7 @@
 		<view class="btn-distribution" @click="gotoCheckList(true, planList[0])" v-if="isShowDistribution">
 			<text class="btn-text">批量分配</text>
 		</view>
-		<modal ref="modal" ></modal>
+		<modal v-if="showModal" v-on:callback="callback"></modal>
 	</view>
 </template>
 
@@ -33,9 +33,10 @@
 				situationID:'',//情境id
 				planList:[],//计划列表
 				firstFlag:1,//是否为第一次分配的标志,为1时表示是第一次,弹框提示
-				isShowDistribution:false,//是否显示批量分配按钮
+				isShowDistribution: false,//是否显示批量分配按钮
         listHeight:1125,//列表高度
-        checkGroupId: 0 // 查核组id
+        checkGroupId: 0, // 查核组id
+				showModal: false
 			}
 		},
 		onLoad({ situationId, checkGroupId }){ // situationId:情景id checkGroupId: 查核组id
@@ -69,14 +70,19 @@
 							toDistribute:item.toDistribute,
 						}
 					});
-					console.log(this.firstFlag,'1111111')
 					if(this.firstFlag==1){
-						this.$refs.modal.show();
+						this.showModal = true;
 					}
 				}
 			});
 		},
 		methods: {
+			callback(flage) {
+				this.showModal = false;
+				if(flage && this.planList.length > 0) {
+					this.gotoCheckList(true, this.planList[0]);
+				}
+			}, 
 			compareTime(planList){
 				this.$store.dispatch({
 				  type: "commActions",
@@ -85,8 +91,7 @@
 				  if (dateStr) {
 						if(planList.some((item)=>moment(item.startDate).valueOf()<moment(dateStr).valueOf())){
 							 this.listHeight=1200;
-						}
-						else{
+						} else {
 							this.isShowDistribution=true;
 						}
 				  }

+ 22 - 16
pages/role-switching/role-switching.vue

@@ -24,7 +24,7 @@
 			return {
 				permissionList:[],//权限列表
 				nowPermission:'',//当前权限
-				selectedPermission:'',//当前选中的权限
+				oldPermission:'',//初始化选中的权限
 				roleList:[
 					{permission: 1, name: '管理员'}, 
 					{permission: 2, name: '查核组长'},
@@ -47,6 +47,8 @@
 					isChecked:this.nowPermission==match.permission?true:false,
 				}
 			});
+			let obj = this.permissionList.find((item)=>item.isChecked);
+			this.oldPermission = obj ? obj.value : '';
 		},
 		methods: {
 			toggleSelect(item,index) {
@@ -54,24 +56,28 @@
 					item.isChecked=false;
 				});
 				this.permissionList[item.value-1].isChecked=true;
-				this.selectedPermission=item.value;
 			},
 			saveChange(){
-				this.$store.dispatch({
-					type: 'roleSwitching/commActions',
-					payload: {
-						key: 'updatePermission',
-						data: {
-							permission: this.selectedPermission,
+				let obj = this.permissionList.find((item)=>item.isChecked);
+				if(obj) {
+					if(obj.value === this.oldPermission) {
+						uni.navigateTo({url: '/pages/home/home'});
+						return;
+					};
+					this.$store.dispatch({
+						type: 'roleSwitching/commActions',
+						payload: {
+							key: 'updatePermission',
+							data: {
+								permission: obj.value,
+							}
 						}
-					}
-				}).then((data)=>{
-					if(data){
-						uni.navigateTo({
-							url: '/pages/home/home'
-						});
-					}
-				});
+					}).then((data)=>{
+						if(data){
+							uni.navigateTo({url: '/pages/home/home'});
+						}
+					});
+				}
 			}
 		},
 	}

+ 16 - 12
pages/situationDetail/situationDetail.vue

@@ -130,7 +130,7 @@
 				uni.showModal({
 					title:'提示',
 					content:'请确认是否作废此情境,作废的情境无法被还原',
-					success:function(res){
+					success: (res) => {
 						if(res.confirm){
 							this.$store.dispatch({
 								type: 'situationDetail/commActions',
@@ -142,17 +142,17 @@
 								}
 							}).then((data) => {
 								if (data) {
-									uni.showToast({
-										title:'作废成功',
-										icon:'none',
-										duration:1000
+									uni.showModal({
+										title:'提示',
+										content:'作废成功',
+										showCancel: false,
+										success: (res) => {
+											uni.navigateTo({url: `/pages/situationsCenter/situationsCenter`});
+										}
 									});
 								}
 							});
 						}
-						else if(res.cancel){
-							return;
-						}
 					}
 				})
 
@@ -295,13 +295,17 @@
 					margin-bottom: 31.25rpx;
 				}
 				.time-text{
-					font-size: 20rpx;
-					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-					font-weight: 400;
-					color: #FFFFFF;
+					overflow: hidden;
 					position: absolute;
 					top: 115rpx;
 					left: 55rpx;
+					width: 70%;
+					white-space: nowrap;
+					font-size: 20rpx;
+					font-weight: 400;
+					font-family: SourceHanSansCN-Normal, SourceHanSansCN;
+					text-overflow: ellipsis;
+					color: #FFFFFF;
 				}
 				.nextTime-text{
 					font-size: 20rpx;

+ 60 - 95
pages/situationsCenter/situationsCenter.vue

@@ -1,14 +1,7 @@
 <template>
 	<view class="situationsCenter-page">
 		<view class="calender-remind" @click="toMessagePage">
-		  <image
-		    :src="
-		      messageType
-		        ? '/static/message-unread.png'
-		        : '/static/message-read.png'
-		    "
-		    mode=""
-		  ></image>
+		  <image :src="`/static/message-${messageType? 'unread':'read'}.png`"></image>
 		</view>
 		<view class="situation-list">
 			<view class="search-box">
@@ -46,7 +39,7 @@
 				</view>
 		  </scroll-view>
 		</view>
-		<view class="situaions-add" @click="gotoCreate">
+		<view v-if="nowPermission == 1" class="situaions-add" @click="gotoCreate">
 			<image class="add-pic" src="/static/situation-add.png"></image>
 		</view>
 		<tm-tabbar :permission="nowPermission" />
@@ -116,30 +109,38 @@
 					url: `/pages/situationDetail/situationDetail?situationId=${id}`
 				});
 			},
-			searchByKeywords(event){
-				console.log(event);
+			getSituationList(data, callback) {
 				this.$store.dispatch({
 					type: 'situationsCenter/commActions',
 					payload: {
-						key: 'situationList',
-						data:{
-							pageNum:1,
-							pageSize:10,
-							keyword:event.target.value,
-						}
-					}
-				}).then((data)=>{
-					if (data) {
-						this.situationList=data.list.map((item,index)=>{
-							return{
-								name:item.name,
-								checkStatus:item.checkStatus,
-								nextCheckTime:item.nextCheckTime,
-								checkGroupName:item.checkGroupName,
-								topic:item.topic==0?true:false,
-							}
-						});
+						data,
+						key: 'situationList'
 					}
+				}).then((data)=> {
+					if(data) callback(data);
+				});
+			},
+			searchByKeywords(event){
+				let data = {
+					pageNum:1,
+					pageSize:10,
+					keyword:event.target.value,
+				};
+				this.getSituationList(data,(data)=>{
+					this.situationList = [];
+					this.createSituationList(data.list);
+				});
+			},
+			createSituationList(list=[]) {
+				list.map((item,index)=>{
+					this.situationList.push({
+						name:item.name,
+						checkStatus:item.checkStatus,
+						nextCheckTime:item.nextCheckTime,
+						checkGroupName:item.checkGroupName,
+						topic:item.topic==0?true:false,
+						situationID:item.id,
+					});
 				});
 			},
 			toLower(){
@@ -151,35 +152,18 @@
 				let count=this.situationList.length;
 				if(this.totalCount!=count){
 					this.page++;
-					this.$store.dispatch({
-						type: 'situationsCenter/commActions',
-						payload: {
-							key: 'situationList',
-							data:{
-								pageNum:this.page,
-								pageSize:10
-							}
-						}
-					}).then((data) => {
-						if (data) {
-							this.situationList=data.list.map((item,index)=>{
-								return{
-									name:item.name,
-									checkStatus:item.checkStatus,
-									nextCheckTime:item.nextCheckTime,
-									checkGroupName:item.checkGroupName,
-									topic:item.topic==0?true:false,
-									situationID:item.id,
-								}
-							});
-							let hiId = uni.getStorageSync("hiId");
-							let user = uni.getStorageSync("id");
-							let permission = uni.getStorageSync("nowPermission");
-							this.isInitWs && this.initWebsocket(hiId, user, permission);
-						}
+					let data = {
+						pageNum:this.page,
+						pageSize:10
+					};
+					this.getSituationList(data,(data)=>{
+						this.createSituationList(data.list);
+						let hiId = uni.getStorageSync("hiId");
+						let user = uni.getStorageSync("id");
+						let permission = uni.getStorageSync("nowPermission");
+						this.isInitWs && this.initWebsocket(hiId, user, permission);
 					});
-				}
-				else{
+				} else {
 					uni.showToast({
 						title:'没有更多数据了',
 						icon:'none',
@@ -193,10 +177,9 @@
 			    url: `/pages/messages/messages`,
 			  });
 			},
-			
 			init(isInitWs) {
 			  this.isInitWs = isInitWs;
-			  this.getSituationList();
+			  this.initSituationList();
 			},
 			initWebsocket(hiId, user, permission) {
 			  websocket.url = `ws://192.168.1.45:8088/imed/pfm/websocket/${hiId}/${user}/${permission}`;
@@ -214,34 +197,18 @@
 			      break;
 			  }
 			},
-			getSituationList(){
-				this.$store.dispatch({
-					type: 'situationsCenter/commActions',
-					payload: {
-						key: 'situationList',
-						data:{
-							pageNum:1,
-							pageSize:10
-						}
-					}
-				}).then((data) => {
-					if (data) {
-						this.totalCount=data.totalCount;
-						this.situationList=data.list.map((item,index)=>{
-							return{
-								name:item.name,
-								checkStatus:item.checkStatus,
-								nextCheckTime:item.nextCheckTime,
-								checkGroupName:item.checkGroupName,
-								topic:item.topic==0?true:false,
-								situationID:item.id,
-							}
-						});
-						let hiId = uni.getStorageSync("hiId");
-						let user = uni.getStorageSync("id");
-						let permission = uni.getStorageSync("nowPermission");
-						this.isInitWs && this.initWebsocket(hiId, user, permission);
-					}
+			initSituationList(){
+				let data = {
+					pageNum:1,
+					pageSize:10
+				};
+				this.getSituationList(data, (data)=>{
+					this.totalCount=data.totalCount;
+					this.createSituationList(data.list);
+					let hiId = uni.getStorageSync("hiId");
+					let user = uni.getStorageSync("id");
+					let permission = uni.getStorageSync("nowPermission");
+					this.isInitWs && this.initWebsocket(hiId, user, permission);
 				});
 			},
 			messStatus(){
@@ -294,12 +261,10 @@
 		  }
 		}
 		.situation-list{
-			// display: flex;
-			// flex-flow: row wrap;
-			// margin-top: 12.5rpx;
 			position: relative;
+			height: 100%;
 			.search-box{
-				position: absolute;
+				position: fixed;
 				left: 25rpx;
 				top: 0rpx;
 				z-index: 2;
@@ -369,12 +334,12 @@
 			}
 			
 			.scroll-box{
-				height: 1072.5rpx;
-				width: 750rpx;
-				// margin-top: 25rpx;
+				width: 100%;
+				height: calc(100% - 87.5rpx);
 				.content{
 					display: flex;
 					flex-flow: row wrap;
+					padding-bottom: 25rpx;
 					.situation{
 						height: 187.5rpx;
 						width: 337.5rpx;
@@ -447,7 +412,7 @@
 			
 		}
 		.situaions-add{
-			position: absolute;
+			position: fixed;
 			right: 25rpx;
 			bottom: 130rpx;
 			.add-pic{

+ 4 - 4
utils/request.js

@@ -135,10 +135,10 @@ function notifyException(resArr, additional) {
     return false;
   } else if (additional.successMessage) {
     let msg = additional.successMessage;
-    uni.showModal({
-      title: '提示',
-      content: msg === 'msg' ? res.data.msg : msg,
-      showCancel: false
+    uni.showToast({
+      title: msg === 'msg' ? res.data.msg : msg,
+			icon:'none',
+			duration:1000
     });
   }
   return res.data.data ? res.data.data : true;