|  | @@ -27,9 +27,63 @@ Page({
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    bindTextAreaBlur(e) {
 | 
	
		
			
				|  |  |      this.setData({
 | 
	
		
			
				|  |  | -      [`noStatusList[${e.target.dataset.index}].result`]: e.detail.value,
 | 
	
		
			
				|  |  | +      [`rvenotList[${e.target.dataset.index}].result`]: e.detail.value,
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | +  deleteImg(e) {
 | 
	
		
			
				|  |  | +    let item = e.target.dataset.item
 | 
	
		
			
				|  |  | +    let index = e.target.dataset.index
 | 
	
		
			
				|  |  | +    let indexT = e.target.dataset.indexT
 | 
	
		
			
				|  |  | +    if (item.length == 1) {
 | 
	
		
			
				|  |  | +      this.setData({
 | 
	
		
			
				|  |  | +        [`rvenotList[${index}].result_file.append`]: [],
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +      return false
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    item.splice(indexT, 1)
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    this.setData({
 | 
	
		
			
				|  |  | +      [`rvenotList[${index}].result_file.append`]: item,
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    console.log(item,index,indexT,this.data.rvenotList[index])
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  showImg(e) {
 | 
	
		
			
				|  |  | +    let item = e.target.dataset.item
 | 
	
		
			
				|  |  | +    app.$get('api/drive/grant', { file_id: item.fileId }).then(res => {
 | 
	
		
			
				|  |  | +      dd.previewFileInDingTalk({
 | 
	
		
			
				|  |  | +        corpId: app.globalData.corpId,
 | 
	
		
			
				|  |  | +        spaceId: item.spaceId,
 | 
	
		
			
				|  |  | +        fileId: item.fileId,
 | 
	
		
			
				|  |  | +        fileName: item.fileName,
 | 
	
		
			
				|  |  | +        fileSize: item.fileSize,
 | 
	
		
			
				|  |  | +        fileType: item.fileType,
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  //图片选择
 | 
	
		
			
				|  |  | +  openImg(e) {
 | 
	
		
			
				|  |  | +    let index = e.target.dataset.index
 | 
	
		
			
				|  |  | +    let append = this.data.rvenotList[index].result_file.append;
 | 
	
		
			
				|  |  | +    app.$get('api/drive/info').then(res => {
 | 
	
		
			
				|  |  | +      let spaceId = res.data.data.space_id.toString()
 | 
	
		
			
				|  |  | +      dd.uploadAttachmentToDingTalk({
 | 
	
		
			
				|  |  | +        image: { multiple: true, compress: false, max: 5, spaceId: spaceId },
 | 
	
		
			
				|  |  | +        space: { spaceId: spaceId, isCopy: 1, max: 5 },
 | 
	
		
			
				|  |  | +        file: { spaceId: spaceId, max: 5 },
 | 
	
		
			
				|  |  | +        types: ["photo", "file", "space"],//PC端仅支持["photo","file","space"]
 | 
	
		
			
				|  |  | +        success: (res) => {
 | 
	
		
			
				|  |  | +          console.log(res);
 | 
	
		
			
				|  |  | +          append.push(...res.data);
 | 
	
		
			
				|  |  | +          that.setData({
 | 
	
		
			
				|  |  | +            [`rvenotList[${e.target.dataset.index}].result_file.append`]: append,
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        fail: (err) => {
 | 
	
		
			
				|  |  | +          console.log(err)
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  |    // 提交
 | 
	
		
			
				|  |  |    save(e) {
 | 
	
		
			
				|  |  |      let num = e.target.dataset.index
 | 
	
	
		
			
				|  | @@ -40,15 +94,29 @@ Page({
 | 
	
		
			
				|  |  |        result_info: '' // 结果值信息
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |      let result_info = [];
 | 
	
		
			
				|  |  | -    this.data.noStatusList.some(item => {
 | 
	
		
			
				|  |  | -      if (item.result) {
 | 
	
		
			
				|  |  | -        result_info.push({
 | 
	
		
			
				|  |  | -          result: item.result, // 单项目结果值
 | 
	
		
			
				|  |  | -          dimension_key: item.message.dimension_key, // 维度索引
 | 
	
		
			
				|  |  | -          index_key: item.message.index_key, // 指标索引
 | 
	
		
			
				|  |  | -          index_id: item.id // 指标ID
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | -        isLr = true;
 | 
	
		
			
				|  |  | +    this.data.rvenotList.some(item => {
 | 
	
		
			
				|  |  | +      if(item.type==1){
 | 
	
		
			
				|  |  | +        if (item.result) {
 | 
	
		
			
				|  |  | +          result_info.push({
 | 
	
		
			
				|  |  | +            result: item.result, // 单项目结果值
 | 
	
		
			
				|  |  | +            dimension_key: item.message.dimension_key, // 维度索引
 | 
	
		
			
				|  |  | +            index_key: item.message.index_key, // 指标索引
 | 
	
		
			
				|  |  | +            index_id: item.id, // 指标ID
 | 
	
		
			
				|  |  | +            result_file: item.result_file
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +          isLr = true;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }else{
 | 
	
		
			
				|  |  | +        // if (item.result_file.append.length > 0) {
 | 
	
		
			
				|  |  | +          result_info.push({
 | 
	
		
			
				|  |  | +            result: item.result, // 单项目结果值
 | 
	
		
			
				|  |  | +            dimension_key: item.message.dimension_key, // 维度索引
 | 
	
		
			
				|  |  | +            index_key: item.message.index_key, // 指标索引
 | 
	
		
			
				|  |  | +            index_id: item.id, // 指标ID
 | 
	
		
			
				|  |  | +            result_file: item.result_file
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +          isLr = true;
 | 
	
		
			
				|  |  | +        // }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |      if (!isLr) {
 | 
	
	
		
			
				|  | @@ -121,6 +189,7 @@ Page({
 | 
	
		
			
				|  |  |            if (item.result_cache) {
 | 
	
		
			
				|  |  |              // 是否有暂存的数据有就显示出来
 | 
	
		
			
				|  |  |              dimension[item.dimension_key].index[item.index_key].result = item.result_cache;
 | 
	
		
			
				|  |  | +            dimension[item.dimension_key].index[item.index_key].result_file = item.result_file;
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |            noStatusList.push(dimension[item.dimension_key].index[item.index_key]);
 | 
	
		
			
				|  |  |          }
 |