myCourseWatchLog.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  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="qwUserId">
  5. <el-select v-model="queryParams.qwUserId" placeholder="企微账号" clearable size="small" @change="updateQwuser()">
  6. <el-option
  7. v-for="dict in myQwUserList"
  8. :key="dict.dictValue"
  9. :label="dict.dictLabel + '('+dict.corpName+')'"
  10. :value="dict.dictValue"
  11. />
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item label="客户ID" prop="qwExternalContactId">
  15. <el-input
  16. v-model="queryParams.qwExternalContactId"
  17. placeholder="请输入会员ID"
  18. clearable
  19. size="small"
  20. @keyup.enter.native="handleQuery"
  21. />
  22. </el-form-item>
  23. <el-form-item label="会员ID" prop="userId">
  24. <el-input
  25. v-model="queryParams.userId"
  26. placeholder="请输入会员ID"
  27. clearable
  28. size="small"
  29. @keyup.enter.native="handleQuery"
  30. />
  31. </el-form-item>
  32. <el-form-item label="会员昵称" prop="nickName">
  33. <el-input
  34. v-model="queryParams.nickName"
  35. placeholder="请输入会员昵称"
  36. clearable
  37. size="small"
  38. @keyup.enter.native="handleQuery"
  39. />
  40. </el-form-item>
  41. <el-form-item label="企微客户昵称" prop="nickName">
  42. <el-input
  43. v-model="queryParams.externalUserName"
  44. placeholder="请输入企微客户昵称"
  45. clearable
  46. size="small"
  47. @keyup.enter.native="handleQuery"
  48. />
  49. </el-form-item>
  50. <el-form-item label="课程" prop="courseId">
  51. <el-select filterable v-model="queryParams.courseId" placeholder="请选择课程" clearable size="small" @change="courseChange(queryParams.courseId)">
  52. <el-option
  53. v-for="dict in courseLists"
  54. :key="dict.dictValue"
  55. :label="dict.dictLabel"
  56. :value="dict.dictValue"
  57. />
  58. </el-select>
  59. </el-form-item>
  60. <el-form-item label="小节" prop="videoId">
  61. <el-select filterable v-model="queryParams.videoId" placeholder="请选择小节" clearable size="small">
  62. <el-option
  63. v-for="dict in videoList"
  64. :key="dict.dictValue"
  65. :label="dict.dictLabel"
  66. :value="dict.dictValue"
  67. />
  68. </el-select>
  69. </el-form-item>
  70. <el-form-item label="创建时间" prop="createTime">
  71. <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>
  72. </el-form-item>
  73. <el-table-column label="完课时间" align="center" prop="finishTime" />
  74. <el-table-column label="营期时间" align="center" prop="campPeriodTime" />
  75. <el-form-item>
  76. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  77. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  78. </el-form-item>
  79. </el-form>
  80. <el-row :gutter="10" class="mb8">
  81. <el-col :span="1.5">
  82. <el-button
  83. type="warning"
  84. plain
  85. icon="el-icon-download"
  86. size="mini"
  87. :loading="exportLoading"
  88. @click="handleExport"
  89. v-hasPermi="['course:courseWatchLog:myExport']"
  90. >导出</el-button>
  91. </el-col>
  92. <el-col :span="1.5">
  93. <el-button
  94. type="primary"
  95. plain
  96. size="mini"
  97. @click="addUserTag"
  98. v-hasPermi="['qw:externalContact:addTag']"
  99. >批量添加标签</el-button>
  100. </el-col>
  101. <el-col :span="1.5">
  102. <el-button
  103. type="primary"
  104. plain
  105. size="mini"
  106. @click="delUserTag"
  107. v-hasPermi="['qw:externalContact:delTag']"
  108. >批量移除标签</el-button>
  109. </el-col>
  110. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  111. </el-row>
  112. <el-tabs type="card" v-model="queryParams.logType" @tab-click="handleClickX">
  113. <el-tab-pane label="全部" name="10"></el-tab-pane>
  114. <el-tab-pane v-for="(item,index) in logTypeOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
  115. </el-tabs>
  116. <el-table border v-loading="loading" :data="courseWatchLogList" @selection-change="handleSelectionChange">
  117. <el-table-column type="selection" width="55" align="center" />
  118. <el-table-column label="记录编号" align="center" prop="logId" />
  119. <el-table-column label="企微客户" align="center" prop="externalUserName"/>
  120. <el-table-column label="会员ID" align="center" prop="userId" />
  121. <el-table-column label="会员昵称" align="center" prop="fsNickName">
  122. <template slot-scope="scope">
  123. <div style="display: flex;white-space: nowrap">
  124. <div style="margin: auto">
  125. {{scope.row.fsNickName}}
  126. </div>
  127. <el-popover
  128. placement="right"
  129. title=""
  130. trigger="hover">
  131. <img slot="reference" :src="scope.row.fsAvatar" style="width: 30px;height: 30px">
  132. <img :src="scope.row.fsAvatar" style="max-width: 200px;max-height: 200px">
  133. </el-popover>
  134. </div>
  135. </template>
  136. </el-table-column>
  137. <el-table-column label="课程名称" align="center" prop="courseName" />
  138. <el-table-column label="小节名称" align="center" prop="videoName" />
  139. <el-table-column label="记录类型" align="center" prop="logType">
  140. <template slot-scope="scope">
  141. <dict-tag :options="logTypeOptions" :value="scope.row.logType"/>
  142. </template>
  143. </el-table-column>
  144. <el-table-column label="播放时长" align="center" prop="duration" />
  145. <el-table-column label="所属销售" align="center" prop="companyUserName" />
  146. <el-table-column label="所属公司" align="center" prop="companyName" />
  147. <el-table-column label="企微员工名称" align="center" prop="qwUserName" />
  148. <el-table-column label="企微账号" align="center" prop="qwUserName" />
  149. <el-table-column label="所属发送方式" align="center" prop="sendType" />
  150. <el-table-column label="创建时间" align="center" prop="createTime" />
  151. <!-- <el-table-column label="更新时间" align="center" prop="updateTime" />-->
  152. <el-table-column label="完课时间" align="center" prop="lastHeartbeatTime" />
  153. </el-table>
  154. <pagination
  155. v-show="total>0"
  156. :total="total"
  157. :page.sync="queryParams.pageNum"
  158. :limit.sync="queryParams.pageSize"
  159. @pagination="getList"
  160. />
  161. <el-dialog title="批量添加标签" :visible.sync="tagOpen" width="800px" append-to-body>
  162. <div>搜索标签:
  163. <el-input v-model="tagChange.tagName" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
  164. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(tagChange.tagName)">搜索</el-button>
  165. <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
  166. </div>
  167. <el-form ref="form" :model="addTagFormByWatch" label-width="80px">
  168. <div v-for="item in tagGroupList" :key="item.id" >
  169. <div style="font-size: 20px;margin-top: 20px;margin-bottom: 20px;">
  170. <span class="name-background">{{ item.name }}</span>
  171. </div>
  172. <div class="tag-container">
  173. <a
  174. v-for="tagItem in item.tag"
  175. class="tag-box"
  176. @click="tagSelection(tagItem)"
  177. :class="{ 'tag-selected': tagItem.isSelected }"
  178. >
  179. {{ tagItem.name }}
  180. </a>
  181. </div>
  182. </div>
  183. </el-form>
  184. <pagination
  185. v-show="tagTotal>0"
  186. :total="tagTotal"
  187. :page.sync="queryTagParams.pageNum"
  188. :limit.sync="queryTagParams.pageSize"
  189. @pagination="getPageListTagGroup"
  190. />
  191. <div slot="footer" class="dialog-footer">
  192. <el-button type="primary" @click="addTagSubmitForm()">确 定</el-button>
  193. <el-button @click="addTagCancel">取 消</el-button>
  194. </div>
  195. </el-dialog>
  196. <el-dialog title="批量移除标签" :visible.sync="tagDelOpen" width="800px" append-to-body>
  197. <div>搜索标签:
  198. <el-input v-model="tagChange.tagName" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
  199. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(tagChange.tagName)">搜索</el-button>
  200. <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
  201. </div>
  202. <el-form ref="form" :model="addTagFormByWatch" label-width="80px">
  203. <div v-for="item in tagGroupList" :key="item.id" >
  204. <div style="font-size: 20px;margin-top: 20px;margin-bottom: 20px;">
  205. <span class="name-background">{{ item.name }}</span>
  206. </div>
  207. <div class="tag-container">
  208. <a
  209. v-for="tagItem in item.tag"
  210. class="tag-box"
  211. @click="tagSelection(tagItem)"
  212. :class="{ 'tag-selected': tagItem.isSelected }"
  213. >
  214. {{ tagItem.name }}
  215. </a>
  216. </div>
  217. </div>
  218. </el-form>
  219. <pagination
  220. v-show="tagTotal>0"
  221. :total="tagTotal"
  222. :page.sync="queryTagParams.pageNum"
  223. :limit.sync="queryTagParams.pageSize"
  224. @pagination="getPageListTagGroup"
  225. />
  226. <div slot="footer" class="dialog-footer">
  227. <el-button type="primary" @click="tagDelSubmitForm()">确 定</el-button>
  228. <el-button @click="DelTagCancel">取 消</el-button>
  229. </div>
  230. </el-dialog>
  231. <el-dialog
  232. :title="resultTitle"
  233. :visible.sync="resultDialogVisible"
  234. width="50%"
  235. custom-class="feedback-dialog"
  236. >
  237. <pre style="white-space: pre-wrap; font-family: inherit;">{{ resultMessage }}</pre>
  238. <span slot="footer" class="dialog-footer">
  239. <el-button @click="resultDialogVisible = false">关闭</el-button>
  240. </span>
  241. </el-dialog>
  242. </div>
  243. </template>
  244. <script>
  245. import { myListCourseWatchLog, getCourseWatchLog, delCourseWatchLog, addCourseWatchLog, updateCourseWatchLog, exportCourseWatchLog } from "@/api/course/courseWatchLog";
  246. import { courseList,videoList } from '@/api/course/courseRedPacketLog'
  247. import {getMyQwUserList} from "@/api/qw/user";
  248. import {allListTagGroup} from "../../../api/qw/tagGroup";
  249. import {searchTags} from "../../../api/qw/tag";
  250. import {addTagByWatch, delTagByWatch} from "../../../api/qw/externalContact";
  251. export default {
  252. name: "CourseWatchLog",
  253. data() {
  254. return {
  255. resultDialogVisible: false,
  256. resultMessage: '',
  257. resultTitle:'',
  258. createTime:null,
  259. courseLists:[],
  260. videoList:[],
  261. myQwUserList:[],
  262. logTypeOptions:[],
  263. // 遮罩层
  264. loading: true,
  265. // 导出遮罩层
  266. exportLoading: false,
  267. // 选中数组
  268. ids: [],
  269. // 非单个禁用
  270. single: true,
  271. // 非多个禁用
  272. multiple: true,
  273. // 显示搜索条件
  274. showSearch: true,
  275. // 总条数
  276. total: 0,
  277. // 短链课程看课记录表格数据
  278. courseWatchLogList: [],
  279. // 弹出层标题
  280. title: "",
  281. // 是否显示弹出层
  282. open: false,
  283. tagOpen:false,
  284. //标签弹窗选择
  285. tagChange:{
  286. open:false,
  287. index:null,
  288. },
  289. addTagFormByWatch:{
  290. logId:[],
  291. tagIds:[]
  292. },
  293. tagGroupList: [],
  294. tagTotal:0,
  295. tagDelOpen:false,
  296. queryTagParams:{
  297. pageNum: 1,
  298. pageSize: 10,
  299. total:0,
  300. name:null,
  301. corpId:null,
  302. },
  303. // 查询参数
  304. queryParams: {
  305. pageNum: 1,
  306. pageSize: 10,
  307. userId: null,
  308. videoId: null,
  309. nickName:null,
  310. logType: "10",
  311. qwExternalContactId: null,
  312. externalUserName:null,
  313. duration: null,
  314. qwUserId: null,
  315. companyUserId: null,
  316. companyId: null,
  317. courseId: null,
  318. sTime:null,
  319. eTime:null,
  320. scheduleStartTime: null,
  321. scheduleEndTime: null,
  322. },
  323. // 表单参数
  324. form: {},
  325. // 表单校验
  326. rules: {
  327. }
  328. };
  329. },
  330. created() {
  331. courseList().then(response => {
  332. this.courseLists = response.list;
  333. });
  334. this.getList();
  335. this.getDicts("sys_course_watch_log_type").then(response => {
  336. this.logTypeOptions = response.data;
  337. });
  338. getMyQwUserList().then(response => {
  339. this.myQwUserList = response.data;
  340. });
  341. },
  342. methods: {
  343. courseChange(row){
  344. this.queryParams.videoId=null;
  345. if(row === ''){
  346. this.videoList=[];
  347. return
  348. }
  349. videoList(row).then(response => {
  350. this.videoList=response.list
  351. });
  352. },
  353. updateQwuser(){
  354. for (const user of this.myQwUserList) {
  355. if (user.dictValue == this.queryParams.qwUserId) {
  356. this.queryParams.corpId=user.corpId;
  357. break;
  358. }
  359. }
  360. this.getList();
  361. },
  362. change() {
  363. if (this.createTime != null) {
  364. this.queryParams.sTime = this.createTime[0];
  365. this.queryParams.eTime = this.createTime[1];
  366. } else {
  367. this.queryParams.sTime = null;
  368. this.queryParams.eTime = null;
  369. }
  370. },
  371. handleClickX(tab){
  372. if(tab.name==="10"){
  373. this.queryParams.logType=null;
  374. }else{
  375. this.queryParams.logType=tab.name;
  376. }
  377. this.getList()
  378. },
  379. /** 查询短链课程看课记录列表 */
  380. getList() {
  381. this.loading = true;
  382. myListCourseWatchLog(this.queryParams).then(response => {
  383. this.courseWatchLogList = response.rows;
  384. this.total = response.total;
  385. this.loading = false;
  386. });
  387. },
  388. // 取消按钮
  389. cancel() {
  390. this.open = false;
  391. this.reset();
  392. },
  393. // 表单重置
  394. reset() {
  395. this.form = {
  396. logId: null,
  397. userId: null,
  398. videoId: null,
  399. logType: null,
  400. createTime: null,
  401. updateTime: null,
  402. qwExternalContactId: null,
  403. externalUserName:null,
  404. duration: null,
  405. qwUserId: null,
  406. companyUserId: null,
  407. companyId: null,
  408. courseId: null,
  409. scheduleStartTime: null,
  410. scheduleEndTime: null,
  411. };
  412. this.scheduleTime=null;
  413. this.resetForm("form");
  414. },
  415. /** 搜索按钮操作 */
  416. handleQuery() {
  417. this.queryParams.pageNum = 1;
  418. this.getList();
  419. },
  420. /** 重置按钮操作 */
  421. resetQuery() {
  422. this.resetForm("queryForm");
  423. this.createTime = null;
  424. this.queryParams.sTime = null;
  425. this.queryParams.eTime = null;
  426. this.queryParams.scheduleStartTime = null;
  427. this.queryParams.scheduleEndTime = null;
  428. this.scheduleTime=null;
  429. this.handleQuery();
  430. },
  431. // 多选框选中数据
  432. handleSelectionChange(selection) {
  433. this.ids = selection.map(item => item.logId)
  434. this.single = selection.length!==1
  435. this.multiple = !selection.length
  436. },
  437. /** 新增按钮操作 */
  438. handleAdd() {
  439. this.reset();
  440. this.open = true;
  441. this.title = "添加短链课程看课记录";
  442. },
  443. /** 修改按钮操作 */
  444. handleUpdate(row) {
  445. this.reset();
  446. const logId = row.logId || this.ids
  447. getCourseWatchLog(logId).then(response => {
  448. this.form = response.data;
  449. this.open = true;
  450. this.title = "修改短链课程看课记录";
  451. });
  452. },
  453. /** 提交按钮 */
  454. submitForm() {
  455. this.$refs["form"].validate(valid => {
  456. if (valid) {
  457. if (this.form.logId != null) {
  458. updateCourseWatchLog(this.form).then(response => {
  459. this.msgSuccess("修改成功");
  460. this.open = false;
  461. this.getList();
  462. });
  463. } else {
  464. addCourseWatchLog(this.form).then(response => {
  465. this.msgSuccess("新增成功");
  466. this.open = false;
  467. this.getList();
  468. });
  469. }
  470. }
  471. });
  472. },
  473. /** 删除按钮操作 */
  474. handleDelete(row) {
  475. const logIds = row.logId || this.ids;
  476. this.$confirm('是否确认删除短链课程看课记录编号为"' + logIds + '"的数据项?', "警告", {
  477. confirmButtonText: "确定",
  478. cancelButtonText: "取消",
  479. type: "warning"
  480. }).then(function() {
  481. return delCourseWatchLog(logIds);
  482. }).then(() => {
  483. this.getList();
  484. this.msgSuccess("删除成功");
  485. }).catch(() => {});
  486. },
  487. /** 导出按钮操作 */
  488. handleExport() {
  489. const queryParams = this.queryParams;
  490. this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
  491. confirmButtonText: "确定",
  492. cancelButtonText: "取消",
  493. type: "warning"
  494. }).then(() => {
  495. this.exportLoading = true;
  496. return exportCourseWatchLog(queryParams);
  497. }).then(response => {
  498. this.download(response.msg);
  499. this.exportLoading = false;
  500. }).catch(() => {});
  501. },
  502. addUserTag(){
  503. if(this.ids==null||this.ids==""){
  504. return this.$message('请选择需要添加标签的客户');
  505. }
  506. this.getPageListTagGroup();
  507. setTimeout(() => {
  508. for (let i = 0; i < this.tagGroupList.length; i++) {
  509. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  510. this.tagGroupList[i].tag[x].isSelected=false;
  511. }
  512. }
  513. }, 200);
  514. this.tagOpen = true;
  515. },
  516. delUserTag(){
  517. if(this.ids==null||this.ids==""){
  518. return this.$message('请选择需要移除标签的客户');
  519. }
  520. this.getPageListTagGroup();
  521. setTimeout(() => {
  522. for (let i = 0; i < this.tagGroupList.length; i++) {
  523. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  524. this.tagGroupList[i].tag[x].isSelected=false;
  525. }
  526. }
  527. }, 200);
  528. this.tagDelOpen = true;
  529. },
  530. getPageListTagGroup(){
  531. this.queryTagParams.corpId=this.queryParams.corpId
  532. allListTagGroup(this.queryTagParams).then(response => {
  533. this.tagGroupList = response.rows;
  534. this.tagTotal = response.total;
  535. });
  536. },
  537. tagSelection(row){
  538. row.isSelected= !row.isSelected;
  539. this.$forceUpdate();
  540. },
  541. handleSearchTags(name){
  542. searchTags({name:name,corpId:this.queryParams.corpId}).then(response => {
  543. this.tagGroupList = response.rows;
  544. });
  545. },
  546. cancelSearchTags(){
  547. this.resetSearchQueryTag()
  548. this.getPageListTagGroup();
  549. },
  550. resetSearchQueryTag(){
  551. this.queryTagParams= {
  552. pageNum: 1,
  553. pageSize: 10,
  554. total:0,
  555. name:null,
  556. };
  557. },
  558. addTagSubmitForm(){
  559. for (let i = 0; i < this.tagGroupList.length; i++) {
  560. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  561. if(this.tagGroupList[i].tag[x].isSelected==true){
  562. this.addTagFormByWatch.tagIds.push(this.tagGroupList[i].tag[x].tagId)
  563. }
  564. }
  565. }
  566. if(this.addTagFormByWatch.tagIds==[]||this.addTagFormByWatch.tagIds==null||this.addTagFormByWatch.tagIds==""){
  567. return this.$message('请选择标签');
  568. }
  569. this.addTagFormByWatch.logIds=this.ids;
  570. let loadingRock = this.$loading({
  571. lock: true,
  572. text: '正在执行中请稍后~~请不要刷新页面!!',
  573. spinner: 'el-icon-loading',
  574. background: 'rgba(0, 0, 0, 0.7)'
  575. });
  576. addTagByWatch(this.addTagFormByWatch).then(response => {
  577. // this.msgSuccess(response.msg);
  578. this.resultMessage = response.msg;
  579. this.resultDialogVisible = true; // 显示弹窗
  580. this.resultTitle = '批量添加标签结果';
  581. this.tagOpen = false;
  582. loadingRock.close();
  583. this.addTagFormByWatch={
  584. logIds:[],
  585. tagIds:[]
  586. };
  587. this.getList()
  588. }).finally(res=>{
  589. loadingRock.close();
  590. });
  591. },
  592. tagDelSubmitForm(){
  593. for (let i = 0; i < this.tagGroupList.length; i++) {
  594. for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
  595. if(this.tagGroupList[i].tag[x].isSelected==true){
  596. this.addTagFormByWatch.tagIds.push(this.tagGroupList[i].tag[x].tagId)
  597. }
  598. }
  599. }
  600. if(this.addTagFormByWatch.tagIds==[]||this.addTagFormByWatch.tagIds==null||this.addTagFormByWatch.tagIds==""){
  601. return this.$message('请选择标签');
  602. }
  603. this.addTagFormByWatch.corpId=this.queryParams.corpId
  604. this.addTagFormByWatch.logIds=this.ids;
  605. let loadingRock = this.$loading({
  606. lock: true,
  607. text: '正在执行中请稍后~~请不要刷新页面!!',
  608. spinner: 'el-icon-loading',
  609. background: 'rgba(0, 0, 0, 0.7)'
  610. });
  611. delTagByWatch(this.addTagFormByWatch).then(response => {
  612. // this.msgSuccess(response.msg);
  613. this.resultMessage = response.msg;
  614. this.resultDialogVisible = true; // 显示弹窗
  615. this.resultTitle = '批量移除标签结果';
  616. this.tagDelOpen = false;
  617. loadingRock.close();
  618. this.addTagFormByWatch={
  619. userIds:[],
  620. tagIds:[]
  621. };
  622. this.getList()
  623. }).finally(res=>{
  624. loadingRock.close();
  625. });
  626. },
  627. addTagCancel() {
  628. this.tagOpen = false;
  629. this.addTagFormByWatch={
  630. logIds:[],
  631. tagIds:[]
  632. };
  633. },
  634. DelTagCancel() {
  635. this.tagDelOpen = false;
  636. this.addTagFormByWatch={
  637. logIds:[],
  638. tagIds:[]
  639. };
  640. },
  641. }
  642. };
  643. </script>
  644. <style scoped>
  645. /* CSS 样式 */
  646. .tag-container {
  647. display: flex;
  648. flex-wrap: wrap; /* 超出宽度时自动换行 */
  649. gap: 8px; /* 设置标签之间的间距 */
  650. }
  651. .name-background {
  652. display: inline-block;
  653. background-color: #abece6; /* 背景颜色 */
  654. padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
  655. border-radius: 4px; /* 可选:设置圆角 */
  656. }
  657. /* CSS 样式 */
  658. .tag-container {
  659. display: flex;
  660. flex-wrap: wrap; /* 超出宽度时自动换行 */
  661. gap: 8px; /* 设置标签之间的间距 */
  662. }
  663. .name-background {
  664. display: inline-block;
  665. background-color: #abece6; /* 背景颜色 */
  666. padding: 4px 8px; /* 调整内边距,让背景包裹文字 */
  667. border-radius: 4px; /* 可选:设置圆角 */
  668. }
  669. .tag-box {
  670. padding: 8px 12px;
  671. border: 1px solid #989797;
  672. border-radius: 4px;
  673. cursor: pointer;
  674. display: inline-block;
  675. }
  676. .tag-selected {
  677. background-color: #00bc98;
  678. color: #fff;
  679. border-color: #00bc98;
  680. }
  681. .el-tag + .el-tag {
  682. margin-left: 10px;
  683. }
  684. .button-new-tag {
  685. margin-left: 10px;
  686. height: 32px;
  687. line-height: 30px;
  688. padding-top: 0;
  689. padding-bottom: 0;
  690. }
  691. .input-new-tag {
  692. width: 90px;
  693. margin-left: 10px;
  694. vertical-align: bottom;
  695. }
  696. </style>