|
@@ -47,15 +47,15 @@
|
|
|
<div class="group-header" v-if="partId != ''">
|
|
<div class="group-header" v-if="partId != ''">
|
|
|
<h5 class="group-title">{{ getPartNameById(partId) }}</h5>
|
|
<h5 class="group-title">{{ getPartNameById(partId) }}</h5>
|
|
|
<div class="group-actions">
|
|
<div class="group-actions">
|
|
|
- <el-button
|
|
|
|
|
- @click="handleCopyItemPart(partId)"
|
|
|
|
|
- :disabled="orderInfo?.taskStatus === PressureTaskOrderTaskStatus['REPORT_END'] || canAddReportItem"
|
|
|
|
|
- type="success"
|
|
|
|
|
- size="small"
|
|
|
|
|
- v-if="partId != ''"
|
|
|
|
|
- :icon="CopyDocument"
|
|
|
|
|
- title="复制部件"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+<!-- <el-button-->
|
|
|
|
|
+<!-- @click="handleCopyItemPart(partId)"-->
|
|
|
|
|
+<!-- :disabled="orderInfo?.taskStatus === PressureTaskOrderTaskStatus['REPORT_END'] || canAddReportItem"-->
|
|
|
|
|
+<!-- type="success"-->
|
|
|
|
|
+<!-- size="small"-->
|
|
|
|
|
+<!-- v-if="partId != ''"-->
|
|
|
|
|
+<!-- :icon="CopyDocument"-->
|
|
|
|
|
+<!-- title="复制部件"-->
|
|
|
|
|
+<!-- />-->
|
|
|
<!-- 复制
|
|
<!-- 复制
|
|
|
</el-button>-->
|
|
</el-button>-->
|
|
|
<el-button
|
|
<el-button
|
|
@@ -162,6 +162,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 右键菜单 -->
|
|
<!-- 右键菜单 -->
|
|
|
|
|
+ <Teleport to="body">
|
|
|
<div
|
|
<div
|
|
|
v-show="contextMenuVisible"
|
|
v-show="contextMenuVisible"
|
|
|
class="context-menu"
|
|
class="context-menu"
|
|
@@ -237,6 +238,7 @@
|
|
|
<!-- <span v-if="contextMenuItem && !canVoidItem(contextMenuItem)" class="disabled-tip">(当前状态不可作废)</span> -->
|
|
<!-- <span v-if="contextMenuItem && !canVoidItem(contextMenuItem)" class="disabled-tip">(当前状态不可作废)</span> -->
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ </Teleport>
|
|
|
<!-- 检验录入-模板 -->
|
|
<!-- 检验录入-模板 -->
|
|
|
<InlineEditCheckRecord
|
|
<InlineEditCheckRecord
|
|
|
v-if="showInlineEditCheckRecord"
|
|
v-if="showInlineEditCheckRecord"
|
|
@@ -671,11 +673,32 @@ const handleContextMenu = (event: MouseEvent, item: ReportItemVO) => {
|
|
|
left: `${event.clientX}px`,
|
|
left: `${event.clientX}px`,
|
|
|
top: `${event.clientY}px`,
|
|
top: `${event.clientY}px`,
|
|
|
position: 'fixed',
|
|
position: 'fixed',
|
|
|
- zIndex: '9999'
|
|
|
|
|
|
|
+ zIndex: '9999',
|
|
|
|
|
+ opacity: '0'
|
|
|
}
|
|
}
|
|
|
|
|
+ contextMenuVisible.value = true
|
|
|
|
|
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
- contextMenuVisible.value = true
|
|
|
|
|
|
|
+ const el = document.querySelector('.context-menu') as HTMLElement
|
|
|
|
|
+ if (!el) return
|
|
|
|
|
+ const rect = el.getBoundingClientRect()
|
|
|
|
|
+ let left = event.clientX
|
|
|
|
|
+ let top = event.clientY
|
|
|
|
|
+ // 右侧超出视口则向左偏移
|
|
|
|
|
+ if (left + rect.width > window.innerWidth) {
|
|
|
|
|
+ left = window.innerWidth - rect.width - 10
|
|
|
|
|
+ }
|
|
|
|
|
+ // 底部超出视口则向上弹出
|
|
|
|
|
+ if (top + rect.height > window.innerHeight) {
|
|
|
|
|
+ top = top - rect.height
|
|
|
|
|
+ }
|
|
|
|
|
+ contextMenuStyle.value = {
|
|
|
|
|
+ left: `${left}px`,
|
|
|
|
|
+ top: `${top}px`,
|
|
|
|
|
+ position: 'fixed',
|
|
|
|
|
+ zIndex: '9999',
|
|
|
|
|
+ opacity: '1'
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
// 获取检验员名称
|
|
// 获取检验员名称
|