| | |
| | | </li> |
| | | </ul> |
| | | <div class="business_scope"> |
| | | <div class="content-title">{{ "最新进展" }}</div> |
| | | <div class="content-title">{{ "最新进展:" }}</div> |
| | | <div class="content-data">{{ record ? record : "--" }}</div> |
| | | </div> |
| | | </div> |
| | |
| | | isRemarkExpand: true, // 备注信息 |
| | | remarkInfoList: [], |
| | | addConfig: {}, |
| | | record: "" |
| | | record: "", // 最新进展 |
| | | noContactDays: 0, |
| | | newContactDays: "" |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | setData(item) { |
| | | if (item.FollowRecord && item.FollowRecord.length > 0) { |
| | | this.record = item.FollowRecord[0].record |
| | | console.log(item.FollowRecord[0].follow_time) |
| | | let follow_time = item.FollowRecord[0].follow_time |
| | | this.newContactDays = follow_time.substring(0, 10) |
| | | this.noContactDays = this.getDiffDay(Date.now(), this.newContactDays) |
| | | } |
| | | this.basicInfoList = [ |
| | | { |
| | |
| | | this.dynamicInfoList = [ |
| | | { |
| | | leftStr: "未联系天数", |
| | | leftValue: "", |
| | | leftValue: this.noContactDays, |
| | | rightStr: "最新联系日期", |
| | | rightValue: "" |
| | | }, |
| | | { |
| | | leftStr: "最新进展", |
| | | leftValue: this.record, |
| | | rightStr: "", |
| | | rightValue: "" |
| | | rightValue: this.newContactDays |
| | | } |
| | | ] |
| | | this.addressInfoList = [ |
| | |
| | | } else if (value === "remark") { |
| | | this.isRemarkExpand = !this.isRemarkExpand |
| | | } |
| | | }, |
| | | // 计算两个日期之间的差值 |
| | | getDiffDay(date_1, date_2) { |
| | | let totalDays, diffDate |
| | | let myDate_1 = date_1 |
| | | let myDate_2 = Date.parse(date_2) |
| | | // 将两个日期都转换为毫秒格式,然后做差 |
| | | diffDate = Math.abs(myDate_1 - myDate_2) // 取相差毫秒数的绝对值 |
| | | |
| | | totalDays = Math.floor(diffDate / (1000 * 3600 * 24)) // 向下取整 |
| | | // console.log(totalDays) |
| | | |
| | | return totalDays // 相差的天数 |
| | | } |
| | | } |
| | | } |
| | |
| | | align-items: center; |
| | | height: 40px; |
| | | .content-title { |
| | | width: 220px; |
| | | width: 320px; |
| | | text-align: right; |
| | | color: #555; |
| | | } |