index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <template>
  2. <div>
  3. <el-input style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="clearSearchValue" size="small" class="input-with-select inline-16 layout_search__panel mt-10" clearable>
  4. </el-input>
  5. <el-table
  6. ref="table"
  7. :row-class-name="tableClassName"
  8. :data="tableData"
  9. highlight-current-row
  10. size="mini"
  11. :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
  12. :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
  13. border
  14. >
  15. <el-table-column
  16. prop="createby"
  17. :label="$t('跟进人')"
  18. min-width="90">
  19. <template slot-scope="scope">
  20. <div>
  21. {{scope.row.createby}}
  22. <el-tag v-if="scope.row.resource" size="mini" style="color: #3874f6">{{$t(scope.row.resource)}}</el-tag>
  23. </div>
  24. </template>
  25. </el-table-column>
  26. <el-table-column
  27. prop="createdate"
  28. :label="$t(`跟进时间`)"
  29. min-width="139">
  30. </el-table-column>
  31. <el-table-column
  32. v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'"
  33. prop="type"
  34. :label="$t(`跟进类型`)"
  35. min-width="80">
  36. </el-table-column>
  37. <el-table-column
  38. prop="contacts"
  39. v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'"
  40. :label="$t(`跟进对象`)"
  41. min-width="69">
  42. <template slot-scope="scope">
  43. <div v-for="item in scope.row.contacts" :key="item.index">
  44. <span v-if="item.rowindex === scope.row.contacts.length" class="span-style">
  45. {{item.name}}
  46. </span>
  47. <span v-else class="span-style">
  48. {{item.name + ','}}
  49. </span>
  50. </div>
  51. </template>
  52. </el-table-column>
  53. <el-table-column
  54. prop="content"
  55. :label="$t(`跟进内容`)"
  56. min-width="500"
  57. >
  58. <template slot-scope="scope">
  59. <div v-if="($route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail')">
  60. <div>{{$t(`目的:`)}}{{scope.row.target}}</div>
  61. <div>{{$t(`过程:`)}}{{scope.row.content}}</div>
  62. <div>{{$t(`结果:`)}}{{scope.row.results}}</div>
  63. <div>{{$t(`下次跟进计划:`)}}{{scope.row.nextplan}}</div>
  64. </div>
  65. <div v-else>{{scope.row.content}}</div>
  66. </template>
  67. </el-table-column>
  68. <el-table-column
  69. v-if="$route.path === '/projectChangeDetail'"
  70. prop="squarestage"
  71. :label="$t(`项目阶段`)"
  72. min-width="500"
  73. >
  74. <template slot-scope="scope">
  75. <div>{{scope.row.squarestage?scope.row.squarestage:''}}</div>
  76. </template>
  77. </el-table-column>
  78. <el-table-column
  79. prop="attcount"
  80. :label="$t(`附件数`)"
  81. min-width="69">
  82. <template slot-scope="scope">
  83. <el-button type="text" size="small" @click="showFiles(scope.row)">{{scope.row.attcount}}</el-button>
  84. </template>
  85. </el-table-column>
  86. <el-table-column
  87. v-if="$route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail'"
  88. prop="salesfeesamount"
  89. :label="$t(`营销费用`)"
  90. min-width="80">
  91. <template slot-scope="scope">
  92. {{scope.row.salesfeesamount?tool.formatAmount(scope.row.salesfeesamount,2,'¥'):'¥0.00'}}
  93. </template>
  94. </el-table-column>
  95. <el-table-column
  96. :label="$t(`操作`)"
  97. fixed="right"
  98. min-width="220">
  99. <template slot-scope="scope">
  100. <el-button type="text" size="small" @click="showReview(scope.row)" class="inline-16">{{$t(`评论`)}}({{scope.row.commentqty}})</el-button>
  101. <editLog v-if="userid === scope.row.createuserid && !disabled" ref="edits" :data="scope.row" :ownertable="ownertable" @onSuccess="onSuccess" :isOperation="true"></editLog>
  102. <el-button type="text" size="small" class="inline-16" @click="onDelFollow(scope.row)" v-if="userid === scope.row.createuserid && !disabled">{{$t(`删除`)}}</el-button>
  103. <marketingExpenses v-if="($route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail') && !disabled"
  104. class="inline-16" ownertable="sa_customers" :ownerid="scope.row.sys_datafollowupid" :dataTime="scope.row.createdate" :userid="scope.row.createuserid" :isOperation="true"
  105. @onSuccess="listData"></marketingExpenses>
  106. </template>
  107. </el-table-column>
  108. </el-table>
  109. <div class="container normal-panel" style="text-align:right">
  110. <el-pagination
  111. background
  112. @size-change="handleSizeChange"
  113. @current-change="handleCurrentChange"
  114. :current-page="currentPage"
  115. :page-sizes="[20, 50, 100, 200]"
  116. :page-size="100"
  117. layout="total,sizes, prev, pager, next, jumper"
  118. :total="total">
  119. </el-pagination>
  120. </div>
  121. <normalDialog ref="normalDialogFile" title="附件" >
  122. <template slot="content">
  123. <attachmentList style="margin-top: -10px;margin-bottom: 10px" :attinfos="attinfo_attachment" :onlyread="true" minWidth="80">
  124. </attachmentList>
  125. </template>
  126. </normalDialog>
  127. <normalDialog ref="normalDialogReview" title="评论" @closeDialog="closeDialog">
  128. <template slot="content">
  129. <div style="padding: 10px">
  130. <div style="border: 1px solid #9ca3af;padding: 10px;border-radius: 5px">
  131. <el-input type="textarea" style="border: none;margin-bottom: 10px" :rows="1" v-model="content" :placeholder="$t(`我评论`)+':'"></el-input>
  132. <el-divider></el-divider>
  133. <div style="display: flex;justify-content: right">
  134. <el-button type="primary" size="small" :disabled="content.length == 0" @click="onComment">{{$t(`发布`)}}</el-button>
  135. </div>
  136. </div>
  137. </div>
  138. <div style="padding: 0 10px 10px 10px">
  139. <div style="max-height: 360px;min-height:200px;background: #F5F5F5;border-radius: 2px;padding: 10px;overflow:auto">
  140. <div style="color: #333;font-size: 16px;font-weight: bold">{{$t(`评论`)}}({{commentqty}})</div>
  141. <div v-for="item in comment" :key="item.index" style="margin-top: 10px">
  142. <div style="color: #333;font-size: 14px;font-weight: bold;margin-top: 5px">{{item.createby}}</div>
  143. <div style="color:#666;font-size: 14px;margin-top: 5px">{{item.content}}</div>
  144. <div style="display: flex;justify-content: space-between;align-items: center;margin-top: -5px;margin-bottom: -5px">
  145. <div style="display: flex;justify-content: space-between;align-items: center">
  146. <div style="font-size: 12px;color: #999">{{item.createdate}}</div>
  147. <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>
  148. <span style="color: #666666;font-size: 14px;margin-left: 5px;vertical-align: middle" @click="onDel(item)">{{$t(`删除`)}}</span></el-button>
  149. </div>
  150. <div>
  151. <el-button type="text" v-if="!isContentShow" size="small" @click="isContentShow = true;sys_datacommentid = item.sys_datacommentid">
  152. <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>
  153. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`回复`)}}</span></el-button>
  154. <el-button type="text" v-if="isContentShow " size="small" @click="isContentShow = false;sys_datacommentid = ''">
  155. <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>
  156. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`取消回复`)}}</span></el-button>
  157. </div>
  158. </div>
  159. <div style="border: 1px solid #9ca3af;padding: 10px;border-radius: 5px" v-if="isContentShow && sys_datacommentid == item.sys_datacommentid">
  160. <el-input type="textarea" style="border: none;margin-bottom: 10px" :rows="1" v-model="replyContent" :placeholder="$t('我回复')+item.createby+':'"></el-input>
  161. <el-divider></el-divider>
  162. <div style="display: flex;justify-content: right">
  163. <el-button type="primary" size="small" :disabled="replyContent.length == 0" @click="onReply(sys_datafollowupid,item)">{{$t(`发布`)}}</el-button>
  164. </div>
  165. </div>
  166. <div v-if="item.subcomment.length > 0" style="margin-left: 10px;margin-top: 10px">
  167. <div v-for="k in item.subcomment" :key="k.index" style="margin-top: 10px">
  168. <div style="display: flex;justify-content: left;align-items: center">
  169. <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>
  170. </div>
  171. <div style="color:#666;font-size: 14px;margin-top: 5px">{{k.content}}</div>
  172. <div style="display: flex;justify-content: space-between;align-items: center;margin-top: -5px;margin-bottom: -5px">
  173. <div style="display: flex;justify-content: space-between;align-items: center">
  174. <div style="font-size: 12px;color:#999;margin-right: 10px">{{k.createdate}}</div>
  175. <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>
  176. <span style="color: #666666;font-size: 14px;margin-left: 5px;vertical-align: middle" @click="onDel(k)">{{$t(`删除`)}}</span></el-button>
  177. </div>
  178. <div>
  179. <el-button type="text" v-if="!isContentShow " size="small" @click="isContentShow = true;sys_datacommentid = k.sys_datacommentid">
  180. <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>
  181. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`回复`)}}</span></el-button>
  182. <el-button type="text" v-if="isContentShow " size="small" @click="isContentShow = false;sys_datacommentid = ''">
  183. <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>
  184. <span style="color: #3874F6;font-size: 14px;margin-left: 5px;vertical-align: middle">{{$t(`取消回复`)}}</span></el-button>
  185. </div>
  186. </div>
  187. <div style="border: 1px solid #9ca3af;padding: 10px;border-radius: 5px" v-if="isContentShow && sys_datacommentid == k.sys_datacommentid">
  188. <el-input type="textarea" style="border: none;margin-bottom: 10px" :rows="1" v-model="replyContent" :placeholder="$t('我回复')+k.createby+':'"></el-input>
  189. <el-divider></el-divider>
  190. <div style="display: flex;justify-content: right">
  191. <el-button type="primary" size="small" :disabled="replyContent.length == 0" @click="onReply(sys_datafollowupid,k)">{{$t(`发布`)}}</el-button>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. </template>
  200. </normalDialog>
  201. </div>
  202. </template>
  203. <script>
  204. import marketingExpenses from '@/components/marketingExpenses/index'
  205. import normalDialog from '@/template/dialogTemplate/normal'
  206. import attachmentList from '@/components/attachment_list/index.vue'
  207. import editLog from '../followUp/editLog'
  208. export default {
  209. name: "index",
  210. props:['ownertable','disabled'],
  211. components:{marketingExpenses,normalDialog,attachmentList,editLog},
  212. data() {
  213. return {
  214. tableData:[],
  215. currentPage:0,
  216. total:0,
  217. attinfo_attachment:[],
  218. content:'',
  219. comment:[],
  220. commentqty:0,
  221. userid:JSON.parse(sessionStorage.getItem('active_account')).userid,
  222. isContentShow:false,
  223. sys_datacommentid:'',
  224. replyContent:'',
  225. sys_datafollowupid:'',
  226. param:{
  227. "id": 20220930121501,
  228. "content": {
  229. "ownertable":'',
  230. "ownerid":'',
  231. "pageNumber": 1,
  232. "pageSize": 50,
  233. "where":{
  234. "condition":''
  235. }
  236. }
  237. }
  238. }
  239. },
  240. methods:{
  241. async listData(type,id){
  242. this.param.content.ownerid = this.$route.query.id
  243. this.param.content.ownertable = this.ownertable
  244. const res = await this.$api.requested(this.param)
  245. this.tableData = res.data
  246. this.total = res.total
  247. this.currentPage = res.pageNumber
  248. if (type){
  249. this.tableData.forEach(item=>{
  250. if (item.sys_datafollowupid == id){
  251. this.comment = item.comment
  252. this.commentqty = item.commentqty
  253. }
  254. })
  255. }
  256. },
  257. handleSizeChange(val) {
  258. // console.log(`每页 ${val} 条`);
  259. this.param.content.pageSize = val
  260. this.listData()
  261. },
  262. handleCurrentChange(val) {
  263. // console.log(`当前页: ${val}`);
  264. this.param.content.pageNumber = val
  265. this.listData()
  266. },
  267. tableClassName({ row, rowIndex }) {
  268. row.index = rowIndex;
  269. },
  270. clearSearchValue () {
  271. this.$store.dispatch('clearSearchValue')
  272. this.listData(this.param.content.pageNumber = 1)
  273. },
  274. showFiles(data){
  275. this.$refs.normalDialogFile.dialogVisible = true
  276. this.attinfo_attachment = data.attinfos
  277. },
  278. showReview(data){
  279. this.$refs.normalDialogReview.dialogVisible = true
  280. this.comment = data.comment
  281. this.commentqty = data.commentqty
  282. this.sys_datafollowupid = data.sys_datafollowupid
  283. },
  284. onDel(data){
  285. console.log(data,'删除')
  286. this.$confirm(this.$t('确定删除该评论吗')+'?', this.$t('提示'), {
  287. confirmButtonText: this.$t('确定'),
  288. cancelButtonText: this.$t('取消'),
  289. type: 'warning'
  290. }).then(async() => {
  291. const res = await this.$api.requested({
  292. "id": 20240429161701,
  293. "content": {
  294. "sys_datacommentid":data.sys_datacommentid
  295. }
  296. })
  297. this.tool.showMessage(res,()=>{
  298. this.listData('删除',this.sys_datafollowupid)
  299. this.$emit('newFollow')
  300. })
  301. }).catch(() => {
  302. this.$message({
  303. type: 'info',
  304. message: this.$t('已取消删除'),
  305. });
  306. });
  307. },
  308. async onReply(id,data){
  309. const res = await this.$api.requested({
  310. "id": 20240429161601,
  311. "content": {
  312. "ownertable":'sys_datafollowup',//数据表
  313. "ownerid":id,//数据id
  314. "content":this.replyContent,//内容
  315. "replyid":data.sys_datacommentid//被回复评论id
  316. }
  317. })
  318. this.tool.showMessage(res,()=>{
  319. this.replyContent = ''
  320. this.isContentShow = false
  321. this.sys_datacommentid = ''
  322. this.listData('回复',this.sys_datafollowupid)
  323. this.$emit('newFollow')
  324. })
  325. },
  326. async onComment(){
  327. const res = await this.$api.requested({
  328. "id": 20240429161601,
  329. "content": {
  330. "ownertable":'sys_datafollowup',//数据表
  331. "ownerid":this.sys_datafollowupid,//数据id
  332. "content":this.content,//内容
  333. "replyid":"0"//被回复评论id
  334. }
  335. })
  336. this.tool.showMessage(res,()=>{
  337. this.content = ''
  338. this.sys_datacommentid = ''
  339. this.listData('回复',this.sys_datafollowupid)
  340. this.$emit('newFollow')
  341. })
  342. },
  343. closeDialog(){
  344. this.content = ''
  345. this.replyContent = ''
  346. this.isContentShow = false
  347. },
  348. onSuccess(){
  349. this.listData()
  350. this.$emit('newFollow')
  351. },
  352. onDelFollow(val){
  353. this.$confirm(this.$t('确定删除该跟进动态吗?'), this.$t('提示'), {
  354. confirmButtonText: this.$t('确定'),
  355. cancelButtonText: this.$t('取消'),
  356. type: 'warning'
  357. }).then(async() => {
  358. const res = await this.$api.requested({
  359. "id": 20220930121701,
  360. "content": {
  361. "sys_datafollowupid":val.sys_datafollowupid
  362. }
  363. })
  364. this.tool.showMessage(res,()=>{
  365. this.listData()
  366. this.$emit('newFollow')
  367. })
  368. }).catch(() => {
  369. this.$message({
  370. type: 'info',
  371. message: '已取消删除'
  372. });
  373. });
  374. }
  375. },
  376. mounted() {
  377. this.listData()
  378. }
  379. }
  380. </script>
  381. <style scoped>
  382. .table-style{
  383. width: 100%;
  384. height: calc(100vh - 390px);
  385. }
  386. /deep/ .el-table .cell.el-tooltip {
  387. white-space: break-spaces;
  388. min-width: 50px;
  389. }
  390. </style>