gjj
2023-02-07 08690e2fd123a710406a101a2a5bd98fa0992502
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<template>
  <div
    v-empty="list"
    class="rc-cont"
    style="padding-right:250px;min-height:500px;">
    <flexbox
      v-for="(item, index) in list"
      :key="index"
      class="ha-cont"
      align="stretch"
      justify="flex-start">
      <div class="ha-week">{{ item.CreateTime}}</div>
      <div class="ha-circle"/>
      <!--<div class="ha-time">{{ item.CreateTime|filterTimestampToFormatTime('H:mm') }}</div>
      <div
        v-photo="item"
        v-lazy:background-image="$options.filters.filterUserLazyImg(item.img)"
        class="div-photo ha-img"/>-->
      <div class="ha-name">{{ item.CreateUserName }}</div>
      <div class="ha-content">
        <!--<p
          v-for="(info, infoIndex) in item.Content"
          :key="infoIndex">{{ info }}</p>-->
          <p>{{ item.Content }}</p>
      </div>
      <div class="ha-line"/>
    </flexbox>
  </div>
</template>
 
<script type="text/javascript">
import loading from '../mixins/loading'
// import crmTypeModel from '@/views/clients/model/crmTypeModel'
import { GetCustomerOperationLogList } from '@/api/customermanagement/customerManage'
import { GetSalesChanceOperationLogList } from '@/api/customermanagement/business'
import { GetContacterOperationLogList } from '@/api/customermanagement/contacts'
 
export default {
  name: 'RelativeHandle', // 相关操作  可能再很多地方展示 放到客户管理目录下
  components: {},
  mixins: [loading],
  props: {
    /** 模块ID */
    id: [String, Number],
    /** 联系人人下 新建商机 需要联系人里的客户信息  合同下需要客户和商机信息 */
    detail: {
      type: Object,
      default: () => {
        return {}
      }
    },
    /** 没有值就是全部类型 有值就是当个类型 */
    crmType: {
      type: String,
      default: ''
    },
    /** 是公海 默认是客户 */
    isSeas: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      list: []
    }
  },
  computed: {},
  watch: {
    id: function (val) {
      this.list = []
      this.getDetail()
    }
  },
  mounted () {
    this.getDetail()
  },
  activated: function () {},
  deactivated: function () {},
  methods: {
    getDetail () {
      this.loading = true
      const request = {
        customer: GetCustomerOperationLogList,
        businessCustomer: GetCustomerOperationLogList,
        business: GetSalesChanceOperationLogList,
        businessChances: GetSalesChanceOperationLogList,
        contacts: GetContacterOperationLogList
      }[this.crmType]
      const params = {}
      params['Id'] = this.id
      params['PageSize'] = 10
      params['PageIndex'] = 1
      request(params)
        .then(res => {
          this.loading = false
          this.list = res.data.Result.List
        })
        .catch(() => {
          this.loading = false
        })
    }
  }
}
</script>
<style lang="scss" scoped>
@import '../styles/relativecrm.scss';
.ha-cont {
  font-size: 12px;
  position: relative;
  line-height: 20px;
  min-height: 40px;
  padding-top: 3px;
  .ha-week {
    margin: 0 17px 0 10px;
    flex-shrink: 0;
    color: #777;
    width: 80px;
  }
  .ha-time {
    padding: 0 10px 0 24px;
    flex-shrink: 0;
    color: #aaa;
  }
  .ha-circle {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 9px;
    background-color: white;
    border: 5px solid #a5ecd7;
  }
  .ha-img {
    flex-shrink: 0;
    margin: -3px 10px 0 10px;
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 15px;
  }
  .ha-name {
    padding: 0 10px;
    flex-shrink: 0;
    color: #333;
  }
  .ha-content {
    padding: 0px 10px 10px 10px;
    flex: 1;
    color: #333;
  }
  .ha-line {
    position: absolute;
    z-index: -1;
    width: 1px;
    top: 3px;
    bottom: -3px;
    left: 115px;
    background-color: #e6e6e6;
  }
}
</style>