followUp.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. <template>
  2. <div class="normal-panel follow__panel" id="containerFull">
  3. <div class="container flex-align-center flex-between" style="padding: 10px 10px 0 10px !important;">
  4. <div>
  5. <slot name="collapse"></slot>
  6. <p class="inline-16">{{$t(`跟进动态`)}}</p>
  7. </div>
  8. <div style="display: flex;justify-content: space-between">
  9. <fullScreen class="inline-16" domId="containerFull" @onFull="onFull" @backFull="backFull"></fullScreen>
  10. <addLog :ownertable="ownertable" @onSuccess="queryLogs" :status="status"></addLog>
  11. </div>
  12. </div>
  13. <div style="padding: 0 10px 0 10px">
  14. <el-input style="width: 100%" :placeholder="$t(`搜索`)" :suffix-icon="search?search.length > 0?'':'':'el-icon-search'" v-model="search" @keyup.native.enter="queryLogs()" @clear="queryLogs" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
  15. </el-input>
  16. </div>
  17. <div class="container" style="padding: 10px;!important;">
  18. <div v-if="logList.length === 0">
  19. <el-empty :description="$t(`暂无记录`)" :image-size="40"></el-empty>
  20. </div>
  21. <el-timeline v-else>
  22. <el-card v-for="i in logList" :key="i.index" shadow="hover" class="card-style">
  23. <div class="dateLine">
  24. <div class="div"></div>
  25. <span class="span margin-5">{{i.createdate}}</span>
  26. </div>
  27. <div slot="dot" class="dot"></div>
  28. <div class="step__panel normal-margin" style="padding: 0 10px 0 10px">
  29. <div class="flex-align-center " style="margin-bottom:10px" v-if="i.userextend.length > 0">
  30. <div class="avatar" >
  31. <img class="avatar__image" v-if="i.headpic" :src="i.headpic" alt="">
  32. <p v-else>{{i.userextend[0].name.substr(0, 1)}}</p>
  33. </div>
  34. <div style="margin-left: 10px">
  35. <p style="font-weight: bold;font-size: 15px;color:#333333;">{{ i.userextend[0].name }}&nbsp;</p>
  36. <small style="color:#999999;margin-top:10px;font-size: 12px">{{$t(`部门`)}}:{{ i.userextend[0].depname?i.userextend[0].depname:"--" }}&emsp;{{$t(`职位`)}}:{{ i.userextend[0].position?i.userextend[0].position:"--" }}</small>
  37. </div>
  38. </div>
  39. <div class="flex-align-center " style="margin-bottom:10px" v-else>
  40. <div class="avatar" >
  41. <img class="avatar__image" v-if="i.headpic" :src="i.headpic" alt="">
  42. <p v-else>{{i.createby.substr(0, 1)}}</p>
  43. </div>
  44. <div style="margin-left: 10px">
  45. <p>{{ i.createby }}&nbsp;</p>
  46. <small style="color:#999999ad;margin-top:10px;font-size: 12px">{{$t(`部门`)}}:{{"--" }}&emsp;{{$t(`职位`)}}:{{ "--" }}</small>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="padding-style" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
  51. <span class="span-style">{{$t(`跟进类型`)}}:{{i.type}}</span>
  52. </div>
  53. <div class="padding-style" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
  54. <span class="span-style">{{$t(`跟进对象`)}}:</span>
  55. <span v-for="item in i.contacts" :key="item.index">
  56. <span v-if="item.rowindex === i.contacts.length" class="span-style">
  57. {{item.name}}
  58. </span>
  59. <span v-else class="span-style">
  60. {{item.name + ','}}
  61. </span>
  62. </span>
  63. </div>
  64. <div class="padding-style" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
  65. <span class="span-style">{{$t(`目的`)}}:{{i.target}}</span>
  66. </div>
  67. <div class="padding-style" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
  68. <span class="span-style">{{$t(`过程`)}}:{{i.content}}</span>
  69. </div>
  70. <div class="padding-style" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
  71. <span class="span-style">{{$t(`结果`)}}:{{i.results}}</span>
  72. </div>
  73. <div class="padding-style" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
  74. <span class="span-style">{{$t(`下次跟进计划`)}}:{{i.nextplan}}</span>
  75. </div>
  76. <div class="padding-style" v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'">
  77. <span class="span-style">{{$t(`营销费用`)}}:</span>
  78. <span v-if="i.salesfeesamount || i.salesfeesamount == 0">
  79. <span style="color: red">¥ </span>
  80. <span style="font-size: 14px;color: red">{{tool.formatAmount(i.salesfeesamount,2)}}</span>
  81. </span>
  82. <span v-else>--</span>
  83. </div>
  84. <div class="padding-style" v-if="$route.path !== '/projectChangeDetail' && $route.path !== '/customerDetail' && $route.path !== '/PublicCustomerDetail'">
  85. <span class="span-style">{{$t(`跟进内容`)}}:{{i.content}}</span>
  86. </div>
  87. <div style="padding: 0 10px 10px 10px">
  88. <div class="flex-align-center flex-between pionter" v-for="img in i.attinfos" :key="img.index" style="padding:10px;margin-bottom:5px;border: 1px solid #ccc">
  89. <div class="flex-align-center" style="flex:1;width:100%;">
  90. <img width="30" :src="checkFileType(img.postfix) === 'file'?require('@/assets/file_icons/file.svg'):img.url" class="inline-16" alt="">
  91. <div class="file__link">
  92. <a :href="img.url">{{img.document}}</a>
  93. <p>{{(img.contentlength / 1024).toFixed(2)}}kb</p>
  94. </div>
  95. </div>
  96. <i style="color:#999999;" class="el-icon-delete" v-if="nowUserid === i.createuserid" @click="deleteFile(img)"></i>
  97. </div>
  98. </div>
  99. <div style="padding: 10px" v-if="commentShowId == i.sys_datafollowupid">
  100. <div style="border: 1px solid #9ca3af;padding: 10px;border-radius: 5px">
  101. <el-input type="textarea" style="border: none;margin-bottom: 10px" :rows="1" v-model="content" :placeholder="$t(`我评论`)+':'"></el-input>
  102. <el-divider></el-divider>
  103. <div style="display: flex;justify-content: right">
  104. <el-button type="primary" size="small" :disabled="content.length == 0" @click="onComment(i)">{{$t(`发布`)}}</el-button>
  105. </div>
  106. </div>
  107. </div>
  108. <div v-if="commentShowId == i.sys_datafollowupid && i.comment.length > 0" style="padding: 0 10px 10px 10px">
  109. <div style="max-height: 360px;min-height:200px;background: #F5F5F5;border-radius: 2px;padding: 10px;overflow:auto">
  110. <div style="color: #333;font-size: 16px;font-weight: bold">{{$t(`评论`)}}({{i.commentqty}})</div>
  111. <div v-for="item in i.comment" :key="item.index" style="margin-top: 10px">
  112. <div style="color: #333;font-size: 14px;font-weight: bold;margin-top: 5px">{{item.createby}}</div>
  113. <div style="color:#666;font-size: 14px;margin-top: 5px">{{item.content}}</div>
  114. <div style="display: flex;justify-content: space-between;align-items: center;margin-top: -5px;margin-bottom: -5px">
  115. <div style="display: flex;justify-content: space-between;align-items: center">
  116. <div style="font-size: 12px;color: #999">{{item.createdate}}</div>
  117. <el-button type="text" size="small" class="margin-5" v-if="userid == item.createuserid"><svg style="vertical-align: middle" t="1727053625238" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11334" width="14" height="14"><path d="M343.113143 156.379429h333.897143v-73.142858H343.113143v73.142858zM677.010286 0a83.456 83.456 0 0 1 83.456 83.456v64.146286h215.917714a46.299429 46.299429 0 1 1 0 92.672h-48.64v700.196571a83.456 83.456 0 0 1-83.456 83.456H176.128a83.456 83.456 0 0 1-83.456-83.456V240.054857H47.542857a46.299429 46.299429 0 0 1 0-92.452571h212.114286v-64.146286A83.456 83.456 0 0 1 343.113143 0h333.897143z m156.525714 241.371429H186.587429v688.859428h647.021714v-689.005714zM384.877714 345.6a41.764571 41.764571 0 0 1 41.764572 41.764571v333.897143a41.764571 41.764571 0 0 1-83.456 0V387.364571a41.764571 41.764571 0 0 1 41.691428-41.764571z m250.441143 0a41.764571 41.764571 0 0 1 41.764572 41.764571v333.897143a41.764571 41.764571 0 0 1-83.456 0V387.364571a41.764571 41.764571 0 0 1 41.545142-41.764571z" fill="#999999" p-id="11335"></path></svg>
  118. <span style="color: #666666;font-size: 14px;margin-left: 5px;vertical-align: middle" @click="onDel(item)">{{$t(`删除`)}}</span></el-button>
  119. </div>
  120. <div>
  121. <el-button type="text" v-if="!isContentShow" size="small" @click="isContentShow = true;sys_datacommentid = item.sys_datacommentid">
  122. <svg t="1727055468269" class="icon" style="vertical-align: middle" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11646" width="14" height="14"><path d="M643.657143 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286 36.571429 0 58.514286-29.257143 58.514285-58.514286 0-36.571429-29.257143-58.514286-58.514285-58.514286-29.257143-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11647"></path><path d="M1024 142.774857c0-43.885714-43.885714-87.771429-87.771429-87.771428H87.771429c-43.885714 0-87.771429 36.571429-87.771429 87.771428v621.714286c0 51.2 43.885714 87.771429 87.771429 87.771428h307.2l117.028571 117.028572 117.028571-117.028572h307.2c51.2 0 87.771429-43.885714 87.771429-87.771428v-621.714286z m-65.828571 592.457143c0 29.257143-21.942857 51.2-51.2 51.2H592.457143l-80.457143 80.457143-80.457143-80.457143H117.028571c-29.257143 0-51.2-21.942857-51.2-51.2v-563.2c0-29.257143 21.942857-51.2 51.2-51.2h789.942858c29.257143 0 51.2 21.942857 51.2 51.2v563.2z" fill="#3874F6" p-id="11648"></path><path d="M453.485714 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514286-58.514286c0-36.571429-21.942857-65.828571-58.514286-65.828572s-58.514286 29.257143-58.514286 65.828572M256 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514285-58.514286c0-36.571429-29.257143-58.514286-58.514285-58.514286-36.571429-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11649"></path></svg>
  123. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`回复`)}}</span></el-button>
  124. <el-button type="text" v-if="isContentShow" size="small" @click="isContentShow = false;sys_datacommentid = ''">
  125. <svg t="1727055468269" class="icon" viewBox="0 0 1024 1024" style="vertical-align: middle" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11646" width="14" height="14"><path d="M643.657143 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286 36.571429 0 58.514286-29.257143 58.514285-58.514286 0-36.571429-29.257143-58.514286-58.514285-58.514286-29.257143-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11647"></path><path d="M1024 142.774857c0-43.885714-43.885714-87.771429-87.771429-87.771428H87.771429c-43.885714 0-87.771429 36.571429-87.771429 87.771428v621.714286c0 51.2 43.885714 87.771429 87.771429 87.771428h307.2l117.028571 117.028572 117.028571-117.028572h307.2c51.2 0 87.771429-43.885714 87.771429-87.771428v-621.714286z m-65.828571 592.457143c0 29.257143-21.942857 51.2-51.2 51.2H592.457143l-80.457143 80.457143-80.457143-80.457143H117.028571c-29.257143 0-51.2-21.942857-51.2-51.2v-563.2c0-29.257143 21.942857-51.2 51.2-51.2h789.942858c29.257143 0 51.2 21.942857 51.2 51.2v563.2z" fill="#3874F6" p-id="11648"></path><path d="M453.485714 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514286-58.514286c0-36.571429-21.942857-65.828571-58.514286-65.828572s-58.514286 29.257143-58.514286 65.828572M256 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514285-58.514286c0-36.571429-29.257143-58.514286-58.514285-58.514286-36.571429-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11649"></path></svg>
  126. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`取消回复`)}}</span></el-button>
  127. </div>
  128. </div>
  129. <div style="border: 1px solid #9ca3af;padding: 10px;border-radius: 5px" v-if="isContentShow && sys_datacommentid == item.sys_datacommentid">
  130. <el-input type="textarea" style="border: none;margin-bottom: 10px" :rows="1" v-model="replyContent" :placeholder="$t('我回复')+item.createby+':'"></el-input>
  131. <el-divider></el-divider>
  132. <div style="display: flex;justify-content: right">
  133. <el-button type="primary" size="small" :disabled="replyContent.length == 0" @click="onReply(i.sys_datafollowupid,item)">{{$t(`发布`)}}</el-button>
  134. </div>
  135. </div>
  136. <div v-if="item.subcomment.length > 0" style="margin-left: 10px;margin-top: 10px">
  137. <div v-for="k in item.subcomment" :key="k.index" style="margin-top: 10px">
  138. <div style="display: flex;justify-content: left;align-items: center">
  139. <div style="font-size: 14px;font-weight: bold;color:#333;">{{k.createby}}</div><i style="margin: 0 10px 0 10px" class="el-icon-caret-right"></i><div style="font-size: 14px;font-weight: bold;color:#333;">{{k.replyusername}}</div>
  140. </div>
  141. <div style="color:#666;font-size: 14px;margin-top: 5px">{{k.content}}</div>
  142. <div style="display: flex;justify-content: space-between;align-items: center;margin-top: -5px;margin-bottom: -5px">
  143. <div style="display: flex;justify-content: space-between;align-items: center">
  144. <div style="font-size: 12px;color:#999;margin-right: 10px">{{k.createdate}}</div>
  145. <el-button type="text" size="small" v-if="userid == k.createuserid"><svg style="vertical-align: middle" t="1727053625238" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11334" width="14" height="14"><path d="M343.113143 156.379429h333.897143v-73.142858H343.113143v73.142858zM677.010286 0a83.456 83.456 0 0 1 83.456 83.456v64.146286h215.917714a46.299429 46.299429 0 1 1 0 92.672h-48.64v700.196571a83.456 83.456 0 0 1-83.456 83.456H176.128a83.456 83.456 0 0 1-83.456-83.456V240.054857H47.542857a46.299429 46.299429 0 0 1 0-92.452571h212.114286v-64.146286A83.456 83.456 0 0 1 343.113143 0h333.897143z m156.525714 241.371429H186.587429v688.859428h647.021714v-689.005714zM384.877714 345.6a41.764571 41.764571 0 0 1 41.764572 41.764571v333.897143a41.764571 41.764571 0 0 1-83.456 0V387.364571a41.764571 41.764571 0 0 1 41.691428-41.764571z m250.441143 0a41.764571 41.764571 0 0 1 41.764572 41.764571v333.897143a41.764571 41.764571 0 0 1-83.456 0V387.364571a41.764571 41.764571 0 0 1 41.545142-41.764571z" fill="#999999" p-id="11335"></path></svg>
  146. <span style="color: #666666;font-size: 14px;margin-left: 5px;vertical-align: middle" @click="onDel(k)">{{$t(`删除`)}}</span></el-button>
  147. </div>
  148. <div>
  149. <el-button type="text" v-if="!isContentShow" size="small" @click="isContentShow = true;sys_datacommentid = k.sys_datacommentid">
  150. <svg t="1727055468269" class="icon" style="vertical-align: middle" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11646" width="14" height="14"><path d="M643.657143 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286 36.571429 0 58.514286-29.257143 58.514285-58.514286 0-36.571429-29.257143-58.514286-58.514285-58.514286-29.257143-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11647"></path><path d="M1024 142.774857c0-43.885714-43.885714-87.771429-87.771429-87.771428H87.771429c-43.885714 0-87.771429 36.571429-87.771429 87.771428v621.714286c0 51.2 43.885714 87.771429 87.771429 87.771428h307.2l117.028571 117.028572 117.028571-117.028572h307.2c51.2 0 87.771429-43.885714 87.771429-87.771428v-621.714286z m-65.828571 592.457143c0 29.257143-21.942857 51.2-51.2 51.2H592.457143l-80.457143 80.457143-80.457143-80.457143H117.028571c-29.257143 0-51.2-21.942857-51.2-51.2v-563.2c0-29.257143 21.942857-51.2 51.2-51.2h789.942858c29.257143 0 51.2 21.942857 51.2 51.2v563.2z" fill="#3874F6" p-id="11648"></path><path d="M453.485714 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514286-58.514286c0-36.571429-21.942857-65.828571-58.514286-65.828572s-58.514286 29.257143-58.514286 65.828572M256 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514285-58.514286c0-36.571429-29.257143-58.514286-58.514285-58.514286-36.571429-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11649"></path></svg>
  151. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`回复`)}}</span></el-button>
  152. <el-button type="text" v-if="isContentShow" size="small" @click="isContentShow = false;sys_datacommentid = ''">
  153. <svg t="1727055468269" style="vertical-align: middle" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11646" width="14" height="14"><path d="M643.657143 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286 36.571429 0 58.514286-29.257143 58.514285-58.514286 0-36.571429-29.257143-58.514286-58.514285-58.514286-29.257143-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11647"></path><path d="M1024 142.774857c0-43.885714-43.885714-87.771429-87.771429-87.771428H87.771429c-43.885714 0-87.771429 36.571429-87.771429 87.771428v621.714286c0 51.2 43.885714 87.771429 87.771429 87.771428h307.2l117.028571 117.028572 117.028571-117.028572h307.2c51.2 0 87.771429-43.885714 87.771429-87.771428v-621.714286z m-65.828571 592.457143c0 29.257143-21.942857 51.2-51.2 51.2H592.457143l-80.457143 80.457143-80.457143-80.457143H117.028571c-29.257143 0-51.2-21.942857-51.2-51.2v-563.2c0-29.257143 21.942857-51.2 51.2-51.2h789.942858c29.257143 0 51.2 21.942857 51.2 51.2v563.2z" fill="#3874F6" p-id="11648"></path><path d="M453.485714 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514286-58.514286c0-36.571429-21.942857-65.828571-58.514286-65.828572s-58.514286 29.257143-58.514286 65.828572M256 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514285-58.514286c0-36.571429-29.257143-58.514286-58.514285-58.514286-36.571429-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#3874F6" p-id="11649"></path></svg>
  154. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`取消回复`)}}</span></el-button>
  155. </div>
  156. </div>
  157. <div style="border: 1px solid #9ca3af;padding: 10px;border-radius: 5px" v-if="isContentShow && sys_datacommentid == k.sys_datacommentid">
  158. <el-input type="textarea" style="border: none;margin-bottom: 10px" :rows="1" v-model="replyContent" :placeholder="$t('我回复')+k.createby+':'"></el-input>
  159. <el-divider></el-divider>
  160. <div style="display: flex;justify-content: right">
  161. <el-button type="primary" size="small" :disabled="replyContent.length == 0" @click="onReply(i.sys_datafollowupid,k)">{{$t(`发布`)}}</el-button>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. <el-divider></el-divider>
  170. <div style="display: flex;justify-content: space-between;align-items:center;vertical-align:middle;padding: 0 10px 0 10px;margin-top: -5px">
  171. <div>
  172. <el-button type="text" size="small" @click="commentClick(i)">
  173. <svg t="1727055468269" class="icon" viewBox="0 0 1024 1024" style="vertical-align: middle" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11646" width="14" height="14"><path d="M643.657143 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286 36.571429 0 58.514286-29.257143 58.514285-58.514286 0-36.571429-29.257143-58.514286-58.514285-58.514286-29.257143-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#999999" p-id="11647"></path><path d="M1024 142.774857c0-43.885714-43.885714-87.771429-87.771429-87.771428H87.771429c-43.885714 0-87.771429 36.571429-87.771429 87.771428v621.714286c0 51.2 43.885714 87.771429 87.771429 87.771428h307.2l117.028571 117.028572 117.028571-117.028572h307.2c51.2 0 87.771429-43.885714 87.771429-87.771428v-621.714286z m-65.828571 592.457143c0 29.257143-21.942857 51.2-51.2 51.2H592.457143l-80.457143 80.457143-80.457143-80.457143H117.028571c-29.257143 0-51.2-21.942857-51.2-51.2v-563.2c0-29.257143 21.942857-51.2 51.2-51.2h789.942858c29.257143 0 51.2 21.942857 51.2 51.2v563.2z" fill="#999999" p-id="11648"></path><path d="M453.485714 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514286-58.514286c0-36.571429-21.942857-65.828571-58.514286-65.828572s-58.514286 29.257143-58.514286 65.828572M256 457.289143c0 36.571429 29.257143 58.514286 58.514286 58.514286s58.514286-29.257143 58.514285-58.514286c0-36.571429-29.257143-58.514286-58.514285-58.514286-36.571429-7.314286-58.514286 21.942857-58.514286 58.514286" fill="#999999" p-id="11649"></path></svg>
  174. <span style="font-size: 14px;color: #3874F6;margin-left: 5px;vertical-align: middle">{{$t(`评论`)}}({{i.commentqty}})</span></el-button>
  175. </div>
  176. <div>
  177. <marketingExpenses v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'" class="inline-16" ownertable="sa_customers" :ownerid="i.sys_datafollowupid" :dataTime="i.createdate" :userid="i.createuserid" @onSuccess="onSuccess"></marketingExpenses>
  178. <editLog v-if="nowUserid === i.createuserid" :status="status" ref="edits" :data="i" :ownertable="ownertable" @onSuccess="queryLogs"></editLog>
  179. <el-popconfirm
  180. :confirm-button-text="$t('确定')" :cancel-button-text="$t('取消')"
  181. :title="$t(`确定删除该跟进动态吗?`)"
  182. @confirm="deleteLogs(i)"
  183. >
  184. <el-button slot="reference" v-if="nowUserid === i.createuserid" size="mini" type="text" :disabled="status === '已结案' || status === '已失败'">
  185. <svg t="1727058242243" class="icon" viewBox="0 0 1024 1024" style="vertical-align: middle" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12098" width="14" height="14"><path d="M343.113143 156.379429h333.897143v-73.142858H343.113143v73.142858zM677.010286 0a83.456 83.456 0 0 1 83.456 83.456v64.146286h215.917714a46.299429 46.299429 0 1 1 0 92.672h-48.64v700.196571a83.456 83.456 0 0 1-83.456 83.456H176.128a83.456 83.456 0 0 1-83.456-83.456V240.054857H47.542857a46.299429 46.299429 0 0 1 0-92.452571h212.114286v-64.146286A83.456 83.456 0 0 1 343.113143 0h333.897143z m156.525714 241.371429H186.587429v688.859428h647.021714v-689.005714zM384.877714 345.6a41.764571 41.764571 0 0 1 41.764572 41.764571v333.897143a41.764571 41.764571 0 0 1-83.456 0V387.364571a41.764571 41.764571 0 0 1 41.691428-41.764571z m250.441143 0a41.764571 41.764571 0 0 1 41.764572 41.764571v333.897143a41.764571 41.764571 0 0 1-83.456 0V387.364571a41.764571 41.764571 0 0 1 41.545142-41.764571z" fill="#999999" p-id="12099"></path></svg>
  186. <span style="font-size: 14px;color: #333;margin-left: 5px;vertical-align: middle">{{$t(`删除`)}}</span></el-button>
  187. </el-popconfirm>
  188. </div>
  189. </div>
  190. </el-card>
  191. </el-timeline>
  192. </div>
  193. </div>
  194. </template>
  195. <script>
  196. import upload from '@/components/upload/hw_obs_upload.vue'
  197. import previewImage from '@/components/previewImage/index.vue'
  198. import fullScreen from "@/views/salesData/components/fullScreen";
  199. import addLog from './addLog.vue'
  200. import editLog from './editLog.vue'
  201. import marketingExpenses from '@/components/marketingExpenses/index'
  202. export default {
  203. props:['ownertable','status'],
  204. components:{
  205. addLog,
  206. editLog,
  207. upload,
  208. previewImage,
  209. fullScreen,
  210. marketingExpenses
  211. },
  212. data () {
  213. return {
  214. folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
  215. userid:JSON.parse(sessionStorage.getItem('active_account')).userid,
  216. commentShowId:'',
  217. logList:[],
  218. nowUserid:'',
  219. ownertableNew:'',
  220. owneridNew:'',
  221. isFull:false,
  222. search:'',
  223. windowHeight: window.innerHeight, //实时屏幕高度
  224. commentqty:0,
  225. content:'',
  226. isShow:false,
  227. sys_datacommentid:'',
  228. isContentShow:false,
  229. replyContent:'',
  230. }
  231. },
  232. methods:{
  233. async queryLogs() {
  234. const res = await this.$api.requested({
  235. "id": 20220930121501,
  236. "content": {
  237. "ownertable":this.ownertable,
  238. "ownerid":this.$route.query.id,
  239. "where":{
  240. "condition":this.search
  241. }
  242. }
  243. })
  244. this.logList = res.data
  245. },
  246. async queryLogsNew(ownertable,ownerid) {
  247. this.owneridNew = ownerid
  248. this.ownertableNew = ownertable
  249. const res = await this.$api.requested({
  250. "id": 20220930121501,
  251. "content": {
  252. "ownertable":this.ownertableNew,
  253. "ownerid":this.owneridNew
  254. }
  255. })
  256. this.logList = res.data
  257. console.log(this.logList,'跟进数据')
  258. console.log(this.logList.length,'数据')
  259. },
  260. async deleteLogs (val) {
  261. const res = await this.$api.requested({
  262. "id": 20220930121701,
  263. "content": {
  264. "sys_datafollowupid":val.sys_datafollowupid
  265. }
  266. })
  267. this.tool.showMessage(res,()=>{
  268. this.queryLogs()
  269. })
  270. },
  271. checkFileType (type) {
  272. let arr = ['JPG','JPEG','PNG']
  273. if (arr.includes(type.toUpperCase())) {
  274. return 'img'
  275. } else {
  276. return 'file'
  277. }
  278. },
  279. async deleteFile (row) {
  280. const res = await this.$api.requested({
  281. "classname": "system.attachment.Attachment",
  282. "method": "deleteFileLink",
  283. "content": {
  284. "linksids":[row.linksid]
  285. }
  286. })
  287. this.tool.showMessage(res,()=>{
  288. this.queryLogs()
  289. })
  290. },
  291. /*全屏*/
  292. onFull(){
  293. this.heightChart = this.windowWidth > 1128 ? 'calc(100vh - 85px)':'calc(100vh - 115px)'
  294. this.isFull = true
  295. },
  296. /*退出全屏*/
  297. backFull(val){
  298. this.heightChart = '100%'
  299. this.isFull = false
  300. this.$emit('backFull',val)
  301. },
  302. onSuccess(){
  303. this.queryLogs()
  304. this.$emit('logSuccess')
  305. },
  306. async onComment(data){
  307. const res = await this.$api.requested({
  308. "id": 20240429161601,
  309. "content": {
  310. "ownertable":'sys_datafollowup',//数据表
  311. "ownerid":data.sys_datafollowupid,//数据id
  312. "content":this.content,//内容
  313. "replyid":"0"//被回复评论id
  314. }
  315. })
  316. this.tool.showMessage(res,()=>{
  317. this.content = ''
  318. this.sys_datacommentid = ''
  319. this.queryLogs()
  320. })
  321. },
  322. async onReply(id,data){
  323. const res = await this.$api.requested({
  324. "id": 20240429161601,
  325. "content": {
  326. "ownertable":'sys_datafollowup',//数据表
  327. "ownerid":id,//数据id
  328. "content":this.replyContent,//内容
  329. "replyid":data.sys_datacommentid//被回复评论id
  330. }
  331. })
  332. this.tool.showMessage(res,()=>{
  333. this.replyContent = ''
  334. this.isContentShow = false
  335. this.sys_datacommentid = ''
  336. this.queryLogs()
  337. })
  338. },
  339. onDel(data){
  340. console.log(data,'删除')
  341. this.$confirm(this.$t('确定删除该评论吗')+'?', this.$t('提示'), {
  342. confirmButtonText: this.$t('确定'),
  343. cancelButtonText: this.$t('取消'),
  344. type: 'warning'
  345. }).then(async() => {
  346. const res = await this.$api.requested({
  347. "id": 20240429161701,
  348. "content": {
  349. "sys_datacommentid":data.sys_datacommentid
  350. }
  351. })
  352. this.tool.showMessage(res,()=>{
  353. this.queryLogs()
  354. })
  355. }).catch(() => {
  356. this.$message({
  357. type: 'info',
  358. message: this.$t('已取消删除'),
  359. });
  360. });
  361. },
  362. commentClick(i){
  363. if (this.commentShowId == i.sys_datafollowupid){
  364. this.commentShowId = ''
  365. }else {
  366. this.commentShowId = i.sys_datafollowupid
  367. }
  368. }
  369. },
  370. mounted () {
  371. this.queryLogs()
  372. console.log(this.windowHeight,'windowHeight高度')
  373. this.nowUserid = JSON.parse(sessionStorage.getItem('active_account')).userid
  374. var that = this;
  375. // <!--把window.onresize事件挂在到mounted函数上-->
  376. window.onresize = () => {
  377. return (() => {
  378. window.fullHeight = document.documentElement.clientHeight;
  379. that.windowHeight = window.fullHeight; // 高
  380. })()
  381. };
  382. },
  383. watch: {
  384. $route () {
  385. this.queryLogs()
  386. },
  387. windowHeight (val) {
  388. console.log("实时屏幕高度:",val );
  389. console.log(this.windowHeight)
  390. }
  391. }
  392. }
  393. </script>
  394. <style>
  395. .el-step__description{
  396. padding-right:0px !important;
  397. }
  398. </style>
  399. <style scoped>
  400. /deep/ .el-card__body {
  401. padding: 0;
  402. }
  403. /deep/ .el-card:hover{
  404. border: 1px solid #3874F6;
  405. }
  406. /deep/ .el-divider--horizontal {
  407. display: block;
  408. height: 1px;
  409. width: 100%;
  410. margin:0 0 10px 0 ;
  411. }
  412. .el-card__body {
  413. padding: 10px;
  414. }
  415. .step__panel{
  416. /* background-color: #eff4ff;*/
  417. /*padding: 10px;*/
  418. border-radius: 5px;
  419. color:#666
  420. }
  421. .follow-progress p{
  422. width:100%;
  423. margin-bottom:5px;
  424. font-size:14px;
  425. word-wrap: break-word;
  426. }
  427. .file__link{
  428. color:#999;
  429. font-size: 12px;
  430. padding: 0 5px;
  431. display:block;
  432. width: 100%;
  433. white-space: nowrap;
  434. overflow: hidden;
  435. text-overflow: ellipsis;
  436. }
  437. .pionter{
  438. margin:6px 0;
  439. padding: 10px;
  440. transition: .2s linear;
  441. cursor: pointer;
  442. border-radius: 5px;
  443. background: #ffff;
  444. }
  445. .pionter:hover{
  446. box-shadow: 0 5px 10px rgb(0 0 0 / 10%);
  447. }
  448. .sticky{
  449. position: sticky;
  450. top:0px;
  451. /* background: #fff; */
  452. z-index: 9999;
  453. }
  454. .dot{
  455. background:#fff;height:10px;width:10px;border-radius:100%;border:2px solid #3874F6;
  456. }
  457. .normal-panel{
  458. border-radius: 5px;
  459. }
  460. .avatar__image{
  461. height: 100%;
  462. width: 100%;
  463. }
  464. .avatar:hover .avatar__model{
  465. display: block;
  466. }
  467. .avatar{
  468. position: relative;
  469. height:40px;
  470. width: 40px;
  471. margin-bottom: 5px;
  472. border-radius: 100%;
  473. text-align: center;
  474. line-height: 40px;
  475. color:#fff;
  476. font-weight: 500;
  477. background: #3874F6;
  478. cursor: pointer;
  479. overflow: hidden;
  480. }
  481. .scroll{
  482. height: 410px;
  483. overflow: auto;
  484. }
  485. .scroll::-webkit-scrollbar-thumb { /*滚动条滑块*/
  486. border-radius: 10px;
  487. background-color: #CACACA;
  488. }
  489. .flex-wrap{
  490. flex-wrap: wrap
  491. }
  492. .margin-5{
  493. margin-left: 5px;
  494. }
  495. .padding-style{
  496. padding: 0 10px 10px 10px;
  497. .span-style{
  498. color: #999999;
  499. font-size: 14px
  500. };
  501. }
  502. .card-style{
  503. margin-bottom: 10px;
  504. .dateLine{
  505. margin-bottom: 10px;
  506. padding: 10px 10px 0 10px;
  507. display: flex;
  508. justify-content: left;
  509. align-items: center;
  510. .div{
  511. width: 8px;
  512. height:8px;
  513. border: 2px solid #3874F6;
  514. background: #FFFFFF;
  515. border-radius: 40px;
  516. }
  517. .span{
  518. color: #3874F6;
  519. }
  520. }
  521. }
  522. </style>