更新
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2025-11-07 17:01:51
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-11-07 22:31:17
|
||||
* @LastEditTime: 2025-11-17 15:47:16
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -15,11 +15,20 @@
|
||||
<div class="bgDiv1">
|
||||
<el-row :gutter="20" style="margin-bottom: 15px">
|
||||
<el-col :span="8" style="font-size: 20px; font-weight: 600">
|
||||
TSK202510230001
|
||||
{{ infoData.mainTaskCode }}
|
||||
</el-col>
|
||||
<el-col :span="8">满盘搬运(自动)</el-col>
|
||||
<el-col :span="8">
|
||||
上次刷新:{{ parseTime(Date.now()) }}
|
||||
{{
|
||||
['', '满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][
|
||||
infoData.mainTaskType
|
||||
] +
|
||||
'(' +
|
||||
['', '自动', '人工'][infoData.taskAttribute] +
|
||||
')'
|
||||
}}
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
上次刷新:{{ parseTime(nowDate) }}
|
||||
<el-button type="text" @click="refresh">刷新</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -31,23 +40,25 @@
|
||||
<el-row :gutter="20" style="margin-bottom: 15px">
|
||||
<el-col :span="8">
|
||||
<span
|
||||
:style="{ backgroundColor: statusColor[1].color }"
|
||||
:style="{
|
||||
backgroundColor: statusColor[infoData.mainTaskState].color,
|
||||
}"
|
||||
class="taskStatus">
|
||||
{{ statusColor[1].label }}
|
||||
{{ statusColor[infoData.mainTaskState].label }}
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="8">中</el-col>
|
||||
<el-col :span="8">--</el-col>
|
||||
<el-col :span="8">
|
||||
{{ ['最高', '较高', '常规', '较低', '最低'][infoData.taskPriority] }}
|
||||
</el-col>
|
||||
<el-col :span="8">{{ infoData.agv }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">执行时长</el-col>
|
||||
<el-col :span="8">创建人</el-col>
|
||||
<el-col :span="8">创建时间</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">--</el-col>
|
||||
<el-col :span="8">系统/张三</el-col>
|
||||
<el-col :span="8">{{ parseTime(Date.now()) }}</el-col>
|
||||
<el-col :span="8">{{ infoData.creator }}</el-col>
|
||||
<el-col :span="8">{{ parseTime(infoData.createTime) }}</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="bgDiv2">
|
||||
@@ -61,7 +72,9 @@
|
||||
<el-step title="执行中"></el-step>
|
||||
<el-step title="已完成"></el-step>
|
||||
</el-steps>
|
||||
<div class="abnormal">任务异常:无效路径</div>
|
||||
<div class="abnormal" v-if="infoData.mainTaskState == 7">
|
||||
任务异常:无效路径
|
||||
</div>
|
||||
</div>
|
||||
<div class="bgDiv3">
|
||||
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||
@@ -71,16 +84,72 @@
|
||||
<el-col :span="12">
|
||||
<div class="pan-info">
|
||||
<div class="pan-title">L盘</div>
|
||||
<div class="pan-body">
|
||||
<el-row :gutter="15">
|
||||
<el-col :span="12">物料名称</el-col>
|
||||
<el-col :span="12">物料规格</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftMaterialName }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftMaterial }}
|
||||
</el-col>
|
||||
<el-col :span="12">物料编码</el-col>
|
||||
<el-col :span="12">批次</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftMaterialCode }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftBatch }}
|
||||
</el-col>
|
||||
<el-col :span="12">线缆长度</el-col>
|
||||
<el-col :span="12">虚拟盘号</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftCableLength }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.leftVirtualTrayNumber }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="pan-info">
|
||||
<div class="pan-title">R盘</div>
|
||||
<div class="pan-body">
|
||||
<el-row :gutter="15">
|
||||
<el-col :span="12">物料名称</el-col>
|
||||
<el-col :span="12">物料规格</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightMaterialName }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightMaterial }}
|
||||
</el-col>
|
||||
<el-col :span="12">物料编码</el-col>
|
||||
<el-col :span="12">批次</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightMaterialCode }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightBatch }}
|
||||
</el-col>
|
||||
<el-col :span="12">线缆长度</el-col>
|
||||
<el-col :span="12">虚拟盘号</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightCableLength }}
|
||||
</el-col>
|
||||
<el-col :span="12" style="color: black">
|
||||
{{ infoData.rightVirtualTrayNumber }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="bgDiv4">
|
||||
<div class="bgDiv4" v-if="false">
|
||||
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||
回收信息
|
||||
</small-title>
|
||||
@@ -100,95 +169,101 @@
|
||||
任务明细
|
||||
</small-title>
|
||||
<el-descriptions :column="2" size="medium" border>
|
||||
<el-descriptions-item label="起点库位(L/R)">
|
||||
CK-01-A05-L / R
|
||||
<el-descriptions-item label="起点库位( L )(候选)">
|
||||
{{ infoData.leftLibraryStartName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终点库位(L/R)">
|
||||
CC-02-B03-L/R (候选 )
|
||||
<el-descriptions-item label="终点库位( L )(候选)">
|
||||
{{ infoData.leftLibraryEndName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="起点策略">--</el-descriptions-item>
|
||||
<el-descriptions-item label="终点策略">入库策略</el-descriptions-item>
|
||||
<el-descriptions-item label="FMS任务号">--</el-descriptions-item>
|
||||
<el-descriptions-item label="车辆位置">--</el-descriptions-item>
|
||||
<el-descriptions-item label="电量">--</el-descriptions-item>
|
||||
<el-descriptions-item label="是否载货">--</el-descriptions-item>
|
||||
<el-descriptions-item label="创建方式">自动/人工</el-descriptions-item>
|
||||
<el-descriptions-item label="任务来源">
|
||||
PDA/PC/系统
|
||||
<el-descriptions-item label="起点库位( R )(候选)">
|
||||
{{ infoData.rightLibraryStartName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终点库位( R )(候选)">
|
||||
{{ infoData.rightLibraryEndName }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item
|
||||
label="起点库位( L )"
|
||||
:labelStyle="{ background: '#f1ffe9' }">
|
||||
{{ infoData.changeLeftLibraryStartName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="终点库位( L )"
|
||||
:labelStyle="{ background: '#f1ffe9' }">
|
||||
{{ infoData.changeLeftLibraryEndName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="起点库位( R )"
|
||||
:labelStyle="{ background: '#f1ffe9' }">
|
||||
{{ infoData.changeRightLibraryStartName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label="终点库位( R )"
|
||||
:labelStyle="{ background: '#f1ffe9' }">
|
||||
{{ infoData.changeRightLibraryEndName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="关联叫料单">--</el-descriptions-item>
|
||||
<el-descriptions-item label=""></el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="bgDiv6">
|
||||
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||
任务日志
|
||||
</small-title>
|
||||
<el-timeline style="padding: 0">
|
||||
<el-timeline-item
|
||||
v-for="(activity, index) in activities"
|
||||
:key="index"
|
||||
:type="activity.type"
|
||||
:color="activity.color"
|
||||
size="large"
|
||||
hide-timestamp>
|
||||
<span>{{ activity.content }}</span>
|
||||
<span style="float: right">{{ activity.timestamp }}</span>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<div class="timelineDiv">
|
||||
<el-timeline style="padding: 0">
|
||||
<el-timeline-item
|
||||
v-for="(activity, index) in activities"
|
||||
:key="index"
|
||||
:type="index == 0 ? 'primary' : ''"
|
||||
:color="activity.color"
|
||||
size="large"
|
||||
hide-timestamp>
|
||||
<span>
|
||||
{{ activity.triggerObject + ' | ' + activity.description }}
|
||||
</span>
|
||||
<span style="float: right">
|
||||
{{ parseTime(activity.createTime) }}
|
||||
</span>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<el-divider></el-divider>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<div class="drawer-body__footer">
|
||||
<el-button @click="closeD">返 回</el-button>
|
||||
</div>
|
||||
<!-- 底部按钮 -->
|
||||
<div class="drawer-body__footer">
|
||||
<el-button @click="closeD">返 回</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import SmallTitle from './SmallTitle';
|
||||
import { getTask, getTaskLogPage } from '@/api/ssdl/taskList';
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
title: '',
|
||||
infoID: '',
|
||||
infoData: '',
|
||||
statusColor: [
|
||||
//bgDiv1的任务状态
|
||||
{ label: '待下发', color: '#fa8c16' },
|
||||
{ label: '待执行', color: '#1890ff' },
|
||||
{ label: '执行中', color: '#1890ff' },
|
||||
{ label: '取货完成', color: '#52c41a' },
|
||||
{ label: '已完成', color: '#52c41a' },
|
||||
{ label: '暂停中', color: '#8c8c8c' },
|
||||
{ label: '已终止', color: '#faad14' },
|
||||
{ label: '异常', color: '#ff4d4f' },
|
||||
{ label: '禁用', color: '#d9d9d9' },
|
||||
],
|
||||
nowDate: Date.now(),
|
||||
//bgDiv2的步骤条
|
||||
stepNum: 2,
|
||||
stepNum: 0,
|
||||
stepStatus: 'finish',
|
||||
//bgDiv6的时间线
|
||||
|
||||
activities: [
|
||||
{
|
||||
content: 'FMS | 卸货完成,任务完成',
|
||||
timestamp: '2018-04-12 20:46',
|
||||
type: 'primary',
|
||||
},
|
||||
{
|
||||
content: 'FMS | 取货完成',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
},
|
||||
{
|
||||
content: 'FMS | 派车AGV-03,前往起点取货',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
},
|
||||
{
|
||||
content: '张三 | 任务扫码配对完成,进入待下发',
|
||||
timestamp: '2018-04-03 20:46',
|
||||
},
|
||||
],
|
||||
activities: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@@ -196,13 +271,37 @@ export default {
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
init(val) {
|
||||
init(id) {
|
||||
this.visible = true;
|
||||
this.infoID = id;
|
||||
this.$nextTick(() => {
|
||||
this.getInfoData();
|
||||
});
|
||||
},
|
||||
getInfoData() {
|
||||
getTask(this.infoID).then(({ data }) => {
|
||||
this.infoData = data;
|
||||
if (data.mainTaskState < 3) {
|
||||
this.stepNum = data.mainTaskState;
|
||||
} else if (data.mainTaskState == 4) {
|
||||
this.stepNum = 3;
|
||||
}
|
||||
getTaskLogPage({
|
||||
mainTaskId: this.infoID,
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
}).then(({ data }) => {
|
||||
this.activities = data.list.sort((a, b) => a.timestamp - b.timestamp);
|
||||
});
|
||||
});
|
||||
},
|
||||
//刷新
|
||||
refresh() {},
|
||||
refresh() {
|
||||
this.nowDate = Date.now();
|
||||
this.getInfoData();
|
||||
},
|
||||
closeD() {
|
||||
this.visible = false
|
||||
this.visible = false;
|
||||
this.$emit('closeDrawer');
|
||||
},
|
||||
},
|
||||
@@ -211,11 +310,10 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bgDiv1 {
|
||||
background-color: rgba(242, 242, 242, 0.5);
|
||||
background-color: #f1f9ff;
|
||||
padding: 20px;
|
||||
line-height: 25px;
|
||||
font-size: 15px;
|
||||
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||
.taskStatus {
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
@@ -224,8 +322,18 @@ export default {
|
||||
}
|
||||
}
|
||||
.bgDiv2 {
|
||||
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||
padding: 18px 0;
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
transparent 0%,
|
||||
#c5c5c5 10%,
|
||||
#c5c5c5 90%,
|
||||
transparent 100%
|
||||
);
|
||||
background-position: bottom;
|
||||
background-size: 100% 1px;
|
||||
background-repeat: no-repeat;
|
||||
padding-bottom: 1px;
|
||||
.abnormal {
|
||||
width: 80%;
|
||||
margin: auto;
|
||||
@@ -242,11 +350,12 @@ export default {
|
||||
.bgDiv3 {
|
||||
padding: 20px 20px 0;
|
||||
.pan-info {
|
||||
height: 350px;
|
||||
height: 200px;
|
||||
border: 1px solid rgba(121, 121, 121, 0.8);
|
||||
border-radius: 5px;
|
||||
.pan-title {
|
||||
background-color: rgba(242, 242, 242, 0.5);
|
||||
background-color: #d8eeff;
|
||||
border-radius: 5px;
|
||||
height: 35px;
|
||||
font-size: 20px;
|
||||
line-height: 35px;
|
||||
@@ -254,6 +363,11 @@ export default {
|
||||
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
.pan-body {
|
||||
padding: 15px;
|
||||
font-size: 16px;
|
||||
color: rgba(121, 121, 121, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
.bgDiv4 {
|
||||
@@ -264,6 +378,11 @@ export default {
|
||||
}
|
||||
.bgDiv6 {
|
||||
padding: 20px 20px 0;
|
||||
.timelineDiv {
|
||||
padding: 5px;
|
||||
height: 400px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.drawer-body__footer {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user