|
@@ -2,6 +2,7 @@
|
|
|
<div class="office-sop flex flex-col h-full">
|
|
|
<div class="page-action">
|
|
|
<t-button
|
|
|
+ v-if="perm.BUTTON_Cancel"
|
|
|
theme="primary"
|
|
|
:disabled="!selectedRowKeys.length"
|
|
|
@click="handleBatchCancel"
|
|
@@ -86,48 +87,60 @@
|
|
|
</template>
|
|
|
<template #operate="{ row }">
|
|
|
<div class="table-operations">
|
|
|
- <t-link
|
|
|
- theme="primary"
|
|
|
- hover="color"
|
|
|
- @click="editSopFlowHandle(row, 'fill')"
|
|
|
- >
|
|
|
- 填报
|
|
|
- </t-link>
|
|
|
- <t-link
|
|
|
- theme="primary"
|
|
|
- hover="color"
|
|
|
- @click="editSopFlowHandle(row, 'new')"
|
|
|
- >
|
|
|
- 新增SOP
|
|
|
- </t-link>
|
|
|
- <t-link
|
|
|
- theme="primary"
|
|
|
- hover="color"
|
|
|
- @click="createViolationHandle(row)"
|
|
|
- >
|
|
|
- 新增违规
|
|
|
- </t-link>
|
|
|
- <t-link
|
|
|
- theme="primary"
|
|
|
- hover="color"
|
|
|
- @click="createQualityIssueHandle(row)"
|
|
|
- >
|
|
|
- 上报质量问题
|
|
|
- </t-link>
|
|
|
- <t-link
|
|
|
- theme="primary"
|
|
|
- hover="color"
|
|
|
- @click="planChangeHandle(row)"
|
|
|
- >
|
|
|
- 计划变更报备
|
|
|
- </t-link>
|
|
|
- <t-link
|
|
|
- theme="primary"
|
|
|
- hover="color"
|
|
|
- @click="editSopFlowHandle(row, 'edit')"
|
|
|
- >
|
|
|
- 编辑
|
|
|
- </t-link>
|
|
|
+ <template v-if="perm.LINK_Fill">
|
|
|
+ <t-link
|
|
|
+ theme="primary"
|
|
|
+ hover="color"
|
|
|
+ @click="editSopFlowHandle(row, 'fill')"
|
|
|
+ >
|
|
|
+ 填报
|
|
|
+ </t-link>
|
|
|
+ </template>
|
|
|
+ <template v-if="perm.LINK_AddSop">
|
|
|
+ <t-link
|
|
|
+ theme="primary"
|
|
|
+ hover="color"
|
|
|
+ @click="editSopFlowHandle(row, 'new')"
|
|
|
+ >
|
|
|
+ 新增SOP
|
|
|
+ </t-link>
|
|
|
+ </template>
|
|
|
+ <template v-if="perm.LINK_AddViolation">
|
|
|
+ <t-link
|
|
|
+ theme="primary"
|
|
|
+ hover="color"
|
|
|
+ @click="createViolationHandle(row)"
|
|
|
+ >
|
|
|
+ 新增违规
|
|
|
+ </t-link>
|
|
|
+ </template>
|
|
|
+ <template v-if="perm.LINK_ProblemSubmit">
|
|
|
+ <t-link
|
|
|
+ theme="primary"
|
|
|
+ hover="color"
|
|
|
+ @click="createQualityIssueHandle(row)"
|
|
|
+ >
|
|
|
+ 上报质量问题
|
|
|
+ </t-link>
|
|
|
+ </template>
|
|
|
+ <template v-if="perm.LINK_ProjectExchange">
|
|
|
+ <t-link
|
|
|
+ theme="primary"
|
|
|
+ hover="color"
|
|
|
+ @click="planChangeHandle(row)"
|
|
|
+ >
|
|
|
+ 计划变更报备
|
|
|
+ </t-link>
|
|
|
+ </template>
|
|
|
+ <template v-if="perm.LINK_Edit">
|
|
|
+ <t-link
|
|
|
+ theme="primary"
|
|
|
+ hover="color"
|
|
|
+ @click="editSopFlowHandle(row, 'edit')"
|
|
|
+ >
|
|
|
+ 编辑
|
|
|
+ </t-link>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</template>
|
|
|
</t-table>
|
|
@@ -135,6 +148,7 @@
|
|
|
|
|
|
<!-- SopStepDialog -->
|
|
|
<sop-step-dialog
|
|
|
+ v-if="perm.LINK_Edit || perm.LINK_AddSop || perm.LINK_Fill"
|
|
|
v-model:visible="showSopStepDialog"
|
|
|
:sop="curSopData"
|
|
|
:type="curSopType"
|
|
@@ -142,6 +156,7 @@
|
|
|
></sop-step-dialog>
|
|
|
<!-- QualityIssueDialog -->
|
|
|
<quality-issue-dialog
|
|
|
+ v-if="perm.LINK_ProblemSubmit"
|
|
|
v-model:visible="showQualityIssueDialog"
|
|
|
:sop="curSopData"
|
|
|
type="new"
|
|
@@ -149,6 +164,7 @@
|
|
|
></quality-issue-dialog>
|
|
|
<!-- PlanChangeDialog -->
|
|
|
<plan-change-dialog
|
|
|
+ v-if="perm.LINK_ProjectExchange"
|
|
|
v-model:visible="showPlanChangeDialog"
|
|
|
:sop="curSopData"
|
|
|
type="new"
|
|
@@ -156,13 +172,14 @@
|
|
|
></plan-change-dialog>
|
|
|
<!-- AddViolationDialog -->
|
|
|
<add-violation-dialog
|
|
|
+ v-if="perm.LINK_AddViolation"
|
|
|
v-model:visible="showAddViolationDialog"
|
|
|
:sop="curSopData"
|
|
|
></add-violation-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="jsx" name="OfficeSop">
|
|
|
+<script setup name="OfficeSop">
|
|
|
import { ref, reactive, computed } from 'vue';
|
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
|
import { sopListApi, sopBatchCancelApi } from '@/api/sop';
|
|
@@ -174,6 +191,8 @@ import QualityIssueDialog from '../quality-issue/quality-issue-dialog.vue';
|
|
|
import PlanChangeDialog from '../plan-change/plan-change-dialog.vue';
|
|
|
import AddViolationDialog from '../../sop-monitor/violation-registration/add-violation-dialog.vue';
|
|
|
import { useAppStore } from '@/store';
|
|
|
+import usePermission from '@/hooks/usePermission';
|
|
|
+const { perm } = usePermission();
|
|
|
|
|
|
const appStore = useAppStore();
|
|
|
|