|
@@ -378,14 +378,51 @@ const setSignRulesClick = () => {
|
|
|
//批量审批
|
|
|
const batchApprovalTaskClick = () => {
|
|
|
const rows = tableCheckedKeys.value
|
|
|
+ const pendingRows = rows.filter(row => row.estatus !== -1)
|
|
|
+
|
|
|
+ if (pendingRows.length > 0) {
|
|
|
+ const pendingNames = pendingRows.map(row => row.taskName).join('<br>')
|
|
|
+ const warningMessage = `
|
|
|
+ 存在以下任务,不允许勾选:<br>
|
|
|
+ ${pendingNames}
|
|
|
+ `
|
|
|
+
|
|
|
+ // 添加 customClass 并启用 HTML
|
|
|
+ window.$message.warning({
|
|
|
+ message: warningMessage,
|
|
|
+ customClass: 'custom-message-warning', // 自定义类名
|
|
|
+ dangerouslyUseHTMLString: true, // 允许 HTML 内容
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (rows.length > 0) {
|
|
|
emit('batchApproval', rows)
|
|
|
} else {
|
|
|
- window?.$message?.warning('请先勾选需要审批的数据')
|
|
|
+ window?.$notify?.warning('请先勾选需要审批的数据')
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
+<style lang="scss">
|
|
|
+/* 复杂提示的样式 */
|
|
|
+.custom-message-warning {
|
|
|
+ --el-message-bg-color: #fff8e6; /* 背景色 */
|
|
|
+ --el-message-border-color: #ffe58f; /* 边框色 */
|
|
|
+ --el-message-text-color: #faad14; /* 文本色 */
|
|
|
+ max-width: 400px; /* 最大宽度 */
|
|
|
+}
|
|
|
|
|
|
+/* 复杂提示中的内容样式 */
|
|
|
+.custom-message-warning .el-message__content {
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 1.6;
|
|
|
+ padding: 10px 0;
|
|
|
+}
|
|
|
+
|
|
|
+/* 简单提示的样式 */
|
|
|
+.custom-message-simple {
|
|
|
+ --el-message-bg-color: #fef0f0;
|
|
|
+ --el-message-border-color: #fee2e2;
|
|
|
+ --el-message-text-color: #f53f3f;
|
|
|
+}
|
|
|
</style>
|