index.vue 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384
  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. />
  31. </el-form-item>
  32. <el-form-item label="用户类别" prop="type">
  33. <el-select v-model="queryParams.type" placeholder="请选择用户类别" clearable size="small">
  34. <el-option
  35. v-for="dict in typeOptions"
  36. :key="dict.dictValue"
  37. :label="dict.dictLabel"
  38. :value="dict.dictValue"
  39. />
  40. </el-select>
  41. </el-form-item>
  42. <el-form-item label="性别" prop="gender">
  43. <el-select v-model="queryParams.gender" placeholder="状态" clearable size="small">
  44. <el-option
  45. v-for="dict in genderOptions"
  46. :key="dict.dictValue"
  47. :label="dict.dictLabel"
  48. :value="dict.dictValue"
  49. />
  50. </el-select>
  51. </el-form-item>
  52. <el-form-item label="电话号码" prop="remarkMobiles">
  53. <el-input
  54. v-model="queryParams.remarkMobiles"
  55. placeholder="请输入备注电话号码"
  56. clearable
  57. size="small"
  58. @keyup.enter.native="handleQuery"
  59. />
  60. </el-form-item>
  61. <el-form-item label="来源" prop="addWay">
  62. <el-select v-model="queryParams.addWay" placeholder="来源" clearable size="small">
  63. <el-option
  64. v-for="dict in addWayOptions"
  65. :key="dict.dictValue"
  66. :label="dict.dictLabel"
  67. :value="dict.dictValue"
  68. />
  69. </el-select>
  70. </el-form-item>
  71. <el-form-item label="状态" prop="status">
  72. <el-select v-model="queryParams.status" placeholder="状态" clearable size="small">
  73. <el-option
  74. v-for="dict in statusOptions"
  75. :key="dict.dictValue"
  76. :label="dict.dictLabel"
  77. :value="dict.dictValue"
  78. />
  79. </el-select>
  80. </el-form-item>
  81. <el-form-item label="转接状态" prop="addWay">
  82. <el-select v-model="queryParams.transferStatus" placeholder="转接状态" clearable size="small">
  83. <el-option
  84. v-for="dict in transferStatusOptions"
  85. :key="dict.dictValue"
  86. :label="dict.dictLabel"
  87. :value="dict.dictValue"
  88. />
  89. </el-select>
  90. </el-form-item>
  91. <el-form-item label="是否绑小程序" prop="isBindMini">
  92. <el-select v-model="queryParams.isBindMini" placeholder="是否绑定小程序" clearable size="small" @change="handleQuery" >
  93. <el-option
  94. v-for="dict in isBindMiniOptions"
  95. :key="dict.dictValue"
  96. :label="dict.dictLabel"
  97. :value="dict.dictValue"
  98. />
  99. </el-select>
  100. </el-form-item>
  101. <el-form-item label="标签" prop="tagIds">
  102. <el-select v-model="selectTags" remote multiple placeholder="请选择" filterable style="width: 100%;">
  103. <el-option
  104. v-for="dict in tagList"
  105. :label="dict.name"
  106. :value="dict.tagId">
  107. </el-option>
  108. </el-select>
  109. </el-form-item>
  110. <el-form-item label="备注" prop="remark">
  111. <el-input
  112. v-model="queryParams.remark"
  113. placeholder="请输入备注"
  114. clearable
  115. size="small"
  116. @keyup.enter.native="handleQuery"
  117. />
  118. </el-form-item>
  119. <el-form-item label="添加时间" prop="createTime">
  120. <el-date-picker clearable size="small"
  121. v-model="queryParams.createTime"
  122. type="date"
  123. value-format="yyyy-MM-dd"
  124. placeholder="选择添加时间">
  125. </el-date-picker>
  126. </el-form-item>
  127. <el-form-item label="流失时间" prop="lossTime">
  128. <el-date-picker clearable size="small"
  129. v-model="queryParams.lossTime"
  130. type="date"
  131. value-format="yyyy-MM-dd"
  132. placeholder="选择流失时间">
  133. </el-date-picker>
  134. </el-form-item>
  135. <el-form-item label="删除时间" prop="delTime">
  136. <el-date-picker clearable size="small"
  137. v-model="queryParams.delTime"
  138. type="date"
  139. value-format="yyyy-MM-dd"
  140. placeholder="选择删除时间">
  141. </el-date-picker>
  142. </el-form-item>
  143. <el-form-item>
  144. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  145. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  146. </el-form-item>
  147. </el-form>
  148. <el-row :gutter="10" class="mb8">
  149. <!-- <el-col :span="1.5">
  150. <el-button
  151. type="primary"
  152. plain
  153. icon="el-icon-plus"
  154. size="mini"
  155. @click="handleAdd"
  156. v-hasPermi="['qw:externalContact:add']"
  157. >同步</el-button>
  158. </el-col> -->
  159. <el-col :span="1.5">
  160. <el-button
  161. type="success"
  162. plain
  163. icon="el-icon-edit"
  164. size="mini"
  165. :disabled="single"
  166. @click="handleUpdate"
  167. v-hasPermi="['qw:externalContact:edit']"
  168. >修改备注</el-button>
  169. </el-col>
  170. <el-col :span="1.5">
  171. <el-button
  172. type="warning"
  173. plain
  174. icon="el-icon-download"
  175. size="mini"
  176. :loading="exportLoading"
  177. @click="handleExport"
  178. v-hasPermi="['qw:externalContact:export']"
  179. >导出</el-button>
  180. </el-col>
  181. <el-col :span="1.5">
  182. <el-button
  183. type="primary"
  184. plain
  185. size="mini"
  186. @click="addUserTag"
  187. v-hasPermi="['qw:externalContact:addTag']"
  188. >批量添加标签</el-button>
  189. </el-col>
  190. <el-col :span="1.5">
  191. <el-button
  192. type="primary"
  193. plain
  194. size="mini"
  195. @click="delUserTag"
  196. v-hasPermi="['qw:externalContact:delTag']"
  197. >批量移除标签</el-button>
  198. </el-col>
  199. <el-col :span="1.5">
  200. <el-button
  201. type="primary"
  202. plain
  203. size="mini"
  204. @click="updateTalk"
  205. >批量更改交流状态</el-button>
  206. </el-col>
  207. <!-- <el-col :span="1.5">-->
  208. <!-- <el-button-->
  209. <!-- type="primary"-->
  210. <!-- plain-->
  211. <!-- size="mini"-->
  212. <!-- @click="setUserCourseSop"-->
  213. <!-- v-hasPermi="['qw:externalContact:setCourseSop']"-->
  214. <!-- >批量设置课程SOP</el-button>-->
  215. <!-- </el-col>-->
  216. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  217. </el-row>
  218. <el-tabs type="card" v-model="isBindActiveName" @tab-click="handleClickX">
  219. <el-tab-pane label="全部" name="all"></el-tab-pane>
  220. <el-tab-pane label="已绑定CRM" name="isBind"></el-tab-pane>
  221. <el-tab-pane label="未绑定CRM" name="noBind"></el-tab-pane>
  222. </el-tabs>
  223. <el-table v-loading="loading" :data="externalContactList" @selection-change="handleSelectionChange" border>
  224. <el-table-column type="selection" width="55" align="center" />
  225. <el-table-column label="企微客户ID" align="center" prop="id" />
  226. <el-table-column label="企微客户头像" align="center" prop="avatar" width="100px">
  227. <template slot-scope="scope">
  228. <el-popover
  229. placement="right"
  230. title=""
  231. trigger="hover">
  232. <img slot="reference" :src="scope.row.avatar" width="60px">
  233. <img :src="scope.row.avatar" style="max-width: 200px;">
  234. </el-popover>
  235. </template>
  236. </el-table-column>
  237. <el-table-column label="企微客户名称" prop="name" width="110px"/>
  238. <el-table-column label="所属员工" align="center" prop="qwUserName" width="120px"/>
  239. <el-table-column label="员工部门" align="center" prop="departmentName" width="120px"/>
  240. <el-table-column label="用户类别" align="center" prop="type">
  241. <template slot-scope="scope">
  242. <dict-tag :options="typeOptions" :value="scope.row.type"/>
  243. </template>
  244. </el-table-column>
  245. <el-table-column label="性别" align="center" prop="gender">
  246. <template slot-scope="scope">
  247. <dict-tag :options="genderOptions" :value="scope.row.gender"/>
  248. </template>
  249. </el-table-column>
  250. <el-table-column label="备注" align="center" prop="remark" />
  251. <el-table-column label="描述信息" align="center" prop="description" />
  252. <el-table-column label="是否重粉" align="center" prop="isRepeat" >
  253. <template slot-scope="scope">
  254. <el-tag :type="scope.row.isRepeat === 1 ? 'success' : 'info'">
  255. {{ scope.row.isRepeat === 1 ? '是' : '否' }}
  256. </el-tag>
  257. </template>
  258. </el-table-column>
  259. <el-table-column label="标签" align="center" prop="tagIds" width="250px">
  260. <template slot-scope="scope">
  261. <div v-for="i in JSON.parse(scope.row.tagIds)" :key="i" style="display: inline;">
  262. <el-tag type="success" v-for="ii in tagList" :key="ii.id" style="margin: 3px;" v-if="ii.tagId==i">{{ii.name}}</el-tag>
  263. </div>
  264. </template>
  265. </el-table-column>
  266. <el-table-column label="状态" align="center" prop="status" width="120px" >
  267. <template slot-scope="scope">
  268. <dict-tag :options="statusOptions" :value="scope.row.status"/>
  269. </template>
  270. </el-table-column>
  271. <el-table-column label="添加时间" align="center" prop="createTime" width="100px" />
  272. <el-table-column label="流失时间" align="center" prop="lossTime" width="100px" />
  273. <el-table-column label="删除时间" align="center" prop="delTime" width="100px" />
  274. <el-table-column label="备注电话号码" align="center" prop="remarkMobiles" width="150px">
  275. <template slot-scope="scope">
  276. <div v-for="i in JSON.parse(scope.row.remarkMobiles)" :key="i">{{i}}</div>
  277. </template>
  278. </el-table-column>
  279. <el-table-column label="备注企业名称" align="center" prop="remarkCorpName" />
  280. <el-table-column label="来源" align="center" prop="addWay" width="100px">
  281. <template slot-scope="scope">
  282. <dict-tag :options="addWayOptions" :value="scope.row.addWay"/>
  283. </template>
  284. </el-table-column>
  285. <el-table-column label="转接状态" align="center" prop="transferStatus" width="100px" >
  286. <template slot-scope="scope">
  287. <dict-tag :options="transferStatusOptions" :value="scope.row.transferStatus"/>
  288. </template>
  289. </el-table-column>
  290. <el-table-column label="企业id" align="center" prop="corpId" />
  291. <el-table-column label="是否绑小程序" width="100px" align="center" fixed="right">
  292. <template slot-scope="scope">
  293. <el-tag v-if="scope.row.fsUserId" >已绑定</el-tag>
  294. <el-tag v-else type="info"> 未绑定</el-tag>
  295. </template>
  296. </el-table-column>
  297. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120px" fixed="right">
  298. <template slot-scope="scope">
  299. <el-button
  300. v-if="scope.row.status==0||scope.row.status==2"
  301. size="mini"
  302. type="text"
  303. icon="el-icon-edit"
  304. @click="handleUpdate(scope.row)"
  305. v-hasPermi="['qw:externalContact:edit']"
  306. >修改备注</el-button>
  307. <el-button
  308. size="mini"
  309. type="text"
  310. icon="el-icon-edit-outline"
  311. @click="handleUpdateCustomer(scope.row)"
  312. >
  313. <span v-if="scope.row.customerId">换绑CRM</span>
  314. <span v-else>绑定CRM</span>
  315. </el-button>
  316. <el-button
  317. size="mini"
  318. type="text"
  319. icon="el-icon-edit-outline"
  320. @click="handleUpdateUser(scope.row)"
  321. >
  322. <span v-if="scope.row.fsUserId">换绑小程序用户</span>
  323. <span v-else>绑定小程序用户</span>
  324. </el-button>
  325. <el-button
  326. size="mini"
  327. type="text"
  328. icon="el-icon-thumb"
  329. @click="handleUnBindUserId(scope.row)"
  330. v-hasPermi="['qw:externalContact:unBindUserId']"
  331. >
  332. <span v-if="scope.row.fsUserId">解除小程序用户绑定</span>
  333. </el-button>
  334. <el-button v-if="scope.row.customerId"
  335. size="mini"
  336. type="text"
  337. icon="el-icon-paperclip"
  338. @click="handleShow(scope.row)"
  339. >CRM客户详情</el-button>
  340. <el-button
  341. size="mini"
  342. type="text"
  343. @click="handledetails(scope.row)"
  344. >用户信息
  345. </el-button>
  346. <el-button
  347. size="mini"
  348. type="text"
  349. @click="handleViewRepeat(scope.row)"
  350. v-if="scope.row.isRepeat===1"
  351. >查看重粉</el-button>
  352. </template>
  353. </el-table-column>
  354. </el-table>
  355. <pagination
  356. v-show="total>0"
  357. :total="total"
  358. :page.sync="queryParams.pageNum"
  359. :limit.sync="queryParams.pageSize"
  360. @pagination="getList"
  361. />
  362. <el-drawer size="75%" :title="show.title" :visible.sync="show.open">
  363. <customer-details ref="customerDetails" @refreshList="refreshList"/>
  364. </el-drawer>
  365. <el-dialog visible.sync="true" width="800px">
  366. </el-dialog>
  367. <el-dialog title="批量添加标签" :visible.sync="tagOpen" width="800px" append-to-body>
  368. <div>搜索标签:
  369. <el-input v-model="tagChange.tagName" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
  370. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(tagChange.tagName)">搜索</el-button>
  371. <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
  372. </div>
  373. <el-form ref="form" :model="addTagForm" label-width="80px">
  374. <div v-for="item in tagGroupList" :key="item.id" >
  375. <div style="font-size: 20px;margin-top: 20px;margin-bottom: 20px;">
  376. <span class="name-background">{{ item.name }}</span>
  377. </div>
  378. <div class="tag-container">
  379. <a
  380. v-for="tagItem in item.tag"
  381. class="tag-box"
  382. @click="tagSelection(tagItem)"
  383. :class="{ 'tag-selected': tagItem.isSelected }"
  384. >
  385. {{ tagItem.name }}
  386. </a>
  387. </div>
  388. </div>
  389. </el-form>
  390. <div slot="footer" class="dialog-footer">
  391. <el-button type="primary" @click="addTagSubmitForm()">确 定</el-button>
  392. <el-button @click="addTagCancel">取 消</el-button>
  393. </div>
  394. </el-dialog>
  395. <el-dialog title="批量移除标签" :visible.sync="tagDelOpen" width="800px" append-to-body>
  396. <div>搜索标签:
  397. <el-input v-model="tagChange.tagName" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
  398. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(tagChange.tagName)">搜索</el-button>
  399. <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
  400. </div>
  401. <el-form ref="form" :model="addTagForm" label-width="80px">
  402. <div v-for="item in tagGroupList" :key="item.id" >
  403. <div style="font-size: 20px;margin-top: 20px;margin-bottom: 20px;">
  404. <span class="name-background">{{ item.name }}</span>
  405. </div>
  406. <div class="tag-container">
  407. <a
  408. v-for="tagItem in item.tag"
  409. class="tag-box"
  410. @click="tagSelection(tagItem)"
  411. :class="{ 'tag-selected': tagItem.isSelected }"
  412. >
  413. {{ tagItem.name }}
  414. </a>
  415. </div>
  416. </div>
  417. </el-form>
  418. <div slot="footer" class="dialog-footer">
  419. <el-button type="primary" @click="tagDelSubmitForm()">确 定</el-button>
  420. <el-button @click="DelTagCancel">取 消</el-button>
  421. </div>
  422. </el-dialog>
  423. <!-- 添加或修改企业微信客户对话框 -->
  424. <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
  425. <el-form ref="form" :model="form" :rules="rules" label-width="100px">
  426. <el-form-item label="备注" prop="remark">
  427. <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
  428. </el-form-item>
  429. <el-form-item label="描述信息" prop="description">
  430. <el-input v-model="form.description" type="textarea" :rows="3" placeholder="请输入描述信息" />
  431. </el-form-item>
  432. <el-form-item label="备注电话号码" prop="remarkMobiles">
  433. <el-tag
  434. :key="tag"
  435. v-for="tag in remarkMobiles"
  436. closable
  437. :disable-transitions="false"
  438. @close="handleClose(tag)">
  439. {{tag}}
  440. </el-tag>
  441. <el-input
  442. style="width:110px"
  443. class="input-new-tag"
  444. v-if="inputVisible"
  445. v-model="inputValue"
  446. ref="saveTagInput"
  447. size="small"
  448. @keyup.enter.native="handleInputConfirm"
  449. @blur="handleInputConfirm"
  450. >
  451. </el-input>
  452. <el-button v-else class="button-new-tag" size="small" style="width: 110px" @click="showInput">新增电话</el-button>
  453. </el-form-item>
  454. <el-form-item label="备注企业名称" prop="remarkCorpName">
  455. <el-input v-model="form.remarkCorpName" placeholder="请输入备注企业名称" />
  456. </el-form-item>
  457. </el-form>
  458. <div slot="footer" class="dialog-footer">
  459. <el-button type="primary" @click="submitForm">确 定</el-button>
  460. <el-button @click="cancel">取 消</el-button>
  461. </div>
  462. </el-dialog>
  463. <!-- 绑定客户 -->
  464. <el-dialog :title="bindCustomer.title" :visible.sync="bindCustomer.open" width="1200px" append-to-body>
  465. <mycustomer ref="mycustomer" @bindCustomerId="bindCustomerId"></mycustomer>
  466. </el-dialog>
  467. <!-- 设置一个课程sop-->
  468. <el-dialog :title="setSop.title" :visible.sync="setSop.open" width="1200px" append-to-body>
  469. <SopDialog ref="SopDialog" @bindCourseSop="bindCourseSop"></SopDialog>
  470. </el-dialog>
  471. <el-dialog :title="user.title" :visible.sync="user.open" width="800px" append-to-body>
  472. <selectUser ref="selectUser" @bindMiniCustomerId="bindMiniCustomerId"></selectUser>
  473. </el-dialog>
  474. <el-dialog :title="info.title" :visible.sync="info.open" width="1100px" append-to-body>
  475. <info ref="Details" />
  476. </el-dialog>
  477. <el-dialog :title="repeatDialog.title" :visible.sync="repeatDialog.visible" width="70%" append-to-body>
  478. <el-table v-loading="repeatDialog.loading" :data="repeatDialog.data" border>
  479. <el-table-column label="所属公司ID" prop="companyId" align="center" />
  480. <el-table-column label="公司名称" prop="companyName" align="center" />
  481. <el-table-column label="销售ID" prop="companyUserId" align="center" />
  482. <el-table-column label="销售名称" prop="companyUserName" align="center" />
  483. <el-table-column label="销售微信号" prop="saleerWx" align="center" />
  484. </el-table>
  485. <div slot="footer" class="dialog-footer">
  486. <el-button @click="repeatDialog.visible = false">关 闭</el-button>
  487. </div>
  488. </el-dialog>
  489. </div>
  490. </template>
  491. <script>
  492. import {
  493. bindUserId,
  494. addTag,
  495. delTag,
  496. listExternalContact,
  497. getExternalContact,
  498. delExternalContact,
  499. addExternalContact,
  500. updateExternalContact,
  501. exportExternalContact,
  502. editbindCustomer,
  503. setCustomerCourseSop,
  504. getCustomerCourseSop,
  505. setCustomerCourseSopList,
  506. unBindUserId
  507. } from '@/api/qw/externalContact'
  508. import { getMyQwUserList,getMyQwCompanyList } from "@/api/qw/user";
  509. import {listTag, getTag, searchTags,} from "@/api/qw/tag";
  510. import { allListTagGroup} from "@/api/qw/tagGroup";
  511. import mycustomer from '@/views/qw/externalContact/mycustomer'
  512. import customerDetails from '@/views/qw/externalContact/customerDetails'
  513. import SopDialog from '@/views/course/sop/SopDialog.vue'
  514. import selectUser from "@/views/qw/externalContact/selectUser.vue";
  515. import info from "@/views/qw/externalContact/info.vue";
  516. import { editTalk } from "@/api/qw/externalContactInfo";
  517. import {getQwRepeatData} from "@/api/user/fsUser";
  518. export default {
  519. name: "ExternalContact",
  520. components:{mycustomer,customerDetails,SopDialog,selectUser,info},
  521. data() {
  522. return {
  523. user:{
  524. open:false,
  525. title:"修改客户"
  526. },
  527. userForm:{
  528. id:null,
  529. fsUserId:null,
  530. },
  531. info:{
  532. title:"用户信息",
  533. open:false,
  534. },
  535. isBindMiniOptions:[
  536. {dictLabel:"已绑定",dictValue:'isBindMini'},
  537. {dictLabel:"未绑定",dictValue:'noBindMini'},
  538. ],
  539. //标签弹窗选择
  540. tagChange:{
  541. open:false,
  542. index:null,
  543. },
  544. // 遮罩层
  545. loading: false,
  546. // 导出遮罩层
  547. exportLoading: false,
  548. tagOpen:false,
  549. tagDelOpen:false,
  550. // 选中数组
  551. ids: [],
  552. isBindActiveName:"all",
  553. remarkMobiles: [],
  554. inputVisible: false,
  555. inputValue: '',
  556. // 非单个禁用
  557. single: true,
  558. tagGroupList: [],
  559. // 非多个禁用
  560. multiple: true,
  561. // 显示搜索条件
  562. showSearch: true,
  563. // 总条数
  564. total: 0,
  565. // 企业微信客户表格数据
  566. externalContactList: [],
  567. // 弹出层标题
  568. title: "",
  569. // 是否显示弹出层
  570. open: false,
  571. // 用户类别字典
  572. typeOptions: [],
  573. // 性别字典
  574. genderOptions: [],
  575. addTagForm:{
  576. userIds:[],
  577. tagIds:[]
  578. },
  579. myQwCompanyList:[],
  580. show:{
  581. title:"客户详情",
  582. open:false,
  583. },
  584. //存储选择的客户
  585. chooseCustomerSOP:null,
  586. setSop:{
  587. title:"选择课节SOP",
  588. open:false,
  589. //区分单选1还是多选2
  590. type:null,
  591. },
  592. //合成的客户-课节SOP参数
  593. customerCourseForm:{},
  594. //查询是否已经设置过客户-某个课节的SOP
  595. customerCourseFormLogs:{},
  596. //绑定客户
  597. bindCustomer:{
  598. title:null,
  599. open:false,
  600. },
  601. //绑定的参数表
  602. qwFormCustomer:{
  603. externalContactId:null,
  604. customerId:null,
  605. },
  606. // 来源字典
  607. addWayOptions: [],
  608. // 查询参数
  609. queryParams: {
  610. pageNum: 1,
  611. pageSize: 10,
  612. userId: null,
  613. qwUserName:null,
  614. externalUserId: null,
  615. name: null,
  616. avatar: null,
  617. type: null,
  618. qwUserId:null,
  619. gender: null,
  620. description: null,
  621. tagIds: null,
  622. remark:null,
  623. remarkMobiles: null,
  624. remarkCorpName: null,
  625. addWay: null,
  626. operUserid: null,
  627. corpId: null,
  628. companyId: null,
  629. status:null,
  630. transferStatus:null,
  631. isBind:null,
  632. isBindMini:null,
  633. lossTime:null,
  634. createTime:null,
  635. },
  636. selectTags:[],
  637. // 表单参数
  638. form: {},
  639. tagList:[],
  640. transferStatusOptions:[],
  641. statusOptions:[],
  642. // 表单校验
  643. rules: {
  644. },
  645. repeatDialog: {
  646. visible: false,
  647. loading: false,
  648. title: "查看重粉数据",
  649. data: []
  650. }
  651. };
  652. },
  653. created() {
  654. this.getDicts("sys_qw_externalContact_type").then(response => {
  655. this.typeOptions = response.data;
  656. });
  657. getMyQwCompanyList().then(response => {
  658. this.myQwCompanyList = response.data;
  659. if(this.myQwCompanyList!=null){
  660. this.queryParams.corpId=this.myQwCompanyList[0].dictValue
  661. var listTagFrom={corpId:this.queryParams.corpId}
  662. allListTagGroup(listTagFrom).then(response => {
  663. this.tagGroupList = response.rows;
  664. });
  665. listTag(listTagFrom).then(response => {
  666. this.tagList = response.rows;
  667. });
  668. this.getList();
  669. }
  670. });
  671. this.getDicts("sys_sex").then(response => {
  672. this.genderOptions = response.data;
  673. });
  674. this.getDicts("sys_qw_externalContact_addWay").then(response => {
  675. this.addWayOptions = response.data;
  676. });
  677. this.getDicts("sys_qw_external_contact_status").then(response => {
  678. this.statusOptions = response.data;
  679. });
  680. this.getDicts("sys_qw_transfer_status").then(response => {
  681. this.transferStatusOptions = response.data;
  682. });
  683. },
  684. methods: {
  685. // 查看重粉
  686. handleViewRepeat(row){
  687. this.repeatDialog.data = [];
  688. this.repeatDialog.visible = true;
  689. this.repeatDialog.loading = true;
  690. const params = {
  691. externalUserID: row.externalUserId,
  692. corpId: row.corpId
  693. };
  694. getQwRepeatData(params).then(response => {
  695. if (response.code === 200) {
  696. this.repeatDialog.data = response.data || [];
  697. } else {
  698. this.msgError(response.msg || "获取重粉数据失败");
  699. }
  700. this.repeatDialog.loading = false;
  701. }).catch(error => {
  702. console.error("Error fetching repeat follower data:", error);
  703. this.msgError("请求重粉数据接口失败");
  704. this.repeatDialog.loading = false;
  705. });
  706. },
  707. updateCorpId(){
  708. var listTagFrom={corpId:this.queryParams.corpId}
  709. allListTagGroup(listTagFrom).then(response => {
  710. this.tagGroupList = response.rows;
  711. });
  712. listTag(listTagFrom).then(response => {
  713. this.tagList = response.rows;
  714. });
  715. this.getList();
  716. },
  717. /** 查询企业微信客户列表 */
  718. getList() {
  719. this.loading = true;
  720. listExternalContact(this.queryParams).then(response => {
  721. this.externalContactList = response.rows;
  722. this.total = response.total;
  723. this.loading = false;
  724. });
  725. },
  726. bindMiniCustomerId(row){
  727. console.log(row)
  728. this.userForm.fsUserId=row;
  729. bindUserId(this.userForm).then(res=>{
  730. if (res.code==200){
  731. this.$message.success('绑定成功')
  732. }else {
  733. this.$message.error('绑定失败:',res.msg)
  734. }
  735. this.getList()
  736. this.user.open=false;
  737. })
  738. },
  739. /** 查看客户详情 */
  740. handleShow(row){
  741. this.show.open=true;
  742. var that=this;
  743. const tab = "visit";
  744. setTimeout(() => {
  745. that.$refs.customerDetails.getDetails(row.customerId);
  746. that.$refs.customerDetails.handleClick(tab);
  747. }, 200);
  748. },
  749. handledetails(row){
  750. this.info.open=true;
  751. setTimeout(() => {
  752. this.$refs.Details.getDetails(row.id);
  753. }, 1);
  754. },
  755. closeInfo(){
  756. this.info.open=false
  757. },
  758. handleClickX(tab, event) {
  759. this.queryParams.isBind=tab.name;
  760. this.handleQuery();
  761. },
  762. handleClose(tag) {
  763. this.remarkMobiles.splice(this.remarkMobiles.indexOf(tag), 1);
  764. },
  765. showInput() {
  766. this.inputVisible = true;
  767. this.$nextTick(_ => {
  768. this.$refs.saveTagInput.$refs.input.focus();
  769. });
  770. },
  771. handleInputConfirm() {
  772. let inputValue = this.inputValue;
  773. if (inputValue) {
  774. this.remarkMobiles.push(inputValue);
  775. }
  776. this.inputVisible = false;
  777. this.inputValue = '';
  778. },
  779. addUserTag(){
  780. if(this.ids==null||this.ids==""){
  781. return this.$message('请选择需要添加标签的客户');
  782. }
  783. for (let i = 0; i < this.tagGroupList.length; i++) {
  784. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  785. this.tagGroupList[i].tag[x].isSelected=false;
  786. }
  787. }
  788. this.tagOpen = true;
  789. },
  790. delUserTag(){
  791. if(this.ids==null||this.ids==""){
  792. return this.$message('请选择需要移除标签的客户');
  793. }
  794. for (let i = 0; i < this.tagGroupList.length; i++) {
  795. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  796. this.tagGroupList[i].tag[x].isSelected=false;
  797. }
  798. }
  799. this.tagDelOpen = true;
  800. },
  801. //重新获取页面数据
  802. refreshList(){
  803. this.getList();
  804. },
  805. //批量设置课程sop
  806. setUserCourseSop(){
  807. if(this.ids==null||this.ids==""){
  808. return this.$message('请选择需要设置课程SOP的客户');
  809. }
  810. this.$confirm('批量设置客户课节SOP可能会存在重复,确定要批量设置吗?', "警告", {
  811. confirmButtonText: "确定",
  812. cancelButtonText: "取消",
  813. type: "warning"
  814. }).then(() => {
  815. this.setSop.open = true;
  816. this.setSop.type = 2;
  817. })
  818. .catch(() => {
  819. // 可以处理用户点击“取消”的逻辑
  820. });
  821. },
  822. tagSelection(row){
  823. row.isSelected= !row.isSelected;
  824. this.$forceUpdate();
  825. },
  826. // 取消按钮
  827. cancel() {
  828. this.open = false;
  829. this.reset();
  830. },
  831. addTagCancel() {
  832. this.tagOpen = false;
  833. this.addTagForm={
  834. userIds:[],
  835. tagIds:[]
  836. };
  837. },
  838. DelTagCancel() {
  839. this.tagDelOpen = false;
  840. this.addTagForm={
  841. userIds:[],
  842. tagIds:[]
  843. };
  844. },
  845. addTagSubmitForm(){
  846. for (let i = 0; i < this.tagGroupList.length; i++) {
  847. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  848. if(this.tagGroupList[i].tag[x].isSelected==true){
  849. this.addTagForm.tagIds.push(this.tagGroupList[i].tag[x].tagId)
  850. }
  851. }
  852. }
  853. if(this.addTagForm.tagIds==[]||this.addTagForm.tagIds==null||this.addTagForm.tagIds==""){
  854. return this.$message('请选择标签');
  855. }
  856. this.addTagForm.corpId=this.queryParams.corpId
  857. this.addTagForm.userIds=this.ids;
  858. let loadingRock = this.$loading({
  859. lock: true,
  860. text: '正在执行中请稍后~~请不要刷新页面!!',
  861. spinner: 'el-icon-loading',
  862. background: 'rgba(0, 0, 0, 0.7)'
  863. });
  864. addTag(this.addTagForm).then(response => {
  865. this.msgSuccess(response.msg);
  866. this.tagOpen = false;
  867. loadingRock.close();
  868. this.addTagForm={
  869. userIds:[],
  870. tagIds:[]
  871. };
  872. this.getList()
  873. }).finally(res=>{
  874. loadingRock.close();
  875. });
  876. },
  877. tagDelSubmitForm(){
  878. for (let i = 0; i < this.tagGroupList.length; i++) {
  879. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  880. if(this.tagGroupList[i].tag[x].isSelected==true){
  881. this.addTagForm.tagIds.push(this.tagGroupList[i].tag[x].tagId)
  882. }
  883. }
  884. }
  885. if(this.addTagForm.tagIds==[]||this.addTagForm.tagIds==null||this.addTagForm.tagIds==""){
  886. return this.$message('请选择标签');
  887. }
  888. this.addTagForm.corpId=this.queryParams.corpId
  889. this.addTagForm.userIds=this.ids;
  890. let loadingRock = this.$loading({
  891. lock: true,
  892. text: '正在执行中请稍后~~请不要刷新页面!!',
  893. spinner: 'el-icon-loading',
  894. background: 'rgba(0, 0, 0, 0.7)'
  895. });
  896. delTag(this.addTagForm).then(response => {
  897. this.msgSuccess(response.msg);
  898. this.tagDelOpen = false;
  899. loadingRock.close();
  900. this.addTagForm={
  901. userIds:[],
  902. tagIds:[]
  903. };
  904. this.getList()
  905. }).finally(res=>{
  906. loadingRock.close();
  907. });
  908. },
  909. // 表单重置
  910. reset() {
  911. this.form = {
  912. id: null,
  913. userId: null,
  914. externalUserId: null,
  915. name: null,
  916. companyUserId:null,
  917. customerId:null,
  918. avatar: null,
  919. type: null,
  920. gender: null,
  921. remark: null,
  922. description: null,
  923. tagIds: null,
  924. remarkMobiles: null,
  925. remarkCorpName: null,
  926. addWay: null,
  927. operUserid: null,
  928. corpId: null,
  929. companyId: null,
  930. transferStatus:null,
  931. status:null,
  932. createTime:null,
  933. transferTime:null,
  934. transferNum:null,
  935. lossTime:null,
  936. delTime:null,
  937. state:null,
  938. wayId:null,
  939. stageStatus:null,
  940. customerName:null
  941. };
  942. this.resetForm("form");
  943. },
  944. /** 搜索按钮操作 */
  945. handleQuery() {
  946. this.queryParams.tagIds=this.selectTags.join(',')
  947. this.queryParams.pageNum = 1;
  948. this.getList();
  949. },
  950. handleSearchTags(name){
  951. searchTags({name:name,corpId:this.queryParams.corpId}).then(response => {
  952. this.tagGroupList = response.rows;
  953. });
  954. },
  955. cancelSearchTags(){
  956. this.updateCorpId()
  957. },
  958. /** 重置按钮操作 */
  959. resetQuery() {
  960. this.resetForm("queryForm");
  961. this.queryParams.corpId= this.myQwCompanyList[0].dictValue;
  962. this.selectTags=[];
  963. this.handleQuery();
  964. },
  965. // 多选框选中数据
  966. handleSelectionChange(selection) {
  967. this.ids = selection.map(item => item.id)
  968. this.single = selection.length!==1
  969. this.multiple = !selection.length
  970. },
  971. /** 新增按钮操作 */
  972. handleAdd() {
  973. this.loading=true;
  974. this.form.corpId=this.queryParams.corpId
  975. addExternalContact(this.form).then(response => {
  976. this.msgSuccess("同步成功");
  977. this.getList();
  978. }).finally(()=>{
  979. this.loading=false;
  980. });
  981. },
  982. /** 修改按钮操作 */
  983. handleUpdate(row) {
  984. this.reset();
  985. const id = row.id || this.ids
  986. getExternalContact(id).then(response => {
  987. this.form = response.data;
  988. if(this.form.remarkMobiles!=null){
  989. this.remarkMobiles=JSON.parse(this.form.remarkMobiles)
  990. }else{
  991. this.remarkMobiles=[]
  992. }
  993. this.open = true;
  994. this.title = "修改企业微信客户";
  995. });
  996. },
  997. /** 绑定客户操作 */
  998. handleUpdateCustomer(row){
  999. this.bindCustomer.title="绑定客户"
  1000. this.bindCustomer.open=true;
  1001. this.form.id=row.id
  1002. this.form.externalUserId=row.externalUserId
  1003. this.form.name=row.name
  1004. },
  1005. handleUpdateUser(row){
  1006. this.user.title="绑定客户"
  1007. this.user.open=true;
  1008. this.userForm.id=row.id;
  1009. },
  1010. handleUnBindUserId(val){
  1011. this.$confirm(
  1012. '确认解绑客户:<span style="color: green;">' + val.name + '' +
  1013. '</span> 的小程序用户?<br><span style="color: red;">【ps:可能会导致客户无法看课】</span>',
  1014. {
  1015. confirmButtonText: "确定",
  1016. cancelButtonText: "取消",
  1017. type: "warning",
  1018. dangerouslyUseHTMLString: true // 允许使用 HTML 字符串
  1019. }
  1020. ).then(() => {
  1021. return unBindUserId(val.id);
  1022. }).then(response => {
  1023. this.getList();
  1024. this.msgSuccess("解绑成功");
  1025. }).finally(res=>{
  1026. this.getList();
  1027. })
  1028. },
  1029. bindCustomerId(row){
  1030. console.log("row",row)
  1031. // this.qwFormCustomer.customerId=row;
  1032. this.form.customerId=row;
  1033. this.form.corpId=this.queryParams.corpId;
  1034. this.msgWarning("绑定中.....同步信息中.....");
  1035. editbindCustomer(this.form).then(res=>{
  1036. //清空表单
  1037. this.reset();
  1038. this.bindCustomer.open = false;
  1039. this.msgSuccess("绑定成功");
  1040. this.getList();
  1041. })
  1042. },
  1043. //设置一个SOP
  1044. setCourseSOP(row) {
  1045. // 检查 row.miniUserId 是否为 null
  1046. if (row.miniUserId === null || row.miniUserId === undefined) {
  1047. return this.$confirm('当前客户【CRM客户详情】中 未绑定小程序客户,请先绑定', "警告", {
  1048. confirmButtonText: "确定",
  1049. cancelButtonText: "取消",
  1050. type: "warning"
  1051. }).catch(error => {
  1052. this.msgWarning("操作取消:", error);
  1053. });
  1054. } else {
  1055. this.chooseCustomerSOP = row;
  1056. this.setSop.open = true;
  1057. this.setSop.type=1;
  1058. }
  1059. },
  1060. //选择课程SOP
  1061. // 用于设置 customerCourseForm 和 customerCourseFormLogs 的共同属性
  1062. setCommonProperties(form, row) {
  1063. form.qwUserid = this.chooseCustomerSOP.userId;
  1064. form.companyUserId = this.chooseCustomerSOP.companyUserId;
  1065. form.externalUserId = this.chooseCustomerSOP.externalUserId;
  1066. form.customerId = this.chooseCustomerSOP.customerId;
  1067. form.miniUserId = this.chooseCustomerSOP.miniUserId;
  1068. form.businessId = row.businessId;
  1069. },
  1070. bindCourseSop(row,days) {
  1071. if (this.setSop.type==2){
  1072. this.setSop.open = false;
  1073. this.loading=true;
  1074. this.msgWarning("设定中.....同步信息中.....");
  1075. setCustomerCourseSopList({ids:this.ids,fsCourseSopId:row.id,days:days}).then(res=>{
  1076. let msg=" 批量设置成功数【" + res.successNum + "】,<br>"
  1077. if (res.failCRM.length>0){
  1078. msg+="失败的客户【" + res.failCRM + "】,原因是未绑定CRM客户。<br>"
  1079. }
  1080. if (res.failMiNi.length>0){
  1081. msg+="失败的客户【" + res.failMiNi + "】,原因是CRM中未绑定小程序客户。<br>"
  1082. }
  1083. if (res.failCompany.length>0){
  1084. msg+="失败的客户【" + res.failCompany + "】,原因是客户没有所属成员。<br>"
  1085. }
  1086. return this.$confirm(msg, "提示", {
  1087. confirmButtonText: "确定",
  1088. cancelButtonText: "取消",
  1089. type: "warning",
  1090. dangerouslyUseHTMLString: true // 允许使用HTML标签
  1091. }).catch(error => {
  1092. this.msgSuccess("操作完成~");
  1093. });
  1094. }).finally(()=>{
  1095. this.loading = false;
  1096. this.getList();
  1097. })
  1098. }else if (this.setSop.type==1){
  1099. // 设置 customerCourseFormLogs 的属性
  1100. this.setCommonProperties(this.customerCourseFormLogs, row);
  1101. // 设置 customerCourseForm 的属性
  1102. this.setCommonProperties(this.customerCourseForm, row);
  1103. this.customerCourseForm.sopId = row.id;
  1104. this.customerCourseForm.sopType = row.sopType;
  1105. this.customerCourseForm.setting = row.setting;
  1106. this.customerCourseForm.days = days;
  1107. // 执行异步操作
  1108. getCustomerCourseSop(this.customerCourseFormLogs)
  1109. .then(res => {
  1110. if (res) {
  1111. return this.$confirm('当前客户已设置过相同课程课节SOP,确定还要再次设置吗?', "警告", {
  1112. confirmButtonText: "确定",
  1113. cancelButtonText: "取消",
  1114. type: "warning"
  1115. });
  1116. } else {
  1117. return Promise.resolve(); // 如果没有设置过,直接执行后续操作
  1118. }
  1119. })
  1120. .then(() => {
  1121. this.loading = true;
  1122. this.setSop.open = false;
  1123. this.msgSuccess("设定中.....同步信息中.....");
  1124. return setCustomerCourseSop(this.customerCourseForm);
  1125. })
  1126. .then(() => {
  1127. this.msgSuccess("设定成功");
  1128. })
  1129. .catch(error => {
  1130. this.msgWarning("操作取消:", error);
  1131. })
  1132. .finally(() => {
  1133. this.loading = false;
  1134. this.getList();
  1135. });
  1136. }
  1137. },
  1138. /** 提交按钮 */
  1139. submitForm() {
  1140. this.$refs["form"].validate(valid => {
  1141. if (valid) {
  1142. if (this.form.id != null) {
  1143. this.form.remarkMobiles=JSON.stringify(this.remarkMobiles)
  1144. updateExternalContact(this.form).then(response => {
  1145. this.msgSuccess("修改成功");
  1146. this.open = false;
  1147. this.getList();
  1148. });
  1149. } else {
  1150. addExternalContact(this.form).then(response => {
  1151. this.msgSuccess("新增成功");
  1152. this.open = false;
  1153. this.getList();
  1154. });
  1155. }
  1156. }
  1157. });
  1158. },
  1159. /** 删除按钮操作 */
  1160. handleDelete(row) {
  1161. const ids = row.id || this.ids;
  1162. this.$confirm('是否确认删除企业微信客户编号为"' + ids + '"的数据项?', "警告", {
  1163. confirmButtonText: "确定",
  1164. cancelButtonText: "取消",
  1165. type: "warning"
  1166. }).then(function() {
  1167. return delExternalContact(ids);
  1168. }).then(() => {
  1169. this.getList();
  1170. this.msgSuccess("删除成功");
  1171. }).catch(() => {});
  1172. },
  1173. updateTalk(row){
  1174. const ids = row.id || this.ids;
  1175. this.$confirm('是否确认批量更改用户信息为非首次交流', "警告", {
  1176. confirmButtonText: "确定",
  1177. cancelButtonText: "取消",
  1178. type: "warning"
  1179. }).then(function() {
  1180. return editTalk(ids);
  1181. }).then(() => {
  1182. this.getList();
  1183. this.msgSuccess("成功");
  1184. }).catch(() => {});
  1185. },
  1186. /** 导出按钮操作 */
  1187. handleExport() {
  1188. const queryParams = this.queryParams;
  1189. this.$confirm('是否确认导出所有企业微信客户数据项?', "警告", {
  1190. confirmButtonText: "确定",
  1191. cancelButtonText: "取消",
  1192. type: "warning"
  1193. }).then(() => {
  1194. this.exportLoading = true;
  1195. return exportExternalContact(queryParams);
  1196. }).then(response => {
  1197. this.download(response.msg);
  1198. this.exportLoading = false;
  1199. }).catch(() => {});
  1200. }
  1201. }
  1202. };
  1203. </script>
  1204. <style scoped>
  1205. /* CSS 样式 */
  1206. .tag-container {
  1207. display: flex;
  1208. flex-wrap: wrap; /* 超出宽度时自动换行 */
  1209. gap: 8px; /* 设置标签之间的间距 */
  1210. }
  1211. .name-background {
  1212. display: inline-block;
  1213. background-color: #abece6; /* 背景颜色 */
  1214. padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
  1215. border-radius: 4px; /* 可选:设置圆角 */
  1216. }
  1217. /* CSS 样式 */
  1218. .tag-container {
  1219. display: flex;
  1220. flex-wrap: wrap; /* 超出宽度时自动换行 */
  1221. gap: 8px; /* 设置标签之间的间距 */
  1222. }
  1223. .name-background {
  1224. display: inline-block;
  1225. background-color: #abece6; /* 背景颜色 */
  1226. padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
  1227. border-radius: 4px; /* 可选:设置圆角 */
  1228. }
  1229. .tag-box {
  1230. padding: 8px 12px;
  1231. border: 1px solid #989797;
  1232. border-radius: 4px;
  1233. cursor: pointer;
  1234. display: inline-block;
  1235. }
  1236. .tag-selected {
  1237. background-color: #00bc98;
  1238. color: #fff;
  1239. border-color: #00bc98;
  1240. }
  1241. .el-tag + .el-tag {
  1242. margin-left: 10px;
  1243. }
  1244. .button-new-tag {
  1245. margin-left: 10px;
  1246. height: 32px;
  1247. line-height: 30px;
  1248. padding-top: 0;
  1249. padding-bottom: 0;
  1250. }
  1251. .input-new-tag {
  1252. width: 90px;
  1253. margin-left: 10px;
  1254. vertical-align: bottom;
  1255. }
  1256. </style>