index.vue 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372
  1. <template>
  2. <div class="tenant">
  3. <div style="padding: 20px; background: #fff; margin-bottom: 20px">
  4. <el-button type="primary" style="margin-left: 10px" @click="openModal()">添加客户</el-button>
  5. </div>
  6. <div style="padding: 20px 20px 0 20px; background: #fff; margin-bottom: 20px">
  7. <div style="display: flex">
  8. <div style="font-size: 14px; cursor: pointer" class="by-dropdown">
  9. <div class="by-dropdown-title">
  10. <span>{{ dictValueLabel(sourceList.paginationTwo.statisticsType, statisticsType) }}</span>
  11. <el-icon style="margin-left: 5px; font-size: 16px"><CaretBottom /></el-icon>
  12. </div>
  13. <ul class="by-dropdown-lists">
  14. <li
  15. v-for="item in statisticsType"
  16. :key="item.value"
  17. @click="searchItemSelect(item.value)"
  18. style="display: flex; align-items: center; justify-content: center">
  19. {{ item.label }}
  20. </li>
  21. </ul>
  22. </div>
  23. </div>
  24. <div style="display: flex; width: 100%; margin: 10px 0 0 10px; flex-wrap: wrap">
  25. <div style="padding: 20px; border-radius: 10px; width: 200px; background-color: #d1caff59; margin: 0 20px 20px 0">
  26. <div style="margin-bottom: 10px; display: flex">
  27. <div style="width: 8px; height: 8px; background-color: #5bacff; border-radius: 50px; margin-top: 6px"></div>
  28. <span style="padding-left: 8px">合计</span>
  29. </div>
  30. <div style="color: black; font-size: 20px; font-weight: 700">{{ statisticalData.countAmount }}</div>
  31. </div>
  32. <template v-if="sourceList.paginationTwo.statisticsType === 1">
  33. <div
  34. style="padding: 20px; border-radius: 10px; width: 200px; background-color: #a2d8ff70; margin: 0 20px 20px 0"
  35. v-for="(item, index) in customerSource"
  36. :key="index">
  37. <div style="margin-bottom: 10px; display: flex">
  38. <div style="width: 8px; height: 8px; background-color: #5bacff; border-radius: 50px; margin-top: 6px"></div>
  39. <el-tooltip class="box-item" effect="light" placement="bottom">
  40. <template #content>
  41. <div style="max-width: 400px; max-height: 50vh; word-break: break-all">
  42. {{ item.label }}
  43. </div>
  44. </template>
  45. <div class="statistics-text" style="cursor: pointer">
  46. {{ item.label }}
  47. </div>
  48. </el-tooltip>
  49. </div>
  50. <div style="color: black; font-size: 20px; font-weight: 700">{{ getNum(item.value) }}</div>
  51. </div>
  52. </template>
  53. <template v-else-if="sourceList.paginationTwo.statisticsType === 2">
  54. <div
  55. style="padding: 20px; border-radius: 10px; width: 200px; background-color: #a2d8ff70; margin: 0 20px 20px 0"
  56. v-for="(item, index) in customerStatus"
  57. :key="index">
  58. <div style="margin-bottom: 10px; display: flex">
  59. <div style="width: 8px; height: 8px; background-color: #5bacff; border-radius: 50px; margin-top: 6px"></div>
  60. <el-tooltip class="box-item" effect="light" placement="bottom">
  61. <template #content>
  62. <div style="max-width: 400px; max-height: 50vh; word-break: break-all">
  63. {{ item.label }}
  64. </div>
  65. </template>
  66. <div class="statistics-text" style="cursor: pointer">
  67. {{ item.label }}
  68. </div>
  69. </el-tooltip>
  70. </div>
  71. <div style="color: black; font-size: 20px; font-weight: 700">{{ getNum(item.value) }}</div>
  72. </div>
  73. </template>
  74. <template v-else-if="sourceList.paginationTwo.statisticsType === 3">
  75. <div
  76. style="padding: 20px; border-radius: 10px; width: 200px; background-color: #a2d8ff70; margin: 0 20px 20px 0"
  77. v-for="(item, index) in userList"
  78. :key="index">
  79. <div style="margin-bottom: 10px; display: flex">
  80. <div style="width: 8px; height: 8px; background-color: #5bacff; border-radius: 50px; margin-top: 6px"></div>
  81. <el-tooltip class="box-item" effect="light" placement="bottom">
  82. <template #content>
  83. <div style="max-width: 400px; max-height: 50vh; word-break: break-all">
  84. {{ item.label }}
  85. </div>
  86. </template>
  87. <div class="statistics-text" style="cursor: pointer">
  88. {{ item.label }}
  89. </div>
  90. </el-tooltip>
  91. </div>
  92. <div style="color: black; font-size: 20px; font-weight: 700">{{ getNum(item.value) }}</div>
  93. </div>
  94. </template>
  95. </div>
  96. </div>
  97. <byTable
  98. :source="sourceList.data"
  99. :pagination="sourceList.pagination"
  100. :config="config"
  101. :loading="loading"
  102. :selectConfig="selectConfig"
  103. highlight-current-row
  104. @moreSearch="moreSearch"
  105. @get-list="getList">
  106. <template #isTop="{ item }">
  107. <div>
  108. <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)" v-if="item.isTop === 1" />
  109. <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/noTop.png'" @click="addTop(item)" v-else />
  110. </div>
  111. </template>
  112. <template #address="{ item }">
  113. <span>{{ item.countryName }}</span>
  114. <span v-if="item.provinceName"> ,{{ item.provinceName }}</span>
  115. <span v-if="item.cityName"> ,{{ item.cityName }}</span>
  116. </template>
  117. <template #name="{ item }">
  118. <div style="cursor: pointer; color: #409eff; word-break: break-all" @click="handleClickName(item)">
  119. {{ item.name }}
  120. </div>
  121. </template>
  122. <template #tags="{ item }">
  123. <div style="width: 100%">
  124. <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.tag" closable :key="index" @close="tagClose(tag, item)">
  125. {{ dictValueLabel(tag, customerTag) }}
  126. </el-tag>
  127. <template v-if="item.tag.length !== customerTag.length">
  128. <el-select
  129. v-if="item.addTagShow"
  130. v-model="addTag"
  131. style="width: 100%"
  132. @change="
  133. (val) => {
  134. return changeTag(val, item);
  135. }
  136. ">
  137. <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value" :disabled="judgeTagSelect(item.tag, tag.value)" />
  138. </el-select>
  139. <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else> + </el-tag>
  140. </template>
  141. </div>
  142. </template>
  143. <template #follow="{ item }">
  144. <div :class="'getWidth' + item.id" style="width: 100%">
  145. <div style="width: 100%; display: flex">
  146. <template v-if="item.customerFollowRecordsList && item.customerFollowRecordsList.length > 0">
  147. <div
  148. :style="
  149. index > 2
  150. ? 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer; display: none'
  151. : 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer'
  152. "
  153. v-for="(record, index) in item.customerFollowRecordsList"
  154. :key="record.id">
  155. <el-popover placement="bottom" :width="300" trigger="hover" @show="recordShow(record)">
  156. <template #reference>
  157. <div>
  158. <span v-if="record.date">{{ record.date.substr(0, 10) }}</span>
  159. <el-icon style="margin-left: 8px; transform: translateY(2px)" @click="deleteFollow(record)"><DeleteFilled /></el-icon>
  160. </div>
  161. </template>
  162. <template #default>
  163. <div style="width: 100%">
  164. <div style="color: #909399; margin: 8px 0">跟进时间: {{ record.date }}</div>
  165. <div style="margin: 8px 0">跟进人: {{ dictValueLabel(record.createUser, userList) }}</div>
  166. <div style="word-wrap: break-word; margin: 8px 0" v-html="getStyle(record.content)" v-if="record.content"></div>
  167. <div v-else>跟进记录:</div>
  168. <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
  169. <div style="width: 36px">附件:</div>
  170. <div style="width: calc(100% - 36px)">
  171. <div v-for="(file, index) in record.fileList" :key="index">
  172. <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. </template>
  178. </el-popover>
  179. </div>
  180. <div
  181. style="line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer"
  182. @click="clickMore(item)"
  183. v-if="item.customerFollowRecordsList.length >= 3">
  184. 更多
  185. </div>
  186. </template>
  187. </div>
  188. </div>
  189. </template>
  190. </byTable>
  191. <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="800" v-loading="loadingOperation">
  192. <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
  193. <template #address>
  194. <el-row style="width: 100%">
  195. <el-col :span="8">
  196. <el-form-item prop="countryId">
  197. <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
  198. <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
  199. </el-select>
  200. </el-form-item>
  201. </el-col>
  202. <el-col :span="8">
  203. <el-form-item prop="provinceName">
  204. <selectCity
  205. placeholder="省/洲"
  206. @change="(val) => getCityData(val, '30', true)"
  207. addressId="provinceId"
  208. addressName="provinceName"
  209. v-model="formData.data"
  210. :data="provinceData">
  211. </selectCity>
  212. </el-form-item>
  213. </el-col>
  214. <el-col :span="8">
  215. <el-form-item prop="cityName">
  216. <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"></selectCity>
  217. </el-form-item>
  218. </el-col>
  219. </el-row>
  220. <el-row style="margin-top: 20px; width: 100%">
  221. <el-col :span="24">
  222. <el-form-item prop="address">
  223. <el-input v-model="formData.data.address" type="textarea"> </el-input>
  224. </el-form-item>
  225. </el-col>
  226. </el-row>
  227. </template>
  228. <template #person>
  229. <div style="width: 100%">
  230. <el-button type="primary" @click="clickAddPerson">添 加</el-button>
  231. <el-table :data="formData.data.customerUserList" style="width: 100%; margin-top: 16px">
  232. <el-table-column label="联系人" width="160">
  233. <template #default="{ row, $index }">
  234. <div style="width: 100%">
  235. <el-form-item :prop="'customerUserList.' + $index + '.name'" :rules="rules.name2" :inline-message="true">
  236. <el-input v-model="row.name" placeholder="请输入联系人" />
  237. </el-form-item>
  238. </div>
  239. </template>
  240. </el-table-column>
  241. <el-table-column label="电子邮箱">
  242. <template #default="{ row, $index }">
  243. <div style="width: 100%">
  244. <el-form-item :prop="'customerUserList.' + $index + '.email'" :rules="rules.email" :inline-message="true">
  245. <el-input v-model="row.email" placeholder="请输入电子邮箱" />
  246. </el-form-item>
  247. </div>
  248. </template>
  249. </el-table-column>
  250. <el-table-column align="center" label="操作" width="120" fixed="right">
  251. <template #default="{ row, $index }">
  252. <el-button type="primary" link @click="clickInformationMore(row, $index)">更多</el-button>
  253. <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
  254. </template>
  255. </el-table-column>
  256. </el-table>
  257. </div>
  258. </template>
  259. </byForm>
  260. <template #footer>
  261. <el-button @click="dialogVisible = false" size="large">取 消</el-button>
  262. <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading">确 定</el-button>
  263. </template>
  264. </el-dialog>
  265. <el-dialog title="更多联系方式" v-if="openPerson" v-model="openPerson" width="700">
  266. <el-form :label-position="'top'" :model="formPerson.data" :rules="rulesPerson" ref="person">
  267. <el-form-item label="联系人" prop="name">
  268. <el-input v-model="formPerson.data.name" />
  269. </el-form-item>
  270. <el-form-item label="电子邮箱" prop="email">
  271. <el-input v-model="formPerson.data.email" />
  272. </el-form-item>
  273. <el-form-item label="更多联系方式">
  274. <div style="width: 100%">
  275. <el-button type="primary" @click="clickAddMoreInformation">添 加</el-button>
  276. <el-table :data="formPerson.data.contact" style="width: 100%; margin-top: 16px">
  277. <el-table-column label="类型" width="180">
  278. <template #default="{ row, $index }">
  279. <div style="width: 100%">
  280. <el-form-item :prop="'contact.' + $index + '.type'" :rules="rulesPerson.type" :inline-message="true">
  281. <el-select v-model="row.type" placeholder="请选择类型" style="width: 100%">
  282. <el-option v-for="item in contactType" :key="item.value" :label="item.label" :value="item.value" />
  283. </el-select>
  284. </el-form-item>
  285. </div>
  286. </template>
  287. </el-table-column>
  288. <el-table-column label="联系号码">
  289. <template #default="{ row, $index }">
  290. <div style="width: 100%">
  291. <el-form-item :prop="'contact.' + $index + '.contactNo'" :rules="rulesPerson.contactNo" :inline-message="true">
  292. <el-input v-model="row.contactNo" placeholder="请输入联系号码" />
  293. </el-form-item>
  294. </div>
  295. </template>
  296. </el-table-column>
  297. <el-table-column align="center" label="操作" width="120" fixed="right">
  298. <template #default="{ $index }">
  299. <el-button type="primary" link @click="clickInformationDelete($index)">删除</el-button>
  300. </template>
  301. </el-table-column>
  302. </el-table>
  303. </div>
  304. </el-form-item>
  305. </el-form>
  306. <template #footer>
  307. <el-button @click="openPerson = false" size="large">取 消</el-button>
  308. <el-button type="primary" @click="submitPerson()" size="large">确 定</el-button>
  309. </template>
  310. </el-dialog>
  311. <el-dialog title="添加跟进记录" v-if="openFollow" v-model="openFollow" width="500" destroy-on-close>
  312. <byForm :formConfig="formConfigAFollow" :formOption="formOption" v-model="formFollow.data" :rules="rulesFollow" ref="follow">
  313. <template #fileSlot>
  314. <div style="width: 100%">
  315. <el-upload
  316. v-model:fileList="fileList"
  317. action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
  318. :data="uploadData"
  319. multiple
  320. :before-upload="uploadFile"
  321. :on-preview="onPreviewFile">
  322. <el-button type="primary">文件上传</el-button>
  323. </el-upload>
  324. </div>
  325. </template>
  326. </byForm>
  327. <template #footer>
  328. <el-button @click="openFollow = false" size="large">取 消</el-button>
  329. <el-button type="primary" @click="submitFollow()" size="large">确 定</el-button>
  330. </template>
  331. </el-dialog>
  332. <el-dialog title="跟进记录" v-if="openRecordMore" v-model="openRecordMore" width="800" destroy-on-close>
  333. <div>
  334. <div style="padding: 8px 0">
  335. <el-button type="primary" @click="clickFollowUp(rowData)" plain>添加跟进记录</el-button>
  336. </div>
  337. <div style="padding-top: 16px">
  338. <div v-infinite-scroll="infiniteScroll" class="infinite-scroll" :infinite-scroll-disabled="judgeTotal()">
  339. <el-timeline>
  340. <el-timeline-item v-for="(record, index) in recordList" :key="index" :timestamp="record.date" hide-timestamp>
  341. <div>
  342. <div style="padding: 0 0 8px 0; display: flex; justify-content: space-between">
  343. <span>{{ dictValueLabel(record.createUser, userList) }}</span>
  344. <span>{{ record.date }}</span>
  345. </div>
  346. <div style="word-wrap: break-word; margin: 8px 0" v-html="getStyle(record.content)" v-if="record.content"></div>
  347. <div style="margin: 8px 0" v-else>跟进记录:</div>
  348. <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
  349. <div style="width: 36px">附件:</div>
  350. <div style="width: calc(100% - 36px)">
  351. <div v-for="(file, index) in record.fileList" :key="index">
  352. <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
  353. </div>
  354. </div>
  355. </div>
  356. </div>
  357. </el-timeline-item>
  358. </el-timeline>
  359. </div>
  360. </div>
  361. </div>
  362. <template #footer>
  363. <el-button @click="openRecordMore = false" size="large">关 闭</el-button>
  364. </template>
  365. </el-dialog>
  366. <el-dialog title="高级检索" v-if="openSearch" v-model="openSearch" width="600">
  367. <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination">
  368. <template #address>
  369. <el-row style="width: 100%">
  370. <el-col :span="8">
  371. <el-form-item prop="countryId">
  372. <el-select
  373. v-model="sourceList.pagination.countryId"
  374. placeholder="国家"
  375. clearable
  376. filterable
  377. @change="(val) => getCitySearchData(val, '20', true)">
  378. <el-option v-for="item in countrySearchData" :label="item.chineseName" :value="item.id"> </el-option>
  379. </el-select>
  380. </el-form-item>
  381. </el-col>
  382. <el-col :span="8">
  383. <el-form-item prop="provinceName">
  384. <selectCity
  385. placeholder="省/洲"
  386. @change="(val) => getCitySearchData(val, '30', true)"
  387. addressId="provinceId"
  388. addressName="provinceName"
  389. v-model="sourceList.pagination"
  390. :data="provinceSearchData">
  391. </selectCity>
  392. </el-form-item>
  393. </el-col>
  394. <el-col :span="8">
  395. <el-form-item prop="cityName">
  396. <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="sourceList.pagination" :data="citySearchData"></selectCity>
  397. </el-form-item>
  398. </el-col>
  399. </el-row>
  400. </template>
  401. <template #tags>
  402. <div style="width: 100%">
  403. <el-tag style="margin-right: 8px" type="info" v-for="(tag, index) in sourceList.pagination.tags" closable :key="index" @close="tagSearchClose(tag)">
  404. {{ dictValueLabel(tag, customerTag) }}
  405. </el-tag>
  406. <template v-if="sourceList.pagination.tags.length !== customerTag.length">
  407. <el-select v-if="addTagSearchShow" v-model="addSearchTag" style="margin-top: 8px" @change="changeSearchTag">
  408. <el-option
  409. v-for="tag in customerTag"
  410. :key="tag.value"
  411. :label="tag.label"
  412. :value="tag.value"
  413. :disabled="judgeTagSelect(sourceList.pagination.tags, tag.value)" />
  414. </el-select>
  415. <el-tag style="cursor: pointer" type="info" @click="addTagSearchShow = true" v-else> + </el-tag>
  416. </template>
  417. </div>
  418. </template>
  419. </byForm>
  420. <template #footer>
  421. <el-button @click="cancelSearch()" size="large">取 消</el-button>
  422. <el-button type="primary" @click="submitSearch()" size="large">确 定</el-button>
  423. </template>
  424. </el-dialog>
  425. </div>
  426. </template>
  427. <script setup>
  428. import { ElMessage, ElMessageBox } from "element-plus";
  429. import byTable from "@/components/byTable/index";
  430. import byForm from "@/components/byForm/index";
  431. import { computed, ref } from "vue";
  432. import useUserStore from "@/store/modules/user";
  433. import selectCity from "@/components/selectCity/index.vue";
  434. const { proxy } = getCurrentInstance();
  435. const loading = ref(false);
  436. const loadingOperation = ref(false);
  437. const submitLoading = ref(false);
  438. const openPerson = ref(false);
  439. const customerTag = ref([]);
  440. const customerSource = ref([]);
  441. const customerStatus = ref([]);
  442. const contactType = ref([]);
  443. const userList = ref([]);
  444. const fileList = ref([]);
  445. const uploadData = ref({});
  446. const statisticsType = ref([
  447. {
  448. label: "客户来源统计",
  449. value: 1,
  450. },
  451. {
  452. label: "客户类型统计",
  453. value: 2,
  454. },
  455. {
  456. label: "业务员统计",
  457. value: 3,
  458. },
  459. ]);
  460. const sourceList = ref({
  461. data: [],
  462. pagination: {
  463. total: 0,
  464. pageNum: 1,
  465. pageSize: 10,
  466. keyword: "",
  467. type: 0,
  468. source: "",
  469. status: "",
  470. name: "",
  471. countryId: "",
  472. provinceId: "",
  473. cityId: "",
  474. customerCode: "",
  475. tag: "",
  476. tags: [],
  477. },
  478. paginationTwo: {
  479. statisticsType: 1,
  480. type: 0,
  481. },
  482. });
  483. const selectConfig = computed(() => {
  484. return [
  485. {
  486. label: "客户状态",
  487. prop: "type",
  488. data: [
  489. {
  490. label: "公海",
  491. value: "0",
  492. },
  493. {
  494. label: "私海",
  495. value: "1",
  496. },
  497. ],
  498. },
  499. {
  500. label: "客户来源",
  501. prop: "source",
  502. data: customerSource.value,
  503. },
  504. {
  505. label: "客户类型",
  506. prop: "status",
  507. data: customerStatus.value,
  508. },
  509. ];
  510. });
  511. const config = computed(() => {
  512. return [
  513. {
  514. attrs: {
  515. label: "",
  516. slot: "isTop",
  517. fixed: "left",
  518. width: 60,
  519. align: "center",
  520. },
  521. },
  522. {
  523. attrs: {
  524. label: "客户名称",
  525. slot: "name",
  526. fixed: "left",
  527. width: 160,
  528. },
  529. },
  530. {
  531. attrs: {
  532. label: "所在城市",
  533. slot: "address",
  534. width: 160,
  535. },
  536. },
  537. {
  538. attrs: {
  539. label: "客户代码",
  540. prop: "customerCode",
  541. width: 120,
  542. },
  543. },
  544. {
  545. attrs: {
  546. label: "客户来源",
  547. prop: "source",
  548. width: 120,
  549. },
  550. render(type) {
  551. return proxy.dictValueLabel(type, customerSource.value);
  552. },
  553. },
  554. {
  555. attrs: {
  556. label: "客户类型",
  557. prop: "status",
  558. width: 120,
  559. },
  560. render(type) {
  561. return proxy.dictValueLabel(type, customerStatus.value);
  562. },
  563. },
  564. {
  565. attrs: {
  566. label: "客户标签",
  567. slot: "tags",
  568. width: 180,
  569. },
  570. },
  571. {
  572. attrs: {
  573. label: "业务员",
  574. prop: "userId",
  575. width: 140,
  576. },
  577. render(type) {
  578. let data = userList.value.filter((item) => item.value == type);
  579. if (data && data.length > 0) {
  580. return data[0].label;
  581. } else {
  582. return "";
  583. }
  584. },
  585. },
  586. {
  587. attrs: {
  588. label: "跟进",
  589. slot: "follow",
  590. "min-width": 440,
  591. },
  592. },
  593. {
  594. attrs: {
  595. label: "操作",
  596. width: 140,
  597. align: "center",
  598. fixed: "right",
  599. },
  600. renderHTML(row) {
  601. return [
  602. {
  603. attrs: {
  604. label: "跟进",
  605. type: "primary",
  606. text: true,
  607. },
  608. el: "button",
  609. click() {
  610. clickFollowUp(row);
  611. },
  612. },
  613. {
  614. attrs: {
  615. label: "认领客户",
  616. type: "primary",
  617. text: true,
  618. },
  619. el: "button",
  620. click() {
  621. ElMessageBox.confirm("是否确定认领该客户?", "提示", {
  622. confirmButtonText: "确定",
  623. cancelButtonText: "取消",
  624. type: "warning",
  625. }).then(() => {
  626. proxy
  627. .post("/customer/CustomerAllocation", {
  628. id: row.id,
  629. userId: useUserStore().user.userId,
  630. })
  631. .then(() => {
  632. ElMessage({
  633. message: "认领成功",
  634. type: "success",
  635. });
  636. getList();
  637. obtainStatisticalData();
  638. });
  639. });
  640. },
  641. },
  642. ];
  643. },
  644. },
  645. ];
  646. });
  647. let modalType = ref("add");
  648. let dialogVisible = ref(false);
  649. let openFollow = ref(false);
  650. let formData = reactive({
  651. data: {
  652. countryId: "44",
  653. },
  654. });
  655. let formPerson = reactive({
  656. data: {},
  657. });
  658. let formFollow = reactive({
  659. data: {},
  660. });
  661. const formOption = reactive({
  662. inline: true,
  663. labelWidth: 100,
  664. itemWidth: 100,
  665. rules: [],
  666. });
  667. const formConfig = computed(() => {
  668. return [
  669. {
  670. type: "input",
  671. prop: "name",
  672. label: "客户名称",
  673. required: true,
  674. itemWidth: 100,
  675. itemType: "text",
  676. },
  677. {
  678. type: "slot",
  679. slotName: "address",
  680. prop: "countryId",
  681. label: "详细地址",
  682. },
  683. {
  684. type: "input",
  685. prop: "customerCode",
  686. label: "客户代码",
  687. required: true,
  688. itemWidth: 100,
  689. itemType: "text",
  690. },
  691. {
  692. type: "select",
  693. label: "客户来源",
  694. prop: "source",
  695. itemWidth: 50,
  696. data: customerSource.value,
  697. },
  698. {
  699. type: "select",
  700. label: "客户类型",
  701. prop: "status",
  702. itemWidth: 50,
  703. data: customerStatus.value,
  704. },
  705. {
  706. type: "select",
  707. label: "业务员",
  708. prop: "userId",
  709. itemWidth: 100,
  710. data: userList.value,
  711. clearable: true,
  712. },
  713. {
  714. type: "select",
  715. label: "客户标签",
  716. prop: "tags",
  717. itemWidth: 100,
  718. multiple: true,
  719. data: customerTag.value,
  720. style: {
  721. width: "100%",
  722. },
  723. },
  724. {
  725. type: "slot",
  726. slotName: "person",
  727. label: "客户联系人",
  728. },
  729. ];
  730. });
  731. let rules = ref({
  732. name: [{ required: true, message: "请输入客户名称", trigger: "blur" }],
  733. name2: [{ required: true, message: "请输入联系人", trigger: "blur" }],
  734. email: [{ required: true, message: "请输入电子邮箱", trigger: "blur" }],
  735. countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
  736. provinceId: [{ required: true, message: "请选择省/州", trigger: "change" }],
  737. cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
  738. source: [{ required: true, message: "请选择客户来源", trigger: "change" }],
  739. status: [{ required: true, message: "请选择类型", trigger: "change" }],
  740. });
  741. const formConfigAFollow = computed(() => {
  742. return [
  743. {
  744. type: "date",
  745. itemType: "datetime",
  746. label: "跟进时间",
  747. prop: "date",
  748. itemWidth: 100,
  749. },
  750. {
  751. type: "input",
  752. itemType: "textarea",
  753. label: "跟进内容",
  754. prop: "content",
  755. itemWidth: 100,
  756. },
  757. {
  758. type: "slot",
  759. label: "上传附件",
  760. prop: "fileList",
  761. slotName: "fileSlot",
  762. },
  763. ];
  764. });
  765. let rulesPerson = ref({
  766. name: [{ required: true, message: "请输入联系人", trigger: "blur" }],
  767. email: [{ required: true, message: "请输入电子邮箱", trigger: "blur" }],
  768. type: [{ required: true, message: "请选择类型", trigger: "change" }],
  769. contactNo: [{ required: true, message: "请输入联系号码", trigger: "blur" }],
  770. });
  771. let rulesFollow = ref({
  772. date: [{ required: true, message: "请选择跟进时间", trigger: "change" }],
  773. content: [{ required: true, message: "请输入跟进内容", trigger: "blur" }],
  774. });
  775. const submit = ref(null);
  776. const person = ref(null);
  777. const allocation = ref(null);
  778. const follow = ref(null);
  779. const getList = async (req) => {
  780. sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
  781. loading.value = true;
  782. proxy.post("/customer/page", sourceList.value.pagination).then((res) => {
  783. res.rows.forEach((x) => {
  784. x.addTagShow = false;
  785. if (x.tag) {
  786. x.tag = x.tag.split(",");
  787. } else {
  788. x.tag = [];
  789. }
  790. });
  791. sourceList.value.data = res.rows;
  792. sourceList.value.pagination.total = res.total;
  793. setTimeout(() => {
  794. loading.value = false;
  795. }, 200);
  796. });
  797. };
  798. const openModal = () => {
  799. modalType.value = "add";
  800. formData.data = {
  801. countryId: "44",
  802. tags: [],
  803. };
  804. getCityData(formData.data.countryId, "20");
  805. loadingOperation.value = false;
  806. dialogVisible.value = true;
  807. };
  808. const countryData = ref([]);
  809. const provinceData = ref([]);
  810. const cityData = ref([]);
  811. const getCityData = (id, type, isChange) => {
  812. proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
  813. if (type === "20") {
  814. provinceData.value = res;
  815. if (isChange) {
  816. formData.data.provinceId = "";
  817. formData.data.provinceName = "";
  818. formData.data.cityId = "";
  819. formData.data.cityName = "";
  820. }
  821. } else if (type === "30") {
  822. cityData.value = res;
  823. if (isChange) {
  824. formData.data.cityId = "";
  825. formData.data.cityName = "";
  826. }
  827. } else {
  828. countryData.value = res;
  829. }
  830. });
  831. };
  832. getCityData("0");
  833. const clickAddPerson = () => {
  834. if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
  835. formData.data.customerUserList.push({
  836. name: "",
  837. email: "",
  838. });
  839. } else {
  840. formData.data.customerUserList = [
  841. {
  842. name: "",
  843. email: "",
  844. },
  845. ];
  846. }
  847. };
  848. const submitFollow = () => {
  849. follow.value.handleSubmit(() => {
  850. if (fileList.value && fileList.value.length > 0) {
  851. formFollow.data.fileList = fileList.value.map((item) => {
  852. return {
  853. id: item.raw.id,
  854. fileName: item.raw.fileName,
  855. fileUrl: item.raw.fileUrl,
  856. };
  857. });
  858. } else {
  859. formFollow.data.fileList = [];
  860. }
  861. proxy.post("/customerFollowRecords/" + modalType.value, formFollow.data).then(
  862. () => {
  863. ElMessage({
  864. message: modalType.value == "add" ? "添加成功" : "编辑成功",
  865. type: "success",
  866. });
  867. openFollow.value = false;
  868. getList();
  869. },
  870. (err) => {
  871. console.log(err);
  872. }
  873. );
  874. });
  875. };
  876. const submitForm = () => {
  877. submit.value.handleSubmit(() => {
  878. if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
  879. formData.data.tag = formData.data.tags.join(",");
  880. submitLoading.value = true;
  881. proxy.post("/customer/" + modalType.value, formData.data).then(
  882. () => {
  883. ElMessage({
  884. message: modalType.value == "add" ? "添加成功" : "编辑成功",
  885. type: "success",
  886. });
  887. dialogVisible.value = false;
  888. submitLoading.value = false;
  889. getList();
  890. obtainStatisticalData();
  891. },
  892. (err) => {
  893. console.log(err);
  894. submitLoading.value = false;
  895. }
  896. );
  897. } else {
  898. ElMessage("请添加客户联系人");
  899. }
  900. });
  901. };
  902. const getDict = () => {
  903. proxy.getDictOne(["customer_tag", "customer_source", "customer_status", "contact_type"]).then((res) => {
  904. customerTag.value = res["customer_tag"].map((x) => ({
  905. label: x.dictValue,
  906. value: x.dictKey,
  907. }));
  908. customerSource.value = res["customer_source"].map((x) => ({
  909. label: x.dictValue,
  910. value: x.dictKey,
  911. }));
  912. customerStatus.value = res["customer_status"].map((x) => ({
  913. label: x.dictValue,
  914. value: x.dictKey,
  915. }));
  916. contactType.value = res["contact_type"].map((x) => ({
  917. label: x.dictValue,
  918. value: x.dictKey,
  919. }));
  920. });
  921. proxy
  922. .get("/tenantUser/list", {
  923. pageNum: 1,
  924. pageSize: 10000,
  925. tenantId: useUserStore().user.tenantId,
  926. })
  927. .then((res) => {
  928. userList.value = res.rows.map((item) => {
  929. return {
  930. label: item.nickName,
  931. value: item.userId,
  932. };
  933. });
  934. });
  935. };
  936. getDict();
  937. getList();
  938. const handleClickName = (row) => {
  939. proxy.$router.push({
  940. path: "/ERP/customer/portrait",
  941. query: {
  942. id: row.id,
  943. },
  944. });
  945. };
  946. const deleteFollow = (data) => {
  947. ElMessageBox.confirm("是否确认删除该跟进?", "提示", {
  948. confirmButtonText: "确定",
  949. cancelButtonText: "取消",
  950. type: "warning",
  951. }).then(() => {
  952. proxy
  953. .post("/customerFollowRecords/delete", {
  954. id: data.id,
  955. })
  956. .then(() => {
  957. ElMessage({
  958. message: "删除成功",
  959. type: "success",
  960. });
  961. getList();
  962. });
  963. });
  964. };
  965. const addTag = ref("");
  966. const judgeTagSelect = (data, val) => {
  967. if (data && data.length > 0) {
  968. if (data.includes(val)) {
  969. return true;
  970. }
  971. }
  972. return false;
  973. };
  974. const changeTag = (val, item) => {
  975. let data = {
  976. id: item.id,
  977. tag: JSON.parse(JSON.stringify(item.tag)),
  978. };
  979. data.tag.push(val);
  980. data.tag = data.tag.join(",");
  981. proxy.post("/customer/editTag", data).then(() => {
  982. ElMessage({
  983. message: "添加成功",
  984. type: "success",
  985. });
  986. item.addTagShow = false;
  987. addTag.value = "";
  988. getList();
  989. });
  990. };
  991. const tagClose = (val, item) => {
  992. let data = {
  993. id: item.id,
  994. tag: JSON.parse(JSON.stringify(item.tag)),
  995. };
  996. data.tag = data.tag.filter((row) => row !== val);
  997. if (data.tag && data.tag.length > 0) {
  998. data.tag = data.tag.join(",");
  999. } else {
  1000. data.tag = "";
  1001. }
  1002. proxy.post("/customer/editTag", data).then(() => {
  1003. ElMessage({
  1004. message: "添加成功",
  1005. type: "success",
  1006. });
  1007. item.addTagShow = false;
  1008. addTag.value = "";
  1009. getList();
  1010. });
  1011. };
  1012. const showSelect = (item) => {
  1013. item.addTagShow = true;
  1014. };
  1015. const clickFollowUp = (item) => {
  1016. formFollow.data = {
  1017. customerId: item.id,
  1018. fileList: [],
  1019. };
  1020. fileList.value = [];
  1021. modalType.value = "add";
  1022. openFollow.value = true;
  1023. openRecordMore.value = false;
  1024. };
  1025. const uploadFile = async (file) => {
  1026. const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
  1027. uploadData.value = res.uploadBody;
  1028. file.id = res.id;
  1029. file.fileName = res.fileName;
  1030. file.fileUrl = res.fileUrl;
  1031. return true;
  1032. };
  1033. const onPreviewFile = (file) => {
  1034. window.open(file.raw.fileUrl, "_blank");
  1035. };
  1036. const getStyle = (val) => {
  1037. if (val) {
  1038. return "跟进记录: " + val.replace(/\n|\r\n/g, "<br>");
  1039. } else {
  1040. return "";
  1041. }
  1042. };
  1043. const recordShow = (item) => {
  1044. if (!(item.fileList && item.fileList.length > 0)) {
  1045. proxy.post("/fileInfo/getList", { businessIdList: [item.id] }).then((fileObj) => {
  1046. item.fileList = fileObj[item.id] || [];
  1047. });
  1048. }
  1049. };
  1050. const openFile = (path) => {
  1051. window.open(path, "_blank");
  1052. };
  1053. const recordList = ref([]);
  1054. const rowData = ref({});
  1055. const openRecordMore = ref(false);
  1056. const queryParams = ref({
  1057. total: 0,
  1058. pageNum: 1,
  1059. pageSize: 10,
  1060. customerId: "",
  1061. });
  1062. const clickMore = (item) => {
  1063. if (openRecordMore.value === false) {
  1064. queryParams.value.pageNum = 1;
  1065. recordList.value = [];
  1066. rowData.value = item;
  1067. queryParams.value.customerId = item.id;
  1068. }
  1069. proxy.post("/customerFollowRecords/page", queryParams.value).then((res) => {
  1070. recordList.value = recordList.value.concat(res.rows);
  1071. queryParams.value.total = res.total;
  1072. proxy.post("/fileInfo/getList", { businessIdList: res.rows.map((rows) => rows.id) }).then((fileObj) => {
  1073. for (let i = 0; i < res.rows.length; i++) {
  1074. recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].fileList =
  1075. fileObj[recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].id] || [];
  1076. }
  1077. });
  1078. });
  1079. openRecordMore.value = true;
  1080. };
  1081. const infiniteScroll = () => {
  1082. queryParams.value.pageNum++;
  1083. clickMore();
  1084. };
  1085. const judgeTotal = () => {
  1086. if (queryParams.value.pageNum * queryParams.value.pageSize >= queryParams.value.total) {
  1087. return true;
  1088. }
  1089. return false;
  1090. };
  1091. const moreIndex = ref(0);
  1092. const clickInformationMore = (item, index) => {
  1093. moreIndex.value = index;
  1094. if (item.contactJson) {
  1095. item.contact = JSON.parse(item.contactJson);
  1096. } else {
  1097. item.contact = [];
  1098. }
  1099. formPerson.data = proxy.deepClone(item);
  1100. openPerson.value = true;
  1101. };
  1102. const clickDelete = (index) => {
  1103. formData.data.customerUserList.splice(index, 1);
  1104. };
  1105. const clickAddMoreInformation = () => {
  1106. if (formPerson.data.contact && formPerson.data.contact.length > 0) {
  1107. formPerson.data.contact.push({
  1108. type: "",
  1109. contactNo: "",
  1110. });
  1111. } else {
  1112. formPerson.data.contact = [
  1113. {
  1114. type: "",
  1115. contactNo: "",
  1116. },
  1117. ];
  1118. }
  1119. };
  1120. const clickInformationDelete = (index) => {
  1121. formPerson.data.contact.splice(index, 1);
  1122. };
  1123. const submitPerson = () => {
  1124. person.value.validate((valid) => {
  1125. if (valid) {
  1126. formPerson.data.contactJson = JSON.stringify(formPerson.data.contact);
  1127. formData.data.customerUserList[moreIndex.value] = formPerson.data;
  1128. openPerson.value = false;
  1129. }
  1130. });
  1131. };
  1132. const deleteTop = (item) => {
  1133. proxy.post("/customerTop/delete", { customerId: item.id }).then(() => {
  1134. item.isTop = 0;
  1135. });
  1136. };
  1137. const addTop = (item) => {
  1138. proxy.post("/customerTop/add", { customerId: item.id }).then(() => {
  1139. item.isTop = 1;
  1140. });
  1141. };
  1142. const searchItemSelect = (val) => {
  1143. sourceList.value.paginationTwo.statisticsType = val;
  1144. obtainStatisticalData();
  1145. };
  1146. const statisticalData = ref({
  1147. countAmount: 0,
  1148. customerList: [],
  1149. });
  1150. const obtainStatisticalData = () => {
  1151. proxy.post("/customer/sourceStatistics", sourceList.value.paginationTwo).then((res) => {
  1152. statisticalData.value = res;
  1153. });
  1154. };
  1155. obtainStatisticalData();
  1156. const getNum = (val) => {
  1157. let num = 0;
  1158. if (statisticalData.value.customerList && statisticalData.value.customerList.length > 0) {
  1159. statisticalData.value.customerList.map((item) => {
  1160. if (sourceList.value.paginationTwo.statisticsType === 1) {
  1161. if (item.source === val) {
  1162. num = item.count;
  1163. }
  1164. } else if (sourceList.value.paginationTwo.statisticsType === 2) {
  1165. if (item.status === val) {
  1166. num = item.count;
  1167. }
  1168. } else if (sourceList.value.paginationTwo.statisticsType === 3) {
  1169. if (item.userId === val) {
  1170. num = item.count;
  1171. }
  1172. }
  1173. });
  1174. }
  1175. return num;
  1176. };
  1177. const countrySearchData = ref([]);
  1178. const provinceSearchData = ref([]);
  1179. const citySearchData = ref([]);
  1180. const getCitySearchData = (id, type, isChange) => {
  1181. proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
  1182. if (type === "20") {
  1183. provinceSearchData.value = res;
  1184. if (isChange) {
  1185. sourceList.value.pagination.provinceId = "";
  1186. sourceList.value.pagination.provinceName = "";
  1187. sourceList.value.pagination.cityId = "";
  1188. sourceList.value.pagination.cityName = "";
  1189. }
  1190. } else if (type === "30") {
  1191. citySearchData.value = res;
  1192. if (isChange) {
  1193. sourceList.value.pagination.cityId = "";
  1194. sourceList.value.pagination.cityName = "";
  1195. }
  1196. } else {
  1197. countrySearchData.value = res;
  1198. }
  1199. });
  1200. };
  1201. getCitySearchData("0");
  1202. const openSearch = ref(false);
  1203. const formSearchConfig = computed(() => {
  1204. return [
  1205. {
  1206. type: "input",
  1207. prop: "name",
  1208. label: "客户名称",
  1209. itemType: "text",
  1210. },
  1211. {
  1212. type: "slot",
  1213. slotName: "address",
  1214. label: "所在城市",
  1215. },
  1216. {
  1217. type: "input",
  1218. prop: "customerCode",
  1219. label: "客户代码",
  1220. itemType: "text",
  1221. },
  1222. {
  1223. type: "select",
  1224. label: "客户来源",
  1225. prop: "source",
  1226. itemWidth: 50,
  1227. data: customerSource.value,
  1228. clearable: true,
  1229. },
  1230. {
  1231. type: "select",
  1232. label: "客户类型",
  1233. prop: "status",
  1234. itemWidth: 50,
  1235. data: customerStatus.value,
  1236. clearable: true,
  1237. },
  1238. {
  1239. type: "slot",
  1240. slotName: "tags",
  1241. label: "客户标签",
  1242. },
  1243. ];
  1244. });
  1245. const addSearchTag = ref("");
  1246. const addTagSearchShow = ref(false);
  1247. let copySearch = ref({});
  1248. const moreSearch = () => {
  1249. if (sourceList.value.pagination.tag) {
  1250. sourceList.value.pagination.tags = sourceList.value.pagination.tag.split(",");
  1251. } else {
  1252. sourceList.value.pagination.tags = [];
  1253. }
  1254. addTagSearchShow.value = false;
  1255. copySearch.value = proxy.deepClone(sourceList.value.pagination);
  1256. openSearch.value = true;
  1257. };
  1258. const cancelSearch = () => {
  1259. sourceList.value.pagination = copySearch.value;
  1260. openSearch.value = false;
  1261. };
  1262. const submitSearch = () => {
  1263. if (sourceList.value.pagination.tags && sourceList.value.pagination.tags.length > 0) {
  1264. sourceList.value.pagination.tag = sourceList.value.pagination.tags.join(",");
  1265. } else {
  1266. sourceList.value.pagination.tag = "";
  1267. }
  1268. openSearch.value = false;
  1269. sourceList.value.pagination.pageNum = 1;
  1270. getList();
  1271. };
  1272. const tagSearchClose = (val) => {
  1273. sourceList.value.pagination.tags = sourceList.value.pagination.tags.filter((item) => item !== val);
  1274. };
  1275. const changeSearchTag = (val) => {
  1276. sourceList.value.pagination.tags.push(val);
  1277. addTagSearchShow.value = false;
  1278. addSearchTag.value = "";
  1279. };
  1280. </script>
  1281. <style lang="scss" scoped>
  1282. .tenant {
  1283. padding: 20px;
  1284. }
  1285. .infinite-scroll {
  1286. max-height: calc(89vh - 94px - 70px - 58px - 16px);
  1287. overflow-y: auto;
  1288. &::-webkit-scrollbar {
  1289. width: 0px;
  1290. }
  1291. }
  1292. .by-dropdown {
  1293. position: relative;
  1294. text-align: left;
  1295. height: 32px;
  1296. z-index: 1010;
  1297. padding: 0 10px;
  1298. transition: all 0.5s ease;
  1299. cursor: pointer;
  1300. line-height: 32px;
  1301. .by-dropdown-title {
  1302. font-size: 14px;
  1303. background-color: #fff;
  1304. }
  1305. ul {
  1306. position: absolute;
  1307. left: 0;
  1308. top: 32px;
  1309. padding: 0;
  1310. margin: 0;
  1311. z-index: 1200;
  1312. display: none;
  1313. white-space: nowrap;
  1314. background-color: #fff;
  1315. li {
  1316. list-style: none;
  1317. z-index: 1200;
  1318. font-size: 12px;
  1319. height: 30px;
  1320. padding: 0 10px;
  1321. }
  1322. li:hover {
  1323. background-color: #eff6ff;
  1324. color: #0084ff;
  1325. }
  1326. }
  1327. }
  1328. .by-dropdown::before {
  1329. display: block;
  1330. width: 1px;
  1331. content: " ";
  1332. position: absolute;
  1333. height: 14px;
  1334. top: 8px;
  1335. background-color: #ddd;
  1336. right: 0;
  1337. z-index: 1011;
  1338. }
  1339. .by-dropdown:hover {
  1340. background: #ffffff;
  1341. border-radius: 2px 2px 2px 2px;
  1342. opacity: 1;
  1343. ul {
  1344. background: #ffffff;
  1345. box-shadow: 0px 2px 16px 1px rgba(0, 0, 0, 0.06);
  1346. border-radius: 2px 2px 2px 2px;
  1347. opacity: 1;
  1348. display: block;
  1349. text-align: left;
  1350. }
  1351. }
  1352. .by-dropdown-lists {
  1353. max-height: 50vh;
  1354. overflow-y: auto;
  1355. line-height: 1;
  1356. }
  1357. .statistics-text {
  1358. padding-left: 8px;
  1359. width: 152px;
  1360. overflow: hidden;
  1361. text-overflow: ellipsis;
  1362. white-space: nowrap;
  1363. }
  1364. </style>