|
|
|
|
@ -283,7 +283,7 @@ |
|
|
|
|
v-model="form.text_comment" |
|
|
|
|
type="textarea" |
|
|
|
|
:rows="9" |
|
|
|
|
:disabled=" |
|
|
|
|
:readonly=" |
|
|
|
|
form.status != 1 && |
|
|
|
|
form.status != 5 && |
|
|
|
|
form.status != 15 |
|
|
|
|
@ -297,7 +297,7 @@ |
|
|
|
|
v-model="form.text_conclusion" |
|
|
|
|
type="textarea" |
|
|
|
|
:rows="4" |
|
|
|
|
:disabled=" |
|
|
|
|
:readonly=" |
|
|
|
|
form.status != 1 && |
|
|
|
|
form.status != 5 && |
|
|
|
|
form.status != 15 |
|
|
|
|
@ -319,10 +319,12 @@ |
|
|
|
|
v-model="item.user_comment" |
|
|
|
|
type="textarea" |
|
|
|
|
:rows="3" |
|
|
|
|
:disabled=" |
|
|
|
|
form.status != 1 && |
|
|
|
|
form.status != 5 && |
|
|
|
|
form.status != 15 |
|
|
|
|
:readonly=" |
|
|
|
|
(form.status != 1 && |
|
|
|
|
form.status != 5 && |
|
|
|
|
form.status != 15) || |
|
|
|
|
item.confirm > 0 || |
|
|
|
|
item.expert_id != userInfo.id |
|
|
|
|
" |
|
|
|
|
/> |
|
|
|
|
<div class="expert-btns"> |
|
|
|
|
@ -330,10 +332,13 @@ |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-document-copy" |
|
|
|
|
:disabled=" |
|
|
|
|
form.status != 1 && |
|
|
|
|
form.status != 5 && |
|
|
|
|
form.status != 15 |
|
|
|
|
(form.status != 1 && |
|
|
|
|
form.status != 5 && |
|
|
|
|
form.status != 15) || |
|
|
|
|
!item.user_comment || |
|
|
|
|
!item.user_comment.trim() |
|
|
|
|
" |
|
|
|
|
@click="handleCopyAllExpertComments(item)" |
|
|
|
|
> |
|
|
|
|
全部复制 |
|
|
|
|
</el-button> |
|
|
|
|
@ -345,18 +350,25 @@ |
|
|
|
|
form.status != 5 && |
|
|
|
|
form.status != 15 |
|
|
|
|
" |
|
|
|
|
v-if="item.confirm == 0" |
|
|
|
|
v-if=" |
|
|
|
|
item.confirm == 0 && item.expert_id == userInfo.id |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
一键同意 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-check" |
|
|
|
|
disabled |
|
|
|
|
v-else-if="item.confirm > 0" |
|
|
|
|
> |
|
|
|
|
专家已确认 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-warning" |
|
|
|
|
:disabled=" |
|
|
|
|
form.status != 1 && |
|
|
|
|
form.status != 5 && |
|
|
|
|
form.status != 15 |
|
|
|
|
" |
|
|
|
|
disabled |
|
|
|
|
v-else |
|
|
|
|
> |
|
|
|
|
待确认 |
|
|
|
|
</el-button> |
|
|
|
|
@ -1484,6 +1496,110 @@ export default { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
async handleCopyAllExpertComments(item) { |
|
|
|
|
const text = item.user_comment || ""; |
|
|
|
|
if (!text || !text.trim()) { |
|
|
|
|
// this.$modal.msgWarning('没有可复制的内容'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
if (navigator.clipboard && window.isSecureContext) { |
|
|
|
|
console.log("复制策略 - 使用 Clipboard API"); |
|
|
|
|
await navigator.clipboard.writeText(text); |
|
|
|
|
this.$modal.msgSuccess("复制成功"); |
|
|
|
|
} else { |
|
|
|
|
console.log("复制策略 - 使用 execCommand fallback"); |
|
|
|
|
const textarea = document.createElement("textarea"); |
|
|
|
|
textarea.value = text; |
|
|
|
|
textarea.style.position = "fixed"; |
|
|
|
|
textarea.style.left = "-9999px"; |
|
|
|
|
document.body.appendChild(textarea); |
|
|
|
|
textarea.select(); |
|
|
|
|
const success = document.execCommand("copy"); |
|
|
|
|
document.body.removeChild(textarea); |
|
|
|
|
if (success) { |
|
|
|
|
console.log("execCommand 返回 true"); |
|
|
|
|
this.$modal.msgSuccess("复制成功"); |
|
|
|
|
} else { |
|
|
|
|
console.log("execCommand 返回 false,使用兜底方案"); |
|
|
|
|
this.showCopyFallback(text); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} catch (err) { |
|
|
|
|
console.error("复制失败 - 捕获异常:", err); |
|
|
|
|
this.showCopyFallback(text); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
showCopyFallback(text) { |
|
|
|
|
const dialog = document.createElement("div"); |
|
|
|
|
dialog.style.cssText = ` |
|
|
|
|
position: fixed; |
|
|
|
|
top: 50%; |
|
|
|
|
left: 50%; |
|
|
|
|
transform: translate(-50%, -50%); |
|
|
|
|
background: #fff; |
|
|
|
|
padding: 20px; |
|
|
|
|
border-radius: 8px; |
|
|
|
|
box-shadow: 0 2px 12px rgba(0,0,0,0.15); |
|
|
|
|
z-index: 9999; |
|
|
|
|
max-width: 80%; |
|
|
|
|
max-height: 80vh; |
|
|
|
|
overflow-y: auto; |
|
|
|
|
`; |
|
|
|
|
const title = document.createElement("h3"); |
|
|
|
|
title.textContent = "复制内容"; |
|
|
|
|
title.style.margin = "0 0 12px 0"; |
|
|
|
|
title.style.fontSize = "16px"; |
|
|
|
|
dialog.appendChild(title); |
|
|
|
|
|
|
|
|
|
const textarea = document.createElement("textarea"); |
|
|
|
|
textarea.value = text; |
|
|
|
|
textarea.style.width = "400px"; |
|
|
|
|
textarea.style.height = "200px"; |
|
|
|
|
textarea.style.marginBottom = "12px"; |
|
|
|
|
textarea.style.padding = "8px"; |
|
|
|
|
textarea.style.border = "1px solid #e4e7ed"; |
|
|
|
|
textarea.style.borderRadius = "4px"; |
|
|
|
|
textarea.addEventListener("focus", () => textarea.select()); |
|
|
|
|
dialog.appendChild(textarea); |
|
|
|
|
|
|
|
|
|
const btn = document.createElement("button"); |
|
|
|
|
btn.textContent = "确定"; |
|
|
|
|
btn.style.cssText = ` |
|
|
|
|
display: block; |
|
|
|
|
margin: 0 auto; |
|
|
|
|
padding: 8px 24px; |
|
|
|
|
background: #409eff; |
|
|
|
|
color: #fff; |
|
|
|
|
border: none; |
|
|
|
|
border-radius: 4px; |
|
|
|
|
cursor: pointer; |
|
|
|
|
`; |
|
|
|
|
btn.addEventListener("click", () => { |
|
|
|
|
document.body.removeChild(dialog); |
|
|
|
|
document.body.removeChild(mask); |
|
|
|
|
}); |
|
|
|
|
dialog.appendChild(btn); |
|
|
|
|
|
|
|
|
|
const mask = document.createElement("div"); |
|
|
|
|
mask.style.cssText = ` |
|
|
|
|
position: fixed; |
|
|
|
|
top: 0; |
|
|
|
|
left: 0; |
|
|
|
|
right: 0; |
|
|
|
|
bottom: 0; |
|
|
|
|
background: rgba(0,0,0,0.5); |
|
|
|
|
z-index: 9998; |
|
|
|
|
`; |
|
|
|
|
mask.addEventListener("click", () => { |
|
|
|
|
document.body.removeChild(dialog); |
|
|
|
|
document.body.removeChild(mask); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
document.body.appendChild(mask); |
|
|
|
|
document.body.appendChild(dialog); |
|
|
|
|
textarea.select(); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
@ -1613,9 +1729,4 @@ export default { |
|
|
|
|
display: inline-block; |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 禁用输入框字体颜色改为黑色 |
|
|
|
|
::v-deep .el-textarea__inner:disabled { |
|
|
|
|
color: #000; |
|
|
|
|
} |
|
|
|
|
</style> |