index.vue 42 KB

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