list.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. <template>
  2. <div class="app-container">
  3. <!-- Search Form -->
  4. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
  5. <el-form-item label="项目" prop="projectId">
  6. <el-select v-model="queryParams.projectId" placeholder="请选择项目" clearable size="small" >
  7. <el-option
  8. v-for="item in projectOptions"
  9. :key="item.dictValue"
  10. :label="item.dictLabel"
  11. :value="item.dictValue"
  12. />
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item label="会员ID" prop="userId">
  16. <el-input
  17. style="width: 200px"
  18. v-model="queryParams.userId"
  19. placeholder="请输入会员ID"
  20. clearable
  21. size="small"
  22. @keyup.enter.native="handleQuery"
  23. />
  24. </el-form-item>
  25. <el-form-item label="昵称" prop="nickname">
  26. <el-input
  27. style="width: 200px"
  28. v-model="queryParams.nickname"
  29. placeholder="请输入昵称"
  30. clearable
  31. size="small"
  32. @keyup.enter.native="handleQuery"
  33. />
  34. </el-form-item>
  35. <el-form-item label="手机号码" prop="phone">
  36. <el-input
  37. style="width: 200px"
  38. v-model="queryParams.phone"
  39. placeholder="请输入手机号码"
  40. clearable
  41. size="small"
  42. @keyup.enter.native="handleQuery"
  43. />
  44. </el-form-item>
  45. <!-- <el-form-item label="状态" prop="status">-->
  46. <!-- <el-select style="width: 200px" v-model="queryParams.status" placeholder="请选择状态" clearable size="small">-->
  47. <!-- <el-option-->
  48. <!-- v-for="item in statusOptions"-->
  49. <!-- :key="item.dictValue"-->
  50. <!-- :label="item.dictLabel"-->
  51. <!-- :value="item.dictValue"-->
  52. <!-- />-->
  53. <!-- </el-select>-->
  54. <!-- </el-form-item>-->
  55. <!-- <el-form-item label="看课状态" prop="watchCourseType">-->
  56. <!-- <el-select style="width: 200px" v-model="queryParams.watchCourseType" placeholder="请选择看课状态" clearable size="small">-->
  57. <!-- <el-option label="全部" value="0" />-->
  58. <!-- <el-option label="未看过课" value="1" />-->
  59. <!-- <el-option label="正常看课" value="2" />-->
  60. <!-- <el-option label="停止看课" value="3" />-->
  61. <!-- </el-select>-->
  62. <!-- </el-form-item>-->
  63. <!-- <el-form-item label="缺课状态" prop="missCourseStatus">-->
  64. <!-- <el-select style="width: 200px" v-model="queryParams.missCourseStatus" placeholder="请选择缺课状态" clearable size="small">-->
  65. <!-- <el-option label="全部" value="0" />-->
  66. <!-- <el-option label="已缺课" value="1" />-->
  67. <!-- <el-option label="未缺课" value="2" />-->
  68. <!-- </el-select>-->
  69. <!-- </el-form-item>-->
  70. <!-- <el-form-item label="标签" prop="tagIds">-->
  71. <!-- <el-select style="width: 200px" v-model="queryParams.tagIds" placeholder="请选择标签" clearable size="small" multiple>-->
  72. <!-- <el-option-->
  73. <!-- v-for="item in tagOptions"-->
  74. <!-- :key="item.tagId"-->
  75. <!-- :label="item.tagName"-->
  76. <!-- :value="item.tagId"-->
  77. <!-- />-->
  78. <!-- </el-select>-->
  79. <!-- </el-form-item>-->
  80. <el-form-item label="注册时间">
  81. <el-date-picker
  82. v-model="dateRange"
  83. size="small"
  84. style="width: 240px"
  85. type="daterange"
  86. range-separator="-"
  87. start-placeholder="开始日期"
  88. end-placeholder="结束日期"
  89. value-format="yyyy-MM-dd"
  90. ></el-date-picker>
  91. </el-form-item>
  92. <el-form-item>
  93. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  94. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  95. </el-form-item>
  96. </el-form>
  97. <!-- Tab Selection -->
  98. <!-- <el-tabs v-model="queryParams.tabValue" @tab-click="handleTabChange">-->
  99. <!-- <el-tab-pane label="全部" name="0"></el-tab-pane>-->
  100. <!-- <el-tab-pane label="今日新增" name="1"></el-tab-pane>-->
  101. <!-- <el-tab-pane label="今日完播" name="2"></el-tab-pane>-->
  102. <!-- <el-tab-pane label="未看过课" name="3"></el-tab-pane>-->
  103. <!-- </el-tabs>-->
  104. <!-- Toolbar -->
  105. <el-row :gutter="10" class="mb8">
  106. <!-- <el-col :span="1.5">-->
  107. <!-- <el-button-->
  108. <!-- type="primary"-->
  109. <!-- plain-->
  110. <!-- icon="el-icon-plus"-->
  111. <!-- size="mini"-->
  112. <!-- @click="handleAdd"-->
  113. <!-- v-hasPermi="['user:fsUser:add']"-->
  114. <!-- >新增</el-button>-->
  115. <!-- </el-col>-->
  116. <!-- <el-col :span="1.5">-->
  117. <!-- <el-button-->
  118. <!-- type="success"-->
  119. <!-- plain-->
  120. <!-- icon="el-icon-edit"-->
  121. <!-- size="mini"-->
  122. <!-- :disabled="single"-->
  123. <!-- @click="handleUpdate"-->
  124. <!-- v-hasPermi="['user:fsUser:edit']"-->
  125. <!-- >编辑</el-button>-->
  126. <!-- </el-col>-->
  127. <!-- <el-col :span="1.5">-->
  128. <!-- <el-button-->
  129. <!-- type="danger"-->
  130. <!-- plain-->
  131. <!-- icon="el-icon-delete"-->
  132. <!-- size="mini"-->
  133. <!-- :disabled="multiple"-->
  134. <!-- @click="handleDelete"-->
  135. <!-- v-hasPermi="['user:fsUser:remove']"-->
  136. <!-- >删除</el-button>-->
  137. <!-- </el-col>-->
  138. <!-- <el-col :span="1.5">-->
  139. <!-- <el-button-->
  140. <!-- type="warning"-->
  141. <!-- plain-->
  142. <!-- icon="el-icon-download"-->
  143. <!-- size="mini"-->
  144. <!-- @click="handleExport"-->
  145. <!-- v-hasPermi="['user:fsUser:export']"-->
  146. <!-- >导出</el-button>-->
  147. <!-- </el-col>-->
  148. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  149. </el-row>
  150. <!-- User Table -->
  151. <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange" border>
  152. <el-table-column type="selection" width="55" align="center" />
  153. <el-table-column label="ID" align="center" prop="userId" />
  154. <el-table-column label="项目" align="center" prop="projectId">
  155. <template slot-scope="scope">
  156. <el-tag v-if="scope.row.projectId !== null">{{ getProjectLabel(scope.row.projectId) }}</el-tag>
  157. </template>
  158. </el-table-column>
  159. <el-table-column label="昵称" align="center" prop="nickname" />
  160. <el-table-column label="头像" align="center" width="80">
  161. <template slot-scope="scope">
  162. <el-popover
  163. placement="right"
  164. title=""
  165. trigger="hover"
  166. >
  167. <img slot="reference" :src="scope.row.avatar" width="50">
  168. <img :src="scope.row.avatar" style="max-width: 120px;">
  169. </el-popover>
  170. </template>
  171. </el-table-column>
  172. <el-table-column label="手机号码" align="center" prop="phone" />
  173. <el-table-column label="积分" align="center" prop="integral" v-if="false" />
  174. <el-table-column label="看课数量" align="center" prop="watchCourseCount" />
  175. <el-table-column label="缺课数量" align="center" prop="missCourseCount" />
  176. <el-table-column label="参与营期数量" align="center" prop="partCourseCount" />
  177. <el-table-column label="状态" align="center">
  178. <template slot-scope="scope">
  179. <el-tag :type="scope.row.status === 1 ? 'success' : 'danger'">
  180. {{ scope.row.status === 1 ? '正常' : '禁止' }}
  181. </el-tag>
  182. </template>
  183. </el-table-column>
  184. <el-table-column label="看课状态" align="center" width="80px">
  185. <template slot-scope="scope">
  186. <el-tag :type="getCourseStatusType(scope.row.courseCountStatus)">
  187. {{ getCourseStatusText(scope.row.courseCountStatus) }}
  188. </el-tag>
  189. </template>
  190. </el-table-column>
  191. <el-table-column label="标签" align="center" prop="tag" show-overflow-tooltip />
  192. <el-table-column label="最后看课时间" align="center" prop="lastWatchDate" width="160" />
  193. <!-- <el-table-column label="停课天数" align="center" prop="stopWatchDays" />-->
  194. <el-table-column label="注册时间" align="center" prop="createTime" width="160" />
  195. <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
  196. <el-table-column label="所属员工" align="center" prop="companyUserNickName" />
  197. <el-table-column label="会员积分" align="center" prop="integral" />
  198. <el-table-column label="是否购买" align="center" prop="isBuy">
  199. <template slot-scope="scope">
  200. <span>{{ scope.row.isBuy === 1 ? '是' : '否' }}</span>
  201. </template>
  202. </el-table-column>
  203. <el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
  204. <template slot-scope="scope">
  205. <el-button
  206. size="mini"
  207. type="text"
  208. icon="el-icon-edit"
  209. @click="handleUpdate(scope.row)"
  210. >修改</el-button>
  211. <el-button
  212. size="mini"
  213. type="text"
  214. icon="el-icon-check"
  215. @click="handleAudit(scope.row)"
  216. v-if="scope.row.isCurrentCompanyUser === 1 && scope.row.status === 0"
  217. >审核会员</el-button>
  218. <el-button
  219. size="mini"
  220. type="text"
  221. @click="handledetails(scope.row)"
  222. >详情</el-button>
  223. </template>
  224. </el-table-column>
  225. </el-table>
  226. <pagination
  227. v-show="total>0"
  228. :total="total"
  229. :page.sync="queryParams.pageNum"
  230. :limit.sync="queryParams.pageSize"
  231. @pagination="getList"
  232. />
  233. <!-- Edit User Dialog -->
  234. <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
  235. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  236. <el-form-item label="用户头像" prop="avatar">
  237. <el-popover
  238. placement="right"
  239. title=""
  240. trigger="hover"
  241. >
  242. <img slot="reference" :src="form.avatar" width="80">
  243. <img :src="form.avatar" style="max-width: 120px;">
  244. </el-popover>
  245. </el-form-item>
  246. <el-form-item label="昵称" prop="nickname">
  247. <el-input v-model="form.nickname" :disabled="true" placeholder="请输入昵称" />
  248. </el-form-item>
  249. <el-form-item label="手机号码" prop="phone">
  250. <el-input v-model="form.phone" disabled placeholder="请输入手机号码" />
  251. </el-form-item>
  252. <el-form-item label="最后登录IP" prop="lastIp" v-if="form.lastIp">
  253. <el-input v-model="form.lastIp" disabled placeholder="最后一次登录IP" />
  254. </el-form-item>
  255. <el-form-item label="看课数量" prop="watchCourseCount" v-if="form.watchCourseCount">
  256. <el-input v-model="form.watchCourseCount" disabled placeholder="看课数量" />
  257. </el-form-item>
  258. <el-form-item label="缺课数量" prop="missCourseCount" v-if="form.missCourseCount">
  259. <el-input v-model="form.missCourseCount" disabled placeholder="缺课数量" />
  260. </el-form-item>
  261. <!-- <el-form-item label="标签" prop="tagIds">
  262. <el-select v-model="form.tagIds" disabled placeholder="请选择标签" clearable multiple>
  263. <el-option
  264. v-for="item in tagOptions"
  265. :key="item.tagId"
  266. :label="item.tagName"
  267. :value="item.tagId"
  268. />
  269. </el-select>
  270. </el-form-item> -->
  271. <el-form-item label="标签" prop="tag">
  272. <el-input v-model="form.tag" disabled clearable >
  273. </el-input>
  274. </el-form-item>
  275. <el-form-item label="所属员工" prop="companyUserId">
  276. <el-select v-model="form.companyUserId" disabled placeholder="请选择所属员工" clearable>
  277. <el-option
  278. v-for="item in companyUserList"
  279. :key="item.userId"
  280. :label="item.nickName"
  281. :value="item.userId"
  282. />
  283. </el-select>
  284. </el-form-item>
  285. <el-form-item label="用户备注" prop="remark">
  286. <el-input v-model="form.remark" type="textarea" placeholder="请输入用户备注" />
  287. </el-form-item>
  288. <el-form-item label="状态">
  289. <el-radio-group v-model="form.status">
  290. <el-radio :label="1">正常</el-radio>
  291. <el-radio :label="0">禁止</el-radio>
  292. </el-radio-group>
  293. </el-form-item>
  294. </el-form>
  295. <div slot="footer" class="dialog-footer">
  296. <el-button type="primary" @click="submitForm">确 定</el-button>
  297. <el-button @click="cancel">取 消</el-button>
  298. </div>
  299. </el-dialog>
  300. <el-drawer
  301. :with-header="false"
  302. size="75%"
  303. :title="show.title" :visible.sync="show.open">
  304. <userDetails ref="userDetails" />
  305. </el-drawer>
  306. </div>
  307. </template>
  308. <script>
  309. import { listUser, getUser, addUser, updateUser, delUser, exportUser, auditUser } from "@/api/user/fsUser";
  310. import {getUserList} from "@/api/company/companyUser";
  311. import userDetails from '@/views/store/components/userDetails.vue';
  312. export default {
  313. name: "FsUser",
  314. components: {userDetails},
  315. data() {
  316. return {
  317. show:{
  318. open:false,
  319. },
  320. cusTransfer: {
  321. targetUserId: [{required: true, message: '请选择转移至销售', trigger: 'change'}],
  322. content: [{required: true, message: '请选择转移至销售', trigger: 'change'}]
  323. },
  324. companyUserList: [],
  325. openTransferDialog: false,
  326. transferForm: {
  327. targetUserId: null,
  328. content: null
  329. },
  330. // 遮罩层
  331. loading: true,
  332. // 选中数组
  333. ids: [],
  334. // 非单个禁用
  335. single: true,
  336. // 非多个禁用
  337. multiple: true,
  338. // 显示搜索条件
  339. showSearch: true,
  340. // 总条数
  341. total: 0,
  342. // 用户表格数据
  343. userList: [],
  344. // 弹出层标题
  345. title: "",
  346. // 是否显示弹出层
  347. open: false,
  348. // 日期范围
  349. dateRange: [],
  350. // 状态数据字典
  351. statusOptions: [],
  352. // 标签选项
  353. tagOptions: [],
  354. // 销售员工选项
  355. salesOptions: [],
  356. // 查询参数
  357. queryParams: {
  358. pageNum: 1,
  359. pageSize: 10,
  360. nickname: null,
  361. isMyFsUser:false,
  362. phone: null,
  363. // status: null,
  364. tagIds: [],
  365. tabValue: "0",
  366. watchCourseType: "0",
  367. missCourseStatus: "0",
  368. continueMissCourseSort: "0",
  369. registerStartTime: null,
  370. registerEndTime: null,
  371. projectId: null,
  372. },
  373. // 表单参数
  374. form: {},
  375. // 表单校验
  376. rules: {
  377. // nickname: [
  378. // { required: true, message: "昵称不能为空", trigger: "blur" }
  379. // ],
  380. // phone: [
  381. // { required: true, message: "手机号码不能为空", trigger: "blur" },
  382. // { pattern: /^1[3-9]\d{9}$/, message: "请输入正确的手机号码", trigger: "blur" }
  383. // ],
  384. status: [
  385. { required: true, message: "状态不能为空", trigger: "change" }
  386. ]
  387. },
  388. projectOptions: []
  389. };
  390. },
  391. created() {
  392. getUserList().then(res=>{
  393. if(res.code === 200) {
  394. this.companyUserList = res.data
  395. }
  396. });
  397. this.getList();
  398. this.getDicts("user_status").then(response => {
  399. this.statusOptions = response.data;
  400. });
  401. this.getDicts("sys_course_project").then(response => {
  402. this.projectOptions = response.data;
  403. });
  404. this.getTagOptions();
  405. this.getSalesOptions();
  406. },
  407. methods: {
  408. handledetails(row){
  409. this.show.open=true;
  410. setTimeout(() => {
  411. this.$refs.userDetails.getDetails(row.userId);
  412. }, 1);
  413. },
  414. // 重置表单
  415. resetForm() {
  416. this.linkForm={
  417. days:null,
  418. courseId:null,
  419. videoId:null
  420. }
  421. },
  422. /** 转移按钮操作 */
  423. handleTransfer(row) {
  424. const userIds = row.userId ? [row.userId] : this.ids;
  425. if (userIds.length === 0) {
  426. this.$message.warning("请至少选择一个客户进行转移");
  427. return;
  428. }
  429. this.resetTransferForm();
  430. this.openTransferDialog = true;
  431. },
  432. resetTransferForm() {
  433. this.transferForm = {
  434. targetUserId: null,
  435. content: null
  436. };
  437. this.resetForm("transferForm"); // 假设 transferForm 是 el-form 的 ref
  438. },
  439. cancelTransfer() {
  440. this.openTransferDialog = false;
  441. this.resetTransferForm();
  442. },
  443. /** 查询用户列表 */
  444. getList() {
  445. this.loading = true;
  446. // 处理日期范围
  447. if (this.dateRange && this.dateRange.length > 0) {
  448. this.queryParams.registerStartTime = this.dateRange[0];
  449. this.queryParams.registerEndTime = this.dateRange[1];
  450. } else {
  451. this.queryParams.registerStartTime = null;
  452. this.queryParams.registerEndTime = null;
  453. }
  454. listUser(this.queryParams).then(response => {
  455. this.userList = response.rows;
  456. this.total = response.total;
  457. this.loading = false;
  458. });
  459. },
  460. /** 获取标签选项 */
  461. getTagOptions() {
  462. this.tagOptions = [
  463. { tagId: "1", tagName: "VIP会员" },
  464. { tagId: "2", tagName: "普通会员" },
  465. { tagId: "3", tagName: "新用户" },
  466. { tagId: "4", tagName: "高频用户" }
  467. ];
  468. },
  469. /** 获取销售员工选项 */
  470. getSalesOptions() {
  471. getUserList().then(res=>{
  472. if(res.code === 200) {
  473. this.salesOptions = res.data
  474. }
  475. });
  476. },
  477. /** 获取看课状态类型 */
  478. getCourseStatusType(status) {
  479. if (status === 1) return "success";
  480. if (status === 2) return "danger";
  481. if (status === 3) return "info";
  482. return "";
  483. },
  484. /** 获取看课状态文本 */
  485. getCourseStatusText(status) {
  486. if (status === 1) return "正常看课";
  487. if (status === 2) return "停止看课";
  488. if (status === 3) return "未看过课";
  489. return "未知状态";
  490. },
  491. // 取消按钮
  492. cancel() {
  493. this.open = false;
  494. this.reset();
  495. },
  496. // 表单重置
  497. reset() {
  498. this.form = {
  499. userId: null,
  500. nickname: null,
  501. avatar: null,
  502. phone: null,
  503. status: 1,
  504. tagIds: [],
  505. companyUserId: null,
  506. remark: null
  507. };
  508. this.resetForm("form");
  509. },
  510. /** 搜索按钮操作 */
  511. handleQuery() {
  512. this.queryParams.pageNum = 1;
  513. this.getList();
  514. },
  515. /** 重置按钮操作 */
  516. resetQuery() {
  517. this.dateRange = [];
  518. this.resetForm("queryForm");
  519. this.handleQuery();
  520. },
  521. /** Tab切换操作 */
  522. handleTabChange() {
  523. this.queryParams.pageNum = 1;
  524. this.getList();
  525. },
  526. // 多选框选中数据
  527. handleSelectionChange(selection) {
  528. this.ids = selection.map(item => item.userId);
  529. this.single = selection.length !== 1;
  530. this.multiple = !selection.length;
  531. },
  532. /** 新增按钮操作 */
  533. handleAdd() {
  534. this.reset();
  535. this.open = true;
  536. this.title = "添加用户";
  537. },
  538. /** 修改按钮操作 */
  539. handleUpdate(row) {
  540. this.reset();
  541. const userId = row.userId || this.ids[0];
  542. getUser(userId).then(response => {
  543. this.form = response.data;
  544. // 处理标签数据,将字符串转为数组
  545. if (this.form.tagIds && typeof this.form.tagIds === 'string') {
  546. this.form.tagIds = this.form.tagIds.split(',');
  547. }
  548. this.open = true;
  549. this.title = "修改用户";
  550. });
  551. },
  552. /** 提交按钮 */
  553. submitForm() {
  554. this.$refs["form"].validate(valid => {
  555. if (valid) {
  556. // 处理标签数据,将数组转为字符串
  557. if (this.form.tagIds && Array.isArray(this.form.tagIds)) {
  558. this.form.tagIds = this.form.tagIds.join(',');
  559. }
  560. if (this.form.userId != null) {
  561. //手机号不能修改 置空
  562. this.form.phone = null;
  563. updateUser(this.form).then(response => {
  564. if (response.code === 200) {
  565. this.$message.success("修改成功");
  566. this.open = false;
  567. this.getList();
  568. }
  569. });
  570. } else {
  571. addUser(this.form).then(response => {
  572. if (response.code === 200) {
  573. this.$message.success("新增成功");
  574. this.open = false;
  575. this.getList();
  576. }
  577. });
  578. }
  579. }
  580. });
  581. },
  582. /** 删除按钮操作 */
  583. handleDelete(row) {
  584. const userIds = row.userId || this.ids;
  585. this.$confirm('是否确认删除用户编号为"' + userIds + '"的数据项?', "警告", {
  586. confirmButtonText: "确定",
  587. cancelButtonText: "取消",
  588. type: "warning"
  589. }).then(() => {
  590. return delUser(userIds);
  591. }).then(() => {
  592. this.getList();
  593. this.$message.success("删除成功");
  594. }).catch(() => {});
  595. },
  596. /** 导出按钮操作 */
  597. handleExport() {
  598. const queryParams = this.queryParams;
  599. this.$confirm('是否确认导出所有用户数据项?', "警告", {
  600. confirmButtonText: "确定",
  601. cancelButtonText: "取消",
  602. type: "warning"
  603. }).then(() => {
  604. return exportUser(queryParams);
  605. }).then(response => {
  606. this.download(response.msg);
  607. }).catch(() => {});
  608. },
  609. /** 审核会员操作 */
  610. handleAudit(row) {
  611. this.$confirm('是否确认将其移除小黑屋?', "提示", {
  612. confirmButtonText: "确定",
  613. cancelButtonText: "取消",
  614. type: "warning"
  615. }).then(() => {
  616. auditUser([row.userId]).then(response => {
  617. if (response.code === 200) {
  618. this.msgSuccess("审核成功");
  619. this.getList();
  620. }
  621. });
  622. }).catch(() => {});
  623. },
  624. /** 获取项目对应名称 */
  625. getProjectLabel(projectId) {
  626. return this.projectOptions.find(item => parseInt(item.dictValue) === projectId)?.dictLabel;
  627. },
  628. }
  629. };
  630. </script>
  631. <style scoped>
  632. .el-tag + .el-tag {
  633. margin-left: 5px;
  634. }
  635. .mb8 {
  636. margin-bottom: 8px;
  637. }
  638. </style>