| | |
| | | <!-- 巡检任务情况-详情 --> |
| | | <template> |
| | | <el-dialog |
| | | class="inspection-rask-details-dialog" |
| | | class="inspection-rask-details-dialog ztzf-dialog" |
| | | v-model="isShowDetailsDialog" |
| | | :width="pxToRem(1000)" |
| | | :width="pxToRem(1500)" |
| | | :close-on-click-modal="false" |
| | | :destroy-on-close="true" |
| | | > |
| | |
| | | <el-input class="ztzf-input" v-model="searchForm.key_word" placeholder="请输入任务/机巢名称" clearable /> |
| | | </el-form-item> |
| | | <el-form-item label="关联算法"> |
| | | <el-select class="ztzf-select" v-model="searchForm.ai_types" placeholder="请选择"> |
| | | <el-select :teleported="false" class="ztzf-select" v-model="searchForm.ai_types" placeholder="请选择"> |
| | | <el-option v-for="item in taskAlgorithm" :key="item.id" :label="item.dictValue" :value="item.dictKey" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="任务状态"> |
| | | <el-select class="ztzf-select" v-model="searchForm.status" placeholder="请选择" clearable> |
| | | <el-select :teleported="false" class="ztzf-select" v-model="searchForm.status" placeholder="请选择" clearable> |
| | | <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="search-row"> |
| | | <el-form-item label="选择机巢"> |
| | | <el-select class="ztzf-select" v-model="searchForm.device_sn" placeholder="请选择"> |
| | | <el-select :teleported="false" class="ztzf-select" v-model="searchForm.device_sn" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in deviceList" |
| | | :label="item.nickname" |
| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-date-picker |
| | | popper-class="custom-date-picker" |
| | | class="ztzf-date-picker" |
| | | v-model="dateRange" |
| | | type="daterange" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <div class="reset" @click="handleReset"></div> |
| | | <div class="searchs" @click="handleSearch"></div> |
| | | <div class="reset" @click="handleReset">重置</div> |
| | | <div class="searchs" @click="handleSearch">搜索</div> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | |
| | | <el-table |
| | | :data="taskDetailData" |
| | | :row-class-name="tableRowClassName" |
| | | :row-style="{ height: '54px', fontSize: '14px', 'text-align': 'center' }" |
| | | :row-style="{ height: '45px', fontSize: '14px', 'text-align': 'center' }" |
| | | :header-cell-style="{ 'text-align': 'center', height: '36px', fontSize: '14px' }" |
| | | > |
| | | <el-table-column label="序号" type="index" width="60"> |
| | |
| | | ? 'distributed' |
| | | : scope.row.status === 3 |
| | | ? 'finish ' |
| | | : scope.row.status === 4 |
| | | ? 'cancel ' |
| | | : 'fail ' |
| | | : scope.row.status === 5 |
| | | ? 'fail ' |
| | | : ' ' |
| | | " |
| | | > |
| | | {{ |
| | |
| | | : scope.row.status === 2 |
| | | ? '执行中' |
| | | : scope.row.status === 3 |
| | | ? '完成' |
| | | : scope.row.status === 4 |
| | | ? '取消' |
| | | : '失败' |
| | | ? '已执行' |
| | | : scope.row.status === 5 |
| | | ? '执行失败' |
| | | : '' |
| | | }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column show-overflow-tooltip prop="industry_type_str" label="任务类型" /> |
| | | <el-table-column prop="begin_time" label="任务时间" width="150" /> |
| | | <el-table-column prop="cycle_time_value" label="任务时间" width="150" /> |
| | | <el-table-column prop="event_number" label="关联事件"> |
| | | <template #default="scope"> |
| | | <span>{{ scope.row.event_number ? scope.row.event_number : '/' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="80"><div class="ztzf-view ">查看</div></el-table-column> |
| | | <el-table-column label="操作" width="80"> |
| | | <template #default="scope"> |
| | | <div class="ztzf-view" @click="viewDetail(scope.row)">查看</div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!-- 分页 --> |
| | | <div style="display: flex;justify-content: center"> |
| | | <div style="display: flex; justify-content: center; margin: 15px 0"> |
| | | <el-pagination |
| | | class="ztzf-pagination" |
| | | v-model:current-page="pageParams.current" |
| | |
| | | /> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 当前任务详情 --> |
| | | <CurrentTaskDetails |
| | | v-if="isShowCurrentTaskDetails" |
| | | v-model:show="isShowCurrentTaskDetails" |
| | | :id="rowData.id" |
| | | /> |
| | | <!-- 历史任务详情 --> |
| | | <DeviceJobDetails |
| | | v-if="isShowDeviceJobDetails" |
| | | v-model:show="isShowDeviceJobDetails" |
| | | :wayLineJodInfoId="rowData.id" |
| | | /> |
| | | </template> |
| | | <script setup> |
| | | import { pxToRem } from '@/utils/rem' |
| | |
| | | import { getDictionary } from '@/api/system/dict' |
| | | import { selectDevicePage } from '@/api/home/machineNest' |
| | | import { getMultipleDictionary } from '@/api/system/dictbiz' |
| | | import CurrentTaskDetails from '@/components/CurrentTaskDetails/CurrentTaskDetails.vue' |
| | | import DeviceJobDetails from '@/components/DeviceJobDetails/DeviceJobDetails.vue' |
| | | import { ElMessage } from 'element-plus' |
| | | const isShowDetailsDialog = defineModel('show') |
| | | const dateRange = ref('') |
| | | const searchForm = reactive({ |
| | |
| | | const statusOptions = [ |
| | | { label: '待执行', value: 1 }, |
| | | { label: '执行中', value: 2 }, |
| | | { label: '已完成', value: 3 }, |
| | | { label: '已取消', value: 4 }, |
| | | { label: '已执行', value: 3 }, |
| | | |
| | | { label: '执行失败', value: 5 }, |
| | | ] |
| | | // 设备页面参数 |
| | |
| | | if (res.data.code !== 0) return |
| | | taskDetailData.value = res.data.data.records |
| | | total.value = res.data.data.total |
| | | |
| | | }) |
| | | } |
| | | // 机巢列表数据 |
| | |
| | | return 'success-row' |
| | | } |
| | | } |
| | | // 查看 |
| | | const isShowCurrentTaskDetails = ref(false) |
| | | const isShowDeviceJobDetails = ref(false) |
| | | let rowData = ref({}); |
| | | const viewDetail = row => { |
| | | if (!row.device_sns.length) return ElMessage.warning('没有device_sns'); |
| | | if (row.device_sns.length !== 1) return ElMessage.success('即将跳转到集群调度'); |
| | | rowData.value = row? row : {}; |
| | | if (row.status === 2 || row.status === 1){ |
| | | isShowCurrentTaskDetails.value = true; |
| | | } else{ |
| | | isShowDeviceJobDetails.value = true |
| | | } |
| | | } |
| | | onMounted(() => { |
| | | requestDictionary() |
| | | getJobList() |
| | | getDeviceList() |
| | | }) |
| | | </script> |
| | | <style lang="scss"> |
| | | /* 修改日期单元格背景色 */ |
| | | .custom-date-picker .el-picker-panel__body { |
| | | background: #012350 !important; |
| | | color: #fff !important; |
| | | } |
| | | |
| | | </style> |
| | | <style scoped lang="scss"> |
| | | .search-row { |
| | | display: flex; |
| | |
| | | } |
| | | |
| | | :deep() { |
| | | |
| | | |
| | | .el-form-item__label { |
| | | font-family: Segoe UI, Segoe UI; |
| | | font-weight: 400; |
| | |
| | | cursor: pointer; |
| | | background: url('/src/assets/images/home/homeLeft/inspection-reset.png') no-repeat center; |
| | | background-size: 100% 100%; |
| | | color: #fff; |
| | | font-weight: bold; |
| | | font-size: 14px; |
| | | text-align: center; |
| | | } |
| | | .searchs { |
| | | margin-left: 23px; |
| | |
| | | height: 32px; |
| | | background: url('/src/assets/images/home/homeLeft/inspection-select.png') no-repeat center; |
| | | background-size: 100% 100%; |
| | | color: #fff; |
| | | font-weight: bold; |
| | | font-size: 14px; |
| | | text-align: center; |
| | | } |
| | | .tabledata { |
| | | padding: 0 16px; |
| | | overflow: hidden; |
| | | height: 640px; |
| | | // height: 640px; |
| | | overflow-y: scroll !important; |
| | | } |
| | | |
| | | // 任务状态颜色 |
| | | // 待执行 |
| | | .pending { |
| | | color: #e36913; |
| | | color: #ffe17e; |
| | | } |
| | | // 执行中 |
| | | .distributed { |
| | | color: #ffc398; |
| | | color: #ffa768; |
| | | } |
| | | // 已执行 |
| | | .finish { |
| | | color: #afd9fb; |
| | | color: #8effac; |
| | | } |
| | | .cancel { |
| | | color: #11c4ff; |
| | | } |
| | | |
| | | // 执行失败 |
| | | .fail { |
| | | color: #8cfea7; |
| | | color: #ff8e8e; |
| | | } |
| | | </style> |
| | | <style lang="scss"> |
| | | .inspection-rask-details-dialog { |
| | | width: 1270px; |
| | | height: 856px; |
| | | background: #0f1929; |
| | | box-shadow: inset 0px -50px 50px 0px rgba(27, 148, 255, 0.13); |
| | | border-radius: 20px 0px 0px 0px; |
| | | border: 2px solid; |
| | | padding: 0 !important; |
| | | |
| | | border-image: linear-gradient( |
| | | 180deg, |
| | | rgba(81, 168, 255, 0), |
| | | rgba(48, 111, 202, 1), |
| | | rgba(255, 255, 255, 1), |
| | | rgba(27, 148, 255, 1) |
| | | ) |
| | | 2 2; |
| | | /* 头部 */ |
| | | .el-dialog__header { |
| | | width: 1270px; |
| | | height: 47px; |
| | | margin-bottom: 14px; |
| | | background: url('/src/assets/images/home/homeLeft/inspection-vector.png') no-repeat center; |
| | | background-size: 100% 100%; |
| | | font-weight: bold; |
| | | font-size: 16px; |
| | | line-height: 47px; |
| | | } |
| | | |
| | | .el-dialog .el-dialog__header { |
| | | /* margin: 0px !important; */ |
| | | padding: 0px !important; |
| | | padding-left: 0px !important; |
| | | } |
| | | /* 头部 */ |
| | | .el-dialog__title { |
| | | width: 112px; |
| | | height: 19px; |
| | | font-family: Segoe UI, Segoe UI; |
| | | font-weight: bold; |
| | | font-size: 16px; |
| | | line-height: 16px; |
| | | text-shadow: 0px 0px 5px rgba(154, 218, 255, 0.6); |
| | | text-align: left; |
| | | font-style: normal; |
| | | text-transform: none; |
| | | background: linear-gradient(90deg, #fbfdff 0%, #86d4ff 100%); |
| | | margin-left: 16px; |
| | | -webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */ |
| | | -webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */ |
| | | } |
| | | |
| | | .el-scrollbar__thumb { |
| | | background: #13c6ff !important; |
| | | } |
| | | } |
| | | </style> |