|
|
@@ -1,74 +1,84 @@
|
|
|
<template>
|
|
|
- <view class="item-box">
|
|
|
- <view class="item-top">
|
|
|
- <view class="item-top-left">
|
|
|
- <view class="row">
|
|
|
- <text class="item-top-text">
|
|
|
- 任务单号:{{ item.orderNo }}
|
|
|
- <text>
|
|
|
- (
|
|
|
- <text :style="{ color: checkTypeColor }">{{ checkType }}</text>
|
|
|
- )
|
|
|
+ <wd-collapse v-model="collapseValue" accordion class="item-collapse">
|
|
|
+ <wd-collapse-item :name="item.orderNo">
|
|
|
+ <template #title="{ expanded }">
|
|
|
+ <view class="item-box">
|
|
|
+ <view class="item-top">
|
|
|
+ <view class="item-top-left">
|
|
|
+ <view class="row">
|
|
|
+ <text class="item-top-text">
|
|
|
+ 任务单号:{{ item.orderNo }}
|
|
|
+ <text>
|
|
|
+ (
|
|
|
+ <text :style="{ color: checkTypeColor }">{{ checkType }}</text>
|
|
|
+ )
|
|
|
+ </text>
|
|
|
+ </text>
|
|
|
+ <text v-if="item.equipNum" class="item-top-num-box">{{ item.equipNum }}台</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="item-center">
|
|
|
+ <view class="row-center">
|
|
|
+ <text class="title">
|
|
|
+ 检测时间:
|
|
|
+ <text class="text">{{ checkDate }}</text>
|
|
|
+ </text>
|
|
|
+ <text class="title">
|
|
|
+ 设备注册代码:
|
|
|
+ <text class="text">{{ item.equipCode }}</text>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <text class="title">
|
|
|
+ 使用单位:
|
|
|
+ <text class="text">{{ item.unitName }}</text>
|
|
|
</text>
|
|
|
- </text>
|
|
|
- <text v-if="item.equipNum" class="item-top-num-box">{{ item.equipNum }}台</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="item-center">
|
|
|
- <view class="row-center">
|
|
|
- <text class="title">
|
|
|
- 检测时间:
|
|
|
- <text class="text">{{ checkDate }}</text>
|
|
|
- </text>
|
|
|
- <text class="title">
|
|
|
- 设备注册代码:
|
|
|
- <text class="text">{{ item.equipCode }}</text>
|
|
|
- </text>
|
|
|
- <view class="row">
|
|
|
- <text class="title">主报告状态:</text>
|
|
|
- <view class="status-badge">
|
|
|
- <text class="status-text">{{ taskStatusText }}</text>
|
|
|
+ <view class="row-center">
|
|
|
+ <text class="title">
|
|
|
+ 项目负责人:
|
|
|
+ <text class="text">{{ item?.manager?.nickname }}</text>
|
|
|
+ </text>
|
|
|
+ <text class="title">
|
|
|
+ 主检人:
|
|
|
+ <text class="text">{{ item?.mainCheckerUser?.nickname }}</text>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <text class="title">
|
|
|
+ 检验员:
|
|
|
+ <text class="text">{{ checkUsersText }}</text>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="btn-group">
|
|
|
+ <button v-show="item.recheckStatus == '100'" class="main-btn" @click.stop="handleOperation">
|
|
|
+ <text class="main-btn-text">{{ operateText }}</text>
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="collapse-arrow">
|
|
|
+ <image class="arrow-icon" :src="iconMap.ArrowDown" :class="{ 'arrow-rotate': expanded }" />
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </template>
|
|
|
|
|
|
- <text class="title">
|
|
|
- 使用单位:
|
|
|
- <text class="text">{{ item.unitName }}</text>
|
|
|
- </text>
|
|
|
- <view class="row-center">
|
|
|
- <text class="title">
|
|
|
- 项目负责人:
|
|
|
- <text class="text">{{ item?.manager?.nickname }}</text>
|
|
|
- </text>
|
|
|
- <text class="title">
|
|
|
- 主检人:
|
|
|
- <text class="text">{{ item?.mainCheckerUser?.nickname }}</text>
|
|
|
- </text>
|
|
|
+ <view class="recheck-list">
|
|
|
+ <view v-if="item.recheckReportList?.length" v-for="report in item.recheckReportList" :key="report.reportId" class="recheck-item">
|
|
|
+ <text class="recheck-report-name">{{ report.reportName }}</text>
|
|
|
+ <view v-if="statusFilter === '100'" class="recheck-btn" @click.stop="handleOperation(item, report)">
|
|
|
+ <text class="recheck-btn-text">校核</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view v-else class="recheck-empty">暂无校核项</view>
|
|
|
</view>
|
|
|
- <text class="title">
|
|
|
- 检验员:
|
|
|
- <text class="text">{{ checkUsersText }}</text>
|
|
|
- </text>
|
|
|
- <text class="title">
|
|
|
- 检验项目:
|
|
|
- <text class="text">{{ reportText }}</text>
|
|
|
- </text>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="btn-group">
|
|
|
- <button v-show="item.recheckStatus == '100'" class="main-btn" @click="handleOperation">
|
|
|
- <text class="main-btn-text">{{ operateText }}</text>
|
|
|
- </button>
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
+ </wd-collapse-item>
|
|
|
+ </wd-collapse>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { computed } from 'vue'
|
|
|
+import { computed, ref } from 'vue'
|
|
|
+import iconMap from '@/utils/imagesMap'
|
|
|
import { BoilerPressureCheckTypeMap } from '@/utils/dictMap'
|
|
|
import { PressureCheckerMyTaskStatusMap } from '@/utils/dictMap'
|
|
|
|
|
|
@@ -76,14 +86,18 @@ interface Props {
|
|
|
item: any
|
|
|
reportDOList: any[]
|
|
|
operateText: string
|
|
|
+ statusFilter: string
|
|
|
}
|
|
|
|
|
|
const props = defineProps<Props>()
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
handleOperation: [item: any, reportDOList: any]
|
|
|
+ handleRecheck: [item: any, report: any]
|
|
|
}>()
|
|
|
|
|
|
+const collapseValue = ref<string>('')
|
|
|
+
|
|
|
const checkType = computed(() => {
|
|
|
return BoilerPressureCheckTypeMap[props.item.checkType] || ''
|
|
|
})
|
|
|
@@ -116,17 +130,17 @@ const taskStatusText = computed(() => {
|
|
|
return PressureCheckerMyTaskStatusMap[props.item.taskStatus] || ''
|
|
|
})
|
|
|
|
|
|
-const handleOperation = () => {
|
|
|
- emit('handleOperation', props.item, props.reportDOList)
|
|
|
+const handleOperation = (taskOrder, recheckItem) => {
|
|
|
+ emit('handleOperation', taskOrder, recheckItem)
|
|
|
}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.item-box {
|
|
|
- margin: 13px;
|
|
|
- padding: 13px;
|
|
|
background-color: #fff;
|
|
|
border-radius: 5px;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
|
|
|
.row {
|
|
|
@@ -239,4 +253,83 @@ const handleOperation = () => {
|
|
|
justify-content: flex-end;
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
-</style>
|
|
|
+
|
|
|
+.collapse-arrow {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ padding-top: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.arrow-icon {
|
|
|
+ width: 24px;
|
|
|
+ height: 14px;
|
|
|
+ transition: transform 0.3s;
|
|
|
+}
|
|
|
+
|
|
|
+.arrow-rotate {
|
|
|
+ transform: rotate(180deg);
|
|
|
+}
|
|
|
+
|
|
|
+/* collapse 外层覆盖 */
|
|
|
+.item-collapse {
|
|
|
+ :deep(.wd-collapse-item__title) {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.wd-collapse-item__title-wrapper) {
|
|
|
+ background-color: transparent;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.wd-collapse-item__arrow) {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.wd-collapse-item__content) {
|
|
|
+ padding: 0 13px 13px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/* recheck 列表 */
|
|
|
+.recheck-list {
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 5px;
|
|
|
+}
|
|
|
+
|
|
|
+.recheck-item {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 10px 13px;
|
|
|
+ border-bottom: 1px solid rgb(244, 244, 244);
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.recheck-report-name {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+
|
|
|
+.recheck-btn {
|
|
|
+ padding: 4px 12px;
|
|
|
+ border-radius: 3px;
|
|
|
+ background-color: #fff;
|
|
|
+ border: 1px solid rgb(47, 142, 255);
|
|
|
+}
|
|
|
+
|
|
|
+.recheck-btn-text {
|
|
|
+ font-size: 13px;
|
|
|
+ color: rgb(47, 142, 255);
|
|
|
+}
|
|
|
+
|
|
|
+.recheck-empty {
|
|
|
+ padding: 20px 0;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #999;
|
|
|
+}
|
|
|
+</style>
|