|
|
@@ -54,6 +54,14 @@
|
|
|
class="!w-240px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="检验部门" prop="deptId">
|
|
|
+ <DeptSelect
|
|
|
+ v-model="queryParams.deptId"
|
|
|
+ placeholder="请选择部门"
|
|
|
+ clearable
|
|
|
+ class="!w-240px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="检验性质" prop="checkType">
|
|
|
<el-select
|
|
|
v-model="queryParams.checkType"
|
|
|
@@ -80,15 +88,15 @@
|
|
|
class="!w-240px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
-<!-- <el-form-item label="检验员" prop="inspectorName">-->
|
|
|
-<!-- <el-input-->
|
|
|
-<!-- v-model="queryParams.inspectorName"-->
|
|
|
-<!-- placeholder="请输入检验员名称"-->
|
|
|
-<!-- clearable-->
|
|
|
-<!-- @keyup.enter="handleQuery"-->
|
|
|
-<!-- class="!w-240px"-->
|
|
|
-<!-- />-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="检验员" prop="inspectorName">-->
|
|
|
+ <!-- <el-input-->
|
|
|
+ <!-- v-model="queryParams.inspectorName"-->
|
|
|
+ <!-- placeholder="请输入检验员名称"-->
|
|
|
+ <!-- clearable-->
|
|
|
+ <!-- @keyup.enter="handleQuery"-->
|
|
|
+ <!-- class="!w-240px"-->
|
|
|
+ <!-- />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
<el-form-item label="检验员" prop="checkUserIds">
|
|
|
<el-select
|
|
|
class="!w-240px"
|
|
|
@@ -108,24 +116,24 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
-<!-- <el-form-item label="排期人员" prop="manager">-->
|
|
|
-<!-- <el-input-->
|
|
|
-<!-- v-model="queryParams.manager"-->
|
|
|
-<!-- placeholder="请输入排期人员"-->
|
|
|
-<!-- clearable-->
|
|
|
-<!-- @keyup.enter="handleQuery"-->
|
|
|
-<!-- class="!w-240px"-->
|
|
|
-<!-- />-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
-<!-- <el-form-item label="项目负责人" prop="manager">-->
|
|
|
-<!-- <el-input-->
|
|
|
-<!-- v-model="queryParams.manager"-->
|
|
|
-<!-- placeholder="请输入项目负责人"-->
|
|
|
-<!-- clearable-->
|
|
|
-<!-- @keyup.enter="handleQuery"-->
|
|
|
-<!-- class="!w-240px"-->
|
|
|
-<!-- />-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="排期人员" prop="manager">-->
|
|
|
+ <!-- <el-input-->
|
|
|
+ <!-- v-model="queryParams.manager"-->
|
|
|
+ <!-- placeholder="请输入排期人员"-->
|
|
|
+ <!-- clearable-->
|
|
|
+ <!-- @keyup.enter="handleQuery"-->
|
|
|
+ <!-- class="!w-240px"-->
|
|
|
+ <!-- />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="项目负责人" prop="manager">-->
|
|
|
+ <!-- <el-input-->
|
|
|
+ <!-- v-model="queryParams.manager"-->
|
|
|
+ <!-- placeholder="请输入项目负责人"-->
|
|
|
+ <!-- clearable-->
|
|
|
+ <!-- @keyup.enter="handleQuery"-->
|
|
|
+ <!-- class="!w-240px"-->
|
|
|
+ <!-- />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
<el-form-item label="项目负责人" prop="managerIds">
|
|
|
<el-select
|
|
|
class="!w-240px"
|
|
|
@@ -146,34 +154,34 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!-- 出厂编号 -->
|
|
|
-<!-- <el-form-item label="出厂编号" prop="remainingDays">-->
|
|
|
-<!-- <el-input-->
|
|
|
-<!-- v-model="queryParams.remainingDays"-->
|
|
|
-<!-- placeholder="请输入出厂编号"-->
|
|
|
-<!-- clearable-->
|
|
|
-<!-- @keyup.enter="handleQuery"-->
|
|
|
-<!-- class="!w-240px"-->
|
|
|
-<!-- />-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="出厂编号" prop="remainingDays">-->
|
|
|
+ <!-- <el-input-->
|
|
|
+ <!-- v-model="queryParams.remainingDays"-->
|
|
|
+ <!-- placeholder="请输入出厂编号"-->
|
|
|
+ <!-- clearable-->
|
|
|
+ <!-- @keyup.enter="handleQuery"-->
|
|
|
+ <!-- class="!w-240px"-->
|
|
|
+ <!-- />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
<!-- 剩余期限 -->
|
|
|
-<!-- <el-form-item label="剩余期限" prop="remainingDays">-->
|
|
|
-<!-- <el-input-->
|
|
|
-<!-- v-model="queryParams.remainingDays"-->
|
|
|
-<!-- placeholder="请输入剩余期限"-->
|
|
|
-<!-- clearable-->
|
|
|
-<!-- @keyup.enter="handleQuery"-->
|
|
|
-<!-- class="!w-240px"-->
|
|
|
-<!-- />-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
-<!-- <el-form-item label="主检人" prop="mainCheckerIds">-->
|
|
|
-<!-- <el-input-->
|
|
|
-<!-- v-model="queryParams.mainCheckerIds"-->
|
|
|
-<!-- placeholder="请选择"-->
|
|
|
-<!-- clearable-->
|
|
|
-<!-- @keyup.enter="handleQuery"-->
|
|
|
-<!-- class="!w-240px"-->
|
|
|
-<!-- />-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="剩余期限" prop="remainingDays">-->
|
|
|
+ <!-- <el-input-->
|
|
|
+ <!-- v-model="queryParams.remainingDays"-->
|
|
|
+ <!-- placeholder="请输入剩余期限"-->
|
|
|
+ <!-- clearable-->
|
|
|
+ <!-- @keyup.enter="handleQuery"-->
|
|
|
+ <!-- class="!w-240px"-->
|
|
|
+ <!-- />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="主检人" prop="mainCheckerIds">-->
|
|
|
+ <!-- <el-input-->
|
|
|
+ <!-- v-model="queryParams.mainCheckerIds"-->
|
|
|
+ <!-- placeholder="请选择"-->
|
|
|
+ <!-- clearable-->
|
|
|
+ <!-- @keyup.enter="handleQuery"-->
|
|
|
+ <!-- class="!w-240px"-->
|
|
|
+ <!-- />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
<el-form-item label="主检人" prop="mainCheckerIds">
|
|
|
<el-select
|
|
|
class="!w-240px"
|
|
|
@@ -183,7 +191,9 @@
|
|
|
placeholder="请选择主检人"
|
|
|
multiple
|
|
|
popper-class="user-select-popper"
|
|
|
- @click.stop.prevent="() => handleOpenUserDialog(recheckStrIdsOpts, 'mainCheckerIds')"
|
|
|
+ @click.stop.prevent="
|
|
|
+ () => handleOpenUserDialog(recheckStrIdsOpts, 'mainCheckerIds')
|
|
|
+ "
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="child in recheckStrIdsOpts"
|
|
|
@@ -201,42 +211,38 @@
|
|
|
<el-row class="flex justify-end mt-2">
|
|
|
<el-form-item>
|
|
|
<el-button @click="handleQuery">
|
|
|
- <Icon icon="ep:search" class="mr-5px"/>
|
|
|
+ <Icon icon="ep:search" class="mr-5px" />
|
|
|
搜索
|
|
|
</el-button>
|
|
|
<el-button @click="resetQuery">
|
|
|
- <Icon icon="ep:refresh" class="mr-5px"/>
|
|
|
+ <Icon icon="ep:refresh" class="mr-5px" />
|
|
|
重置
|
|
|
</el-button>
|
|
|
-<!-- <el-button type="primary" @click="showSettingDialog">-->
|
|
|
-<!-- <Icon icon="ep:user" class="mr-5px"/>-->
|
|
|
-<!-- 审核配置-->
|
|
|
-<!-- </el-button>-->
|
|
|
+ <!-- <el-button type="primary" @click="showSettingDialog">-->
|
|
|
+ <!-- <Icon icon="ep:user" class="mr-5px"/>-->
|
|
|
+ <!-- 审核配置-->
|
|
|
+ <!-- </el-button>-->
|
|
|
<el-button link @click="isSearchExpanded = !isSearchExpanded">
|
|
|
<el-icon>
|
|
|
- <ArrowUp v-if="isSearchExpanded"/>
|
|
|
- <ArrowDown v-else/>
|
|
|
+ <ArrowUp v-if="isSearchExpanded" />
|
|
|
+ <ArrowDown v-else />
|
|
|
</el-icon>
|
|
|
{{ isSearchExpanded ? '收起' : '展开' }}
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <el-radio-group v-model="filterStatus" @change="handleStatusFilter" style="margin-top: 20px;">
|
|
|
- <el-radio-button label="全部" value="all"/>
|
|
|
- <el-radio-button label="已认领" value="claim"/>
|
|
|
- <el-radio-button label="待认领" value="unclaim"/>
|
|
|
+ <el-radio-group v-model="filterStatus" @change="handleStatusFilter" style="margin-top: 20px">
|
|
|
+ <el-radio-button label="全部" value="all" />
|
|
|
+ <el-radio-button label="已认领" value="claim" />
|
|
|
+ <el-radio-button label="待认领" value="unclaim" />
|
|
|
</el-radio-group>
|
|
|
<el-tooltip placement="bottom" effect="light" popper-class="status-help-tooltip">
|
|
|
<template #content>
|
|
|
<div class="status-help-content">
|
|
|
<div class="help-title">状态说明</div>
|
|
|
<div class="status-list">
|
|
|
- <div
|
|
|
- v-for="item in statusList"
|
|
|
- :key="item.status"
|
|
|
- class="status-item"
|
|
|
- >
|
|
|
+ <div v-for="item in statusList" :key="item.status" class="status-item">
|
|
|
<div class="color-dot" :style="{ backgroundColor: item.color }"></div>
|
|
|
<span class="status-label">{{ item.label }}</span>
|
|
|
</div>
|
|
|
@@ -244,35 +250,69 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<el-icon class="help-icon" :size="18">
|
|
|
- <QuestionFilled/>
|
|
|
+ <QuestionFilled />
|
|
|
</el-icon>
|
|
|
</el-tooltip>
|
|
|
</ContentWrap>
|
|
|
|
|
|
<!-- 列表 -->
|
|
|
<ContentWrap>
|
|
|
- <el-table v-loading="loading" :data="list" :stripe="true" ref="MyTaskTableListRef"
|
|
|
- border
|
|
|
- class-name="cursor-pointer" @row-dblclick="handleRowDblclick">
|
|
|
- <el-table-column type="selection" align="center" width="55"/>
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="list"
|
|
|
+ :stripe="true"
|
|
|
+ ref="MyTaskTableListRef"
|
|
|
+ border
|
|
|
+ class-name="cursor-pointer"
|
|
|
+ @row-dblclick="handleRowDblclick"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" align="center" width="55" />
|
|
|
<el-table-column
|
|
|
label="剩余期限 (工作日)"
|
|
|
align="center"
|
|
|
prop="remainingDays"
|
|
|
min-width="140px"
|
|
|
/>
|
|
|
- <el-table-column label="任务单号" align="center" prop="orderNo" min-width="150px"/>
|
|
|
- <el-table-column label="设备代码" align="center" prop="equipCode" min-width="200px"/>
|
|
|
- <el-table-column label="使用单位" align="center" prop="unitName" min-width="150px"/>
|
|
|
+ <el-table-column label="任务单号" align="center" prop="orderNo" min-width="150px" />
|
|
|
+ <el-table-column label="设备代码" align="center" prop="equipCode" min-width="200px" />
|
|
|
+ <el-table-column label="使用单位" align="center" prop="unitName" min-width="150px">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag
|
|
|
+ v-if="scope.row.checkType == 100"
|
|
|
+ type="primary"
|
|
|
+ style="font-weight: bold; color: #2f8eff"
|
|
|
+ >{{ PressureBoilerCheckTypeMap[scope.row.checkType].substring(0, 1) }}</el-tag
|
|
|
+ >
|
|
|
+ <el-tag
|
|
|
+ v-if="scope.row.checkType == 200"
|
|
|
+ type="warning"
|
|
|
+ style="font-weight: bold; color: #ff9925"
|
|
|
+ >{{ PressureBoilerCheckTypeMap[scope.row.checkType].substring(0, 1) }}</el-tag
|
|
|
+ >
|
|
|
+ <el-tag
|
|
|
+ v-if="scope.row.checkType == 300"
|
|
|
+ type="danger"
|
|
|
+ style="font-weight: bold; color: #f05551"
|
|
|
+ >{{ PressureBoilerCheckTypeMap[scope.row.checkType].substring(0, 1) }}</el-tag
|
|
|
+ >
|
|
|
+ {{ scope.row.unitName }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="检验部门" align="center" prop="deptName" min-width="120px" />
|
|
|
<el-table-column label="检验性质" align="center" prop="checkType" min-width="120px">
|
|
|
<template #default="scope">
|
|
|
{{ PressureBoilerCheckTypeMap[scope.row.checkType] }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="检验时间" align="center" prop="checkDate" min-width="120px">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ formatArrayDate(scope.row.checkDate) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
|
|
|
<!-- 检验项目 -->
|
|
|
- <el-table-column label="检验项目" align="center" prop="reportDOList" :min-width="200" >
|
|
|
-<!-- <template #default="scope">
|
|
|
+ <el-table-column label="检验项目" align="left" prop="reportDOList" :min-width="600">
|
|
|
+ <!-- <template #default="scope">
|
|
|
<div v-if="scope.row.reportDOList && scope.row.reportDOList.length > 0">
|
|
|
<div class="reportDOList-item">
|
|
|
<!– 数据大于2条时,使用展开收起功能 –>
|
|
|
@@ -376,30 +416,24 @@
|
|
|
<div v-else class="empty-data">-</div>
|
|
|
</template>-->
|
|
|
<template #default="scope">
|
|
|
- <BoilerReportList :row="scope.row"/>
|
|
|
+ <BoilerReportList :row="scope.row" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="任务状态" align="center" prop="isClaim" min-width="150px">
|
|
|
<template #default="scope">
|
|
|
<el-tag :type="scope.row.isClaim ? 'success' : 'default'">{{
|
|
|
- scope.row.isClaim ? '已认领' : '待认领'
|
|
|
- }}</el-tag>
|
|
|
+ scope.row.isClaim ? '已认领' : '待认领'
|
|
|
+ }}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="主报告状态" align="center" prop="taskStatus" min-width="150px">
|
|
|
<template #default="scope">
|
|
|
- <el-tag :type="getTypeColor(scope.row.taskStatus)">{{
|
|
|
- PressureCheckerMyTaskStatusMap[scope.row.taskStatus]
|
|
|
- }}
|
|
|
+ <el-tag :type="getTypeColor(scope.row.taskStatus)"
|
|
|
+ >{{ PressureCheckerMyTaskStatusMap[scope.row.taskStatus] }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="检验时间" align="center" prop="checkDate" min-width="120px">
|
|
|
- <template #default="scope">
|
|
|
- {{ formatArrayDate(scope.row.checkDate) }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="项目负责人" align="center" prop="manager" min-width="120px">
|
|
|
<template #default="scope">
|
|
|
{{
|
|
|
@@ -415,9 +449,9 @@
|
|
|
{{
|
|
|
scope.row.mainCheckerUser
|
|
|
? scope.row.mainCheckerUser.nickname +
|
|
|
- ' (' +
|
|
|
- scope.row.mainCheckerUser.employeeNo +
|
|
|
- ')'
|
|
|
+ ' (' +
|
|
|
+ scope.row.mainCheckerUser.employeeNo +
|
|
|
+ ')'
|
|
|
: '-'
|
|
|
}}
|
|
|
</template>
|
|
|
@@ -433,18 +467,18 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!--排期人员 -->
|
|
|
-<!-- <el-table-column label="排期人员" align="center" prop="planCheckUsers" min-width="120px">-->
|
|
|
-<!-- <template #default="scope">-->
|
|
|
-<!-- {{-->
|
|
|
-<!-- scope.row.planCheckUsers-->
|
|
|
-<!-- ? scope.row.planCheckUsers.nickname +-->
|
|
|
-<!-- ' (' +-->
|
|
|
-<!-- scope.row.planCheckUsers.employeeNo +-->
|
|
|
-<!-- ')'-->
|
|
|
-<!-- : '-'-->
|
|
|
-<!-- }}-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- </el-table-column>-->
|
|
|
+ <!-- <el-table-column label="排期人员" align="center" prop="planCheckUsers" min-width="120px">-->
|
|
|
+ <!-- <template #default="scope">-->
|
|
|
+ <!-- {{-->
|
|
|
+ <!-- scope.row.planCheckUsers-->
|
|
|
+ <!-- ? scope.row.planCheckUsers.nickname +-->
|
|
|
+ <!-- ' (' +-->
|
|
|
+ <!-- scope.row.planCheckUsers.employeeNo +-->
|
|
|
+ <!-- ')'-->
|
|
|
+ <!-- : '-'-->
|
|
|
+ <!-- }}-->
|
|
|
+ <!-- </template>-->
|
|
|
+ <!-- </el-table-column>-->
|
|
|
<el-table-column label="操作" align="center" min-width="150px" fixed="right">
|
|
|
<template #default="scope">
|
|
|
<div class="flex flex-col gap-1">
|
|
|
@@ -459,22 +493,32 @@
|
|
|
<el-button v-else link type="primary" @click="handleCheckInput(scope.row.id)">
|
|
|
检验录入
|
|
|
</el-button>
|
|
|
+ <el-button link type="primary" @click="printProject(scope.row.reportDOList)">
|
|
|
+ 打印项目
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
+ v-if="
|
|
|
+ scope.row.taskStatus == 400 &&
|
|
|
+ scope.row.isClaim == true &&
|
|
|
+ scope.row.mainCheckerUser &&
|
|
|
+ userStore.user.id === scope.row.mainCheckerUser.id
|
|
|
+ "
|
|
|
link
|
|
|
type="primary"
|
|
|
- @click="printProject(scope.row.reportDOList)"
|
|
|
+ @click="handleCancelClaim(scope.row.id)"
|
|
|
>
|
|
|
- 打印项目
|
|
|
+ 取消认领
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- v-if="scope.row.taskStatus == 400 && scope.row.isClaim == true && scope.row.mainCheckerUser && userStore.user.id === scope.row.mainCheckerUser.id"
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="handleCancelClaim(scope.row.id)"
|
|
|
- >
|
|
|
- 取消认领
|
|
|
- </el-button>
|
|
|
- <el-button v-if="scope.row.isClaim == true && scope.row.mainCheckerUser && userStore.user.id === scope.row.mainCheckerUser.id" link type="primary" @click="handleFinishCheck(scope.row.id,scope.row.endCheckDate)">
|
|
|
+ v-if="
|
|
|
+ scope.row.isClaim == true &&
|
|
|
+ scope.row.mainCheckerUser &&
|
|
|
+ userStore.user.id === scope.row.mainCheckerUser.id
|
|
|
+ "
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="handleFinishCheck(scope.row.id, scope.row.endCheckDate)"
|
|
|
+ >
|
|
|
结束检验
|
|
|
</el-button>
|
|
|
</div>
|
|
|
@@ -532,35 +576,16 @@
|
|
|
@on-page-no-change="onPageNoChange"
|
|
|
/>
|
|
|
</CustomDialog>
|
|
|
- <CustomDialog
|
|
|
- v-model="printProjectDialogVisible"
|
|
|
- :close-on-click-modal="true"
|
|
|
- >
|
|
|
+ <CustomDialog v-model="printProjectDialogVisible" :close-on-click-modal="true">
|
|
|
<el-table
|
|
|
:data="printProjectList"
|
|
|
style="width: 100%"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
- <el-table-column
|
|
|
- type="selection"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="序号"
|
|
|
- width="60"
|
|
|
- align="center"
|
|
|
- type="index"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="项目"
|
|
|
- align="center"
|
|
|
- prop="reportName"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="项目状态"
|
|
|
- align="center"
|
|
|
- prop="taskStatus"
|
|
|
- >
|
|
|
+ <el-table-column type="selection" align="center" />
|
|
|
+ <el-table-column label="序号" width="60" align="center" type="index" />
|
|
|
+ <el-table-column label="项目" align="center" prop="reportName" />
|
|
|
+ <el-table-column label="项目状态" align="center" prop="taskStatus">
|
|
|
<template #default="scope">
|
|
|
<el-tag :type="getTypeColor(scope.row.taskStatus)">
|
|
|
{{ PressureTaskOrderTaskStatusMap[scope.row.taskStatus] }}
|
|
|
@@ -576,35 +601,39 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import {ref, reactive, onMounted, computed} from 'vue'
|
|
|
-import {formatArrayDate} from '@/utils/formatTime'
|
|
|
+import { ref, reactive, onMounted, computed } from 'vue'
|
|
|
+import { formatArrayDate } from '@/utils/formatTime'
|
|
|
//import SettingDialog from './components/SettingDialog.vue'
|
|
|
-import {BoilerTaskOrderApi, BoilerTaskOrderOrderItemVO} from '@/api/pressure2/boilertaskorder'
|
|
|
+import { BoilerTaskOrderApi, BoilerTaskOrderOrderItemVO } from '@/api/pressure2/boilertaskorder'
|
|
|
import {
|
|
|
- PressureBoilerCheckTypeMap, PressureCheckerMyTaskStatus,
|
|
|
+ PressureBoilerCheckTypeMap,
|
|
|
+ PressureCheckerMyTaskStatus,
|
|
|
PressureCheckerMyTaskStatusMap,
|
|
|
- PressureTaskOrderTaskStatus, PressureTaskOrderTaskStatusMap
|
|
|
+ PressurePipeCheckTypeMap,
|
|
|
+ PressureTaskOrderTaskStatus,
|
|
|
+ PressureTaskOrderTaskStatusMap
|
|
|
} from '@/utils/constants'
|
|
|
-import {ElMessageBox, ElMessage} from 'element-plus'
|
|
|
-import {useRoute, useRouter} from 'vue-router'
|
|
|
-import {ArrowDown, ArrowUp, QuestionFilled} from "@element-plus/icons-vue";
|
|
|
+import { ElMessageBox, ElMessage } from 'element-plus'
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
|
+import { ArrowDown, ArrowUp, QuestionFilled } from '@element-plus/icons-vue'
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
-import {useEmitt} from "@/hooks/web/useEmitt";
|
|
|
+import { useEmitt } from '@/hooks/web/useEmitt'
|
|
|
import endCheckForm from './components/endCheckForm.vue'
|
|
|
-import SmartTable from "@/components/SmartTable/SmartTable";
|
|
|
+import SmartTable from '@/components/SmartTable/SmartTable'
|
|
|
import { getUserList } from '@/api/common/user'
|
|
|
-import SettingDialog from "@/views/pressure/checker/components/SettingDialog.vue";
|
|
|
-import {PipeInputApi} from "@/api/pressure2/pipeInput";
|
|
|
+import SettingDialog from '@/views/pressure/checker/components/SettingDialog.vue'
|
|
|
+import { PipeInputApi } from '@/api/pressure2/pipeInput'
|
|
|
import 'https://printjs-4de6.kxcdn.com/print.min.js'
|
|
|
-import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
|
|
|
-import BoilerReportList from "@/views/pressure2/boilerReportPreparationList/BoilerReportList.vue";
|
|
|
+import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
|
|
|
+import BoilerReportList from '@/views/pressure2/boilerReportPreparationList/BoilerReportList.vue'
|
|
|
+import DeptSelect from '@/views/pressure2/pipescheduling/components/DeptSelect.vue'
|
|
|
|
|
|
const { emitter } = useEmitt()
|
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
-const loginUser = useUserStore().user;
|
|
|
+const loginUser = useUserStore().user
|
|
|
|
|
|
const getTypeColor = (status: string | number) => {
|
|
|
const statusMap = {
|
|
|
@@ -633,8 +662,32 @@ const statusList = [
|
|
|
{ status: PressureCheckerMyTaskStatus.REPORT_END, label: '报告办结', color: '#303133' }
|
|
|
]
|
|
|
// 获取状态字体颜色
|
|
|
-const getStatusBgColor = (status: number): '#5B9BD5' | '#70AD47' | '#ED7D31' | '#303133' |'#9973C2' | '#FF8DC7' | '#FFC000' | '#A7D78B' | 'primary' | 'danger' => {
|
|
|
- const statusMap: Record<number, '#5B9BD5' | '#70AD47' | '#FFC000'| '#9973C2' | '#ED7D31'| '#FF8DC7' | '#A7D78B' | 'primary' | '#303133' | 'danger'> = {
|
|
|
+const getStatusBgColor = (
|
|
|
+ status: number
|
|
|
+):
|
|
|
+ | '#5B9BD5'
|
|
|
+ | '#70AD47'
|
|
|
+ | '#ED7D31'
|
|
|
+ | '#303133'
|
|
|
+ | '#9973C2'
|
|
|
+ | '#FF8DC7'
|
|
|
+ | '#FFC000'
|
|
|
+ | '#A7D78B'
|
|
|
+ | 'primary'
|
|
|
+ | 'danger' => {
|
|
|
+ const statusMap: Record<
|
|
|
+ number,
|
|
|
+ | '#5B9BD5'
|
|
|
+ | '#70AD47'
|
|
|
+ | '#FFC000'
|
|
|
+ | '#9973C2'
|
|
|
+ | '#ED7D31'
|
|
|
+ | '#FF8DC7'
|
|
|
+ | '#A7D78B'
|
|
|
+ | 'primary'
|
|
|
+ | '#303133'
|
|
|
+ | 'danger'
|
|
|
+ > = {
|
|
|
[PressureCheckerMyTaskStatus.CONFIRMED]: '#5B9BD5', //待录入
|
|
|
[PressureCheckerMyTaskStatus.RECORD_INPUT]: '#70AD47', //记录录入
|
|
|
[PressureCheckerMyTaskStatus.RECORD_CHECK]: '#9973C2', //记录校核
|
|
|
@@ -647,7 +700,7 @@ const getStatusBgColor = (status: number): '#5B9BD5' | '#70AD47' | '#ED7D31' | '
|
|
|
}
|
|
|
|
|
|
/** 承压任务单 列表 */
|
|
|
-defineOptions({name: 'BoilerMyTask'})
|
|
|
+defineOptions({ name: 'BoilerMyTask' })
|
|
|
|
|
|
const isSearchExpanded = ref(false)
|
|
|
// 状态筛选
|
|
|
@@ -662,6 +715,7 @@ const queryParams = reactive<Recordable>({
|
|
|
unitName: undefined,
|
|
|
orderNo: undefined,
|
|
|
checkType: undefined,
|
|
|
+ deptId: userStore.user.deptId,
|
|
|
checkDate: [],
|
|
|
checkUserIds: [],
|
|
|
mainCheckerIds: [],
|
|
|
@@ -683,7 +737,7 @@ const MyTaskTableListRef = ref() // table的实例
|
|
|
const getList = async () => {
|
|
|
loading.value = true
|
|
|
try {
|
|
|
- const params: any = {...queryParams}
|
|
|
+ const params: any = { ...queryParams }
|
|
|
const data = await BoilerTaskOrderApi.getTaskOrderOrderItemPage(params)
|
|
|
list.value = data.list
|
|
|
total.value = data.total
|
|
|
@@ -715,8 +769,8 @@ const handleCheckInput = (id: string) => {
|
|
|
}
|
|
|
|
|
|
// 添加结束检验时间
|
|
|
-const handleFinishCheck = (id: string,endCheckDate: any) => {
|
|
|
- endCheckFormRef.value.open(id,endCheckDate)
|
|
|
+const handleFinishCheck = (id: string, endCheckDate: any) => {
|
|
|
+ endCheckFormRef.value.open(id, endCheckDate)
|
|
|
}
|
|
|
|
|
|
/** 修改成功处理 */
|
|
|
@@ -725,7 +779,6 @@ const handleScheduleSuccess = () => {
|
|
|
getList()
|
|
|
}
|
|
|
|
|
|
-
|
|
|
const handleClaim = (id: string) => {
|
|
|
ElMessageBox.confirm('是否确认认领?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
@@ -733,13 +786,12 @@ const handleClaim = (id: string) => {
|
|
|
type: 'warning'
|
|
|
})
|
|
|
.then(() => {
|
|
|
- BoilerTaskOrderApi.claim({id: id}).then(() => {
|
|
|
+ BoilerTaskOrderApi.claim({ id: id }).then(() => {
|
|
|
ElMessage.success('认领成功')
|
|
|
getList()
|
|
|
})
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- })
|
|
|
+ .catch(() => {})
|
|
|
}
|
|
|
|
|
|
//取消认领
|
|
|
@@ -750,13 +802,12 @@ const handleCancelClaim = (id: string) => {
|
|
|
type: 'warning'
|
|
|
})
|
|
|
.then(() => {
|
|
|
- BoilerTaskOrderApi.cancelClaim({id: id}).then(() => {
|
|
|
+ BoilerTaskOrderApi.cancelClaim({ id: id }).then(() => {
|
|
|
ElMessage.success('取消认领成功')
|
|
|
getList()
|
|
|
})
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- })
|
|
|
+ .catch(() => {})
|
|
|
}
|
|
|
|
|
|
/** 处理状态筛选 */
|
|
|
@@ -825,7 +876,6 @@ const userColumns = ref<any[]>([
|
|
|
}
|
|
|
])
|
|
|
|
|
|
-
|
|
|
const printProjectDialogVisible = ref(false)
|
|
|
const printProjectList = ref([])
|
|
|
const selectionProject = ref([])
|
|
|
@@ -836,9 +886,9 @@ const printProject = (reportDOList) => {
|
|
|
|
|
|
const handleSelectionChange = (selection) => {
|
|
|
// 根据表格的序号重新排序 selection
|
|
|
- const sortedSelection = selection.map(item => {
|
|
|
+ const sortedSelection = selection.map((item) => {
|
|
|
// 在原始数据中查找该项的索引
|
|
|
- const index = printProjectList.value.findIndex(v => v.id === item.id)
|
|
|
+ const index = printProjectList.value.findIndex((v) => v.id === item.id)
|
|
|
return {
|
|
|
...item,
|
|
|
_index: index // 临时存储原始索引
|
|
|
@@ -861,23 +911,21 @@ const handleDownload = async () => {
|
|
|
|
|
|
let data: any[] = []
|
|
|
console.log(selectionProject)
|
|
|
- selectionProject.value.forEach(
|
|
|
- (item) => {
|
|
|
- data.push({
|
|
|
- taskStatus: item.taskStatus,
|
|
|
- resultTemplateId: item.resultTemplateId,
|
|
|
- templateId: item.templateId,
|
|
|
- reportTemplateId: item.reportTemplateId,
|
|
|
- reportUrl: item.reportUrl,
|
|
|
- id: item.id,
|
|
|
- })
|
|
|
- }
|
|
|
- )
|
|
|
+ selectionProject.value.forEach((item) => {
|
|
|
+ data.push({
|
|
|
+ taskStatus: item.taskStatus,
|
|
|
+ resultTemplateId: item.resultTemplateId,
|
|
|
+ templateId: item.templateId,
|
|
|
+ reportTemplateId: item.reportTemplateId,
|
|
|
+ reportUrl: item.reportUrl,
|
|
|
+ id: item.id
|
|
|
+ })
|
|
|
+ })
|
|
|
|
|
|
let loadingInstance = ElLoading.service({
|
|
|
lock: true,
|
|
|
text: '正在下载...',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
+ spinner: 'el-icon-loading'
|
|
|
})
|
|
|
|
|
|
try {
|
|
|
@@ -919,22 +967,20 @@ const handlePrint = async () => {
|
|
|
}
|
|
|
|
|
|
let data: any[] = []
|
|
|
- selectionProject.value.forEach(
|
|
|
- (item) => {
|
|
|
- data.push({
|
|
|
- taskStatus: item.taskStatus,
|
|
|
- resultTemplateId: item.resultTemplateId,
|
|
|
- templateId: item.templateId,
|
|
|
- reportTemplateId: item.reportTemplateId,
|
|
|
- reportUrl: item.reportUrl,
|
|
|
- id: item.id,
|
|
|
- })
|
|
|
- }
|
|
|
- )
|
|
|
+ selectionProject.value.forEach((item) => {
|
|
|
+ data.push({
|
|
|
+ taskStatus: item.taskStatus,
|
|
|
+ resultTemplateId: item.resultTemplateId,
|
|
|
+ templateId: item.templateId,
|
|
|
+ reportTemplateId: item.reportTemplateId,
|
|
|
+ reportUrl: item.reportUrl,
|
|
|
+ id: item.id
|
|
|
+ })
|
|
|
+ })
|
|
|
let loadingInstance = ElLoading.service({
|
|
|
lock: true,
|
|
|
text: '正在打印...',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
+ spinner: 'el-icon-loading'
|
|
|
})
|
|
|
try {
|
|
|
// 调用 API 获取 PDF blob
|
|
|
@@ -960,22 +1006,22 @@ const handlePrint = async () => {
|
|
|
} catch (error) {
|
|
|
console.error('打印失败:', error)
|
|
|
ElMessage.error('打印失败')
|
|
|
- }finally {
|
|
|
+ } finally {
|
|
|
loadingInstance.close()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
const PartTypeList = getStrDictOptions(DICT_TYPE.PRESSURE2_BOILER_PART_TYPE)
|
|
|
const getTypeName = (type) => {
|
|
|
- const item = PartTypeList.find(item => item.value === type);
|
|
|
- return item ? item.label : '';
|
|
|
+ const item = PartTypeList.find((item) => item.value === type)
|
|
|
+ return item ? item.label : ''
|
|
|
}
|
|
|
|
|
|
const getReportName = (item) => {
|
|
|
if (!item.itemPartId || item.itemPartId === '0') {
|
|
|
return item.reportName
|
|
|
}
|
|
|
- return item.reportName +'(' + getTypeName(item.itemPartId) + ')'
|
|
|
+ return item.reportName + '(' + getTypeName(item.itemPartId) + ')'
|
|
|
}
|
|
|
|
|
|
const handleRowDblclick = (row: Record<string, any>) => {
|
|
|
@@ -1009,7 +1055,7 @@ const handleToActiveDetail = (row, item) => {
|
|
|
localStorage.setItem('activeBoilerDetailItemId', item.id)
|
|
|
router.push({
|
|
|
name: 'BoilerCheckerTaskDetail',
|
|
|
- query: {id: row.id, type: 'BoilerMyTask'},
|
|
|
+ query: { id: row.id, type: 'BoilerMyTask' }
|
|
|
})
|
|
|
}
|
|
|
const handleUserConfirm = () => {
|
|
|
@@ -1061,23 +1107,25 @@ const onPageNoChange = (val) => {
|
|
|
handleFetchUserList()
|
|
|
}
|
|
|
|
|
|
-watch(() => route.path, async () => {
|
|
|
- if (route.path === '/gljy/my-task/boiler') {
|
|
|
- await getList()
|
|
|
+watch(
|
|
|
+ () => route.path,
|
|
|
+ async () => {
|
|
|
+ if (route.path === '/gljy/my-task/boiler') {
|
|
|
+ await getList()
|
|
|
+ }
|
|
|
}
|
|
|
-})
|
|
|
+)
|
|
|
|
|
|
/** 初始化 **/
|
|
|
onMounted(() => {
|
|
|
getList()
|
|
|
- emitter.on('refresh-my-task-boiler', ()=> {
|
|
|
- getList();
|
|
|
+ emitter.on('refresh-my-task-boiler', () => {
|
|
|
+ getList()
|
|
|
})
|
|
|
})
|
|
|
onUnmounted(() => {
|
|
|
emitter.off('refresh-my-task-boiler')
|
|
|
})
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|