Browse Source

合同审批详情变更说明修改

jwyu 3 years ago
parent
commit
3b2c662e08
2 changed files with 14 additions and 3 deletions
  1. 13 2
      pages-approve/contract/detail.vue
  2. 1 1
      utils/calculationDate.js

+ 13 - 2
pages-approve/contract/detail.vue

@@ -55,9 +55,11 @@
 			</view>
 		</view>
 		<!-- 变更说明 -->
-		<view class="section white-wrap change-info-wrap" v-if="changeDesc.length>0">
+		<view class="section white-wrap change-info-wrap" v-if="changeDesc&&changeDesc.length>0">
 			<view class="title">变更说明</view>
-			<view style="margin-bottom: 20rpx;" v-for="(item,index) in changeDesc" :key="index">{{index+1}}、{{item}}</view>
+			<view style="margin-bottom: 20rpx;" v-for="(item,index) in changeDesc" :key="index">{{index+1}}、
+				<rich-text :nodes="formatChangeInfo(item)" style="padding-left:14px;margin-top:-19px;display: block;"></rich-text>
+			</view>
 		</view>
 		<!-- 服务内容 -->
 		<view class="section white-wrap service-wrap">
@@ -340,6 +342,15 @@
 			},1000)
 		},
 		methods: {
+			// 处理变更说明
+			formatChangeInfo(str){
+				let arr=str.split('</n>').filter(item=> item)
+				let arr2=arr.map(item=>{
+					return `<p>${item}</p>`
+				})
+				return arr2.join('')
+			},
+			
 			// 点击上传回签附件
 			handleUploadCheckFile(){
 				const _this=this

+ 1 - 1
utils/calculationDate.js

@@ -68,7 +68,7 @@ export const CalculationDate = (s, e) => {
   if (numDay > 0) {
     str = str + numDay + "天";
   }
-  console.log(str);
+  // console.log(str);
   return str
 };