吉安感知网项目-前端
罗广辉
2026-01-06 457ec00abf3dbc49fca614a4e0a2ea122f7fad3f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<template>
    <div class="executeNestDetails">
        <img src="/src/assets/images/task/sign.svg" alt="">
        <div class="title">
            任务执行详情
        </div>
    </div>
    <div class="ztzf-table">
        <el-table
            v-loading="loading"
            element-loading-background="rgba(22, 43, 74, 0.79)"
            :row-class-name="tableRowClassName"
            :data="taskData"
            style="width: 100%"
            :row-style="{ height: pxToRem(48), fontSize: pxToRem(14), 'text-align': 'center' }"
            :header-cell-style="{ 'text-align': 'center', height: pxToRem(36), fontSize: pxToRem(14) }"
        >
            <el-table-column type="index" label="序号" :width="pxToRemNum(100)" align="center">
                <template #default="{ $index }">
                    {{ ($index + 1).toString().padStart(2, '0') }}
                </template>
            </el-table-column>
            <el-table-column show-overflow-tooltip prop="nick_name" label="机巢名称" align="center">
                <template #default="scope">
                    <el-tooltip-copy :content="scope.row.nick_name" :showCopyText="true">
                        {{ scope.row.nick_name }}
                    </el-tooltip-copy>
                </template>
            </el-table-column>
 
            <el-table-column prop="status" label="执行状态" align="center">
                <template #default="scope">
                    <div class="base_f_c_c">
                        <span
                            :style="{
                                color:
                                    scope.row.status === 1
                                        ? '#ffe17e'
                                        : scope.row.status === 2
                                        ? '#ffa768'
                                        : scope.row.status === 3
                                        ? 'rgb(6, 217, 87)'
                                        : scope.row.status === 5
                                        ? '#FF4848'
                                        : scope.row.status === 7
                                        ? '#A6A6A6'
                                        : '',
                            }"
                        >
                            {{ scope.row.status ? getStatusText(scope.row.status) : '' }}
                        </span>
 
                        <el-tooltip
                            class="item"
                            effect="dark"
                            :content="scope.row.reason"
                            placement="top"
                            popper-class="reasonNotFly ztzf-tooltip-box1"
                        >
                            <el-icon v-if="scope.row.status === 5 && scope.row.reason" color="#FF4848"><QuestionFilled /></el-icon>
                        </el-tooltip>
                    </div>
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>
<script setup>
import { NestDetailApi } from '@/api/home'
import { dayjs, ElMessage, ElMessageBox } from 'element-plus'
import { pxToRem, pxToRemNum } from '@/utils/rem'
import { QuestionFilled } from '@element-plus/icons-vue'
import { ContinuingToFly } from '@/const/device'
const props = defineProps(['wayLineJobInfoId', 'batchNo'])
const taskData = ref('')
// 是否展示再次执行弹框
let isShowDetails = ref(false)
const singledevice_sns = ref([])
const deviseName = ref(null)
const devisejobInfoId = ref('')
const devisebatchNo = ref(null)
const loading = ref(false)
const isShowContinuingToFly = code => {
    return ContinuingToFly.find(i => i.code === code)
}
// 状态文字
const getStatusText = status => {
    const statusMap = {
        1: '待执行',
        2: '执行中',
        3: '已执行',
        4: '已取消',
        5: '执行失败',
        7: '取消执行',
    }
    return statusMap[status] || '-'
}
// 表格隔行变色
const tableRowClassName = ({ row, rowIndex }) => {
    if (rowIndex % 2 === 1) {
        return 'warning-row'
    } else {
        return 'success-row'
    }
}
 
const handleSearch = () => {}
// 执行机巢详情
const getNestDetailApi = () => {
    const params = {
        jobInfoId: props.wayLineJobInfoId,
        batchNo: props.batchNo,
    }
    NestDetailApi(params).then(res => {
        taskData.value = res.data.data
    })
}
onMounted(() => {
    getNestDetailApi()
})
</script>
 
<style scoped lang="scss">
.executeNestDetails {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #e4e7ed;
    img {
        width: 15px;
        height: 15px;
    }
    margin-bottom: 8px;
 
    .title {
        margin-left: 10px;
        font-size: 16px;
        color: #303133;
    }
}
 
.ztzf-table {
    margin-bottom: 16px;
}
 
// 待处理
.pending {
    color: #ff7411;
}
// 待审核
.reviewed {
    color: #ff472f;
}
// 处理中
.processing {
    color: #ffff61;
}
// 已完成
.done {
    color: #06d957;
}
// 已完结
.ended {
    color: #06d957;
}
 
.searchBox {
    display: flex;
}
.search-btn {
    display: flex;
    img {
        cursor: pointer;
        margin-right: 8px;
        width: 82px;
        height: 32px;
    }
}
.btnGroups {
    display: flex;
    align-items: center;
    justify-content: space-around;
    div {
        height: 27px;
        line-height: 27px;
        background: #001f4e !important;
        border-radius: 0px 0px 0px 0px;
        border: 1px solid #51a8ff !important;
        font-size: 14px;
        color: #ffffff;
        text-align: center;
        cursor: pointer;
        padding: 0 8px;
    }
}
</style>
<style lang="scss">
.machineTableDetailsTitle {
    display: flex;
    border-bottom: 2px solid #e4e7ed;
    background-size: 100% 100%;
 
    img {
        width: 15px;
        height: 15px;
        margin-top: 6px;
    }
 
    .title {
        display: inline-block;
        margin-left: 10px;
        font-size: 16px;
        // color: #0282ff;
        color: #303133;
        line-height: 20px;
        text-align: left;
        margin-bottom: 8px;
    }
 
    .btn {
        margin-left: 16px;
        margin-bottom: 8px;
        line-height: 20px;
    }
}
</style>