followUp.vue 34 KB

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