followUp.vue 32 KB

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