| | |
| | | <el-tabs v-model="activeTab" @tab-click="handleTabChange"> |
| | | <el-tab-pane v-for="tab in tabsList" :key="tab.name" :label="`${tab.label} (${tab.count})`" :name="tab.name"> |
| | | <SearchBox @search="searchClick"></SearchBox> |
| | | <el-button v-if="hasAddBtnPermission() && activeTab != 'WAIT_AUDIT'" type="primary" icon="el-icon-plus" |
| | | @click="handleAdd">新建工单 |
| | | <el-button v-if="hasAddBtnPermission() && activeTab != 'WAIT_AUDIT'" type="primary" icon="el-icon-plus" @click="handleAddOrder">新建工单 |
| | | </el-button> |
| | | <el-button type="success" plain icon="el-icon-download" @click="exportData">导出 |
| | | </el-button> |
| | |
| | | <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 label="操作" width="200" align="center">--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-button icon="el-icon-back" v-if="scope.row.status === 2" type="text"@click="turnBack(scope.row)">返航</el-button>--> |
| | | <!-- <el-button icon="el-icon-close" v-if="scope.row.status === 1" type="text" @click="cancelTask(scope.row)">取消任务</el-button>--> |
| | | <!-- <el-button icon="el-icon-view" type="text" @click="handleDetail(scope.row)">查看</el-button>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <template v-if="scope.row.status == 1"> |
| | | <el-button v-if="hasPaddingBtnPermission()" type="text" icon="el-icon-view" @click="handleCheckDetail(row)">审核</el-button> |
| | | <!--待审核状态--> |
| | | <el-button type="text" icon="el-icon-warning" v-if="hasRecallPaddingBtnPermission()" @click="orderLogRecall(scope.row.id)">撤回 |
| | | </el-button> |
| | | </template> |
| | | <!--已驳回--> |
| | | <template v-if="scope.row.status == 2"> |
| | | <el-button type="text" icon="el-icon-warning" @click="rejectDetail(scope.row.id)">驳回原因</el-button> |
| | | <el-button v-if="userInfo.user_id == row.create_user" type="text" icon="el-icon-view" @click="handleViewDetail(scope.row)">编辑</el-button> |
| | | <el-button v-else type="text" icon="el-icon-view" @click="handleViewDetail(scope.row)">详情</el-button> |
| | | </template> |
| | | <!-- 已通过 --> |
| | | <template v-if="scope.row.status == 3"> |
| | | <el-button type="text" icon="el-icon-view" @click="handleViewDetail(scope.row)">详情</el-button> |
| | | </template> |
| | | <!--草稿--> |
| | | <template v-if="scope.row.status == 0"> |
| | | <el-button type="text" icon="el-icon-edit" @click="handleViewDetail(scope.row)">编辑</el-button> |
| | | <el-button type="text" icon="el-icon-position" @click="userPublishPush(scope.row.id)">发布</el-button> |
| | | <el-button type="text" icon="el-icon-delete" @click="deleteOrderLog(scope.row.id)">删除</el-button> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="pagination"> |
| | |
| | | // 新增按钮 和 导出按钮 |
| | | function hasAddBtnPermission () { |
| | | // undefined 或 false 都返回 false,只有 true 返回 true |
| | | // console.log('this.permission.order_log_add :', this.permission.order_log_add) |
| | | return permission && permission?.order_log_add === true |
| | | console.log(permission?.value.order_log_add, '66666') |
| | | return permission && permission?.value.order_log_add |
| | | } |
| | | // 新建工单 |
| | | function handleAddOrder() {} |
| | | |
| | | onMounted(() => { |
| | | getTableList() |