followUp.vue 33 KB

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