| | |
| | | <el-button type="success" plain icon="el-icon-download" @click="exportData">导出 |
| | | </el-button> |
| | | <div class="task-table"> |
| | | <el-table border :data="orderListTable" class="custom-header"> |
| | | <el-table border :data="orderListTable" class="custom-header" @cell-click="handleCellClick"> |
| | | <el-table-column label="序号" type="index" width="60"> |
| | | <template #default="{ $index }"> |
| | | {{ ($index + 1 + (orderListParams.current - 1) * orderListParams.size).toString().padStart(2, |
| | | '0') }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="job_info_num" label="工单编号" width="170"> |
| | | <el-table-column prop="job_info_num" label="工单编号" width="150" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <el-tooltip-copy :content="scope.row.job_info_num" :showCopyText="true"> |
| | | {{scope.row.job_info_num}} |
| | | </el-tooltip-copy> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="工单名称" width="160"> |
| | | <el-table-column prop="name" label="工单名称" width="100" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <el-tooltip-copy :content="scope.row.name" :showCopyText="true"> |
| | | {{scope.row.name}} |
| | | </el-tooltip-copy> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dept_name" label="工单状态"> |
| | | <el-table-column prop="dept_name" label="工单状态" width="88"> |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusTagType(scope.row.status)">{{ getOrderStatus(scope.row.status) }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dept_name" label="所属单位" show-overflow-tooltip/> |
| | | <el-table-column prop="create_time" label="创建时间" show-overflow-tooltip/> |
| | | <el-table-column prop="job_num" label="已执行次数" width="90" align="center" /> |
| | | <el-table-column prop="content" label="工单内容" show-overflow-tooltip align="center" /> |
| | | <el-table-column prop="dept_name" label="所属单位" width="88" show-overflow-tooltip/> |
| | | <el-table-column prop="create_time" label="创建时间" width="120" show-overflow-tooltip/> |
| | | <el-table-column prop="job_num" label="已执行次数" width="100" align="center" /> |
| | | <el-table-column prop="content" label="工单内容" show-overflow-tooltip align="center"/> |
| | | <el-table-column prop="wayline_name" label="关联航线" show-overflow-tooltip /> |
| | | <el-table-column prop="ai_type_str" label="关联算法" width="200" align="center" /> |
| | | <el-table-column prop="device_names" label="关联机巢" width="200" align="center" /> |
| | | <el-table-column prop="creator_name" label="创建人" align="center" show-overflow-tooltip /> |
| | | <el-table-column prop="cycle_time_value" label="工单周期频次" align="center" show-overflow-tooltip /> |
| | | <el-table-column prop="ai_type_str" label="关联算法" width="100" align="center" show-overflow-tooltip/> |
| | | <el-table-column prop="device_names" label="关联机巢" width="100" align="center" show-overflow-tooltip/> |
| | | <el-table-column prop="creator_name" label="创建人" width="100" align="center" show-overflow-tooltip /> |
| | | <el-table-column prop="cycle_time_value" label="工单周期频次" width="110" align="center" show-overflow-tooltip /> |
| | | <el-table-column label="操作" width="200" fixed="right" align="center"> |
| | | <template #default="scope"> |
| | | {{scope.row.status}} |
| | | <!-- {{scope.row.status}}--> |
| | | <template v-if="scope.row.status === 1"> |
| | | <el-button type="text" icon="el-icon-view" v-if="permission.order_log_review" @click="handleCheckDetail(scope.row, '工单审核')">审核</el-button> |
| | | <!--待审核状态--> |
| | |
| | | <!-- </template>--> |
| | | </template> |
| | | </el-table-column> |
| | | <template #empty> |
| | | <el-empty |
| | | class="custom-empty" |
| | | :image-size="100" |
| | | > |
| | | <template #description> |
| | | <span class="custom-text">暂无数据</span> |
| | | </template> |
| | | </el-empty> |
| | | </template> |
| | | </el-table> |
| | | </div> |
| | | <div class="pagination"> |
| | | <div class="pagination" v-if="orderListTable.length > 0"> |
| | | <el-pagination class="ztzf-pagination" popper-class="custom-pagination-dropdown" background |
| | | :page-sizes="[10, 20, 30, 40, 50, 100]" v-model:current-page="orderListParams.current" |
| | | v-model:page-size="orderListParams.size" layout="total, sizes, prev, pager, next, jumper" :total="total" |
| | |
| | | import AddEditDetails from './component/AddEditDetails.vue' |
| | | import NProgress from 'nprogress' |
| | | import { useStore } from 'vuex' |
| | | import { useRoute } from 'vue-router' |
| | | import { downloadXls } from '@/utils/util' |
| | | import { |
| | | getList, |
| | | saveUpdateOrderLog, |
| | | orderLogDetails, |
| | | orderLogRecall, |
| | | orderLogReject, |
| | | orderLogPass, |
| | | orderLogExport, |
| | | jobStatusNum, |
| | | userPublish, |
| | | deleteOrderLog, |
| | | getWaylineMaxTerrainHeight |
| | | } from '@/api/tickets/orderLog' |
| | | import { newGetWorkspacesPage } from '@/api/resource/wayline' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { cloneDeep } from 'lodash'; |
| | | import { computed, onMounted } from 'vue'; |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import dayjs from 'dayjs' |
| | | import 'dayjs/locale/zh-cn' // 导入中文语言包 |
| | | import weekday from 'dayjs/plugin/weekday' |
| | | import { aiImagesPage } from '@/api/dataCenter/dataCenter'; |
| | | |
| | | const store = useStore() |
| | | const route = useRoute() |
| | | |
| | | const userInfo = computed(() => store.state.user.userInfo) |
| | | const permission = computed(() => store.state.user.permission); |
| | | |
| | | console.log(userInfo,permission, '8888') |
| | | |
| | | const isShowAddEditDetails = ref(false) |
| | | |
| | | const activeTab = ref('all') |
| | | provide('activeTab', activeTab) |
| | | let tabsList = ref([ |
| | | // { label: '我的工单', name: 'my_order', value: null, count: 0 }, |
| | | // { label: '全部工单', name: 'all', value: null, count: 0 }, |
| | |
| | | activeTab.value = tabsList.value[0].name |
| | | // tab值传 |
| | | orderListParams.status = tabsList.value[0].value |
| | | console.log('8878797', tabsList.value) |
| | | // tabsList.value |
| | | // .map(tab => { |
| | | // if (tab.name === 'all') { |
| | |
| | | // tab切换 |
| | | function handleTabChange (tab) { |
| | | activeTab.value = tab.paneName |
| | | orderListParams.status = '' |
| | | if (tab.paneName === 'WAIT_AUDIT') { |
| | | orderListParams.status = '1' |
| | | } else if (tab.paneName === 'REJECTED') { |
| | | orderListParams.status = '2' |
| | | } else if (tab.paneName === 'PASS') { |
| | | orderListParams.status = '3' |
| | | } else if (tab.paneName === 'DRAFT') { |
| | | orderListParams.status = '0' |
| | | } |
| | | refreshGetOrderList() |
| | | // orderListParams.status = '' |
| | | // if (tab.paneName === 'WAIT_AUDIT') { |
| | | // orderListParams.status = '1' |
| | | // } else if (tab.paneName === 'REJECTED') { |
| | | // orderListParams.status = '2' |
| | | // } else if (tab.paneName === 'PASS') { |
| | | // orderListParams.status = '3' |
| | | // } else if (tab.paneName === 'DRAFT') { |
| | | // orderListParams.status = '0' |
| | | // } |
| | | // refreshGetOrderList() |
| | | } |
| | | |
| | | // 更新统计数 |
| | |
| | | }) |
| | | } |
| | | |
| | | // 获取航线 |
| | | let lineList = ref([]) |
| | | provide('lineList', lineList) |
| | | function getLines() { |
| | | const formData = { |
| | | name: '', |
| | | waylineType: undefined, |
| | | current: 1, |
| | | size: 99999999, |
| | | descs: 'update_time' |
| | | } |
| | | newGetWorkspacesPage(formData).then(res => { |
| | | lineList.value = res.data.data.records |
| | | }) |
| | | } |
| | | |
| | | // 获取算法 |
| | | let aiTypeList = ref([]) |
| | | provide('aiTypeList', aiTypeList) |
| | | function aitypeList() { |
| | | getDictionaryByCode('SF').then(res => { |
| | | aiTypeList.value = res.data.data['SF'] |
| | | }) |
| | | } |
| | | |
| | | const total = ref(0) |
| | | const orderListParams = reactive({ |
| | | current: 1, |
| | |
| | | |
| | | const orderListTable = ref([]) |
| | | function getTableList() { |
| | | orderListParams.searchParams.ai_types = orderListParams.searchParams.ai_typesValue ? [ orderListParams.searchParams.ai_typesValue] : null |
| | | const apiParams = { |
| | | ...cloneDeep(orderListParams), |
| | | ...cloneDeep(orderListParams.searchParams) |
| | | } |
| | | getList(apiParams).then(res => { |
| | | getList(apiParams, orderListParams.current, orderListParams.size).then(res => { |
| | | orderListTable.value = res.data.data.records |
| | | total.value = res.data.data.total |
| | | // updateGlobalCounts() |
| | |
| | | const searchClick = params => { |
| | | orderListParams.current = 1 |
| | | orderListParams.size = 10 |
| | | console.log('333', params) |
| | | orderListParams.searchParams = params |
| | | getTableList() |
| | | } |
| | |
| | | |
| | | NProgress.start() |
| | | |
| | | orderListParams.searchParams.ai_types = orderListParams.searchParams.ai_typesValue ? [ orderListParams.searchParams.ai_typesValue] : null |
| | | const apiParams = { |
| | | ...cloneDeep(orderListParams), |
| | | searchParams: { |
| | | ...cloneDeep(orderListParams.searchParams) |
| | | }, |
| | | ...cloneDeep(orderListParams.searchParams) |
| | | } |
| | | const res = await orderLogExport(apiParams) |
| | | |
| | | downloadXls(res.data, `智飞工单${dayjs().format('YYYY-MM-DD')}.xlsx`) |
| | | ElMessage.success('导出成功') |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | function handleCellClick (row, column) { |
| | | if (column.no === 1) { |
| | | navigator.clipboard.writeText(row.job_info_num).then(() => { |
| | | ElMessage.success('复制工单编号成功') |
| | | }) |
| | | } else if (column.no === 2) { |
| | | navigator.clipboard.writeText(row.name).then(() => { |
| | | ElMessage.success('复制工单名称成功') |
| | | }) |
| | | } else if (column.no === 4) { |
| | | navigator.clipboard.writeText(row.dept_name).then(() => { |
| | | ElMessage.success('复制所属单位成功') |
| | | }) |
| | | } else if (column.no === 8) { |
| | | navigator.clipboard.writeText(row.wayline_name).then(() => { |
| | | ElMessage.success('复制关联航线成功') |
| | | }) |
| | | } else if (column.no === 9) { |
| | | navigator.clipboard.writeText(row.ai_type_str).then(() => { |
| | | ElMessage.success('复制关联算法成功') |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // 删除 |
| | | async function deleteOrder(id) { |
| | | try { |
| | |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getLines() |
| | | aitypeList() |
| | | filteredTabs() |
| | | getTableList() |
| | | updateGlobalCounts() |
| | | if (route.query.id) { |
| | | route.query.status === '1' ? handleCheckDetail({ id: route.query.id}, '工单审核') : handleCheckDetail({ id: route.query.id}, '工单详情') |
| | | } |
| | | }) |
| | | </script> |
| | | |
| | |
| | | .task-table { |
| | | //height: 0; |
| | | //flex: 1; |
| | | height: 500px; |
| | | height: calc(100vh - 380px); |
| | | margin-top: 18px; |
| | | overflow: auto; |
| | | :deep(.el-scrollbar__view) { |
| | | height: 100%; |
| | | } |
| | | :deep(.el-table--fit,.el-scrollbar__view) { |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | .btnItem { |
| | |
| | | :deep(.el-pagination) { |
| | | display: flex; |
| | | justify-content: right; |
| | | padding: 20px 0; |
| | | } |
| | | |
| | | :deep(.el-pagination button) { |