index.vue 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
  4. <el-form-item label="企微公司" prop="corpId">
  5. <el-select v-model="queryParams.corpId" placeholder="企微公司" size="small" @change="updateCorpId()">
  6. <el-option
  7. v-for="dict in myQwCompanyList"
  8. :key="dict.dictValue"
  9. :label="dict.dictLabel"
  10. :value="dict.dictValue"
  11. />
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item label="客户名称" prop="name">
  15. <el-input
  16. v-model="queryParams.name"
  17. placeholder="请输入客户名称"
  18. clearable
  19. size="small"
  20. @keyup.enter.native="handleQuery"
  21. />
  22. </el-form-item>
  23. <el-form-item label="销售企微昵称" prop="qwUserName">
  24. <el-input
  25. v-model="queryParams.qwUserName"
  26. placeholder="请输入销售企微昵称"
  27. clearable
  28. size="small"
  29. @keyup.enter.native="handleQuery"
  30. @input="searchQwUser"
  31. @focus="showQwUserDropdown = true"
  32. @blur="hideDropdownWithDelay"
  33. @clear="onQwUserNameClear"
  34. />
  35. <!-- 下拉建议 -->
  36. <div v-if="showQwUserDropdown && qwUserSuggestions.length > 0" class="suggestion-box" @scroll="handleScroll">
  37. <div
  38. v-for="item in qwUserSuggestions"
  39. :key="item.dictValue"
  40. class="suggestion-item"
  41. @click="selectQwUser(item.dictValue,item.dictLabel)"
  42. >
  43. {{ item.dictLabel }}
  44. </div>
  45. </div>
  46. </el-form-item>
  47. <el-form-item label="用户类别" prop="type">
  48. <el-select v-model="queryParams.type" placeholder="请选择用户类别" clearable size="small">
  49. <el-option
  50. v-for="dict in typeOptions"
  51. :key="dict.dictValue"
  52. :label="dict.dictLabel"
  53. :value="dict.dictValue"
  54. />
  55. </el-select>
  56. </el-form-item>
  57. <el-form-item label="所属销售" prop="companyUser">
  58. <el-input
  59. v-model="queryParams.companyUser"
  60. placeholder="请输入昵称或者手机号"
  61. clearable
  62. size="small"
  63. @keyup.enter.native="handleQuery"
  64. />
  65. </el-form-item>
  66. <el-form-item label="性别" prop="gender">
  67. <el-select v-model="queryParams.gender" placeholder="状态" clearable size="small">
  68. <el-option
  69. v-for="dict in genderOptions"
  70. :key="dict.dictValue"
  71. :label="dict.dictLabel"
  72. :value="dict.dictValue"
  73. />
  74. </el-select>
  75. </el-form-item>
  76. <el-form-item label="客户等级" prop="level">
  77. <el-select v-model="queryParams.level" placeholder="客户等级" clearable size="small">
  78. <el-option
  79. v-for="dict in ratingType"
  80. :key="dict.dictValue"
  81. :label="dict.dictLabel"
  82. :value="dict.dictValue"
  83. />
  84. </el-select>
  85. </el-form-item>
  86. <el-form-item label="等级升降" prop="levelType">
  87. <el-select v-model="queryParams.levelType" placeholder="等级升降" clearable size="small">
  88. <el-option
  89. v-for="dict in ratingUpFall"
  90. :key="dict.dictValue"
  91. :label="dict.dictLabel"
  92. :value="dict.dictValue"
  93. />
  94. </el-select>
  95. </el-form-item>
  96. <el-form-item label="电话号码" prop="remarkMobiles">
  97. <el-input
  98. v-model="queryParams.remarkMobiles"
  99. placeholder="请输入备注电话号码"
  100. clearable
  101. size="small"
  102. @keyup.enter.native="handleQuery"
  103. />
  104. </el-form-item>
  105. <el-form-item label="来源" prop="addWay">
  106. <el-select v-model="queryParams.addWay" placeholder="来源" clearable size="small">
  107. <el-option
  108. v-for="dict in addWayOptions"
  109. :key="dict.dictValue"
  110. :label="dict.dictLabel"
  111. :value="dict.dictValue"
  112. />
  113. </el-select>
  114. </el-form-item>
  115. <el-form-item label="状态" prop="status">
  116. <el-select v-model="queryParams.status" placeholder="状态" clearable size="small">
  117. <el-option
  118. v-for="dict in statusOptions"
  119. :key="dict.dictValue"
  120. :label="dict.dictLabel"
  121. :value="dict.dictValue"
  122. />
  123. </el-select>
  124. </el-form-item>
  125. <el-form-item label="转接状态" prop="addWay">
  126. <el-select v-model="queryParams.transferStatus" placeholder="转接状态" clearable size="small">
  127. <el-option
  128. v-for="dict in transferStatusOptions"
  129. :key="dict.dictValue"
  130. :label="dict.dictLabel"
  131. :value="dict.dictValue"
  132. />
  133. </el-select>
  134. </el-form-item>
  135. <el-form-item label="是否绑定会员" prop="isBindMini">
  136. <el-select v-model="queryParams.isBindMini" placeholder="是否绑定会员" clearable size="small" @change="handleQuery" >
  137. <el-option
  138. v-for="dict in isBindMiniOptions"
  139. :key="dict.dictValue"
  140. :label="dict.dictLabel"
  141. :value="dict.dictValue"
  142. />
  143. </el-select>
  144. </el-form-item>
  145. <el-form-item label="标签" prop="tagIds">
  146. <!-- <el-select v-model="selectTags" remote multiple placeholder="请选择" filterable style="width: 100%;">-->
  147. <!-- <el-option-->
  148. <!-- v-for="dict in tagList"-->
  149. <!-- :label="dict.name"-->
  150. <!-- :value="dict.tagId">-->
  151. <!-- </el-option>-->
  152. <!-- </el-select>-->
  153. <div @click="hangleChangeTags()" style="cursor: pointer; border: 1px solid #e6e6e6; background-color: white; overflow: hidden; flex-grow: 1;width: 250px">
  154. <div style="min-height: 35px; max-height: 200px; overflow-y: auto;">
  155. <el-tag type="success"
  156. closable
  157. :disable-transitions="false"
  158. v-for="list in this.selectTags"
  159. :key="list.tagId"
  160. @close="handleCloseTags(list)"
  161. style="margin: 3px;"
  162. >{{list.name}}
  163. </el-tag>
  164. </div>
  165. </div>
  166. </el-form-item>
  167. <el-form-item label="备注" prop="remark">
  168. <el-input
  169. v-model="queryParams.remark"
  170. placeholder="请输入备注"
  171. clearable
  172. size="small"
  173. @keyup.enter.native="handleQuery"
  174. />
  175. </el-form-item>
  176. <el-form-item label="添加时间" prop="createTime">
  177. <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
  178. </el-form-item>
  179. <el-form-item label="流失时间" prop="lossTime">
  180. <el-date-picker clearable size="small"
  181. v-model="queryParams.lossTime"
  182. type="date"
  183. value-format="yyyy-MM-dd"
  184. placeholder="选择流失时间">
  185. </el-date-picker>
  186. </el-form-item>
  187. <el-form-item label="删除时间" prop="delTime">
  188. <el-date-picker clearable size="small"
  189. v-model="queryParams.delTime"
  190. type="date"
  191. value-format="yyyy-MM-dd"
  192. placeholder="选择删除时间">
  193. </el-date-picker>
  194. </el-form-item>
  195. <el-form-item>
  196. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  197. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  198. </el-form-item>
  199. </el-form>
  200. <el-row :gutter="10" class="mb8">
  201. <!-- <el-col :span="1.5">
  202. <el-button
  203. type="primary"
  204. plain
  205. icon="el-icon-plus"
  206. size="mini"
  207. @click="handleAdd"
  208. v-hasPermi="['qw:externalContact:add']"
  209. >同步</el-button>
  210. </el-col> -->
  211. <el-col :span="1.5">
  212. <el-button
  213. type="success"
  214. plain
  215. icon="el-icon-edit"
  216. size="mini"
  217. @click="handleBatchUpdateNotes"
  218. v-hasPermi="['qw:externalContact:edit']"
  219. >批量修改备注
  220. </el-button>
  221. </el-col>
  222. <el-col :span="1.5">
  223. <el-button
  224. type="success"
  225. plain
  226. icon="el-icon-edit"
  227. size="mini"
  228. @click="handleBatchUpdateNotesFilter"
  229. v-hasPermi="['qw:externalContact:edit']"
  230. >批量修改备注(筛选条件)
  231. </el-button>
  232. </el-col>
  233. <el-col :span="1.5">
  234. <el-button
  235. type="success"
  236. plain
  237. icon="el-icon-edit"
  238. size="mini"
  239. :disabled="single"
  240. @click="handleUpdate"
  241. v-hasPermi="['qw:externalContact:edit']"
  242. >修改备注</el-button>
  243. </el-col>
  244. <el-col :span="1.5">
  245. <el-button
  246. type="warning"
  247. plain
  248. icon="el-icon-download"
  249. size="mini"
  250. :loading="exportLoading"
  251. @click="handleExport"
  252. v-hasPermi="['qw:externalContact:export']"
  253. >导出</el-button>
  254. </el-col>
  255. <el-col :span="1.5">
  256. <el-button
  257. type="primary"
  258. plain
  259. size="mini"
  260. @click="addUserTag"
  261. v-hasPermi="['qw:externalContact:addTag']"
  262. >批量添加标签</el-button>
  263. </el-col>
  264. <el-col :span="1.5">
  265. <el-button
  266. type="primary"
  267. plain
  268. size="mini"
  269. @click="delUserTag"
  270. v-hasPermi="['qw:externalContact:delTag']"
  271. >批量移除标签</el-button>
  272. </el-col>
  273. <el-col :span="1.5">
  274. <el-button
  275. type="primary"
  276. plain
  277. size="mini"
  278. @click="updateTalk"
  279. v-hasPermi="['qw:externalContactInfo:updateTalk']"
  280. >批量更改交流状态</el-button>
  281. </el-col>
  282. <!-- <el-col :span="1.5">-->
  283. <!-- <el-button-->
  284. <!-- type="primary"-->
  285. <!-- plain-->
  286. <!-- size="mini"-->
  287. <!-- @click="setUserCourseSop"-->
  288. <!-- v-hasPermi="['qw:externalContact:setCourseSop']"-->
  289. <!-- >批量设置课程SOP</el-button>-->
  290. <!-- </el-col>-->
  291. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  292. </el-row>
  293. <!-- <el-tabs type="card" v-model="isBindActiveName" @tab-click="handleClickX">-->
  294. <!-- <el-tab-pane label="全部" name="all"></el-tab-pane>-->
  295. <!-- <el-tab-pane label="已绑定CRM" name="isBind"></el-tab-pane>-->
  296. <!-- <el-tab-pane label="未绑定CRM" name="noBind"></el-tab-pane>-->
  297. <!-- </el-tabs>-->
  298. <el-table v-loading="loading" :data="externalContactList" @selection-change="handleSelectionChange" border>
  299. <el-table-column type="selection" width="55" align="center" />
  300. <el-table-column label="企微客户ID" align="center" prop="id" />
  301. <el-table-column label="企微客户头像" align="center" prop="avatar" width="100px">
  302. <template slot-scope="scope">
  303. <el-popover
  304. placement="right"
  305. title=""
  306. trigger="hover">
  307. <img slot="reference" :src="scope.row.avatar" width="60px">
  308. <img :src="scope.row.avatar" style="max-width: 200px;">
  309. </el-popover>
  310. </template>
  311. </el-table-column>
  312. <el-table-column label="企微客户名称" prop="name" width="110px"/>
  313. <el-table-column label="客户称呼" prop="stageStatus" width="110px"/>
  314. <el-table-column label="销售企微昵称" align="center" prop="qwUserName" width="120px"/>
  315. <el-table-column label="企微部门" align="center" prop="departmentName" width="120px"/>
  316. <el-table-column label="用户类别" align="center" prop="type">
  317. <template slot-scope="scope">
  318. <dict-tag :options="typeOptions" :value="scope.row.type"/>
  319. </template>
  320. </el-table-column>
  321. <el-table-column label="性别" align="center" prop="gender">
  322. <template slot-scope="scope">
  323. <dict-tag :options="genderOptions" :value="scope.row.gender"/>
  324. </template>
  325. </el-table-column>
  326. <el-table-column label="备注" align="center" prop="remark" />
  327. <el-table-column label="描述信息" align="center" prop="description" />
  328. <el-table-column label="标签" align="center" prop="tagIdsName" width="300px">
  329. <!-- <template slot-scope="scope">-->
  330. <!-- <div v-for="name in scope.row.tagIdsName" style="display: inline;">-->
  331. <!-- <el-tag type="success">{{ name }}</el-tag>-->
  332. <!-- </div>-->
  333. <!-- </template>-->
  334. <template slot-scope="scope">
  335. <div class="tag-container">
  336. <div class="tag-list">
  337. <el-tag
  338. v-for="name in scope.row.tagIdsName"
  339. :key="name"
  340. type="success"
  341. size="small"
  342. >
  343. {{ name }}
  344. </el-tag>
  345. </div>
  346. </div>
  347. </template>
  348. </el-table-column>
  349. <el-table-column label="是否回复" align="center" prop="isReply" width="120px" >
  350. <template slot-scope="scope">
  351. <span v-if="scope.row.isReply === 1"><el-tag type="success">已回复</el-tag></span>
  352. <span v-else-if="scope.row.isReply === 0"><el-tag type="info">未回复</el-tag></span>
  353. <span v-else>{{ scope.row.isReply }}</span>
  354. </template>
  355. </el-table-column>
  356. <el-table-column label="状态" align="center" prop="status" width="120px" >
  357. <template slot-scope="scope">
  358. <dict-tag :options="statusOptions" :value="scope.row.status"/>
  359. </template>
  360. </el-table-column>
  361. <el-table-column label="客户等级" align="center" prop="level" width="120px" >
  362. <template slot-scope="scope">
  363. <dict-tag :options="ratingType" :value="scope.row.level"/>
  364. </template>
  365. </el-table-column>
  366. <el-table-column label="等级状态" align="center" prop="levelType" width="120px" >
  367. <template slot-scope="scope">
  368. <dict-tag :options="ratingUpFall" :value="scope.row.levelType"/>
  369. </template>
  370. </el-table-column>
  371. <el-table-column label="添加时间" align="center" prop="createTime" width="100px" />
  372. <el-table-column label="流失时间" align="center" prop="lossTime" width="100px" />
  373. <el-table-column label="删除时间" align="center" prop="delTime" width="100px" />
  374. <el-table-column label="注册时间" align="center" prop="registerTime" width="100px" />
  375. <el-table-column label="备注电话号码" align="center" prop="remarkMobiles" width="150px">
  376. <template slot-scope="scope">
  377. <div v-for="i in JSON.parse(scope.row.remarkMobiles)" :key="i">{{i}}</div>
  378. </template>
  379. </el-table-column>
  380. <el-table-column label="备注企业名称" align="center" prop="remarkCorpName" />
  381. <el-table-column label="来源" align="center" prop="addWay" width="100px">
  382. <template slot-scope="scope">
  383. <dict-tag :options="addWayOptions" :value="scope.row.addWay"/>
  384. </template>
  385. </el-table-column>
  386. <el-table-column label="转接状态" align="center" prop="transferStatus" width="100px" >
  387. <template slot-scope="scope">
  388. <dict-tag :options="transferStatusOptions" :value="scope.row.transferStatus"/>
  389. </template>
  390. </el-table-column>
  391. <el-table-column label="企业id" align="center" prop="corpId" />
  392. <el-table-column label="是否绑定会员" width="100px" align="center" fixed="right">
  393. <template slot-scope="scope">
  394. <el-tag v-if="scope.row.fsUserId" >已绑定</el-tag>
  395. <el-tag v-else type="info"> 未绑定</el-tag>
  396. </template>
  397. </el-table-column>
  398. <el-table-column label="修改" align="center" class-name="small-padding fixed-width" width="120px" fixed="right">
  399. <template slot-scope="scope">
  400. <el-button
  401. v-if="scope.row.status==0||scope.row.status==2"
  402. size="mini"
  403. type="text"
  404. icon="el-icon-edit"
  405. @click="handleUpdate(scope.row)"
  406. v-hasPermi="['qw:externalContact:edit']"
  407. >修改备注</el-button>
  408. <el-button
  409. size="mini"
  410. type="text"
  411. icon="el-icon-user-solid"
  412. @click="handleAppellation(scope.row)"
  413. >修改客户称呼</el-button>
  414. </template>
  415. </el-table-column>
  416. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120px" fixed="right">
  417. <template slot-scope="scope">
  418. <!-- <el-button-->
  419. <!-- size="mini"-->
  420. <!-- type="text"-->
  421. <!-- icon="el-icon-edit-outline"-->
  422. <!-- @click="handleUpdateCustomer(scope.row)"-->
  423. <!-- >-->
  424. <!-- <span v-if="scope.row.customerId">换绑CRM</span>-->
  425. <!-- <span v-else>绑定CRM</span>-->
  426. <!-- </el-button>-->
  427. <el-button
  428. size="mini"
  429. type="text"
  430. icon="el-icon-edit-outline"
  431. @click="handleUpdateUser(scope.row)"
  432. >
  433. <span v-if="scope.row.fsUserId">换绑会员</span>
  434. <span v-else>绑定会员</span>
  435. </el-button>
  436. <el-button
  437. v-if="scope.row.fsUserId"
  438. size="mini"
  439. type="text"
  440. icon="el-icon-thumb"
  441. @click="handleUnBindUserId(scope.row)"
  442. v-hasPermi="['qw:externalContact:unBindUserId']"
  443. >
  444. <span>解除会员绑定</span>
  445. </el-button>
  446. <!-- <el-button v-if="scope.row.customerId"-->
  447. <!-- size="mini"-->
  448. <!-- type="text"-->
  449. <!-- icon="el-icon-paperclip"-->
  450. <!-- @click="handleShow(scope.row)"-->
  451. <!-- >CRM客户详情</el-button>-->
  452. <el-button
  453. size="mini"
  454. type="text"
  455. @click="handledetails(scope.row)"
  456. >AI获取用户信息
  457. </el-button>
  458. </template>
  459. </el-table-column>
  460. </el-table>
  461. <pagination
  462. v-show="total>0"
  463. :total="total"
  464. :page.sync="queryParams.pageNum"
  465. :limit.sync="queryParams.pageSize"
  466. @pagination="getList"
  467. />
  468. <el-drawer size="75%" :title="show.title" :visible.sync="show.open">
  469. <customer-details ref="customerDetails" @refreshList="refreshList"/>
  470. </el-drawer>
  471. <!-- 搜索标签 -->
  472. <el-dialog :title="changeTagDialog.title" :visible.sync="changeTagDialog.open" style="width:100%;height: 100%" append-to-body>
  473. <div>搜索标签:
  474. <el-input v-model="queryTagParams.name" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
  475. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(queryTagParams.name)">搜索</el-button>
  476. <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
  477. </div>
  478. <div v-for="item in tagGroupList" :key="item.id" >
  479. <div style="font-size: 20px;margin-top: 20px;margin-bottom: 20px;">
  480. <span class="name-background">{{ item.name }}</span>
  481. </div>
  482. <!-- 添加外层滚动容器 -->
  483. <div class="scroll-wrapper">
  484. <div class="tag-container">
  485. <a
  486. v-for="tagItem in item.tag"
  487. class="tag-box"
  488. @click="tagSelection(tagItem)"
  489. :class="{ 'tag-selected': tagItem.isSelected }"
  490. >
  491. {{ tagItem.name }}
  492. </a>
  493. </div>
  494. </div>
  495. </div>
  496. <pagination
  497. v-show="tagTotal>0"
  498. :total="tagTotal"
  499. :page.sync="queryTagParams.pageNum"
  500. :limit.sync="queryTagParams.pageSize"
  501. @pagination="getPageListTagGroup"
  502. />
  503. <div slot="footer" class="dialog-footer">
  504. <el-button type="primary" @click="tagSubmitForm()">确 定</el-button>
  505. <el-button @click="tagCancel()">取消</el-button>
  506. </div>
  507. </el-dialog>
  508. <el-dialog title="批量添加标签" :visible.sync="tagOpen" width="800px" append-to-body>
  509. <div>搜索标签:
  510. <el-input v-model="tagChange.tagName" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
  511. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(tagChange.tagName)">搜索</el-button>
  512. <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
  513. </div>
  514. <el-form ref="form" :model="addTagForm" label-width="80px">
  515. <div v-for="item in tagGroupList" :key="item.id" >
  516. <div style="font-size: 20px;margin-top: 20px;margin-bottom: 20px;">
  517. <span class="name-background">{{ item.name }}</span>
  518. </div>
  519. <!-- 添加外层滚动容器 -->
  520. <div class="scroll-wrapper">
  521. <div class="tag-container">
  522. <a
  523. v-for="tagItem in item.tag"
  524. class="tag-box"
  525. @click="tagSelection(tagItem)"
  526. :class="{ 'tag-selected': tagItem.isSelected }"
  527. >
  528. {{ tagItem.name }}
  529. </a>
  530. </div>
  531. </div>
  532. </div>
  533. </el-form>
  534. <pagination
  535. v-show="tagTotal>0"
  536. :total="tagTotal"
  537. :page.sync="queryTagParams.pageNum"
  538. :limit.sync="queryTagParams.pageSize"
  539. @pagination="getPageListTagGroup"
  540. />
  541. <div slot="footer" class="dialog-footer">
  542. <el-button type="primary" @click="addTagSubmitForm()">确 定</el-button>
  543. <el-button @click="addTagCancel">取 消</el-button>
  544. </div>
  545. </el-dialog>
  546. <el-dialog title="批量添加客户备注" :visible.sync="notesOpen.open" width="800px" append-to-body>
  547. <el-card>
  548. <el-row>
  549. <el-col>
  550. <el-radio-group v-model="notesOpen.nameType" style="margin-bottom: 2%">
  551. <el-radio :label="1">
  552. 客户名称添加在【新备注】【前】
  553. </el-radio>
  554. <el-radio :label="2">
  555. 客户名称添加在【新备注】【后】
  556. </el-radio>
  557. <el-radio :label="3">
  558. 不添加客户名称
  559. </el-radio>
  560. </el-radio-group>
  561. </el-col>
  562. <el-col>
  563. <el-radio-group v-model="notesOpen.type">
  564. <el-radio
  565. :label="1"
  566. >添加【新备注】在最【前】面
  567. </el-radio>
  568. <el-radio
  569. :label="2"
  570. >添加【新备注】在最【后】面
  571. </el-radio>
  572. <el-radio
  573. :label="3"
  574. >替换所有备注
  575. </el-radio>
  576. </el-radio-group>
  577. </el-col>
  578. <el-col>
  579. <el-input v-model="notesOpen.notes" placeholder="请输入客户备注(最多20个字,含已有的)" clearable size="small"
  580. maxlength="20" show-word-limit style="width: 500px;margin-top: 3%"/>
  581. <div style="color: #999;font-size: 14px;display: flex;align-items: center;">
  582. <i class="el-icon-info"></i>
  583. 由于企业微信官方限制,备注最多20个字,且自动会去除末尾超出的字
  584. </div>
  585. </el-col>
  586. </el-row>
  587. </el-card>
  588. <div slot="footer" class="dialog-footer">
  589. <el-button type="primary" @click="notesSubmitForm()">确 定</el-button>
  590. <el-button @click="notesCancel()">取消</el-button>
  591. </div>
  592. </el-dialog>
  593. <el-dialog title="批量移除标签" :visible.sync="tagDelOpen" width="800px" append-to-body>
  594. <div>搜索标签:
  595. <el-input v-model="tagChange.tagName" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
  596. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(tagChange.tagName)">搜索</el-button>
  597. <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
  598. </div>
  599. <el-form ref="form" :model="addTagForm" label-width="80px">
  600. <div v-for="item in tagGroupList" :key="item.id" >
  601. <div style="font-size: 20px;margin-top: 20px;margin-bottom: 20px;">
  602. <span class="name-background">{{ item.name }}</span>
  603. </div>
  604. <!-- 添加外层滚动容器 -->
  605. <div class="scroll-wrapper">
  606. <div class="tag-container">
  607. <a
  608. v-for="tagItem in item.tag"
  609. class="tag-box"
  610. @click="tagSelection(tagItem)"
  611. :class="{ 'tag-selected': tagItem.isSelected }"
  612. >
  613. {{ tagItem.name }}
  614. </a>
  615. </div>
  616. </div>
  617. </div>
  618. </el-form>
  619. <pagination
  620. v-show="tagTotal>0"
  621. :total="tagTotal"
  622. :page.sync="queryTagParams.pageNum"
  623. :limit.sync="queryTagParams.pageSize"
  624. @pagination="getPageListTagGroup"
  625. />
  626. <div slot="footer" class="dialog-footer">
  627. <el-button type="primary" @click="tagDelSubmitForm()">确 定</el-button>
  628. <el-button @click="DelTagCancel">取 消</el-button>
  629. </div>
  630. </el-dialog>
  631. <!-- 添加或修改企业微信客户对话框 -->
  632. <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
  633. <el-form ref="form" :model="form" :rules="rules" label-width="100px">
  634. <el-form-item label="备注" prop="remark">
  635. <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
  636. </el-form-item>
  637. <el-form-item label="描述信息" prop="description">
  638. <el-input v-model="form.description" type="textarea" :rows="3" placeholder="请输入描述信息" />
  639. </el-form-item>
  640. <el-form-item label="备注电话号码" prop="remarkMobiles">
  641. <el-tag
  642. :key="tag"
  643. v-for="tag in remarkMobiles"
  644. closable
  645. :disable-transitions="false"
  646. @close="handleClose(tag)">
  647. {{tag}}
  648. </el-tag>
  649. <el-input
  650. style="width:110px"
  651. class="input-new-tag"
  652. v-if="inputVisible"
  653. v-model="inputValue"
  654. ref="saveTagInput"
  655. size="small"
  656. @keyup.enter.native="handleInputConfirm"
  657. @blur="handleInputConfirm"
  658. >
  659. </el-input>
  660. <el-button v-else class="button-new-tag" size="small" style="width: 110px" @click="showInput">新增电话</el-button>
  661. </el-form-item>
  662. <el-form-item label="备注企业名称" prop="remarkCorpName">
  663. <el-input v-model="form.remarkCorpName" placeholder="请输入备注企业名称" />
  664. </el-form-item>
  665. </el-form>
  666. <div slot="footer" class="dialog-footer">
  667. <el-button type="primary" @click="submitForm">确 定</el-button>
  668. <el-button @click="cancel">取 消</el-button>
  669. </div>
  670. </el-dialog>
  671. <el-dialog :title="callOpen.title" :visible.sync="callOpen.open" width="500px" append-to-body>
  672. <el-form ref="callOpenFrom" :model="callOpenFrom" :rules="callOpenRule" label-width="110px">
  673. <el-form-item label="客户称呼" prop="stageStatus">
  674. <el-input v-model="callOpenFrom.stageStatus" placeholder="请输入客户称呼" />
  675. </el-form-item>
  676. </el-form>
  677. <div slot="footer" class="dialog-footer" >
  678. <el-button type="primary" @click="submitCallOpenFrom">确 定</el-button>
  679. </div>
  680. </el-dialog>
  681. <!-- 绑定客户 -->
  682. <el-dialog :title="bindCustomer.title" :visible.sync="bindCustomer.open" width="1200px" append-to-body>
  683. <mycustomer ref="mycustomer" @bindCustomerId="bindCustomerId"></mycustomer>
  684. </el-dialog>
  685. <!-- 设置一个课程sop-->
  686. <el-dialog :title="setSop.title" :visible.sync="setSop.open" width="1200px" append-to-body>
  687. <SopDialog ref="SopDialog" @bindCourseSop="bindCourseSop"></SopDialog>
  688. </el-dialog>
  689. <el-dialog :title="user.title" :visible.sync="user.open" width="800px" append-to-body>
  690. <selectUser ref="selectUser" @bindMiniCustomerId="bindMiniCustomerId"></selectUser>
  691. </el-dialog>
  692. <el-dialog :title="info.title" :visible.sync="info.open" width="1100px" append-to-body>
  693. <info ref="Details" />
  694. </el-dialog>
  695. </div>
  696. </template>
  697. <script>
  698. import {
  699. bindUserId,
  700. addTag,
  701. delTag,
  702. batchUpdateExternalContactNotes,
  703. listExternalContact,
  704. getExternalContact,
  705. delExternalContact,
  706. addExternalContact,
  707. updateExternalContact,
  708. exportExternalContact,
  709. editbindCustomer,
  710. setCustomerCourseSop,
  711. getCustomerCourseSop,
  712. setCustomerCourseSopList,
  713. unBindUserId, updateExternalContactCall
  714. } from '@/api/qw/externalContact'
  715. import {getMyQwUserList, getMyQwCompanyList, updateUser,getQwUserListLikeName} from "@/api/qw/user";
  716. import {listTag, getTag, searchTags,} from "@/api/qw/tag";
  717. import { allListTagGroup} from "@/api/qw/tagGroup";
  718. import mycustomer from '@/views/qw/externalContact/mycustomer'
  719. import customerDetails from '@/views/qw/externalContact/customerDetails'
  720. import SopDialog from '@/views/course/sop/SopDialog.vue'
  721. import selectUser from "@/views/qw/externalContact/selectUser.vue";
  722. import info from "@/views/qw/externalContact/info.vue";
  723. import { editTalk } from "@/api/qw/externalContactInfo";
  724. import PaginationMore from "../../../components/PaginationMore/index.vue";
  725. export default {
  726. name: "ExternalContact",
  727. components:{PaginationMore, mycustomer,customerDetails,SopDialog,selectUser,info},
  728. data() {
  729. return {
  730. notesOpen: {
  731. type: 1,
  732. nameType: 3,
  733. addType: 0,
  734. filter: false,
  735. open: false,
  736. notes: null,
  737. },
  738. user:{
  739. open:false,
  740. title:"修改客户"
  741. },
  742. userForm:{
  743. id:null,
  744. fsUserId:null,
  745. },
  746. info:{
  747. title:"用户信息",
  748. open:false,
  749. },
  750. // ...其他已有数据
  751. qwUserSuggestions: [], // 已展示的数据
  752. showQwUserDropdown: false, // 控制下拉框显示
  753. qwUserLoading: false, // 加载状态
  754. qwUserNoMore: false, // 是否还有更多数据
  755. qwUserPageNum: 1, // 当前页码
  756. qwUserPageSize: 10, // 每页数量
  757. qwUserTotal: 0, // 总数
  758. isBindMiniOptions:[
  759. {dictLabel:"已绑定",dictValue:'isBindMini'},
  760. {dictLabel:"未绑定",dictValue:'noBindMini'},
  761. ],
  762. //标签弹窗选择
  763. tagChange:{
  764. open:false,
  765. index:null,
  766. },
  767. sTime:null,
  768. eTime:null,
  769. createTime:null,
  770. // 遮罩层
  771. loading: false,
  772. // 导出遮罩层
  773. exportLoading: false,
  774. tagOpen:false,
  775. tagDelOpen:false,
  776. // 选中数组
  777. ids: [],
  778. isBindActiveName:"all",
  779. remarkMobiles: [],
  780. inputVisible: false,
  781. inputValue: '',
  782. // 非单个禁用
  783. single: true,
  784. tagGroupList: [],
  785. // 非多个禁用
  786. multiple: true,
  787. // 显示搜索条件
  788. showSearch: true,
  789. // 总条数
  790. total: 0,
  791. // 企业微信客户表格数据
  792. externalContactList: [],
  793. // 弹出层标题
  794. title: "",
  795. // 是否显示弹出层
  796. open: false,
  797. // 用户类别字典
  798. typeOptions: [],
  799. ratingType: [],
  800. ratingUpFall: [],
  801. // 性别字典
  802. genderOptions: [],
  803. addTagForm:{
  804. userIds:[],
  805. tagIds:[]
  806. },
  807. myQwCompanyList:[],
  808. show:{
  809. title:"客户详情",
  810. open:false,
  811. },
  812. //存储选择的客户
  813. chooseCustomerSOP:null,
  814. setSop:{
  815. title:"选择课节SOP",
  816. open:false,
  817. //区分单选1还是多选2
  818. type:null,
  819. },
  820. //合成的客户-课节SOP参数
  821. customerCourseForm:{},
  822. //查询是否已经设置过客户-某个课节的SOP
  823. customerCourseFormLogs:{},
  824. //绑定客户
  825. bindCustomer:{
  826. title:null,
  827. open:false,
  828. },
  829. callOpen:{
  830. open:false,
  831. title: '修改客户称呼',
  832. },
  833. callOpenFrom:{
  834. id:null,
  835. stageStatus:null,
  836. },
  837. callOpenRule:{
  838. stageStatus:[{required:true,message:"员工称呼不能为空",trigger:"blur"}]
  839. },
  840. //绑定的参数表
  841. qwFormCustomer:{
  842. externalContactId:null,
  843. customerId:null,
  844. },
  845. // 来源字典
  846. addWayOptions: [],
  847. //标签
  848. changeTagDialog:{
  849. title:"",
  850. open:false,
  851. },
  852. queryTagParams:{
  853. pageNum: 1,
  854. pageSize: 5,
  855. total:0,
  856. name:null,
  857. corpId:null,
  858. },
  859. tagTotal:0,
  860. // 查询参数
  861. queryParams: {
  862. pageNum: 1,
  863. pageSize: 10,
  864. userId: null,
  865. qwUserName:null,
  866. externalUserId: null,
  867. name: null,
  868. avatar: null,
  869. type: null,
  870. qwUserId:null,
  871. gender: null,
  872. description: null,
  873. tagIds: null,
  874. remark:null,
  875. remarkMobiles: null,
  876. remarkCorpName: null,
  877. addWay: null,
  878. operUserid: null,
  879. corpId: null,
  880. companyId: null,
  881. status:null,
  882. transferStatus:null,
  883. isBind:null,
  884. isBindMini:null,
  885. lossTime:null,
  886. sTime:null,
  887. eTime:null,
  888. createTime:null,
  889. level:null,
  890. levelType:null,
  891. companyUser:null
  892. },
  893. selectTags:[],
  894. // 表单参数
  895. form: {},
  896. tagList:[],
  897. transferStatusOptions:[],
  898. statusOptions:[],
  899. // 表单校验
  900. rules: {
  901. }
  902. };
  903. },
  904. created() {
  905. this.getDicts("sys_qw_externalContact_type").then(response => {
  906. this.typeOptions = response.data;
  907. });
  908. this.getDicts("sys_qw_sop_rating_type").then(response => {
  909. this.ratingType = response.data;
  910. });
  911. this.getDicts("sys_qw_sop_rating_upFall").then(response => {
  912. this.ratingUpFall = response.data;
  913. });
  914. getMyQwCompanyList().then(response => {
  915. this.myQwCompanyList = response.data;
  916. if(this.myQwCompanyList!=null){
  917. this.queryParams.corpId=this.myQwCompanyList[0].dictValue
  918. var listTagFrom={corpId:this.queryParams.corpId}
  919. listTag(listTagFrom).then(response => {
  920. this.tagList = response.rows;
  921. });
  922. this.getList();
  923. }
  924. });
  925. this.getDicts("sys_sex").then(response => {
  926. this.genderOptions = response.data;
  927. });
  928. this.getDicts("sys_qw_externalContact_addWay").then(response => {
  929. this.addWayOptions = response.data;
  930. });
  931. this.getDicts("sys_qw_external_contact_status").then(response => {
  932. this.statusOptions = response.data;
  933. });
  934. this.getDicts("sys_qw_transfer_status").then(response => {
  935. this.transferStatusOptions = response.data;
  936. });
  937. },
  938. methods: {
  939. onQwUserNameClear() {
  940. this.queryParams.qwUserId = null; // 同时清空 qwUserId
  941. },
  942. // 搜索企微用户
  943. searchQwUser(query) {
  944. if (!query.trim()) {
  945. this.qwUserSuggestions = [];
  946. this.showQwUserDropdown = false;
  947. this.qwUserNoMore = false;
  948. this.qwUserPageNum = 1;
  949. return;
  950. }
  951. this.queryParams.qwUserName = query;
  952. this.qwUserPageNum = 1;
  953. this.qwUserNoMore = false;
  954. this.qwUserSuggestions = [];
  955. this.fetchQwUsers(query);
  956. },
  957. fetchQwUsers(query) {
  958. const params = {
  959. qwUserName: query,
  960. pageNum: this.qwUserPageNum,
  961. pageSize: this.qwUserPageSize
  962. };
  963. this.qwUserLoading = true;
  964. getQwUserListLikeName(params).then(res => {
  965. const list = res.data.list || [];
  966. const total = res.data.total || 0;
  967. this.qwUserSuggestions = [...this.qwUserSuggestions, ...list];
  968. this.qwUserTotal = total;
  969. // 判断是否还有更多数据
  970. if (this.qwUserSuggestions.length >= total) {
  971. this.qwUserNoMore = true;
  972. }
  973. this.showQwUserDropdown = true;
  974. }).finally(() => {
  975. this.qwUserLoading = false;
  976. });
  977. },
  978. // 选择企微用户
  979. selectQwUser(key,value) {
  980. this.queryParams.qwUserName = value;
  981. this.queryParams.qwUserId = key;
  982. this.showQwUserDropdown = false;
  983. this.handleQuery(); // 可选:自动触发查询
  984. },
  985. // 延迟隐藏下拉框,防止点击失效
  986. hideDropdownWithDelay() {
  987. setTimeout(() => {
  988. this.showQwUserDropdown = false;
  989. }, 200);
  990. },
  991. handleScroll(e) {
  992. const container = e.target;
  993. const scrollTop = container.scrollTop;
  994. const scrollHeight = container.scrollHeight;
  995. const clientHeight = container.clientHeight;
  996. // 距离底部小于 20px 触发加载
  997. if (scrollHeight - scrollTop - clientHeight < 20 && !this.qwUserLoading && !this.qwUserNoMore) {
  998. this.qwUserPageNum += 1;
  999. this.fetchQwUsers(this.queryParams.qwUserName);
  1000. }
  1001. },
  1002. change(){
  1003. if(this.createTime!=null){
  1004. this.queryParams.sTime=this.createTime[0];
  1005. this.queryParams.eTime=this.createTime[1];
  1006. }else{
  1007. this.queryParams.sTime=null;
  1008. this.queryParams.eTime=null;
  1009. }
  1010. },
  1011. updateCorpId(){
  1012. var listTagFrom={corpId:this.queryParams.corpId}
  1013. listTag(listTagFrom).then(response => {
  1014. this.tagList = response.rows;
  1015. });
  1016. this.getList();
  1017. },
  1018. /** 查询企业微信客户列表 */
  1019. getList() {
  1020. this.loading = true;
  1021. const { qwUserName, ...queryParams } = this.queryParams;
  1022. listExternalContact(queryParams).then(response => {
  1023. this.externalContactList = response.rows;
  1024. this.total = response.total;
  1025. this.loading = false;
  1026. });
  1027. },
  1028. bindMiniCustomerId(row){
  1029. console.log(row)
  1030. this.userForm.fsUserId=row;
  1031. bindUserId(this.userForm).then(res=>{
  1032. if (res.code==200){
  1033. this.$message.success('绑定成功')
  1034. }else {
  1035. this.$message.error('绑定失败:',res.msg)
  1036. }
  1037. this.getList()
  1038. this.user.open=false;
  1039. })
  1040. },
  1041. /** 查看客户详情 */
  1042. handleShow(row){
  1043. this.show.open=true;
  1044. var that=this;
  1045. const tab = "visit";
  1046. setTimeout(() => {
  1047. that.$refs.customerDetails.getDetails(row.customerId);
  1048. that.$refs.customerDetails.handleClick(tab);
  1049. }, 200);
  1050. },
  1051. handledetails(row){
  1052. this.info.open=true;
  1053. setTimeout(() => {
  1054. this.$refs.Details.getDetails(row.id);
  1055. }, 1);
  1056. },
  1057. closeInfo(){
  1058. this.info.open=false
  1059. },
  1060. handleClickX(tab, event) {
  1061. this.queryParams.isBind=tab.name;
  1062. this.handleQuery();
  1063. },
  1064. handleClose(tag) {
  1065. this.remarkMobiles.splice(this.remarkMobiles.indexOf(tag), 1);
  1066. },
  1067. showInput() {
  1068. this.inputVisible = true;
  1069. this.$nextTick(_ => {
  1070. this.$refs.saveTagInput.$refs.input.focus();
  1071. });
  1072. },
  1073. handleInputConfirm() {
  1074. let inputValue = this.inputValue;
  1075. if (inputValue) {
  1076. this.remarkMobiles.push(inputValue);
  1077. }
  1078. this.inputVisible = false;
  1079. this.inputValue = '';
  1080. },
  1081. addUserTag(){
  1082. if(this.ids==null||this.ids==""){
  1083. return this.$message('请选择需要添加标签的客户');
  1084. }
  1085. this.getPageListTagGroup();
  1086. setTimeout(() => {
  1087. for (let i = 0; i < this.tagGroupList.length; i++) {
  1088. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  1089. this.tagGroupList[i].tag[x].isSelected=false;
  1090. }
  1091. }
  1092. }, 200);
  1093. this.tagOpen = true;
  1094. },
  1095. getPageListTagGroup(){
  1096. this.queryTagParams.corpId=this.queryParams.corpId
  1097. allListTagGroup(this.queryTagParams).then(response => {
  1098. this.tagGroupList = response.rows;
  1099. this.tagTotal = response.total;
  1100. });
  1101. },
  1102. delUserTag(){
  1103. if(this.ids==null||this.ids==""){
  1104. return this.$message('请选择需要移除标签的客户');
  1105. }
  1106. this.getPageListTagGroup();
  1107. setTimeout(() => {
  1108. for (let i = 0; i < this.tagGroupList.length; i++) {
  1109. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  1110. this.tagGroupList[i].tag[x].isSelected=false;
  1111. }
  1112. }
  1113. }, 200);
  1114. this.tagDelOpen = true;
  1115. },
  1116. //搜索的标签
  1117. hangleChangeTags(){
  1118. this.changeTagDialog.title="搜索的标签"
  1119. this.changeTagDialog.open=true;
  1120. // 获取 tagListFormIndex 中的所有 tagId,用于快速查找
  1121. const selectedTagIds = new Set(
  1122. (this.selectTags || []).map(tagItem => tagItem?.tagId)
  1123. );
  1124. this.queryTagParams.name=null;
  1125. this.getPageListTagGroup();
  1126. setTimeout(() => {
  1127. for (let i = 0; i < this.tagGroupList.length; i++) {
  1128. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  1129. this.tagGroupList[i].tag[x].isSelected = selectedTagIds.has(this.tagGroupList[i].tag[x].tagId);
  1130. }
  1131. }
  1132. }, 200);
  1133. },
  1134. //删除一些选择的标签
  1135. handleCloseTags(list){
  1136. const ls = this.selectTags.findIndex(t => t.tagId === list.tagId);
  1137. if (ls !== -1) {
  1138. this.selectTags.splice(ls, 1);
  1139. this.selectTags = [...this.selectTags];
  1140. }
  1141. if (this.selectTags!=null && this.selectTags.length>0){
  1142. // 确保 this.form.tags 是数组
  1143. if (!this.queryParams.tagIds) {
  1144. this.queryParams.tagIds = []; // 如果未定义,初始化
  1145. } else {
  1146. this.queryParams.tagIds = []; // 清空已有数据
  1147. }
  1148. // 遍历并添加 tagId
  1149. this.selectTags.forEach(tag => {
  1150. if (tag.tagId) { // 确保 tagId 存在
  1151. this.queryParams.tagIds.push(tag.tagId);
  1152. }
  1153. });
  1154. this.queryParams.tagIds=this.queryParams.tagIds.join(",");
  1155. }else {
  1156. this.queryParams.tagIds=null;
  1157. }
  1158. },
  1159. //重新获取页面数据
  1160. refreshList(){
  1161. this.getList();
  1162. },
  1163. //批量设置课程sop
  1164. setUserCourseSop(){
  1165. if(this.ids==null||this.ids==""){
  1166. return this.$message('请选择需要设置课程SOP的客户');
  1167. }
  1168. this.$confirm('批量设置客户课节SOP可能会存在重复,确定要批量设置吗?', "警告", {
  1169. confirmButtonText: "确定",
  1170. cancelButtonText: "取消",
  1171. type: "warning"
  1172. }).then(() => {
  1173. this.setSop.open = true;
  1174. this.setSop.type = 2;
  1175. })
  1176. .catch(() => {
  1177. // 可以处理用户点击“取消”的逻辑
  1178. });
  1179. },
  1180. tagSelection(row){
  1181. row.isSelected= !row.isSelected;
  1182. this.$forceUpdate();
  1183. },
  1184. // 取消按钮
  1185. cancel() {
  1186. this.open = false;
  1187. this.reset();
  1188. },
  1189. addTagCancel() {
  1190. this.tagOpen = false;
  1191. this.addTagForm={
  1192. userIds:[],
  1193. tagIds:[]
  1194. };
  1195. },
  1196. DelTagCancel() {
  1197. this.tagDelOpen = false;
  1198. this.addTagForm={
  1199. userIds:[],
  1200. tagIds:[]
  1201. };
  1202. },
  1203. addTagSubmitForm(){
  1204. for (let i = 0; i < this.tagGroupList.length; i++) {
  1205. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  1206. if(this.tagGroupList[i].tag[x].isSelected==true){
  1207. this.addTagForm.tagIds.push(this.tagGroupList[i].tag[x].tagId)
  1208. }
  1209. }
  1210. }
  1211. if(this.addTagForm.tagIds==[]||this.addTagForm.tagIds==null||this.addTagForm.tagIds==""){
  1212. return this.$message('请选择标签');
  1213. }
  1214. this.addTagForm.corpId=this.queryParams.corpId
  1215. this.addTagForm.userIds=this.ids;
  1216. let loadingRock = this.$loading({
  1217. lock: true,
  1218. text: '正在执行中请稍后~~请不要刷新页面!!',
  1219. spinner: 'el-icon-loading',
  1220. background: 'rgba(0, 0, 0, 0.7)'
  1221. });
  1222. addTag(this.addTagForm).then(response => {
  1223. this.msgSuccess(response.msg);
  1224. this.tagOpen = false;
  1225. loadingRock.close();
  1226. this.addTagForm={
  1227. userIds:[],
  1228. tagIds:[]
  1229. };
  1230. this.getList()
  1231. }).finally(res=>{
  1232. loadingRock.close();
  1233. });
  1234. },
  1235. tagDelSubmitForm(){
  1236. for (let i = 0; i < this.tagGroupList.length; i++) {
  1237. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  1238. if(this.tagGroupList[i].tag[x].isSelected==true){
  1239. this.addTagForm.tagIds.push(this.tagGroupList[i].tag[x].tagId)
  1240. }
  1241. }
  1242. }
  1243. if(this.addTagForm.tagIds==[]||this.addTagForm.tagIds==null||this.addTagForm.tagIds==""){
  1244. return this.$message('请选择标签');
  1245. }
  1246. this.addTagForm.corpId=this.queryParams.corpId
  1247. this.addTagForm.userIds=this.ids;
  1248. let loadingRock = this.$loading({
  1249. lock: true,
  1250. text: '正在执行中请稍后~~请不要刷新页面!!',
  1251. spinner: 'el-icon-loading',
  1252. background: 'rgba(0, 0, 0, 0.7)'
  1253. });
  1254. delTag(this.addTagForm).then(response => {
  1255. this.msgSuccess(response.msg);
  1256. this.tagDelOpen = false;
  1257. loadingRock.close();
  1258. this.addTagForm={
  1259. userIds:[],
  1260. tagIds:[]
  1261. };
  1262. this.getList()
  1263. }).finally(res=>{
  1264. loadingRock.close();
  1265. });
  1266. },
  1267. // 表单重置
  1268. reset() {
  1269. this.form = {
  1270. id: null,
  1271. userId: null,
  1272. externalUserId: null,
  1273. name: null,
  1274. companyUserId:null,
  1275. customerId:null,
  1276. avatar: null,
  1277. type: null,
  1278. gender: null,
  1279. remark: null,
  1280. description: null,
  1281. tagIds: null,
  1282. remarkMobiles: null,
  1283. remarkCorpName: null,
  1284. addWay: null,
  1285. operUserid: null,
  1286. corpId: null,
  1287. companyId: null,
  1288. transferStatus:null,
  1289. status:null,
  1290. sTime:null,
  1291. eTime:null,
  1292. createTime:null,
  1293. transferTime:null,
  1294. transferNum:null,
  1295. lossTime:null,
  1296. delTime:null,
  1297. state:null,
  1298. wayId:null,
  1299. stageStatus:null,
  1300. customerName:null
  1301. };
  1302. this.resetForm("form");
  1303. },
  1304. /** 搜索按钮操作 */
  1305. handleQuery() {
  1306. if (this.selectTags!=null && this.selectTags.length>0){
  1307. // 确保 this.form.tags 是数组
  1308. if (!this.queryParams.tagIds) {
  1309. this.queryParams.tagIds = []; // 如果未定义,初始化
  1310. } else {
  1311. this.queryParams.tagIds = []; // 清空已有数据
  1312. }
  1313. // 遍历并添加 tagId
  1314. this.selectTags.forEach(tag => {
  1315. if (tag.tagId) { // 确保 tagId 存在
  1316. this.queryParams.tagIds.push(tag.tagId);
  1317. }
  1318. });
  1319. this.queryParams.tagIds=this.queryParams.tagIds.join(",");
  1320. }else {
  1321. this.queryParams.tagIds=null;
  1322. }
  1323. this.queryParams.pageNum = 1;
  1324. this.getList();
  1325. },
  1326. handleSearchTags(name){
  1327. if (!name){
  1328. return this.$message.error("请输入要搜索的标签")
  1329. }
  1330. this.queryTagParams.name=name;
  1331. this.queryTagParams.corpId=this.queryParams.corpId;
  1332. searchTags(this.queryTagParams).then(response => {
  1333. this.tagGroupList = response.rows;
  1334. });
  1335. },
  1336. cancelSearchTags(){
  1337. this.resetSearchQueryTag()
  1338. this.getPageListTagGroup();
  1339. },
  1340. //确定选择标签
  1341. tagSubmitForm(){
  1342. for (let i = 0; i < this.tagGroupList.length; i++) {
  1343. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  1344. if (this.tagGroupList[i].tag[x].isSelected === true) {
  1345. if (!this.selectTags) {
  1346. this.selectTags = [];
  1347. }
  1348. // 检查当前 tag 是否已经存在于 tagListFormIndex[index] 中
  1349. let tagExists = this.selectTags.some(
  1350. tag => tag.id === this.tagGroupList[i].tag[x].id
  1351. );
  1352. // 如果 tag 不存在于 tagListFormIndex[index] 中,则新增
  1353. if (!tagExists) {
  1354. this.selectTags.push(this.tagGroupList[i].tag[x]);
  1355. }
  1356. }
  1357. }
  1358. }
  1359. if (!this.selectTags || this.selectTags.length === 0) {
  1360. return this.$message('请选择标签');
  1361. }
  1362. this.changeTagDialog.open = false;
  1363. },
  1364. //取消选择标签
  1365. tagCancel(){
  1366. this.changeTagDialog.open = false;
  1367. },
  1368. resetSearchQueryTag(){
  1369. this.queryTagParams= {
  1370. pageNum: 1,
  1371. pageSize: 10,
  1372. total:0,
  1373. name:null,
  1374. };
  1375. },
  1376. /** 重置按钮操作 */
  1377. resetQuery() {
  1378. this.resetForm("queryForm");
  1379. this.queryParams.corpId= this.myQwCompanyList[0].dictValue;
  1380. this.selectTags=[];
  1381. this.createTime=null;
  1382. this.queryParams.sTime=null;
  1383. this.queryParams.eTime=null;
  1384. this.handleQuery();
  1385. },
  1386. // 多选框选中数据
  1387. handleSelectionChange(selection) {
  1388. this.ids = selection.map(item => item.id)
  1389. this.single = selection.length!==1
  1390. this.multiple = !selection.length
  1391. },
  1392. /** 新增按钮操作 */
  1393. handleAdd() {
  1394. this.loading=true;
  1395. this.form.corpId=this.queryParams.corpId
  1396. addExternalContact(this.form).then(response => {
  1397. this.msgSuccess("同步成功");
  1398. this.getList();
  1399. }).finally(()=>{
  1400. this.loading=false;
  1401. });
  1402. },
  1403. /** 修改按钮操作 */
  1404. handleUpdate(row) {
  1405. this.reset();
  1406. const id = row.id || this.ids
  1407. getExternalContact(id).then(response => {
  1408. this.form = response.data;
  1409. if(this.form.remarkMobiles!=null){
  1410. this.remarkMobiles=JSON.parse(this.form.remarkMobiles)
  1411. }else{
  1412. this.remarkMobiles=[]
  1413. }
  1414. this.open = true;
  1415. this.title = "修改企业微信客户";
  1416. });
  1417. },
  1418. handleAppellation(val){
  1419. this.callOpen.open=true;
  1420. this.callOpenFrom.stageStatus=val.stageStatus;
  1421. this.callOpenFrom.id=val.id;
  1422. },
  1423. /** 绑定客户操作 */
  1424. handleUpdateCustomer(row){
  1425. this.bindCustomer.title="绑定客户"
  1426. this.bindCustomer.open=true;
  1427. this.form.id=row.id
  1428. this.form.externalUserId=row.externalUserId
  1429. this.form.name=row.name
  1430. },
  1431. handleUpdateUser(row){
  1432. this.user.title="绑定客户"
  1433. this.user.open=true;
  1434. this.userForm.id=row.id;
  1435. },
  1436. handleUnBindUserId(val){
  1437. this.$confirm(
  1438. '确认解绑客户:<span style="color: green;">' + val.name + '' +
  1439. '</span> 的小程序用户?<br><span style="color: red;">【ps:可能会导致客户无法看课】</span>',
  1440. {
  1441. confirmButtonText: "确定",
  1442. cancelButtonText: "取消",
  1443. type: "warning",
  1444. dangerouslyUseHTMLString: true // 允许使用 HTML 字符串
  1445. }
  1446. ).then(() => {
  1447. return unBindUserId(val.id);
  1448. }).then(response => {
  1449. this.getList();
  1450. this.msgSuccess("解绑成功");
  1451. }).finally(res=>{
  1452. this.getList();
  1453. })
  1454. },
  1455. bindCustomerId(row){
  1456. console.log("row",row)
  1457. // this.qwFormCustomer.customerId=row;
  1458. this.form.customerId=row;
  1459. this.form.corpId=this.queryParams.corpId;
  1460. this.msgWarning("绑定中.....同步信息中.....");
  1461. editbindCustomer(this.form).then(res=>{
  1462. //清空表单
  1463. this.reset();
  1464. this.bindCustomer.open = false;
  1465. this.msgSuccess("绑定成功");
  1466. this.getList();
  1467. })
  1468. },
  1469. //设置一个SOP
  1470. setCourseSOP(row) {
  1471. // 检查 row.miniUserId 是否为 null
  1472. if (row.miniUserId === null || row.miniUserId === undefined) {
  1473. return this.$confirm('当前客户【CRM客户详情】中 未绑定小程序客户,请先绑定', "警告", {
  1474. confirmButtonText: "确定",
  1475. cancelButtonText: "取消",
  1476. type: "warning"
  1477. }).catch(error => {
  1478. this.msgWarning("操作取消:", error);
  1479. });
  1480. } else {
  1481. this.chooseCustomerSOP = row;
  1482. this.setSop.open = true;
  1483. this.setSop.type=1;
  1484. }
  1485. },
  1486. //选择课程SOP
  1487. // 用于设置 customerCourseForm 和 customerCourseFormLogs 的共同属性
  1488. setCommonProperties(form, row) {
  1489. form.qwUserid = this.chooseCustomerSOP.userId;
  1490. form.companyUserId = this.chooseCustomerSOP.companyUserId;
  1491. form.externalUserId = this.chooseCustomerSOP.externalUserId;
  1492. form.customerId = this.chooseCustomerSOP.customerId;
  1493. form.miniUserId = this.chooseCustomerSOP.miniUserId;
  1494. form.businessId = row.businessId;
  1495. },
  1496. bindCourseSop(row,days) {
  1497. if (this.setSop.type==2){
  1498. this.setSop.open = false;
  1499. this.loading=true;
  1500. this.msgWarning("设定中.....同步信息中.....");
  1501. setCustomerCourseSopList({ids:this.ids,fsCourseSopId:row.id,days:days}).then(res=>{
  1502. let msg=" 批量设置成功数【" + res.successNum + "】,<br>"
  1503. if (res.failCRM.length>0){
  1504. msg+="失败的客户【" + res.failCRM + "】,原因是未绑定CRM客户。<br>"
  1505. }
  1506. if (res.failMiNi.length>0){
  1507. msg+="失败的客户【" + res.failMiNi + "】,原因是CRM中未绑定小程序客户。<br>"
  1508. }
  1509. if (res.failCompany.length>0){
  1510. msg+="失败的客户【" + res.failCompany + "】,原因是客户没有所属成员。<br>"
  1511. }
  1512. return this.$confirm(msg, "提示", {
  1513. confirmButtonText: "确定",
  1514. cancelButtonText: "取消",
  1515. type: "warning",
  1516. dangerouslyUseHTMLString: true // 允许使用HTML标签
  1517. }).catch(error => {
  1518. this.msgSuccess("操作完成~");
  1519. });
  1520. }).finally(()=>{
  1521. this.loading = false;
  1522. this.getList();
  1523. })
  1524. }else if (this.setSop.type==1){
  1525. // 设置 customerCourseFormLogs 的属性
  1526. this.setCommonProperties(this.customerCourseFormLogs, row);
  1527. // 设置 customerCourseForm 的属性
  1528. this.setCommonProperties(this.customerCourseForm, row);
  1529. this.customerCourseForm.sopId = row.id;
  1530. this.customerCourseForm.sopType = row.sopType;
  1531. this.customerCourseForm.setting = row.setting;
  1532. this.customerCourseForm.days = days;
  1533. // 执行异步操作
  1534. getCustomerCourseSop(this.customerCourseFormLogs)
  1535. .then(res => {
  1536. if (res) {
  1537. return this.$confirm('当前客户已设置过相同课程课节SOP,确定还要再次设置吗?', "警告", {
  1538. confirmButtonText: "确定",
  1539. cancelButtonText: "取消",
  1540. type: "warning"
  1541. });
  1542. } else {
  1543. return Promise.resolve(); // 如果没有设置过,直接执行后续操作
  1544. }
  1545. })
  1546. .then(() => {
  1547. this.loading = true;
  1548. this.setSop.open = false;
  1549. this.msgSuccess("设定中.....同步信息中.....");
  1550. return setCustomerCourseSop(this.customerCourseForm);
  1551. })
  1552. .then(() => {
  1553. this.msgSuccess("设定成功");
  1554. })
  1555. .catch(error => {
  1556. this.msgWarning("操作取消:", error);
  1557. })
  1558. .finally(() => {
  1559. this.loading = false;
  1560. this.getList();
  1561. });
  1562. }
  1563. },
  1564. submitCallOpenFrom(){
  1565. this.$refs["callOpenFrom"].validate(valid => {
  1566. if (valid) {
  1567. if (this.callOpenFrom.id != null && this.callOpenFrom.stageStatus != null) {
  1568. updateExternalContactCall(this.callOpenFrom).then(res=>{
  1569. this.$message.success('修改成功');
  1570. this.callOpen.open=false;
  1571. this.getList();
  1572. });
  1573. }
  1574. }
  1575. });
  1576. },
  1577. /** 提交按钮 */
  1578. submitForm() {
  1579. this.$refs["form"].validate(valid => {
  1580. if (valid) {
  1581. if (this.form.id != null) {
  1582. this.form.remarkMobiles=JSON.stringify(this.remarkMobiles)
  1583. updateExternalContact(this.form).then(response => {
  1584. this.msgSuccess("修改成功");
  1585. this.open = false;
  1586. this.getList();
  1587. });
  1588. } else {
  1589. addExternalContact(this.form).then(response => {
  1590. this.msgSuccess("新增成功");
  1591. this.open = false;
  1592. this.getList();
  1593. });
  1594. }
  1595. }
  1596. });
  1597. },
  1598. /** 删除按钮操作 */
  1599. handleDelete(row) {
  1600. const ids = row.id || this.ids;
  1601. this.$confirm('是否确认删除企业微信客户编号为"' + ids + '"的数据项?', "警告", {
  1602. confirmButtonText: "确定",
  1603. cancelButtonText: "取消",
  1604. type: "warning"
  1605. }).then(function() {
  1606. return delExternalContact(ids);
  1607. }).then(() => {
  1608. this.getList();
  1609. this.msgSuccess("删除成功");
  1610. }).catch(() => {});
  1611. },
  1612. updateTalk(row){
  1613. const ids = row.id || this.ids;
  1614. this.$confirm('是否确认批量更改用户信息为非首次交流', "警告", {
  1615. confirmButtonText: "确定",
  1616. cancelButtonText: "取消",
  1617. type: "warning"
  1618. }).then(function() {
  1619. return editTalk(ids);
  1620. }).then(() => {
  1621. this.getList();
  1622. this.msgSuccess("成功");
  1623. }).catch(() => {});
  1624. },
  1625. /** 导出按钮操作 */
  1626. handleExport() {
  1627. const { qwUserName, ...queryParams } = this.queryParams;
  1628. this.$confirm('是否确认导出所有企业微信客户数据项?', "警告", {
  1629. confirmButtonText: "确定",
  1630. cancelButtonText: "取消",
  1631. type: "warning"
  1632. }).then(() => {
  1633. this.exportLoading = true;
  1634. return exportExternalContact(queryParams);
  1635. }).then(response => {
  1636. this.download(response.msg);
  1637. this.exportLoading = false;
  1638. }).catch(() => {});
  1639. },
  1640. handleBatchUpdateNotesFilter() {
  1641. this.notesOpen.open = true;
  1642. this.notesOpen.filter = true;
  1643. },
  1644. handleBatchUpdateNotes() {
  1645. if (this.ids == null || this.ids == "") {
  1646. return this.$message('请选择需要添加备注的客户');
  1647. }
  1648. this.notesOpen.open = true;
  1649. this.notesOpen.filter = false;
  1650. },
  1651. notesSubmitForm() {
  1652. if (this.notesOpen.notes == null || this.notesOpen.notes == "") {
  1653. return this.$message.error("请输入备注内容");
  1654. }
  1655. // let loadingRock = this.$loading({
  1656. // lock: true,
  1657. // text: '正在执行中请稍后~~请不要刷新页面!!',
  1658. // spinner: 'el-icon-loading',
  1659. // background: 'rgba(0, 0, 0, 0.7)'
  1660. // });
  1661. let obj = JSON.parse(JSON.stringify(this.queryParams))
  1662. console.log(obj);
  1663. if(obj.tagIds !== null && obj.tagIds !== undefined && obj.tagIds !== ''){
  1664. obj.tagIds = obj.tagIds.split(",");
  1665. }
  1666. batchUpdateExternalContactNotes({
  1667. addType: 0,
  1668. userIds: this.ids,
  1669. notes: this.notesOpen.notes,
  1670. type: this.notesOpen.type,
  1671. nameType: this.notesOpen.nameType,
  1672. filter: this.notesOpen.filter,
  1673. param: obj
  1674. }).then(res => {
  1675. this.resultMessage = res.msg;
  1676. this.$message.success("正在执行中...");
  1677. // this.resultDialogVisible = true; // 显示弹窗
  1678. // this.resultTitle = '批量修改备注结果';
  1679. }).finally(res => {
  1680. this.getList();
  1681. // loadingRock.close();
  1682. this.notesCancel();
  1683. })
  1684. },
  1685. }
  1686. };
  1687. </script>
  1688. <style scoped>
  1689. /* CSS 样式 */
  1690. .tag-container {
  1691. display: flex;
  1692. flex-wrap: wrap; /* 超出宽度时自动换行 */
  1693. gap: 8px; /* 设置标签之间的间距 */
  1694. }
  1695. .name-background {
  1696. display: inline-block;
  1697. background-color: #abece6; /* 背景颜色 */
  1698. padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
  1699. border-radius: 4px; /* 可选:设置圆角 */
  1700. }
  1701. /* CSS 样式 */
  1702. .tag-container {
  1703. display: flex;
  1704. flex-wrap: wrap; /* 超出宽度时自动换行 */
  1705. gap: 8px; /* 设置标签之间的间距 */
  1706. }
  1707. .name-background {
  1708. display: inline-block;
  1709. background-color: #abece6; /* 背景颜色 */
  1710. padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
  1711. border-radius: 4px; /* 可选:设置圆角 */
  1712. }
  1713. .tag-box {
  1714. padding: 8px 12px;
  1715. border: 1px solid #989797;
  1716. border-radius: 4px;
  1717. cursor: pointer;
  1718. display: inline-block;
  1719. }
  1720. .tag-selected {
  1721. background-color: #00bc98;
  1722. color: #fff;
  1723. border-color: #00bc98;
  1724. }
  1725. .el-tag + .el-tag {
  1726. margin-left: 10px;
  1727. }
  1728. .button-new-tag {
  1729. margin-left: 10px;
  1730. height: 32px;
  1731. line-height: 30px;
  1732. padding-top: 0;
  1733. padding-bottom: 0;
  1734. }
  1735. .input-new-tag {
  1736. width: 90px;
  1737. margin-left: 10px;
  1738. vertical-align: bottom;
  1739. }
  1740. .suggestion-box {
  1741. position: absolute;
  1742. z-index: 999;
  1743. background: #fff;
  1744. border: 1px solid #ddd;
  1745. max-height: 200px;
  1746. overflow-y: auto;
  1747. width: 100%;
  1748. }
  1749. .suggestion-item {
  1750. padding: 10px;
  1751. cursor: pointer;
  1752. }
  1753. .suggestion-item:hover {
  1754. background-color: #f5f7fa;
  1755. }
  1756. /* 新增的滚动容器样式(不影响原有样式) */
  1757. .scroll-wrapper {
  1758. max-height: 130px; /* 大约三行的高度 */
  1759. overflow-y: auto; /* 垂直滚动 */
  1760. padding-right: 5px; /* 为滚动条留出空间 */
  1761. }
  1762. /* 美化滚动条(可选) */
  1763. .scroll-wrapper::-webkit-scrollbar {
  1764. width: 6px;
  1765. }
  1766. .scroll-wrapper::-webkit-scrollbar-thumb {
  1767. background: rgba(0, 0, 0, 0.2);
  1768. border-radius: 3px;
  1769. }
  1770. .tag-container {
  1771. max-height: 200px;
  1772. overflow-y: auto;
  1773. padding: 1px;
  1774. border: 1px solid #ebeef5;
  1775. border-radius: 1px;
  1776. background-color: #fafafa;
  1777. }
  1778. .tag-list {
  1779. display: flex;
  1780. flex-wrap: wrap;
  1781. gap: 8px;
  1782. }
  1783. .scroll-hint {
  1784. text-align: center;
  1785. color: #909399;
  1786. font-size: 12px;
  1787. padding: 1px 0;
  1788. }
  1789. .container {
  1790. max-width: 800px;
  1791. margin: 0 auto;
  1792. padding: 10px;
  1793. }
  1794. .title {
  1795. text-align: center;
  1796. color: #303133;
  1797. margin-bottom: 30px;
  1798. }
  1799. .demo-table {
  1800. width: 100%;
  1801. margin-bottom: 30px;
  1802. }
  1803. .instructions {
  1804. background-color: #f5f7fa;
  1805. padding: 15px;
  1806. border-radius: 1px;
  1807. margin-bottom: 20px;
  1808. }
  1809. </style>