|
@@ -4,41 +4,64 @@
|
|
|
class="message-item cursor-pointer"
|
|
|
v-for="item in tableData"
|
|
|
:key="item.id"
|
|
|
-
|
|
|
>
|
|
|
- <div class="m-head">
|
|
|
- <div
|
|
|
- class="m-title flex items-center"
|
|
|
- style="max-width: calc(100% - 180px)"
|
|
|
- >
|
|
|
- <t-link hover="color" @click="editSopFlowHandle(item)">
|
|
|
- <span>{{ messageTypeFilter(item.messageType) }}</span>
|
|
|
-<!-- <span class="ellipsis">{{ item.content }}</span>-->
|
|
|
-
|
|
|
- </t-link>
|
|
|
- <t-tag
|
|
|
- theme="danger"
|
|
|
- variant="light"
|
|
|
- size="small"
|
|
|
- v-if="!item.readStatus"
|
|
|
- >未读</t-tag
|
|
|
+ <template v-if="IS_CYTX(item)">
|
|
|
+ <div class="m-head">
|
|
|
+ <div class="cytx m-title flex items-center">
|
|
|
+ <span>查阅提醒</span>
|
|
|
+ <t-tag
|
|
|
+ theme="danger"
|
|
|
+ variant="light"
|
|
|
+ size="small"
|
|
|
+ v-if="!item.readStatus"
|
|
|
+ >未读</t-tag
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="m-body m-t-10px">
|
|
|
+ <div class="m-content">{{ item.content }}</div>
|
|
|
+ <t-space class="m-info" :size="5">
|
|
|
+ <p>查阅流程:{{ item.setupName }} </p>
|
|
|
+ <p>客户类型:{{ customerTypeFilter(item.customType) }}</p>
|
|
|
+ <template #separator>
|
|
|
+ <t-divider layout="vertical" />
|
|
|
+ </template>
|
|
|
+ </t-space>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="m-head">
|
|
|
+ <div
|
|
|
+ class="m-title flex items-center"
|
|
|
+ style="max-width: calc(100% - 180px)"
|
|
|
>
|
|
|
+ <t-link hover="color" @click="editSopFlowHandle(item)">
|
|
|
+ <span>{{ messageTypeFilter(item.messageType) }}</span>
|
|
|
+ </t-link>
|
|
|
+ <t-tag
|
|
|
+ theme="danger"
|
|
|
+ variant="light"
|
|
|
+ size="small"
|
|
|
+ v-if="!item.readStatus"
|
|
|
+ >未读</t-tag
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="m-time">{{ timestampFilter(item.sendTime, 'mm') }}</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="m-time">{{ timestampFilter(item.sendTime, 'mm') }}</div>
|
|
|
- </div>
|
|
|
- <div class="m-body m-t-10px" @click="open(item)">
|
|
|
- <div class="m-content">{{ item.content }}</div>
|
|
|
- <t-space class="m-info" :size="5">
|
|
|
- <p>发起人:{{ item.formUser }}</p>
|
|
|
- <p>服务单元:{{ item.service }} </p>
|
|
|
- <p>客户类型:{{ customerTypeFilter(item.customType) }}</p>
|
|
|
- <p>客户名称:{{ item.custom }}</p>
|
|
|
- <template #separator>
|
|
|
- <t-divider layout="vertical" />
|
|
|
- </template>
|
|
|
- </t-space>
|
|
|
- </div>
|
|
|
+ <div class="m-body m-t-10px" @click="open(item)">
|
|
|
+ <div class="m-content">{{ item.content }}</div>
|
|
|
+ <t-space class="m-info" :size="5">
|
|
|
+ <p>发起人:{{ item.formUser }}</p>
|
|
|
+ <p>服务单元:{{ item.service }} </p>
|
|
|
+ <p>客户类型:{{ customerTypeFilter(item.customType) }}</p>
|
|
|
+ <p>客户名称:{{ item.custom }}</p>
|
|
|
+ <template #separator>
|
|
|
+ <t-divider layout="vertical" />
|
|
|
+ </template>
|
|
|
+ </t-space>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
|
|
|
<t-pagination
|
|
@@ -59,45 +82,52 @@
|
|
|
|
|
|
<!-- SopStepDialog -->
|
|
|
<sop-step-dialog
|
|
|
- v-model:visible="showSopStepDialog"
|
|
|
- :sop="curSopData"
|
|
|
- type="fill"
|
|
|
- @confirm="sopStepConfirm"
|
|
|
+ v-model:visible="showSopStepDialog"
|
|
|
+ :sop="curSopData"
|
|
|
+ type="fill"
|
|
|
+ @confirm="sopStepConfirm"
|
|
|
></sop-step-dialog>
|
|
|
<!-- PlanChangeDialog -->
|
|
|
<plan-change-dialog
|
|
|
- v-model:visible="showPlanChangeDialog"
|
|
|
- :sop="curSopData"
|
|
|
- type="fill"
|
|
|
- @confirm="sopStepConfirm"
|
|
|
+ v-model:visible="showPlanChangeDialog"
|
|
|
+ :sop="curSopData"
|
|
|
+ type="fill"
|
|
|
+ @confirm="sopStepConfirm"
|
|
|
></plan-change-dialog>
|
|
|
<!-- QualityIssueDialog -->
|
|
|
<quality-issue-dialog
|
|
|
- v-model:visible="showQualityIssueDialog"
|
|
|
- :sop="curSopData"
|
|
|
- type="fill"
|
|
|
- @confirm="sopStepConfirm"
|
|
|
+ v-model:visible="showQualityIssueDialog"
|
|
|
+ :sop="curSopData"
|
|
|
+ type="fill"
|
|
|
+ @confirm="sopStepConfirm"
|
|
|
></quality-issue-dialog>
|
|
|
<violation-flow-dialog
|
|
|
- v-model:visible="showViolationFlowDialog"
|
|
|
- :curRow="curSopData"
|
|
|
- @confirm="sopStepConfirm"
|
|
|
+ v-model:visible="showViolationFlowDialog"
|
|
|
+ :curRow="curSopData"
|
|
|
+ @confirm="sopStepConfirm"
|
|
|
></violation-flow-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="MessageList">
|
|
|
-import {timestampFilter, customerTypeFilter, messageTypeFilter} from '@/utils/filter';
|
|
|
-import QualityIssueDialog from "@/views/sop/sop-manage/quality-issue/quality-issue-dialog.vue";
|
|
|
-import SopStepDialog from "@/views/sop/sop-manage/sop-step/sop-step-dialog.vue";
|
|
|
-import AbnormalAudit from "@/views/work-hours/work-hours-manage/abnormal-check/abnormal-audit.vue";
|
|
|
-import PlanChangeDialog from "@/views/sop/sop-manage/plan-change/plan-change-dialog.vue";
|
|
|
-import {reactive, ref} from "vue";
|
|
|
-import {MessagePlugin} from "tdesign-vue-next";
|
|
|
-import ViolationFlowDialog from "@/views/sop/sop-monitor/violation-registration/flow-dialog.vue";
|
|
|
-import {getViolationBy, setMyMessagesRead} from "@/api/my-workbenches";
|
|
|
-import {sopListApi} from "@/api/sop";
|
|
|
-
|
|
|
+import {
|
|
|
+ timestampFilter,
|
|
|
+ customerTypeFilter,
|
|
|
+ messageTypeFilter,
|
|
|
+} from '@/utils/filter';
|
|
|
+import QualityIssueDialog from '@/views/sop/sop-manage/quality-issue/quality-issue-dialog.vue';
|
|
|
+import SopStepDialog from '@/views/sop/sop-manage/sop-step/sop-step-dialog.vue';
|
|
|
+import AbnormalAudit from '@/views/work-hours/work-hours-manage/abnormal-check/abnormal-audit.vue';
|
|
|
+import PlanChangeDialog from '@/views/sop/sop-manage/plan-change/plan-change-dialog.vue';
|
|
|
+import { reactive, ref, computed } from 'vue';
|
|
|
+import { MessagePlugin } from 'tdesign-vue-next';
|
|
|
+import ViolationFlowDialog from '@/views/sop/sop-monitor/violation-registration/flow-dialog.vue';
|
|
|
+import { getViolationBy, setMyMessagesRead } from '@/api/my-workbenches';
|
|
|
+import { sopListApi } from '@/api/sop';
|
|
|
+
|
|
|
+const IS_CYTX = (item) => {
|
|
|
+ return ['OFFICE_SOP', 'CLOUD_MARK_SOP'].includes(item.messageType);
|
|
|
+};
|
|
|
const { tableData, pagination, onChange } = defineProps([
|
|
|
'tableData',
|
|
|
'pagination',
|
|
@@ -114,38 +144,35 @@ const showViolationFlowDialog = ref(false);
|
|
|
const curSopData = ref({});
|
|
|
const curRow = ref({});
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
const editSopFlowHandle = (row) => {
|
|
|
curRow.value = row;
|
|
|
if (row.messageType === 'AFTER' || row.messageType === 'BEFORE') {
|
|
|
const params = reactive({
|
|
|
pageNumber: 1,
|
|
|
pageSize: 10,
|
|
|
- serviceId: "",
|
|
|
+ serviceId: '',
|
|
|
formWidgetMetadataViewList: [],
|
|
|
- formWidgetMetadataConditionList: [{fieldId: "sopNo", operator: "EQ", fieldValue: row.code}],
|
|
|
- type: row.objType
|
|
|
+ formWidgetMetadataConditionList: [
|
|
|
+ { fieldId: 'sopNo', operator: 'EQ', fieldValue: row.code },
|
|
|
+ ],
|
|
|
+ type: row.objType,
|
|
|
});
|
|
|
- sopListApi(params).then(res => {
|
|
|
+ sopListApi(params).then((res) => {
|
|
|
if (res.records.length) {
|
|
|
curSopData.value = res.records[0];
|
|
|
showSopStepDialog.value = true;
|
|
|
} else {
|
|
|
MessagePlugin.error('未找到对应的SOP');
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
if (row.messageType === 'VIOLATION') {
|
|
|
- getViolationBy(row.code)
|
|
|
- .then(res=>{
|
|
|
- curSopData.value = res;
|
|
|
- showViolationFlowDialog.value = true;
|
|
|
- })
|
|
|
+ getViolationBy(row.code).then((res) => {
|
|
|
+ curSopData.value = res;
|
|
|
+ showViolationFlowDialog.value = true;
|
|
|
+ });
|
|
|
return;
|
|
|
}
|
|
|
// if (row.messageType === 'SYSTEM_PLAN_CHANGE') {
|
|
@@ -158,7 +185,6 @@ const editSopFlowHandle = (row) => {
|
|
|
// return;
|
|
|
// }
|
|
|
|
|
|
-
|
|
|
MessagePlugin.error('未知类型待办');
|
|
|
};
|
|
|
const sopStepConfirm = () => {
|