index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="148px">
  4. <el-form-item label="外部联系人名称" prop="extName">
  5. <el-input
  6. v-model="queryParams.extName"
  7. placeholder="请输入外部联系人名称"
  8. clearable
  9. size="small"
  10. @keyup.enter.native="handleQuery"
  11. />
  12. </el-form-item>
  13. <el-form-item label="企微用户名称" prop="qwUserName">
  14. <el-input
  15. v-model="queryParams.qwUserName"
  16. placeholder="请输入企微用户名称"
  17. clearable
  18. size="small"
  19. @keyup.enter.native="handleQuery"
  20. />
  21. </el-form-item>
  22. <!-- <el-form-item label="标题" prop="title">
  23. <el-input
  24. v-model="queryParams.title"
  25. placeholder="请输入标题"
  26. clearable
  27. size="small"
  28. @keyup.enter.native="handleQuery"
  29. />
  30. </el-form-item>-->
  31. <el-form-item label="通话状态" prop="status">
  32. <el-select v-model="queryParams.status" placeholder="请选择通话状态" clearable size="small">
  33. <el-option
  34. v-for="dict in statusOptions"
  35. :key="dict.dictValue"
  36. :label="dict.dictLabel"
  37. :value="dict.dictValue"
  38. />
  39. </el-select>
  40. </el-form-item>
  41. <!-- <el-form-item label="企微id" prop="corpId">
  42. <el-input
  43. v-model="queryParams.corpId"
  44. placeholder="请输入企微id"
  45. clearable
  46. size="small"
  47. @keyup.enter.native="handleQuery"
  48. />
  49. </el-form-item>-->
  50. <el-form-item label="公司名称" prop="companyName">
  51. <el-input
  52. v-model="queryParams.companyName"
  53. placeholder="请输入公司名称"
  54. clearable
  55. size="small"
  56. @keyup.enter.native="handleQuery"
  57. />
  58. </el-form-item>
  59. <el-form-item label="销售用户名称" prop="companyUserName">
  60. <el-input
  61. v-model="queryParams.companyUserName"
  62. placeholder="请输入销售用户名称"
  63. clearable
  64. size="small"
  65. @keyup.enter.native="handleQuery"
  66. />
  67. </el-form-item>
  68. <!-- <el-form-item label="时长秒" prop="duration">
  69. <el-input
  70. v-model="queryParams.duration"
  71. placeholder="请输入时长秒"
  72. clearable
  73. size="small"
  74. @keyup.enter.native="handleQuery"
  75. />
  76. </el-form-item>-->
  77. <el-form-item label="标签" prop="tagIds">
  78. <div @click="hangleChangeTags()" style="cursor: pointer; border: 1px solid #e6e6e6; background-color: white; overflow: hidden; flex-grow: 1;width: 250px">
  79. <div style="min-height: 35px; max-height: 200px; overflow-y: auto;" :key="selectTags.length">
  80. <el-tag type="success"
  81. closable
  82. :disable-transitions="false"
  83. v-for="list in this.selectTags"
  84. :key="list.tagId"
  85. @close="handleCloseTags(list)"
  86. style="margin: 3px;"
  87. >{{list.name}}
  88. </el-tag>
  89. </div>
  90. </div>
  91. </el-form-item>
  92. <el-form-item label="创建时间" prop="createTime">
  93. <el-date-picker v-model="createTime" size="small" style="width: 215px"
  94. value-format="yyyy-MM-dd" type="daterange" range-separator="-"
  95. start-placeholder="开始日期" end-placeholder="结束日期"
  96. @change="changeTime"></el-date-picker>
  97. </el-form-item>
  98. <el-form-item>
  99. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  100. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  101. </el-form-item>
  102. </el-form>
  103. <el-row :gutter="10" class="mb8">
  104. <!-- <el-col :span="1.5">
  105. <el-button
  106. type="primary"
  107. plain
  108. icon="el-icon-plus"
  109. size="mini"
  110. @click="handleAdd"
  111. v-hasPermi="['qw:qwUserVoiceLog:add']"
  112. >新增</el-button>
  113. </el-col>
  114. <el-col :span="1.5">
  115. <el-button
  116. type="success"
  117. plain
  118. icon="el-icon-edit"
  119. size="mini"
  120. :disabled="single"
  121. @click="handleUpdate"
  122. v-hasPermi="['qw:qwUserVoiceLog:edit']"
  123. >修改</el-button>
  124. </el-col>
  125. <el-col :span="1.5">
  126. <el-button
  127. type="danger"
  128. plain
  129. icon="el-icon-delete"
  130. size="mini"
  131. :disabled="multiple"
  132. @click="handleDelete"
  133. v-hasPermi="['qw:qwUserVoiceLog:remove']"
  134. >删除</el-button>
  135. </el-col>-->
  136. <el-col :span="1.5">
  137. <el-button
  138. type="warning"
  139. plain
  140. icon="el-icon-download"
  141. size="mini"
  142. :loading="exportLoading"
  143. @click="handleExport"
  144. v-hasPermi="['qw:qwUserVoiceLog:export']"
  145. >导出</el-button>
  146. </el-col>
  147. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  148. </el-row>
  149. <el-table border v-loading="loading" :data="qwUserVoiceLogList" @selection-change="handleSelectionChange">
  150. <el-table-column type="selection" width="55" align="center" />
  151. <el-table-column label="id" align="center" width="80" prop="id" />
  152. <el-table-column label="外部联系人名称" align="center" prop="qwExternalContact.name" />
  153. <el-table-column label="企微用户名称" align="center" prop="qwUser.qwUserName" />
  154. <el-table-column label="时长秒" align="center" prop="duration" />
  155. <el-table-column label="标题" align="center" width="80" prop="title" />
  156. <el-table-column label="通话状态" align="center" prop="status">
  157. <template slot-scope="scope">
  158. <dict-tag :options="statusOptions" :value="scope.row.status"/>
  159. </template>
  160. </el-table-column>
  161. <el-table-column label="标签" align="center" prop="tagIdsName" width="250px">
  162. <template slot-scope="scope">
  163. <div v-for="name in scope.row.tagIdsName" style="display: inline;">
  164. <el-tag type="success">{{ name }}</el-tag>
  165. </div>
  166. </template>
  167. </el-table-column>
  168. <el-table-column label="企微id" align="center" width="80" prop="corpId" />
  169. <el-table-column label="公司名称" align="center" prop="company.companyName" />
  170. <el-table-column label="销售用户名称" align="center" prop="companyUser.userName" />
  171. <el-table-column label="创建时间" align="center" prop="createTime" />
  172. <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  173. <template slot-scope="scope">
  174. <el-button
  175. size="mini"
  176. type="text"
  177. icon="el-icon-edit"
  178. @click="handleUpdate(scope.row)"
  179. v-hasPermi="['qw:qwUserVoiceLog:edit']"
  180. >修改</el-button>
  181. <el-button
  182. size="mini"
  183. type="text"
  184. icon="el-icon-delete"
  185. @click="handleDelete(scope.row)"
  186. v-hasPermi="['qw:qwUserVoiceLog:remove']"
  187. >删除</el-button>
  188. </template>
  189. </el-table-column>-->
  190. </el-table>
  191. <pagination
  192. v-show="total>0"
  193. :total="total"
  194. :page.sync="queryParams.pageNum"
  195. :limit.sync="queryParams.pageSize"
  196. @pagination="getList"
  197. />
  198. <!-- 搜索标签 -->
  199. <el-dialog :title="changeTagDialog.title" :visible.sync="changeTagDialog.open" width="1000px" append-to-body>
  200. <div>搜索标签:
  201. <el-input v-model="queryTagParams.name" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
  202. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(queryTagParams.name)">搜索</el-button>
  203. <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
  204. </div>
  205. <div v-for="item in tagGroupList" :key="item.id" >
  206. <div style="font-size: 20px;margin-top: 20px;margin-bottom: 20px;">
  207. <span class="name-background">{{ item.name }}</span>
  208. </div>
  209. <!-- 添加外层滚动容器 -->
  210. <div class="scroll-wrapper">
  211. <div class="tag-container">
  212. <a
  213. v-for="tagItem in item.tag"
  214. class="tag-box"
  215. @click="tagSelection(tagItem)"
  216. :class="{ 'tag-selected': tagItem.isSelected }"
  217. >
  218. {{ tagItem.name }}
  219. </a>
  220. </div>
  221. </div>
  222. </div>
  223. <pagination
  224. v-show="tagTotal>0"
  225. :total="tagTotal"
  226. :page.sync="queryTagParams.pageNum"
  227. :limit.sync="queryTagParams.pageSize"
  228. @pagination="getPageListTagGroup"
  229. />
  230. <div slot="footer" class="dialog-footer">
  231. <el-button type="primary" @click="tagSubmitForm()">确 定</el-button>
  232. <el-button @click="tagCancel()">取消</el-button>
  233. </div>
  234. </el-dialog>
  235. <!-- 添加或修改企微用户通话记录对话框 -->
  236. <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
  237. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  238. <el-form-item label="外部联系人id" prop="extId">
  239. <el-input v-model="form.extId" placeholder="请输入外部联系人id" />
  240. </el-form-item>
  241. <el-form-item label="企微用户id" prop="qwUserId">
  242. <el-input v-model="form.qwUserId" placeholder="请输入企微用户id" />
  243. </el-form-item>
  244. <el-form-item label="时长秒" prop="duration">
  245. <el-input v-model="form.duration" placeholder="请输入时长秒" />
  246. </el-form-item>
  247. <el-form-item label="标题" prop="title">
  248. <el-input v-model="form.title" placeholder="请输入标题" />
  249. </el-form-item>
  250. <el-form-item label="1接听 2未接">
  251. <el-radio-group v-model="form.status">
  252. <el-radio
  253. v-for="dict in statusOptions"
  254. :key="dict.dictValue"
  255. :label="parseInt(dict.dictValue)"
  256. >{{dict.dictLabel}}</el-radio>
  257. </el-radio-group>
  258. </el-form-item>
  259. <el-form-item label="企微id" prop="corpId">
  260. <el-input v-model="form.corpId" placeholder="请输入企微id" />
  261. </el-form-item>
  262. <el-form-item label="公司id" prop="companyId">
  263. <el-input v-model="form.companyId" placeholder="请输入公司id" />
  264. </el-form-item>
  265. <el-form-item label="销售用户id" prop="companyUserId">
  266. <el-input v-model="form.companyUserId" placeholder="请输入销售用户id" />
  267. </el-form-item>
  268. </el-form>
  269. <div slot="footer" class="dialog-footer">
  270. <el-button type="primary" @click="submitForm">确 定</el-button>
  271. <el-button @click="cancel">取 消</el-button>
  272. </div>
  273. </el-dialog>
  274. </div>
  275. </template>
  276. <script>
  277. import { listQwUserVoiceLog, getQwUserVoiceLog, delQwUserVoiceLog, addQwUserVoiceLog, updateQwUserVoiceLog, exportQwUserVoiceLog } from "@/api/qw/qwUserVoiceLog";
  278. import {allListTagGroup} from "@/api/qw/tagGroup";
  279. import {searchTags} from "@/api/qw/tag";
  280. export default {
  281. name: "QwUserVoiceLog",
  282. data() {
  283. return {
  284. // 遮罩层
  285. loading: true,
  286. // 导出遮罩层
  287. exportLoading: false,
  288. // 选中数组
  289. ids: [],
  290. // 非单个禁用
  291. single: true,
  292. // 非多个禁用
  293. multiple: true,
  294. // 显示搜索条件
  295. showSearch: true,
  296. //时间范围
  297. createTime:null,
  298. beginTime:null,
  299. endTime:null,
  300. // 总条数
  301. total: 0,
  302. // 企微用户通话记录表格数据
  303. qwUserVoiceLogList: [],
  304. selectTags:[],
  305. queryTagParams:{
  306. pageNum: 1,
  307. pageSize: 5,
  308. total:0,
  309. name:null,
  310. corpId:null,
  311. },
  312. //标签
  313. changeTagDialog:{
  314. title:"",
  315. open:false,
  316. },
  317. tagTotal:0,
  318. tagGroupList: [],
  319. addTagForm:{
  320. userIds:[],
  321. tagIds:[]
  322. },
  323. // 弹出层标题
  324. title: "",
  325. // 是否显示弹出层
  326. open: false,
  327. // 1接听 2未接字典
  328. statusOptions: [],
  329. // 查询参数
  330. queryParams: {
  331. pageNum: 1,
  332. pageSize: 10,
  333. extId: null,
  334. extName:null,
  335. qwUserId: null,
  336. qwUserName: null,
  337. duration: null,
  338. title: null,
  339. status: null,
  340. corpId: null,
  341. companyId: null,
  342. companyName: null,
  343. companyUserId: null,
  344. companyUserName: null,
  345. createTime:null,
  346. beginTime:null,
  347. endTime:null,
  348. tagIds: null,
  349. },
  350. // 表单参数
  351. form: {},
  352. // 表单校验
  353. rules: {
  354. }
  355. };
  356. },
  357. created() {
  358. this.getList();
  359. this.getDicts("sys_qw_user_voice_status").then(response => {
  360. this.statusOptions = response.data;
  361. });
  362. },
  363. methods: {
  364. tagSubmitForm(){
  365. for (let i = 0; i < this.tagGroupList.length; i++) {
  366. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  367. if (this.tagGroupList[i].tag[x].isSelected === true) {
  368. if (!this.selectTags) {
  369. this.selectTags = [];
  370. }
  371. // 检查当前 tag 是否已经存在于 tagListFormIndex[index] 中
  372. let tagExists = this.selectTags.some(
  373. tag => tag.id === this.tagGroupList[i].tag[x].id
  374. );
  375. // 如果 tag 不存在于 tagListFormIndex[index] 中,则新增
  376. if (!tagExists) {
  377. this.selectTags.push(this.tagGroupList[i].tag[x]);
  378. }
  379. }
  380. }
  381. }
  382. if (!this.selectTags || this.selectTags.length === 0) {
  383. return this.$message('请选择标签');
  384. }
  385. this.changeTagDialog.open = false;
  386. },
  387. //取消选择标签
  388. tagCancel(){
  389. this.changeTagDialog.open = false;
  390. },
  391. tagSelection(row){
  392. row.isSelected= !row.isSelected;
  393. this.$forceUpdate();
  394. },
  395. handleSearchTags(name){
  396. if (!name){
  397. return this.$message.error("请输入要搜索的标签")
  398. }
  399. this.queryTagParams.name=name;
  400. this.queryTagParams.corpId=this.queryParams.corpId;
  401. searchTags(this.queryTagParams).then(response => {
  402. this.tagGroupList = response.rows;
  403. this.tagTotal = response.total;
  404. });
  405. // searchTags({name:name,corpId:this.queryParams.corpId}).then(response => {
  406. // this.tagGroupList = response.rows;
  407. // });
  408. },
  409. cancelSearchTags(){
  410. this.resetSearchQueryTag()
  411. this.getPageListTagGroup();
  412. },
  413. //删除一些选择的标签
  414. handleCloseTags(list){
  415. const ls = this.selectTags.findIndex(t => t.tagId === list.tagId);
  416. if (ls !== -1) {
  417. this.selectTags.splice(ls, 1);
  418. this.selectTags = [...this.selectTags];
  419. }
  420. if (this.selectTags!=null && this.selectTags.length>0){
  421. // 确保 this.form.tags 是数组
  422. if (!this.queryParams.tagIds) {
  423. this.queryParams.tagIds = []; // 如果未定义,初始化
  424. } else {
  425. this.queryParams.tagIds = []; // 清空已有数据
  426. }
  427. // 遍历并添加 tagId
  428. this.selectTags.forEach(tag => {
  429. if (tag.tagId) { // 确保 tagId 存在
  430. this.queryParams.tagIds.push(tag.tagId);
  431. }
  432. });
  433. console.log(this.queryParams.tagIds)
  434. this.queryParams.tagIds=this.queryParams.tagIds.join(",");
  435. }else {
  436. this.queryParams.tagIds=null;
  437. }
  438. },
  439. getPageListTagGroup(){
  440. this.queryTagParams.corpId=this.queryParams.corpId
  441. allListTagGroup(this.queryTagParams).then(response => {
  442. this.tagGroupList = response.rows;
  443. this.tagTotal = response.total;
  444. });
  445. },
  446. //搜索的标签
  447. hangleChangeTags(){
  448. this.changeTagDialog.title="搜索的标签"
  449. this.changeTagDialog.open=true;
  450. // 获取 tagListFormIndex 中的所有 tagId,用于快速查找
  451. const selectedTagIds = new Set(
  452. (this.selectTags || []).map(tagItem => tagItem?.tagId)
  453. );
  454. this.queryTagParams.name=null;
  455. this.getPageListTagGroup();
  456. setTimeout(() => {
  457. for (let i = 0; i < this.tagGroupList.length; i++) {
  458. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  459. this.tagGroupList[i].tag[x].isSelected = selectedTagIds.has(this.tagGroupList[i].tag[x].tagId);
  460. }
  461. }
  462. }, 200);
  463. },
  464. /** 查询企微用户通话记录列表 */
  465. getList() {
  466. this.loading = true;
  467. const { qwUserName, ...queryParams } = this.queryParams;
  468. listQwUserVoiceLog(queryParams).then(response => {
  469. this.qwUserVoiceLogList = response.rows;
  470. this.total = response.total;
  471. this.loading = false;
  472. });
  473. },
  474. changeTime(){
  475. if(this.createTime!=null){
  476. this.queryParams.beginTime=this.createTime[0];
  477. this.queryParams.endTime=this.createTime[1];
  478. }else{
  479. this.queryParams.beginTime=null;
  480. this.queryParams.endTime=null;
  481. }
  482. },
  483. // 取消按钮
  484. cancel() {
  485. this.open = false;
  486. this.reset();
  487. },
  488. // 表单重置
  489. reset() {
  490. this.form = {
  491. id: null,
  492. extId: null,
  493. qwUserId: null,
  494. duration: null,
  495. title: null,
  496. status: 0,
  497. corpId: null,
  498. companyId: null,
  499. companyUserId: null,
  500. createTime:null,
  501. beginTime:null,
  502. endTime:null,
  503. };
  504. this.resetForm("form");
  505. },
  506. /** 搜索按钮操作 */
  507. handleQuery() {
  508. if (this.selectTags!=null && this.selectTags.length>0){
  509. // 确保 this.form.tags 是数组
  510. if (!this.queryParams.tagIds) {
  511. this.queryParams.tagIds = []; // 如果未定义,初始化
  512. } else {
  513. this.queryParams.tagIds = []; // 清空已有数据
  514. }
  515. // 遍历并添加 tagId
  516. this.selectTags.forEach(tag => {
  517. if (tag.tagId) { // 确保 tagId 存在
  518. this.queryParams.tagIds.push(tag.tagId);
  519. }
  520. });
  521. //this.queryParams.tagIds=this.queryParams.tagIds.join(",");
  522. }else {
  523. this.queryParams.tagIds=null;
  524. }
  525. this.queryParams.pageNum = 1;
  526. this.getList();
  527. },
  528. /** 重置按钮操作 */
  529. resetQuery() {
  530. this.resetForm("queryForm");
  531. if (this.myQwCompanyList && this.myQwCompanyList.length > 0) {
  532. this.queryParams.corpId = this.myQwCompanyList[0].dictValue;
  533. } else {
  534. this.queryParams.corpId = null; // 或设置默认值
  535. }
  536. this.selectTags=[];
  537. this.createTime=null;
  538. this.queryParams.beginTime=null;
  539. this.queryParams.endTime=null;
  540. this.queryParams.tagIds=null;
  541. this.$forceUpdate();
  542. this.handleQuery();
  543. },
  544. // 多选框选中数据
  545. handleSelectionChange(selection) {
  546. this.ids = selection.map(item => item.id)
  547. this.single = selection.length!==1
  548. this.multiple = !selection.length
  549. },
  550. /** 新增按钮操作 */
  551. handleAdd() {
  552. this.reset();
  553. this.open = true;
  554. this.title = "添加企微用户通话记录";
  555. },
  556. /** 修改按钮操作 */
  557. handleUpdate(row) {
  558. this.reset();
  559. const id = row.id || this.ids
  560. getQwUserVoiceLog(id).then(response => {
  561. this.form = response.data;
  562. this.open = true;
  563. this.title = "修改企微用户通话记录";
  564. });
  565. },
  566. /** 提交按钮 */
  567. submitForm() {
  568. this.$refs["form"].validate(valid => {
  569. if (valid) {
  570. if (this.form.id != null) {
  571. updateQwUserVoiceLog(this.form).then(response => {
  572. this.msgSuccess("修改成功");
  573. this.open = false;
  574. this.getList();
  575. });
  576. } else {
  577. addQwUserVoiceLog(this.form).then(response => {
  578. this.msgSuccess("新增成功");
  579. this.open = false;
  580. this.getList();
  581. });
  582. }
  583. }
  584. });
  585. },
  586. /** 删除按钮操作 */
  587. handleDelete(row) {
  588. const ids = row.id || this.ids;
  589. this.$confirm('是否确认删除企微用户通话记录编号为"' + ids + '"的数据项?', "警告", {
  590. confirmButtonText: "确定",
  591. cancelButtonText: "取消",
  592. type: "warning"
  593. }).then(function() {
  594. return delQwUserVoiceLog(ids);
  595. }).then(() => {
  596. this.getList();
  597. this.msgSuccess("删除成功");
  598. }).catch(() => {});
  599. },
  600. /** 导出按钮操作 */
  601. handleExport() {
  602. const queryParams = this.queryParams;
  603. this.$confirm('是否确认导出所有企微用户通话记录数据项?', "警告", {
  604. confirmButtonText: "确定",
  605. cancelButtonText: "取消",
  606. type: "warning"
  607. }).then(() => {
  608. this.exportLoading = true;
  609. return exportQwUserVoiceLog(queryParams);
  610. }).then(response => {
  611. this.download(response.msg);
  612. this.exportLoading = false;
  613. }).catch(() => {});
  614. }
  615. }
  616. };
  617. </script>
  618. <style scoped>
  619. /* CSS 样式 */
  620. .tag-container {
  621. display: flex;
  622. flex-wrap: wrap; /* 超出宽度时自动换行 */
  623. gap: 8px; /* 设置标签之间的间距 */
  624. }
  625. .name-background {
  626. display: inline-block;
  627. background-color: #abece6; /* 背景颜色 */
  628. padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
  629. border-radius: 4px; /* 可选:设置圆角 */
  630. }
  631. /* CSS 样式 */
  632. .tag-container {
  633. display: flex;
  634. flex-wrap: wrap; /* 超出宽度时自动换行 */
  635. gap: 8px; /* 设置标签之间的间距 */
  636. }
  637. .name-background {
  638. display: inline-block;
  639. background-color: #abece6; /* 背景颜色 */
  640. padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
  641. border-radius: 4px; /* 可选:设置圆角 */
  642. }
  643. .tag-box {
  644. padding: 8px 12px;
  645. border: 1px solid #989797;
  646. border-radius: 4px;
  647. cursor: pointer;
  648. display: inline-block;
  649. }
  650. .tag-selected {
  651. background-color: #00bc98;
  652. color: #fff;
  653. border-color: #00bc98;
  654. }
  655. .el-tag + .el-tag {
  656. margin-left: 10px;
  657. }
  658. .suggestion-box {
  659. position: absolute;
  660. z-index: 999;
  661. background: #fff;
  662. border: 1px solid #ddd;
  663. max-height: 200px;
  664. overflow-y: auto;
  665. width: 100%;
  666. }
  667. .suggestion-item {
  668. padding: 10px;
  669. cursor: pointer;
  670. }
  671. .suggestion-item:hover {
  672. background-color: #f5f7fa;
  673. }
  674. .button-new-tag {
  675. margin-left: 10px;
  676. height: 32px;
  677. line-height: 30px;
  678. padding-top: 0;
  679. padding-bottom: 0;
  680. }
  681. .input-new-tag {
  682. width: 90px;
  683. margin-left: 10px;
  684. vertical-align: bottom;
  685. }
  686. .feedback-dialog {
  687. width: 100%;
  688. max-width: 1000px;
  689. max-height: 80vh; /* 限制最大高度为视窗高度的 80% */
  690. overflow-y: auto; /* 超出时显示垂直滚动条 */
  691. padding: 20px;
  692. box-sizing: border-box; /* 确保 padding 不影响总宽度 */
  693. }
  694. /* 新增的滚动容器样式(不影响原有样式) */
  695. .scroll-wrapper {
  696. max-height: 130px; /* 大约三行的高度 */
  697. overflow-y: auto; /* 垂直滚动 */
  698. padding-right: 5px; /* 为滚动条留出空间 */
  699. }
  700. /* 美化滚动条(可选) */
  701. .scroll-wrapper::-webkit-scrollbar {
  702. width: 6px;
  703. }
  704. .scroll-wrapper::-webkit-scrollbar-thumb {
  705. background: rgba(0, 0, 0, 0.2);
  706. border-radius: 3px;
  707. }
  708. </style>