|
@@ -14,10 +14,16 @@
|
|
|
<template v-else>
|
|
|
<a-tabs centered>
|
|
|
<a-tab-pane key="1" :tab="basicTabText">
|
|
|
+ <a-alert
|
|
|
+ v-if="(formModel as any).progress === -1 && !isReviewer && !isAdmin"
|
|
|
+ message="提示:您的信息已被审核退回,请根据审核建议修改后重新提交。"
|
|
|
+ :description="(formModel as any).comment"
|
|
|
+ showIcon
|
|
|
+ ></a-alert>
|
|
|
<DynamicForm
|
|
|
ref="formBase"
|
|
|
:model="(formModel as any)"
|
|
|
- :options="formOptions"
|
|
|
+ :options="finalFormOptions"
|
|
|
/>
|
|
|
<div class="d-flex flex-column mt-3">
|
|
|
<div class="d-flex flex-row w-100 align-items-center justify-content-between">
|
|
@@ -29,6 +35,7 @@
|
|
|
</div>
|
|
|
<div class="d-flex flex-row w-100 align-items-center justify-content-end mt-3">
|
|
|
<a-popover
|
|
|
+ v-if="!isReviewer"
|
|
|
title="保存提示"
|
|
|
content="如果未完成编辑,可以先点击保存按钮保存修改,完成后再点击提交审核。您可以在历史版本中查看之前的修改。"
|
|
|
>
|
|
@@ -172,6 +179,10 @@ const props = defineProps({
|
|
|
type: Function as PropType<(model: U) => Promise<DataModel>>,
|
|
|
default: (a: any) => Promise.resolve(a)
|
|
|
},
|
|
|
+ pushExamine: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
})
|
|
|
|
|
|
const { formModel, formOptions, extendFormOptions, load } = toRefs(props);
|
|
@@ -188,10 +199,108 @@ const showHistory = ref(false);
|
|
|
const showHistoryLoading = ref(false);
|
|
|
const showHistoryModel = ref<any>(null);
|
|
|
|
|
|
-watch(readonly, (newValue) => {
|
|
|
- formOptions.value.disabled = newValue;
|
|
|
- extendFormOptions.value.disabled = newValue;
|
|
|
-})
|
|
|
+const isAdmin = computed(() => {
|
|
|
+ return authStore.loginType === 1;
|
|
|
+});
|
|
|
+const isReviewer = computed(() => {
|
|
|
+ return authStore.userInfo?.isReviewer ?? false;
|
|
|
+});
|
|
|
+const finalFormOptions = computed(() => {
|
|
|
+
|
|
|
+ return {
|
|
|
+ ...formOptions.value,
|
|
|
+ formItems: [
|
|
|
+ ...formOptions.value.formItems,
|
|
|
+ ...(props.pushExamine ? [
|
|
|
+ {
|
|
|
+ type: 'group-flat', label: '审核', name: 'ichInfo',
|
|
|
+ childrenColProps: { span: 24 },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ label: '审核人员', name: 'text1', type: 'static-text',
|
|
|
+ hidden: { callback: (_: any, model: any) => isAdmin.value || isReviewer.value },
|
|
|
+ additionalProps: {
|
|
|
+ text: '黄念旭,李向群,卢志明',
|
|
|
+ style: { color: '#999', }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '审核状态', name: 'text2', type: 'static-text',
|
|
|
+ hidden: { callback: (_: any, model: any) => isAdmin.value || isReviewer.value },
|
|
|
+ additionalProps: {
|
|
|
+ text: '暂未审核',
|
|
|
+ style: { color: '#999', }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '填报人', name: 'text3', type: 'static-text',
|
|
|
+ hidden: { callback: (_: any, model: any) => !(!isAdmin.value && !isReviewer.value) },
|
|
|
+ additionalProps: {
|
|
|
+ text: authStore.userInfo?.nickname,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /* {
|
|
|
+ label: '填报人', name: 'text3', type: 'static-text',
|
|
|
+ hidden: { callback: (_: any, model: any) => !(isAdmin.value || isReviewer.value) },
|
|
|
+ additionalProps: {
|
|
|
+ text: authStore.userInfo?.nickname,
|
|
|
+ }
|
|
|
+ }, */
|
|
|
+ {
|
|
|
+ label: '初审状态', name: 'progress', type: 'select',
|
|
|
+ hidden: { callback: (_: any, model: any) => !(!isReviewer.value) },
|
|
|
+ additionalProps: {
|
|
|
+ options: [
|
|
|
+ { text: '保存未审核', value: -2, disabled: true },
|
|
|
+ { text: '审核退回', value: -1 },
|
|
|
+ { text: '暂未审核', value: 0 },
|
|
|
+ { text: '初审通过', value: 1 },
|
|
|
+ { text: '专家审核通过', value: 2, disabled: true },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '审核状态', name: 'progress', type: 'select',
|
|
|
+ hidden: { callback: (_: any, model: any) => !(isReviewer.value) },
|
|
|
+ additionalProps: {
|
|
|
+ options: [
|
|
|
+ { text: '未审核', value: -2, disabled: true },
|
|
|
+ { text: '审核退回', value: -1 },
|
|
|
+ { text: '未审核', value: 0, disabled: true },
|
|
|
+ { text: '未审核', value: 1, disabled: true },
|
|
|
+ { text: '通过审核', value: 2 },
|
|
|
+ ],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '审核状态', name: 'progress', type: 'select',
|
|
|
+ hidden: { callback: (_: any, model: any) => isAdmin.value || isReviewer.value },
|
|
|
+ disabled: true,
|
|
|
+ additionalProps: {
|
|
|
+ options: [
|
|
|
+ { text: '保存未审核', value: -2 },
|
|
|
+ { text: '审核退回', value: -1 },
|
|
|
+ { text: '暂未审核', value: 0 },
|
|
|
+ { text: '初审通过', value: 1 },
|
|
|
+ { text: '审核员通过', value: 2 },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '审核意见', name: 'comment', type: 'text-area',
|
|
|
+ disabled: { callback: (_: any, model: any) => !isAdmin.value },
|
|
|
+ additionalProps: {
|
|
|
+ placeholder: { callback: (_: any, model: any) => (isAdmin.value || isReviewer.value) ? '若审核不通过,请输入审核意见' : '暂无审核意见' },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ] : [])
|
|
|
+ ],
|
|
|
+ disabled: readonly.value,
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
|
|
|
useWindowOnUnLoadConfirm();
|
|
|
|