Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
71f8993304
|
@ -278,7 +278,7 @@ public class AiServiceImpl implements IAiService {
|
|||
List<BusAgentInfo> agentInfoL = agentInfoService.selectBusAgentInfoList(agentInfo);
|
||||
if (agentInfoL.size() > 0) {
|
||||
int cha = agentInfoL.get(0).getAiDurationBalance() - agentInfoL.get(0).getAiRealTimeNum();
|
||||
if (cha < list.size()) {
|
||||
if (cha < list.size()&&(cha - 1)>0) {
|
||||
list.subList(0, cha - 1);
|
||||
agentInfoL.get(0).setAiRealTimeNum(agentInfoL.get(0).getAiDurationBalance());
|
||||
} else {
|
||||
|
@ -347,6 +347,21 @@ public class AiServiceImpl implements IAiService {
|
|||
if (listInfo.size() == 0) {
|
||||
System.out.println("话术:" + content + "; order" + busOrderInfo.toString());
|
||||
sendAiTask(content,busOrderInfo);
|
||||
}else {
|
||||
BusAgentInfo busAgentInfo = agentInfoL.get(0);
|
||||
int a = 1;
|
||||
int reduce = busAgentInfo.getAiDurationBalance() - a;
|
||||
busAgentInfo.setAiDurationBalance(reduce);
|
||||
busAgentInfo.setAiRealTimeNum(0);
|
||||
agentInfoService.updateBusAgentInfo(busAgentInfo);
|
||||
|
||||
BusIntegralRecord record = new BusIntegralRecord();
|
||||
record.setAccount(busAgentInfo.getAgentAccount());
|
||||
record.setIntegralUpdateTime(new Date());
|
||||
record.setUpdateType("消耗账分");
|
||||
record.setIntegralUpdateNum(a);
|
||||
record.setIntegralBalance(reduce);
|
||||
integralRecordService.insertBusIntegralRecord(record);
|
||||
}
|
||||
BusReturnVisitInfo returnVisitInfo = new BusReturnVisitInfo();
|
||||
returnVisitInfo.setPhoneNumber(busOrderInfo.getPrivcyPhone());
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
<!-- <el-table-column label="删除状态" align="center" prop="delStatus" /> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
<el-button v-if="scope.row.superiorAgentAccount == 'admin'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
|
|
|
@ -716,48 +716,41 @@ export default {
|
|||
const query = {id:row.id}
|
||||
generateWord(query).then(response => {
|
||||
const copyText = response.msg
|
||||
this.imageUrl = "http://localhost/dev-api/profile/upload/2024/07/18/img0_20240718113153A001.jpg";
|
||||
try {
|
||||
// 创建一个ClipboardItem
|
||||
// const blob = this.fetchImageAsBlob(this.imageUrl);
|
||||
// const item = new ClipboardItem({ [blob.type]: blob });
|
||||
this.imageUrl = "https://youshi.bj.cn/prod-api/profile/upload/2024/07/19/img0_20240719111559A001.jpg";
|
||||
|
||||
// // 将ClipboardItem放入剪贴板
|
||||
// navigator.clipboard.write([item]).then(function() {
|
||||
// console.log('图片已复制到剪贴板');
|
||||
// })
|
||||
// this.copyQrCode()
|
||||
navigator.clipboard.writeText(copyText);
|
||||
this.$modal.msgSuccess("复制成功");
|
||||
} catch (err) {
|
||||
console.error('复制失败', err);
|
||||
// this.copyQrCode(this.imageUrl)
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
const blob = this.fetchImageAsBlob(this.imageUrl);
|
||||
const item = new ClipboardItem({ [blob.type]: blob });
|
||||
navigator.clipboard.writeText(copyText)
|
||||
this.$modal.msgSuccess("复制成功")
|
||||
|
||||
} else {
|
||||
// 创建text area
|
||||
let textArea = document.createElement("textarea");
|
||||
textArea.value = copyText;
|
||||
// 使text area不在viewport,同时设置不可见
|
||||
textArea.style.position = "absolute";
|
||||
textArea.style.opacity = 0;
|
||||
textArea.style.left = "-999999px";
|
||||
textArea.style.top = "-999999px";
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
return new Promise((res, rej) => {
|
||||
// 执行复制命令并移除文本框
|
||||
document.execCommand('copy') ? res() : rej();
|
||||
textArea.remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
// this.$modal.confirm('是否确认删除解绑编号为"' + row.storeCode + '"的店铺?').then(function() {
|
||||
// return changeSelfDeliveryStatus(row.id, 3);
|
||||
// }).then(() => {
|
||||
// this.getList();
|
||||
// this.$modal.msgSuccess("删除成功");
|
||||
// }).catch(function() {
|
||||
|
||||
// });
|
||||
},
|
||||
copyQrCode() {
|
||||
const clipboard = new Clipboard('.copy-btn', {
|
||||
text: () => this.imageUrl
|
||||
});
|
||||
|
||||
clipboard.on('success', () => {
|
||||
console.log('二维码图片链接已复制到剪贴板');
|
||||
// 可以添加用户提示复制成功
|
||||
clipboard.destroy(); // 销毁Clipboard实例
|
||||
});
|
||||
|
||||
clipboard.on('error', () => {
|
||||
console.log('复制失败');
|
||||
// 可以添加用户提示复制失败
|
||||
clipboard.destroy(); // 销毁Clipboard实例
|
||||
});
|
||||
async copyQrCode(imageUrl) {
|
||||
const blob = this.fetchImageAsBlob(imageUrl);
|
||||
const item = new ClipboardItem({ [blob.type]: blob });
|
||||
await navigator.clipboard.write([item]).then(function() {
|
||||
console.log('图片已复制到剪贴板');
|
||||
})
|
||||
},
|
||||
fetchImageAsBlob(imageUrl) {
|
||||
return fetch(imageUrl)
|
||||
|
|
Loading…
Reference in New Issue