sopUserLogsSchedule.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672
  1. <template>
  2. <div class="app-container">
  3. <div style="margin-bottom: 10px">
  4. <el-card>
  5. <span class="custom-style" style="display: block; margin-bottom: 10px">自动化规则名称:{{sopName}}</span>
  6. <span class="custom-style" style="display: block; margin-bottom: 10px">自动化规则编号:{{queryParams.sopId}}</span>
  7. <span class="custom-style" style="display: block;">模板编号:{{tempId}}</span>
  8. </el-card>
  9. </div>
  10. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
  11. <el-form-item label="企微员工账号" prop="qwUserId">
  12. <el-input
  13. v-model="queryParams.qwUserId"
  14. placeholder="请输入企微员工账号"
  15. clearable
  16. size="small"
  17. @keyup.enter.native="handleQuery"
  18. />
  19. </el-form-item>
  20. <el-form-item label="企微员工昵称" prop="qwUserName">
  21. <el-input
  22. v-model="queryParams.qwUserName"
  23. placeholder="请输入企微员工昵称"
  24. clearable
  25. size="small"
  26. @keyup.enter.native="handleQuery"
  27. />
  28. </el-form-item>
  29. <el-form-item label="营期时间" prop="startTime">
  30. <el-date-picker clearable size="small"
  31. v-model="queryParams.startTime"
  32. type="date"
  33. value-format="yyyy-MM-dd"
  34. placeholder="选择营期时间">
  35. </el-date-picker>
  36. </el-form-item>
  37. <!-- <el-form-item label="状态" prop="status">-->
  38. <!-- <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">-->
  39. <!-- <el-option-->
  40. <!-- v-for="dict in sopUserLogsDelStatus"-->
  41. <!-- :key="dict.dictValue"-->
  42. <!-- :label="dict.dictLabel"-->
  43. <!-- :value="dict.dictValue"-->
  44. <!-- />-->
  45. <!-- </el-select>-->
  46. <!-- </el-form-item>-->
  47. <el-form-item label="客户名称" prop="externalUserName">
  48. <el-input
  49. v-model="queryParams.externalUserName"
  50. placeholder="请输入客户名称"
  51. clearable
  52. size="small"
  53. @keyup.enter.native="handleQuery"
  54. />
  55. </el-form-item>
  56. <el-form-item label="客户id" prop="externalId">
  57. <el-input
  58. v-model="queryParams.externalId"
  59. placeholder="请输入企微客户id"
  60. clearable
  61. size="small"
  62. @keyup.enter.native="handleQuery"
  63. />
  64. </el-form-item>
  65. <el-form-item>
  66. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  67. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  68. </el-form-item>
  69. </el-form>
  70. <el-row :gutter="10" class="mb8" v-if="filterMode == 1">
  71. <el-col :span="1.5">
  72. <el-tooltip class="item" effect="dark" content="此功能用于给 选中的 营期 内【所有的】客户发送 消息【或者发送草稿-/-清楚草稿】" placement="top">
  73. <el-button
  74. type="warning"
  75. icon="el-icon-s-promotion"
  76. size="medium"
  77. :disabled="multiple"
  78. @click="handleCampSendMsg"
  79. v-hasPermi="['qw:sopUserLogsInfo:msgSchedule']"
  80. >营期一键群发(或草稿)</el-button>
  81. </el-tooltip>
  82. </el-col>
  83. <el-col :span="1.5">
  84. <el-tooltip class="item" effect="dark" content="删除营期之后,将不会在给原营期的客户发送消息,ps:删除之后不可恢复" placement="top">
  85. <el-button
  86. type="danger"
  87. icon="el-icon-s-promotion"
  88. size="medium"
  89. :disabled="multiple"
  90. @click="handleDeleteUserLogs"
  91. v-hasPermi="['qw:sopUserLogs:remove']"
  92. >批量删除营期</el-button>
  93. </el-tooltip>
  94. </el-col>
  95. </el-row>
  96. <el-row :gutter="10" class="mb8" v-if="filterMode == 2">
  97. <el-col :span="1.5">
  98. <el-tooltip class="item" effect="dark" content="添加新群聊进入任务" placement="top">
  99. <el-button
  100. type="warning"
  101. icon="el-icon-plus"
  102. size="medium"
  103. @click="addGroup"
  104. >追加群聊</el-button>
  105. </el-tooltip>
  106. </el-col>
  107. <el-col :span="1.5">
  108. <el-tooltip class="item" effect="dark" content="修改选择的群聊营期时间" placement="top">
  109. <el-button
  110. type="danger"
  111. icon="el-icon-edit"
  112. size="medium"
  113. :disabled="multiple"
  114. @click="updateGroupTime"
  115. >批量修改营期时间</el-button>
  116. </el-tooltip>
  117. </el-col>
  118. <el-col :span="1.5">
  119. <el-tooltip class="item" effect="dark" content="删除营期之后,将不会在给原营期的群发送消息,ps:删除之后不可恢复" placement="top">
  120. <el-button
  121. type="danger"
  122. icon="el-icon-s-promotion"
  123. size="medium"
  124. :disabled="multiple"
  125. @click="handleDeleteUserLogs"
  126. v-hasPermi="['qw:sopUserLogs:remove']"
  127. >批量删除营期</el-button>
  128. </el-tooltip>
  129. </el-col>
  130. <el-col :span="1.5">
  131. <el-tooltip class="item" effect="dark" content="批量更换实际发送人" placement="top" >
  132. <el-button
  133. type="primary"
  134. icon="el-icon-s-custom"
  135. size="medium"
  136. :disabled="multiple"
  137. @click="handleUpdateSender"
  138. >批量更换实际发送人</el-button>
  139. </el-tooltip>
  140. </el-col>
  141. </el-row>
  142. <div style="color: #999;font-size: 14px;display: flex;align-items: center;margin-bottom: 5px" v-if="filterMode == 1">
  143. <i class="el-icon-info"></i>
  144. 【营期一键群发】:此功能用于给 选中的 营期 内【所有的】客户发送 消息【或者发送草稿-/-清楚草稿】
  145. </div>
  146. <div style="color: #999;font-size: 14px;display: flex;align-items: center;margin-bottom: 5px" v-if="filterMode == 1">
  147. <i class="el-icon-info"></i>
  148. 【批量删除营期】:此功能用于删除选中的【整个营期】,删除之后将不会在给原营期的客户发送消息,ps:删除之后不可恢复
  149. </div>
  150. <div style="color: #999;font-size: 14px;display: flex;align-items: center;margin-bottom: 5px" v-if="filterMode == 1">
  151. <i class="el-icon-info"></i>
  152. 【天数】:【列表:营期时间】对应列表中的天数是几 就代表着 插件助手 会发送【任务模板】里的第几天的消息
  153. </div>
  154. <el-table border v-loading="loading" :data="sopUserLogsList" @selection-change="handleSelectionChange">
  155. <el-table-column type="selection" width="55" align="center" />
  156. <el-table-column label="营期编号" align="center" prop="id" />
  157. <el-table-column label="企微员工账号" align="center" prop="qwUserId" />
  158. <el-table-column label="企微员工名称" align="center" prop="qwUserName" />
  159. <el-table-column label="实际发送人" align="center" prop="actualQwUserName" />
  160. <el-table-column label="群聊" align="center" prop="chatName" v-if="filterMode == 2" />
  161. <el-table-column label="营期时间" align="center" prop="startTime" width="180">
  162. <template slot-scope="scope">
  163. <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
  164. </template>
  165. </el-table-column>
  166. <el-table-column label="天数" align="center" prop="countDays" />
  167. <el-table-column label="状态" align="center" prop="status" >
  168. <template slot-scope="scope">
  169. <div v-if="scope.row.userId && scope.row.userId.includes('null')">
  170. <span style="color: orange;">营期异常</span>
  171. </div>
  172. <div v-else>
  173. <dict-tag :options="sopUserLogsDelStatus" :value="scope.row.status"/>
  174. </div>
  175. </template>
  176. </el-table-column>
  177. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="filterMode == 1">
  178. <template slot-scope="scope">
  179. <el-button
  180. v-if="scope.row.status ==1"
  181. size="mini"
  182. type="text"
  183. icon="el-icon-edit"
  184. @click="handleSelect(scope.row)"
  185. v-hasPermi="['qw:sop:list']"
  186. >营期详情</el-button>
  187. <el-button
  188. v-if="scope.row.userId && scope.row.userId.includes('null')"
  189. size="mini"
  190. type="text"
  191. icon="el-icon-s-check"
  192. @click="handleRepairLogs(scope.row)"
  193. v-hasPermi="['qw:sop:list']"
  194. >修复营期</el-button>
  195. <!-- <el-button-->
  196. <!-- size="mini"-->
  197. <!-- type="text"-->
  198. <!-- icon="el-icon-edit"-->
  199. <!-- @click="handleTemp(scope.row)"-->
  200. <!-- >新建群发任务</el-button>-->
  201. </template>
  202. </el-table-column>
  203. </el-table>
  204. <pagination
  205. v-show="total>0"
  206. :total="total"
  207. :page.sync="queryParams.pageNum"
  208. :limit.sync="queryParams.pageSize"
  209. @pagination="getList"
  210. />
  211. <!-- 执行详情 -->
  212. <el-drawer :title="logsInfoDetailsOpen.title" :visible.sync="logsInfoDetailsOpen.open" size="88%" style="font-weight: bolder">
  213. <sop-user-logs-info-details ref="SopUserLogsInfoDetails" :rowDetailFrom="logsInfoDetailsOpen.item" @flashNotify="flashNotify"></sop-user-logs-info-details>
  214. </el-drawer>
  215. <send-msg-open-tool ref="sendMsgOpenTool" ></send-msg-open-tool>
  216. <el-dialog title="修改营期时间" :visible.sync="updateTimeData.open" width="800px" append-to-body>
  217. <p>
  218. <span>选择群聊:</span>
  219. <el-tag v-for="name in chatNames">{{name}}</el-tag>
  220. </p>
  221. <el-form ref="msgForm" :model="updateTimeData.form" label-width="100px">
  222. <el-form-item label="日期">
  223. <el-date-picker
  224. v-model="updateTimeData.form.date"
  225. type="date"
  226. value-format="yyyy-MM-dd"
  227. placeholder="选择日期">
  228. </el-date-picker>
  229. </el-form-item>
  230. </el-form>
  231. <div slot="footer" class="dialog-footer">
  232. <el-button type="primary" @click="submitUpdateTimeForm">确 定</el-button>
  233. <el-button @click="updateTimeData.open = false">取 消</el-button>
  234. </div>
  235. </el-dialog>
  236. <el-dialog title="选择企微" :visible.sync="addGroupData.userOpen" width="1300px" append-to-body>
  237. <qwUserList ref="QwUserList" @selectUserList="selectUserList"></qwUserList>
  238. </el-dialog>
  239. <el-dialog :title="listUser.title" :visible.sync="listUser.open" width="1300px" append-to-body>
  240. <qwUserSelectOne ref="QwUserListSender" @selectUser="selectSenderSingle"></qwUserSelectOne>
  241. </el-dialog>
  242. <el-dialog title="追加群聊" :visible.sync="addGroupData.open" width="800px" append-to-body>
  243. <el-form ref="msgForm" :model="addGroupData.form" label-width="100px">
  244. <el-form-item label="选择员工" prop="qwUserIds" style="margin-top: 2%">
  245. <div>
  246. <el-button
  247. size="medium"
  248. icon="el-icon-circle-plus-outline"
  249. plain
  250. @click="handleCompanyUser">请选择使用员工</el-button>
  251. </div>
  252. <div>
  253. <el-tag
  254. style="margin-left: 5px"
  255. size="medium"
  256. :key="id"
  257. v-for="id in userSelectList"
  258. closable
  259. :disable-transitions="false"
  260. @close="handleClosegroupUser(id)">
  261. <span v-for="list in companyUserLists " :key="list.userId" v-if="list.id == id">{{list.qwUserName}}</span>
  262. </el-tag>
  263. </div>
  264. </el-form-item>
  265. <el-form-item label="群聊">
  266. <el-select multiple filterable clearable v-model="addGroupData.form.chatIds">
  267. <el-option v-for="item in addGroupData.selectChat" :key="item.chatId" :label="item.name" :value="item.chatId"/>
  268. </el-select>
  269. </el-form-item>
  270. <el-form-item label="日期">
  271. <el-date-picker
  272. v-model="addGroupData.form.date"
  273. type="date"
  274. value-format="yyyy-MM-dd"
  275. placeholder="选择日期">
  276. </el-date-picker>
  277. </el-form-item>
  278. </el-form>
  279. <div slot="footer" class="dialog-footer">
  280. <el-button type="primary" @click="submitAddGroupForm">确 定</el-button>
  281. <el-button @click="addGroupData.open = false">取 消</el-button>
  282. </div>
  283. </el-dialog>
  284. </div>
  285. </template>
  286. <script>
  287. import {
  288. delSopUserLogs,
  289. exportSopUserLogs,
  290. listSopUserLogs,
  291. repairSopUserLogs,
  292. getSelectChat,
  293. addGroupChat,
  294. updateLogDate,UpdateTimeSopUserLogs,replaceUser
  295. } from "../../../api/qw/sopUserLogs";
  296. import sopLogsDetails from "@/views/qw/sopLogs/sopLogsList.vue";
  297. import SopUserLogsInfoDetails from "@/views/qw/sopUserLogsInfo/sopUserLogsInfoDetails.vue";
  298. import sendMsgOpenTool from "../../../views/qw/sopUserLogsInfo/sendMsgOpenTool.vue";
  299. import {listAll as chatListAll} from "@/api/qw/groupChat";
  300. import companyUserList from "@/views/company/companyUser/companyUserList.vue";
  301. import qwUserList from "@/views/qw/user/qwUserList.vue";
  302. import qwUserSelectOne from "@/views/qw/user/qwUserSelectOne.vue";
  303. import {getQwAllUserList, listUser} from "@/api/company/companyUser";
  304. export default {
  305. name: "sopUserLogsSchedule",
  306. components: {qwUserList, qwUserSelectOne, companyUserList, SopUserLogsInfoDetails, sopLogsDetails,sendMsgOpenTool},
  307. props:{
  308. rowDetailFrom:{},
  309. },
  310. data() {
  311. return {
  312. qwUserIds: [],
  313. sopUserLogId:null,
  314. companyUserLists:[],
  315. sopName:'',
  316. tempId:'',
  317. listUser: {
  318. title: '选择发送人',
  319. open: false
  320. },
  321. // 遮罩层
  322. loading: true,
  323. // 导出遮罩层
  324. exportLoading: false,
  325. filterMode: 1,
  326. // 选中数组
  327. ids: [],
  328. chatNames: [],
  329. statusOptions: [],
  330. // 非单个禁用
  331. single: true,
  332. // 非多个禁用
  333. multiple: true,
  334. // 显示搜索条件
  335. showSearch: true,
  336. // 总条数
  337. total: 0,
  338. logsInfoDetailsOpen:{
  339. title:"",
  340. open:false,
  341. },
  342. sysQwSopAiContentType:[],
  343. userSelectList:[],
  344. // sopUserLogs表格数据
  345. sopUserLogsList: [],
  346. sopUserLogsDelStatus:[],
  347. // 弹出层标题
  348. title: "",
  349. // 是否显示弹出层
  350. open: false,
  351. // 查询参数
  352. addGroupData: {
  353. open: false,
  354. userOpen: false,
  355. selectChat: [],
  356. form: {
  357. chatIds: [],
  358. },
  359. },
  360. updateTimeData: {
  361. open: false,
  362. form: {
  363. date: null,
  364. },
  365. },
  366. queryParams: {
  367. pageNum: 1,
  368. pageSize: 10,
  369. sopId: null,
  370. userLogsId:null,
  371. externalUserName:null,
  372. externalId:null,
  373. sopTempId: null,
  374. qwUserId: null,
  375. qwUserName: null,
  376. corpId: null,
  377. startTime: null,
  378. status: null,
  379. userId: null,
  380. type:null,
  381. },
  382. sendMsgOpen:{
  383. title:'营期一键批量群发',
  384. open:false,
  385. ids:null,
  386. },
  387. setting:[],
  388. // 表单参数
  389. form: {},
  390. tempForm: {
  391. setting:null,
  392. videoIdSet:null,
  393. courseIdSet:null,
  394. },
  395. // 表单校验
  396. rules: {
  397. }
  398. };
  399. },
  400. created() {
  401. this.getDicts("sys_company_status").then(response => {
  402. this.statusOptions = response.data;
  403. });
  404. this.getDicts("sop_user_logs_del_status").then(response => {
  405. this.sopUserLogsDelStatus = response.data;
  406. });
  407. this.getDicts("sys_qwSopAi_contentType").then(response => {
  408. this.sysQwSopAiContentType = response.data;
  409. });
  410. this.queryParams.sopId = this.$route.params.id;
  411. this.sopName = this.$route.query.name;
  412. this.filterMode = this.$route.query.filterMode;
  413. this.tempId = this.$route.query.tempId;
  414. this.queryParams.corpId= this.$route.query.corpId;
  415. this.queryParams.type= this.$route.query.type;
  416. getQwAllUserList(this.queryParams.corpId).then(response => {
  417. this.companyUserLists = response.data;
  418. });
  419. this.getList()
  420. },
  421. methods: {
  422. selectSenderSingle(user){
  423. this.listUser.open=false;
  424. const data = { ids: this.ids };
  425. // 仅在选中员工时携带 actualQwUserId 与 actualQwId,否则两字段均不传,后端按清空处理
  426. if (user && user.qwUserId) {
  427. data.actualQwUserId = user.qwUserId;
  428. data.actualQwId = user.id;
  429. }
  430. replaceUser(data).then(res => {
  431. this.msgSuccess(user && user.qwUserId ? "修改成功" : "已清空实际发送人");
  432. this.getList();
  433. })
  434. },
  435. /** 查询sopUserLogs列表 */
  436. getList() {
  437. this.loading = true;
  438. listSopUserLogs(this.queryParams).then(response => {
  439. this.sopUserLogsList = response.rows;
  440. this.total = response.total;
  441. this.loading = false;
  442. });
  443. },
  444. // 取消按钮
  445. cancel() {
  446. this.open = false;
  447. this.reset();
  448. },
  449. addSetList(){
  450. const newSetting = {
  451. contentType:'1',
  452. value: '',
  453. };
  454. // 将新设置项添加到 content.setting 数组中
  455. this.setting.push(newSetting);
  456. },
  457. // 表单重置
  458. reset() {
  459. this.form = {
  460. id: null,
  461. sopId: null,
  462. sopTempId: null,
  463. qwUserId: null,
  464. externalId:null,
  465. corpId: null,
  466. startTime: null,
  467. status: 0,
  468. userId: null
  469. };
  470. this.resetForm("form");
  471. },
  472. /**
  473. * 营期一键群发
  474. */
  475. handleCampSendMsg(){
  476. setTimeout(() => {
  477. this.$refs.sendMsgOpenTool.oneClickGroupSending(this.ids,2,this.queryParams.corpId);
  478. }, 500);
  479. },
  480. /**
  481. * 批量更换实际发送人
  482. */
  483. handleUpdateSender() {
  484. this.listUser.open = true;
  485. this.$nextTick(() => {
  486. this.$refs.QwUserListSender.getDetails(this.queryParams.corpId);
  487. })
  488. },
  489. /**
  490. * 删除营期
  491. */
  492. handleDeleteUserLogs(){
  493. const ids = this.ids;
  494. this.$confirm('是否确认删除编号为"' + ids + '"的数据项【注意!!删除后不可恢复,请谨慎操作】?', "警告", {
  495. confirmButtonText: "确定",
  496. cancelButtonText: "取消",
  497. type: "warning"
  498. }).then(function() {
  499. return delSopUserLogs(ids);
  500. }).then(() => {
  501. this.getList();
  502. this.msgSuccess("删除成功");
  503. }).catch(() => {});
  504. },
  505. /** 搜索按钮操作 */
  506. handleQuery() {
  507. this.queryParams.pageNum = 1;
  508. this.getList();
  509. },
  510. /** 重置按钮操作 */
  511. resetQuery() {
  512. this.resetForm("queryForm");
  513. this.handleQuery();
  514. },
  515. flashNotify(){
  516. this.getList();
  517. },
  518. // 多选框选中数据
  519. handleSelectionChange(selection) {
  520. this.ids = selection.map(item => item.id)
  521. if(this.filterMode == 2){
  522. this.chatNames = selection.map(item => item.chatName);
  523. }
  524. this.single = selection.length!==1
  525. this.multiple = !selection.length
  526. },
  527. handleSelect(val){
  528. val.filterMode = this.filterMode;
  529. this.logsInfoDetailsOpen.title='企微账号:'+val.qwUserId+' '+'营期时间:'+val.startTime+' '+'天数:' + val.countDays;
  530. this.logsInfoDetailsOpen.open=true;
  531. const externalUserName = this.queryParams.externalUserName;
  532. setTimeout(() => {
  533. this.$refs.SopUserLogsInfoDetails.selectSopUserLogsInfo(val, externalUserName);
  534. }, 500);
  535. },
  536. handleRepairLogs(val) {
  537. this.loading = true;
  538. let loadingRock = this.$loading({
  539. lock: true,
  540. text: '正在修复中请稍后~~!!',
  541. spinner: 'el-icon-loading',
  542. background: 'rgba(0, 0, 0, 0.7)'
  543. });
  544. repairSopUserLogs(val).then(res => {
  545. this.msgSuccess("修复成功成功");
  546. }).catch(res => {
  547. }).finally(res => {
  548. loadingRock.close();
  549. this.loading = false;
  550. this.getList();
  551. })
  552. },
  553. /** 导出按钮操作 */
  554. handleExport() {
  555. const queryParams = this.queryParams;
  556. this.$confirm('是否确认导出所有sopUserLogs数据项?', "警告", {
  557. confirmButtonText: "确定",
  558. cancelButtonText: "取消",
  559. type: "warning"
  560. }).then(() => {
  561. this.exportLoading = true;
  562. return exportSopUserLogs(queryParams);
  563. }).then(response => {
  564. this.download(response.msg);
  565. this.exportLoading = false;
  566. }).catch(() => {
  567. });
  568. },
  569. addGroup() {
  570. this.addGroupData.open = true;
  571. this.addGroupData.form = {date: new Date(), chatIds: []};
  572. },
  573. updateGroupTime() {
  574. this.updateTimeData.open = true;
  575. this.updateTimeData.form = {date: new Date()};
  576. },
  577. submitUpdateTimeForm() {
  578. let form = {
  579. date: this.updateTimeData.form.date,
  580. ids: this.ids,
  581. }
  582. updateLogDate(form).then(e => {
  583. this.updateTimeData.open = false;
  584. this.getList();
  585. });
  586. },
  587. submitAddGroupForm() {
  588. let form = {
  589. id: this.queryParams.sopId,
  590. qwUserIds: this.userSelectList.join(),
  591. chatIds: this.addGroupData.form.chatIds.join(),
  592. date: this.addGroupData.form.date,
  593. }
  594. addGroupChat(form).then(e => {
  595. this.addGroupData.open = false;
  596. this.getList();
  597. });
  598. },
  599. handleCompanyUser() {
  600. setTimeout(() => {
  601. this.$refs.QwUserList.getDetails(this.queryParams.corpId, this.queryParams.type, 2);
  602. }, 1);
  603. this.addGroupData.userOpen = true;
  604. },
  605. handleClosegroupUser(list) {
  606. const index = this.userSelectList.findIndex(t => t === list);
  607. if (index !== -1) {
  608. this.userSelectList.splice(index, 1);
  609. this.qwUserIds.splice(index, 1);
  610. this.loadChatList()
  611. }
  612. },
  613. loadChatList() {
  614. chatListAll(this.qwUserIds.join(), this.queryParams.corpId, this.queryParams.sopId).then(e => {
  615. this.addGroupData.selectChat = e.data;
  616. })
  617. },
  618. selectUserList(list) {
  619. this.addGroupData.userOpen = false;
  620. list.forEach(obj => {
  621. if (!this.userSelectList.some(item => item == obj.id)) {
  622. console.info(this.userSelectList)
  623. this.userSelectList.push(obj.id);
  624. this.qwUserIds.push(obj.qwUserId);
  625. }
  626. });
  627. this.loadChatList()
  628. },
  629. }
  630. };
  631. </script>
  632. <style>
  633. .custom-style {
  634. font-weight: bold; /* 加粗 */
  635. }
  636. </style>