sopLogsList.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
  4. <el-form-item label="企微员工账号" prop="qwUserid" v-if="queryParams.type==2">
  5. <el-input
  6. v-model="queryParams.qwUserid"
  7. placeholder="请输入企微员工账号"
  8. clearable
  9. size="small"
  10. @keyup.enter.native="handleQuery"
  11. />
  12. </el-form-item>
  13. <el-form-item label="销售昵称" prop="qwUserName" v-if="queryParams.type==1">
  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="externalUserName">
  23. <el-input
  24. v-model="queryParams.externalUserName"
  25. placeholder="请输入客户昵称"
  26. clearable
  27. size="small"
  28. @keyup.enter.native="handleQuery"
  29. />
  30. </el-form-item>
  31. <el-form-item label="发送类型" prop="sendType" label-width="100px" >
  32. <el-select v-model="queryParams.sendType" placeholder="请选择发送类型" clearable size="small">
  33. <el-option
  34. v-for="dict in sysQwSopType"
  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="发送(成员)状态" prop="sendStatus">
  42. <el-select v-model="queryParams.sendStatus" placeholder="请选择发送(成员)状态" clearable size="small">
  43. <el-option
  44. v-for="dict in sysQwSopLogsStatus"
  45. :key="dict.dictValue"
  46. :label="dict.dictLabel"
  47. :value="dict.dictValue"
  48. />
  49. </el-select>
  50. </el-form-item>
  51. <el-form-item label="预计发送时间" prop="scheduleTime">
  52. <!-- <el-date-picker clearable size="small"-->
  53. <!-- v-model="queryParams.sendTime"-->
  54. <!-- type="datetime"-->
  55. <!-- value-format="yyyy-MM-dd HH:mm:ss"-->
  56. <!-- placeholder="选择预计发送时间">-->
  57. <!-- </el-date-picker>-->
  58. <el-date-picker
  59. clearable size="small"
  60. v-model="scheduleTime"
  61. type="datetimerange"
  62. range-separator="至"
  63. start-placeholder="开始日期"
  64. end-placeholder="结束日期"
  65. placeholder="选择预计发送时间"
  66. @change="handleScheduleTimeChange"
  67. >
  68. </el-date-picker>
  69. </el-form-item>
  70. <el-form-item label="接收(客户)状态" prop="receivingStatus">
  71. <el-select v-model="queryParams.receivingStatus" placeholder="请选择接收(客户)状态" clearable size="small">
  72. <el-option
  73. v-for="dict in groupMsgSendStatusOptions"
  74. :key="dict.dictValue"
  75. :label="dict.dictLabel"
  76. :value="dict.dictValue"
  77. />
  78. </el-select>
  79. </el-form-item>
  80. <el-form-item>
  81. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  82. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  83. </el-form-item>
  84. </el-form>
  85. <el-row :gutter="10" class="mb8">
  86. <el-col :span="1.5">
  87. <el-button
  88. type="warning"
  89. plain
  90. icon="el-icon-download"
  91. size="mini"
  92. :loading="exportLoading"
  93. @click="handleExport"
  94. v-hasPermi="['qw:sopLogs:export']"
  95. >导出</el-button>
  96. <el-button
  97. type="danger"
  98. plain
  99. icon="el-icon-delete"
  100. size="mini"
  101. :disabled="multiple"
  102. @click="handleDelete"
  103. v-hasPermi="['qw:sopLogs:remove']"
  104. >批量删除</el-button>
  105. <el-button
  106. type="success"
  107. plain
  108. icon="el-icon-edit"
  109. size="mini"
  110. :disabled="multiple"
  111. @click="handleEditCourse"
  112. v-hasPermi="['qw:sopLogs:editCourse']"
  113. >再次发送记录</el-button>
  114. </el-col>
  115. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  116. </el-row>
  117. <el-table v-loading="loading" :data="qwSopLogsList" @selection-change="handleSelectionChange">
  118. <el-table-column type="selection" width="55" align="center" />
  119. <el-table-column label="编号" align="center" prop="id" />
  120. <el-table-column label="发送类型" align="center" prop="sendType" width="80">
  121. <template slot-scope="scope">
  122. <dict-tag :options="sysQwSopType" :value="scope.row.sendType"/>
  123. </template>
  124. </el-table-column>
  125. <el-table-column label="企微成员账号" align="center" prop="qwUserid" />
  126. <el-table-column label="企微成员昵称" align="center" prop="qwUserName" v-if="queryParams.type==2" />
  127. <!-- <el-table-column label="系统后台昵称" align="center" prop="userName" />-->
  128. <el-table-column label="客户昵称" align="center" prop="externalUserName" />
  129. <el-table-column label="发送的消息" align="center" prop="contentJson" >
  130. <template slot-scope="scope">
  131. <el-button type="text" @click="showContentDialog(scope.row.contentJson)">
  132. 查看详情
  133. </el-button>
  134. </template>
  135. </el-table-column>
  136. <el-table-column label="成员状态" align="center" prop="sendStatus" >
  137. <template slot-scope="scope">
  138. <dict-tag :options="sysQwSopLogsStatus" :value="scope.row.sendStatus"/>
  139. </template>
  140. </el-table-column>
  141. <el-table-column label="预计发送时间" align="center" prop="sendTime" width="180"/>
  142. <el-table-column label="实际发送时间" align="center" prop="realSendTime" width="180"/>
  143. <!-- <el-table-column label="获取记录" align="center" prop="takeRecords" width="180">-->
  144. <!-- <template slot-scope="scope">-->
  145. <!-- <span v-if="scope.row.takeRecords == 0" :style="{ color: 'red' }" >未获取</span>-->
  146. <!-- <span v-else-if="scope.row.takeRecords == 1" :style="{ color: 'green' }" >已获取</span>-->
  147. <!-- <span v-else :style="{ color: 'gray' }" >未知状态</span>-->
  148. <!-- </template>-->
  149. <!-- </el-table-column>-->
  150. <el-table-column label="客户" align="center" prop="receivingStatus" >
  151. <template slot-scope="scope">
  152. <dict-tag :options="groupMsgSendStatusOptions" :value="scope.row.receivingStatus"/>
  153. </template>
  154. </el-table-column>
  155. <el-table-column label="生成时间" align="createTime" prop="createTime" width="180" />
  156. <el-table-column label="消息ID" align="center" prop="msgId" />
  157. <el-table-column label="备注" align="center" prop="remark" />
  158. </el-table>
  159. <el-dialog :visible.sync="contentDialog.isDialogVisible" title="消息详情" width="30%" append-to-body>
  160. <div>
  161. <div v-for="(item, index) in contentDialog.json || []" :key="index">
  162. <el-card class="box-card" style="margin-top: 2%">
  163. <div slot="header" class="clearfix" style="display: flex;justify-content: space-between;align-items: center;">
  164. <div>
  165. <span>类型:</span>
  166. <span v-if="item.contentType == 1">文本</span>
  167. <span v-if="item.contentType == 2">图片</span>
  168. <span v-if="item.contentType == 3">卡片</span>
  169. <span v-if="item.contentType == 4">小程序</span>
  170. <span v-if="item.contentType == 5">文件</span>
  171. <span v-if="item.contentType == 6">视频</span>
  172. <span v-if="item.contentType == 7">语音</span>
  173. <span v-if="item.contentType == 8">视频号</span>
  174. <span v-if="item.contentType == 9">APP</span>
  175. <span v-if="item.contentType == 10">自定义小程序</span>
  176. <span v-if="item.contentType == 21">群公告</span>
  177. <span v-if="item.contentType == 4"><el-button size="mini" type="primary" @click="generateShortLink(item)" style="margin-left: 330px;">生成短链</el-button></span>
  178. </div>
  179. <div v-if="item.sendStatus">
  180. <span>发送状态:</span>
  181. <el-tag type="success" v-if="item.sendStatus == 1">发送成功</el-tag>
  182. <el-tag type="danger" v-if="item.sendStatus == 2">发送失败</el-tag>
  183. </div>
  184. </div>
  185. <div v-if="item.sendStatus && item.sendStatus == 2">发送失败原因:<span style="color: #ff4949">{{item.sendRemarks}}</span></div>
  186. <div v-if="item.contentType == 1" v-html="item.value"></div>
  187. <div v-if="item.contentType == 2">
  188. <el-image
  189. style="width: 100px; height: 100px"
  190. :src="item.imgUrl"
  191. fit="contain"
  192. @click.prevent="openImageViewer(item.imgUrl)" />
  193. </div>
  194. <div v-if="item.contentType == 3 || item.contentType == 9" class="message-style">
  195. <div
  196. style="background-color: white; padding: 10px; width: 100%"
  197. @click="openLink(item.linkUrl)">
  198. <span>{{ item.linkTitle }}</span>
  199. <div style="display: flex; justify-content: space-between; width: 100%">
  200. <span style="font-size: 13px; flex: 1">{{ item.linkDescribe }}</span>
  201. <!-- 点击图片时停止事件冒泡 -->
  202. <el-image
  203. style="width: 50px; height: 50px; flex-shrink: 0"
  204. :src="item.linkImageUrl"
  205. fit="contain"
  206. @click.stop="openImageViewer(item.linkImageUrl)" />
  207. </div>
  208. </div>
  209. </div>
  210. <div v-if="item.contentType == 4 || item.contentType == 10" class="message-style">
  211. <div style="display: flex; justify-content: space-between; width: 100%">
  212. <span style="font-size: 13px; flex: 1">{{ item.miniprogramTitle }}</span>
  213. <el-image
  214. style="width: 50px; height: 50px; flex-shrink: 0"
  215. :src="item.miniprogramPicUrl"
  216. fit="contain"
  217. @click.stop="openImageViewer(item.miniprogramPicUrl)" />
  218. </div>
  219. </div>
  220. <div v-if="item.contentType == 5" class="message-style">
  221. <el-link type="primary" :href="item.fileUrl" download style="padding: 10px">
  222. {{ item.fileUrl }}
  223. </el-link>
  224. </div>
  225. <div v-if="item.contentType == 6" class="message-style">
  226. <video
  227. :src="item.videoUrl"
  228. controls
  229. style="width: 200px; height: 100px">
  230. </video>
  231. </div>
  232. <div v-if="item.contentType == 7">
  233. <span>
  234. {{ item.value }}
  235. </span>
  236. <div v-if="!item.voiceUrl" style="margin-top: 3px" >
  237. <span style="color: red">无语音地址</span>
  238. </div>
  239. </div>
  240. <div v-if="item.contentType == 8" class="message-style">
  241. <el-card class="box-card" v-if="item.coverUrl">
  242. <el-form-item label="封面标题:" label-width="100px">
  243. <el-input v-model="item.nickname" style="width: 90%;margin-bottom: 1%" disabled/>
  244. </el-form-item>
  245. <el-form-item label="头像:" label-width="100px" >
  246. <el-image
  247. v-if="item.avatar != null"
  248. :src="item.avatar"
  249. :preview-src-list="[item.avatar]"
  250. :style="{ width: '50px', height: '50px' }"
  251. ></el-image>
  252. </el-form-item>
  253. <el-form-item label="封面:" label-width="100px" >
  254. <el-image
  255. v-if="item.coverUrl != null"
  256. :src="item.coverUrl"
  257. :preview-src-list="[item.coverUrl]"
  258. :style="{ width: '200px', height: '200px' }"
  259. ></el-image>
  260. </el-form-item>
  261. <el-form-item label="简介:" label-width="100px" >
  262. <el-input type="textarea" :rows="3" v-model="item.desc" style="width: 90%;margin-top: 1%;" disabled />
  263. </el-form-item>
  264. <el-form-item label="视频地址:" label-width="100px" style="margin-top: 1%" >
  265. <el-input v-model="item.url" style="width: 90%;" disabled />
  266. </el-form-item >
  267. </el-card>
  268. </div>
  269. <div v-if="item.contentType == 21">
  270. <div v-html="item.value"></div>
  271. </div>
  272. </el-card>
  273. </div>
  274. </div>
  275. <span slot="footer" class="dialog-footer">
  276. <el-button @click="contentDialog.isDialogVisible = false">关闭</el-button>
  277. </span>
  278. </el-dialog>
  279. <!-- 大图预览对话框 -->
  280. <el-dialog
  281. :visible.sync="dialogVisible"
  282. :modal="false"
  283. width="500"
  284. append-to-body>
  285. <img
  286. :src="this.dialogImageUrl"
  287. style="display: block; max-width: 100%; margin: 0 auto"
  288. />
  289. </el-dialog>
  290. <el-dialog
  291. title="生成短链"
  292. :visible.sync="shortLinkDialogVisible"
  293. width="30%"
  294. v-loading="shortLoading"
  295. append-to-body>
  296. <el-tooltip placement="top" effect="dark" :content="copyText">
  297. <span class="ellipsis" style="max-width:100px;display:inline-block;">{{copyText}}</span>
  298. </el-tooltip>
  299. <i style="margin-left:120px;cursor: pointer" class="el-icon-document-copy" @click="onCopy"></i>
  300. <span slot="footer" class="dialog-footer">
  301. <el-button @click="shortLinkDialogVisible = false">取 消</el-button>
  302. <el-button type="primary" @click="shortLinkDialogVisible = false">确 定</el-button>
  303. </span>
  304. </el-dialog>
  305. <pagination
  306. v-show="total>0"
  307. :total="total"
  308. :page.sync="queryParams.pageNum"
  309. :limit.sync="queryParams.pageSize"
  310. @pagination="getList"
  311. />
  312. <el-dialog :title="videoNumOptions.title" :visible.sync="videoNumOptions.open" width="1500px" append-to-body>
  313. <userVideo ref="QwUserVideo" @videoResult="qwUserVideoResult"></userVideo>
  314. </el-dialog>
  315. </div>
  316. </template>
  317. <script>
  318. import {
  319. listQwSopLogs,
  320. exportQwSopLogs,
  321. listQwSopLogsList,
  322. delQwSopLogs,
  323. editCourseQwSopLogs,
  324. generateShortLink
  325. } from '../../../api/qw/sopLogs'
  326. import {delSopUserLogsInfo} from "@/api/qw/sopUserLogsInfo";
  327. import userVideo from "@/views/qw/userVideo/userVideo";
  328. export default {
  329. name: "sopLogsList",
  330. props:{
  331. rowDetailFrom:{userVideo},
  332. },
  333. watch:{
  334. rowDetailFrom:{
  335. handler(newVal){
  336. // 当formData变化时重新查询
  337. this.getList(newVal);
  338. },
  339. deep: true
  340. }
  341. },
  342. data() {
  343. return {
  344. videoNumOptions: {
  345. title: '选择视频号',
  346. open: false,
  347. content: null,
  348. contentIndex: null,
  349. },
  350. copyText:"",
  351. shortLoading:false,
  352. shortLinkDialogVisible:false,
  353. //图片放大
  354. dialogVisible: false,
  355. dialogImageUrl:null,
  356. //时间选择
  357. scheduleTime: null,
  358. // 遮罩层
  359. loading: true,
  360. // 导出遮罩层
  361. exportLoading: false,
  362. // 选中数组
  363. ids: [],
  364. // 非单个禁用
  365. single: true,
  366. // 非多个禁用
  367. multiple: true,
  368. // 显示搜索条件
  369. showSearch: true,
  370. // 总条数
  371. total: 0,
  372. // 企业微信SOP 定时任务表格数据
  373. qwSopLogsList: [],
  374. //成员状态
  375. sysQwSopLogsStatus:[],
  376. //客户接收状态
  377. groupMsgSendStatusOptions:[],
  378. //企微SOP发送类型
  379. sysQwSopType: [],
  380. //发送的消息
  381. contentDialog:{
  382. isDialogVisible:false,
  383. json: [],
  384. },
  385. // 弹出层标题
  386. title: "",
  387. // 是否显示弹出层
  388. open: false,
  389. // 查询参数
  390. queryParams: {
  391. pageNum: 1,
  392. pageSize: 10,
  393. qwUserName: null,
  394. qwUserid: null,
  395. externalUserName: null,
  396. sendStatus: null,
  397. sendTime: null,
  398. corpId:null,
  399. receivingStatus: null,
  400. sendType: null,
  401. type:null,
  402. scheduleEndTime:null,
  403. scheduleStartTime:null,
  404. },
  405. // 表单参数
  406. form: {},
  407. // 表单校验
  408. rules: {
  409. }
  410. };
  411. },
  412. created() {
  413. this.getList(this.rowDetailFrom);
  414. //成员状态
  415. this.getDicts("sys_qw_sopLogs_status").then(response => {
  416. this.sysQwSopLogsStatus = response.data;
  417. });
  418. //客户接收状态
  419. this.getDicts("sys_qw_groupMsg_SendStatus").then(response => {
  420. this.groupMsgSendStatusOptions = response.data;
  421. });
  422. //发送消息类型
  423. this.getDicts("sys_qw_sop_course_type").then(response => {
  424. this.sysQwSopType = response.data;
  425. });
  426. },
  427. methods: {
  428. qwUserVideoResult(val) {
  429. // 根据选中的内容,将返回的数据更新到相应的表单项
  430. const content = this.videoNumOptions.content;
  431. const setList = content[this.videoNumOptions.contentIndex];
  432. setList.nickname = val.nickname;
  433. setList.avatar = val.avatar;
  434. setList.coverUrl = val.coverUrl;
  435. setList.thumbUrl = val.thumbUrl;
  436. setList.desc = val.desc;
  437. setList.url = val.url;
  438. setList.extras = val.extras;
  439. setList.videoId = val.id;
  440. console.info(setList)
  441. this.videoNumOptions.open = false;
  442. },
  443. /** 查询企业微信SOP 定时任务列表 */
  444. getList(val) {
  445. this.queryParams.sopId = val.id || this.rowDetailFrom.id;
  446. this.queryParams.corpId= val.corpId || this.rowDetailFrom.corpId;
  447. this.queryParams.type= val.type || this.rowDetailFrom.type;
  448. this.queryParams.filterSopType=val.filterSopType || this.rowDetailFrom.filterSopType;
  449. this.loading = true;
  450. listQwSopLogsList(this.queryParams).then(response => {
  451. // console.log("response.rows",response.rows)
  452. this.qwSopLogsList = response.rows;
  453. this.total = response.total;
  454. this.loading = false;
  455. });
  456. },
  457. handleScheduleTimeChange(val) {
  458. if (val) {
  459. this.queryParams.scheduleStartTime = this.formatDateTime(val[0]);
  460. this.queryParams.scheduleEndTime = this.formatDateTime(val[1]);
  461. } else {
  462. this.queryParams.scheduleStartTime = null;
  463. this.queryParams.scheduleEndTime = null;
  464. }
  465. },
  466. // 格式化日期为 yyyy-MM-dd HH:mm:ss 的北京时间
  467. formatDateTime(date) {
  468. if (!date) return null;
  469. // 创建国际化时间格式,指定为 Asia/Shanghai 时区
  470. const options = {
  471. timeZone: 'Asia/Shanghai',
  472. year: 'numeric',
  473. month: '2-digit',
  474. day: '2-digit',
  475. hour: '2-digit',
  476. minute: '2-digit',
  477. second: '2-digit',
  478. hour12: false, // 24小时制
  479. };
  480. // 获取格式化的日期字符串(如 2025-01-23, 16:00:00)
  481. const formattedDate = new Intl.DateTimeFormat('zh-CN', options).format(new Date(date));
  482. // 转换为 yyyy-MM-dd HH:mm:ss 格式
  483. const [datePart, timePart] = formattedDate.replace(',', '').split(' ');
  484. return `${datePart} ${timePart}`;
  485. },
  486. // 取消按钮
  487. cancel() {
  488. this.open = false;
  489. this.reset();
  490. },
  491. // 表单重置
  492. reset() {
  493. this.form = {
  494. id: null,
  495. qwUserName: null,
  496. externalUserName: null,
  497. logType: null,
  498. contentJson: null,
  499. sendStatus: null,
  500. sendTime: null,
  501. companyId: null,
  502. receivingStatus: null,
  503. msgId: null,
  504. sendType: null,
  505. sopId: null
  506. };
  507. this.resetForm("form");
  508. },
  509. openImageViewer(url) {
  510. // 打开大图预览对话框
  511. this.dialogImageUrl=url
  512. this.dialogVisible = true;
  513. },
  514. openLink(url){
  515. // 使用 window.open 打开链接
  516. window.open(url, '_blank');
  517. },
  518. //查看发送的消息体
  519. showContentDialog(contentJson) {
  520. // 解析 JSON 字符串为 JavaScript 对象
  521. // 替换非法换行符等控制字符
  522. const sanitizedJson = contentJson.replace(/[\u0000-\u001F\u007F]/g, '');
  523. const parsedData = JSON.parse(sanitizedJson);
  524. this.contentDialog.json = parsedData.setting;
  525. this.contentDialog.isDialogVisible = true;
  526. },
  527. /** 搜索按钮操作 */
  528. handleQuery() {
  529. this.queryParams.pageNum = 1;
  530. this.getList(this.rowDetailFrom);
  531. },
  532. /** 重置按钮操作 */
  533. resetQuery() {
  534. this.resetForm("queryForm");
  535. this.queryParams.scheduleStartTime=null;
  536. this.queryParams.scheduleEndTime=null;
  537. this.scheduleTime = null;
  538. this.handleQuery();
  539. },
  540. // 多选框选中数据
  541. handleSelectionChange(selection) {
  542. this.ids = selection.map(item => item.id)
  543. this.single = selection.length!==1
  544. this.multiple = !selection.length
  545. },
  546. /** 删除按钮操作 */
  547. handleDelete(row) {
  548. const ids = row.id || this.ids;
  549. this.$confirm('是否确认删除【执行详情】编号为"【' + ids + '】"的数据项?', "警告", {
  550. confirmButtonText: "确定",
  551. cancelButtonText: "取消",
  552. type: "warning"
  553. }).then(function() {
  554. return delQwSopLogs(ids);
  555. }).then(() => {
  556. this.getList(this.rowDetailFrom);
  557. this.msgSuccess("删除成功");
  558. }).catch(() => {});
  559. },
  560. /**
  561. * 批量修改发送记录
  562. */
  563. handleEditCourse(row){
  564. const ids = row.id || this.ids;
  565. this.$confirm('确认要再次发送【执行详情】编号为"【' + ids + '】"的记录?', "警告", {
  566. confirmButtonText: "确定",
  567. cancelButtonText: "取消",
  568. type: "warning"
  569. }).then(function() {
  570. return editCourseQwSopLogs(ids);
  571. }).then(() => {
  572. this.getList(this.rowDetailFrom);
  573. this.msgSuccess("已经 修改记录为 待发送~");
  574. }).catch(() => {});
  575. },
  576. /** 导出按钮操作 */
  577. handleExport() {
  578. const queryParams = this.queryParams;
  579. this.$confirm('是否确认导出所有企业微信SOP 定时任务数据项?', "警告", {
  580. confirmButtonText: "确定",
  581. cancelButtonText: "取消",
  582. type: "warning"
  583. }).then(() => {
  584. this.exportLoading = true;
  585. return exportQwSopLogs(queryParams);
  586. }).then(response => {
  587. this.download(response.msg);
  588. this.exportLoading = false;
  589. }).catch(() => {});
  590. },
  591. //生成短链
  592. generateShortLink(val){
  593. const param = {
  594. linkStr:val.miniprogramPage,
  595. appId:val.miniprogramAppid
  596. };
  597. generateShortLink(param).then(res=>{
  598. this.copyText = res.urlLink;
  599. });
  600. this.shortLinkDialogVisible = true;
  601. },
  602. onCopy(){
  603. navigator.clipboard.writeText(this.copyText).then(() => {
  604. this.$message.success('复制成功')
  605. })
  606. }
  607. }
  608. };
  609. </script>
  610. <style scoped>
  611. .message-stayle{
  612. display: flex;
  613. justify-content: normal;
  614. align-items: center;
  615. margin-top: 10px;
  616. }
  617. .message-stayle .el-link {
  618. white-space: normal; /* 允许换行 */
  619. word-break: break-all; /* 单词中间断行 */
  620. overflow-wrap: break-word; /* 允许在单词内换行 */
  621. }
  622. .message-stayle span {
  623. word-break: break-all;
  624. }
  625. .ellipsis {
  626. max-width:100px;
  627. white-space: nowrap;
  628. text-overflow: ellipsis;
  629. display: inline-block;
  630. }
  631. </style>