浏览代码

查看查核结果详情修改和多张图片上传优化

yuwenfen 4 年之前
父节点
当前提交
4a9c36fb1f

+ 5 - 1
components/tm-upload-img/tm-upload-img.vue

@@ -69,7 +69,11 @@
 					sourceType: ['album'], //从相册选择
 					success: res1 => {
             uploadImage(res1).then(fileList => {
-              this.$emit('changeFilePaths', fileList, this.pickIndex);
+              if(this.isMultiple){
+                this.$emit('changeFilePaths', [...this.filePaths, ...fileList], this.pickIndex);
+              }else {
+                this.$emit('changeFilePaths', fileList, this.pickIndex);
+              }
 				  	})
 					},
 					error: e => {

+ 1 - 0
pages/mission-action/mission-action.vue

@@ -31,6 +31,7 @@
 			return {
 				// 当前显示的组件
         currentComponet: '',
+        disabled: false,
         // 查看详情回显的数据
         values: {},
         // 按钮信息

+ 10 - 3
pages/mission-details/mission-details.vue

@@ -154,9 +154,16 @@
       },
       // 查看详情
       goToDetails(currentInfo, detailInfo) {
-        uni.navigateTo({
-          url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...detailInfo}))}`
-				});
+        if(detailInfo.navigateUrl){ // 跳转其他页面(如查核项详情) 目前hasAnyData都为false
+          const {navigateUrl, key, isOutvalueKey, hasAnyData} = detailInfo;
+          uni.navigateTo({
+            url: `${detailInfo.navigateUrl}?id=${(isOutvalueKey ? this.missionDetails : currentInfo)[detailInfo.key]}`
+				  });
+        }else {
+          uni.navigateTo({
+            url: `/pages/mission-action/mission-action?details=${encodeURIComponent(JSON.stringify({...currentInfo, ...detailInfo}))}`
+				  });
+        }
       },
       /***
        *  解析显示对应的内容

+ 14 - 10
pages/mission-details/setting.js

@@ -49,12 +49,13 @@ const taskTypeList = [
     selectDetails: {
       name: '查看查核结果详情', // 详情显示的名字
       hasAnyData: false, // 是否有多个数据需要回显 为true则使用dateKey, 否则使用key <key和datakey互斥)
-      key: 'checkDetailResult', //使用详情接口key
+      key: 'checkItemId', //使用详情接口key
+      navigateUrl: '/pages/auditItemDetails/auditItemDetails', // 跳转页面的url
       dataKey: [],
       isOutvalueKey: true,  // 是否详情接口一级key, 不是则在当前任务状态中找key(如pfmTaskCirculationList下面)
-      componentName: 'disagree', //点击后跳转的组件名
-      disabled: true, // 调整后是否编辑和禁用
-      labelKey: 'textarea' // 回显时使用的key
+      componentName: null, //点击后跳转的组件名
+      disabled: true, // 跳转后是否编辑和禁用
+      labelKey: '' // 回显时使用的key
     }
   },
   {
@@ -89,12 +90,15 @@ const taskTypeList = [
     row1: { hasJoin: true, name: '查核人x', key: 'establishEmpName' },
     row2: {hasJoin: true, name: '发送改善通知,查核结果:x', key: 'checkDetailResult', isOutvalueKey: true },
     selectDetails: {
-      name: '查看查核结果详情',
-      key: 'checkDetailResult',
-      isOutvalueKey: true,
-      componentName: 'disagree',
-      disabled: true,
-      labelKey: 'textarea'
+      name: '查看查核结果详情', // 详情显示的名字
+      hasAnyData: false, // 是否有多个数据需要回显 为true则使用dateKey, 否则使用key <key和datakey互斥)
+      key: 'checkItemId', //使用详情接口key
+      navigateUrl: '/pages/auditItemDetails/auditItemDetails', // 跳转页面的url
+      dataKey: [],
+      isOutvalueKey: true,  // 是否详情接口一级key, 不是则在当前任务状态中找key(如pfmTaskCirculationList下面)
+      componentName: null, //点击后跳转的组件名
+      disabled: true, // 跳转后是否编辑和禁用
+      labelKey: '' // 回显时使用的key
     }
   },
   {