fix: 仓储任务节点修复(assignee=None + WAREHOUSE 类型) + 前端防御性渲染
- webhook 生成任务 assignee_id 置 None,不再填中文,避免前端解析报错跳过渲染
- task_type=WAREHOUSE,并同步 isMain 判断(后端+双端前端)使其画在中央主干道
- 前端对扫码入库/出库任务:不请求用户数据,直接显示 📦 + 'MOM 仓储系统'
This commit is contained in:
@ -8,8 +8,10 @@
|
||||
</view>
|
||||
<text class="fc-name">{{ node.task_name }}</text>
|
||||
<view class="fc-meta">
|
||||
<!-- 仓储系统任务:系统图标 + 固定名(assignee 为 null 不报错) -->
|
||||
<text v-if="isSystemTask" class="fc-assignee">📦 MOM 仓储系统</text>
|
||||
<!-- 在库任务显示"转入在库",其余显示负责人 -->
|
||||
<text v-if="isWarehouseTask" class="fc-warehouse-in">📥 转入在库: {{ formatUserName(node.assignee_id) }}</text>
|
||||
<text v-else-if="isWarehouseTask" class="fc-warehouse-in">📥 转入在库: {{ formatUserName(node.assignee_id) }}</text>
|
||||
<text v-else class="fc-assignee">👤 {{ formatUserName(node.assignee_id) || '未分配' }}</text>
|
||||
</view>
|
||||
<!-- 时间独占一行 -->
|
||||
@ -35,7 +37,13 @@ export default {
|
||||
isMainNode() {
|
||||
return !this.node.parent_task_id
|
||||
|| this.node.task_type === "TRANSFER"
|
||||
|| this.node.task_type === "RECOVERY";
|
||||
|| this.node.task_type === "RECOVERY"
|
||||
|| this.node.task_type === "WAREHOUSE";
|
||||
},
|
||||
// ★ 仓储系统任务(扫码入库/扫码出库):防御性渲染,不请求用户数据
|
||||
isSystemTask() {
|
||||
const name = String(this.node.task_name || "");
|
||||
return name.includes("扫码") || this.node.task_type === "WAREHOUSE";
|
||||
},
|
||||
isWarehouseTask() {
|
||||
const name = String(this.node.task_name || "");
|
||||
|
||||
@ -120,7 +120,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
isMain(t) {
|
||||
return !t.parent_task_id || t.task_type === "TRANSFER" || t.task_type === "RECOVERY";
|
||||
return !t.parent_task_id || t.task_type === "TRANSFER" || t.task_type === "RECOVERY" || t.task_type === "WAREHOUSE";
|
||||
},
|
||||
// 当前主线的直接分支子节点(非主线)
|
||||
branchChildren(mainTask) {
|
||||
|
||||
Reference in New Issue
Block a user