|
|
@@ -651,24 +651,26 @@
|
|
|
<i class="el-icon-s-operation"></i>
|
|
|
当前节点:<strong>{{ record.currentNodeTypeName }}</strong>
|
|
|
|
|
|
- <el-button
|
|
|
+ <el-button
|
|
|
+ v-if="hasContent(record)"
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
plain
|
|
|
icon="el-icon-chat-dot-round"
|
|
|
style="margin-left: 8px;"
|
|
|
@click.stop="handleShowContent(record)">
|
|
|
- 查看对话内容
|
|
|
- </el-button>
|
|
|
+ 查看对话内容
|
|
|
+ </el-button>
|
|
|
<!-- 外呼未执行标识 -->
|
|
|
<el-button
|
|
|
- v-if="record.waitCallNode"
|
|
|
- type="danger"
|
|
|
- size="mini"
|
|
|
- icon="el-icon-phone"
|
|
|
- style="margin-left: 8px;"
|
|
|
- @click.stop="handleManualCall(record)">
|
|
|
- 开始人工外呼
|
|
|
+ v-if="record.waitCallNode"
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-phone"
|
|
|
+ style="margin-left: 8px;"
|
|
|
+ @click.stop="handleManualCall(record)">
|
|
|
+ 开始人工外呼
|
|
|
</el-button>
|
|
|
</span>
|
|
|
</div>
|
|
|
@@ -1642,6 +1644,32 @@ export default {
|
|
|
return []
|
|
|
}
|
|
|
},
|
|
|
+ hasContent(record) {
|
|
|
+ if (!record || !record.contentList) return false
|
|
|
+
|
|
|
+ try {
|
|
|
+ const parsed = typeof record.contentList === 'string'
|
|
|
+ ? JSON.parse(record.contentList)
|
|
|
+ : record.contentList
|
|
|
+
|
|
|
+ if (!Array.isArray(parsed)) return false
|
|
|
+
|
|
|
+ // 过滤 system 和空内容
|
|
|
+ const validList = parsed.filter(item => {
|
|
|
+ if (!item) return false
|
|
|
+ if (item.role === 'system') return false
|
|
|
+
|
|
|
+ const text = String(item.content || '').trim()
|
|
|
+ if (!text) return false
|
|
|
+
|
|
|
+ return true
|
|
|
+ })
|
|
|
+
|
|
|
+ return validList.length > 0
|
|
|
+ } catch (e) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|