Explorar el Código

reactor:甄别调整;

zhangchong hace 8 meses
padre
commit
0d84592fc9

+ 26 - 17
src/views/business/discern/components/Discern-detail.vue

@@ -61,6 +61,8 @@
 	<audit-record ref="auditRecordRef" />
 	<!--  流程审批  -->
 	<process-audit ref="processAuditRef" @orderProcessSuccess="orderProcessSuccess"></process-audit>
+	<!-- 甄别修改 -->
+	<discern-edit ref="discernEditRef" @updateList="orderProcessSuccess" />
 </template>
 <script setup lang="ts" name="discernDetail">
 import { defineAsyncComponent, reactive, ref } from 'vue';
@@ -72,6 +74,7 @@ import { transformFile } from '@/utils/tools';
 const AuditRecord = defineAsyncComponent(() => import('@/components/AuditRecord/index.vue')); // 流程明细
 const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue')); // 附件列表
 const ProcessAudit = defineAsyncComponent(() => import('@/components/ProcessAudit/index.vue')); // 流程审批
+const DiscernEdit = defineAsyncComponent(() => import('@/views/business/discern/components/Discern-edit.vue')); // 甄别修改
 
 const emit = defineEmits(['updateList']); // 定义事件
 // 定义变量内容
@@ -112,6 +115,7 @@ const processDetail = () => {
 };
 // 甄别审批
 const processAuditRef = ref<RefType>();
+const discernEditRef = ref<RefType>(); // 甄别修改ref
 const onAudit = () => {
 	try {
 		const orderDetail = {
@@ -121,6 +125,7 @@ const onAudit = () => {
 		let params = <EmptyObjectType>{};
 		switch (state.ruleForm.status) {
 			case 0: // 待办 申请甄别
+			case 1:// 审批中 甄别审批
 				params = {
 					id: state.ruleForm.workflowId,
 					commonEnum: commonEnum.Discriminate,
@@ -135,23 +140,6 @@ const onAudit = () => {
 				};
 				processAuditRef.value.openDialog(params);
 				break;
-			case 1: // 审批中 甄别审批
-				params = {
-					id: state.ruleForm.workflowId,
-					commonEnum: commonEnum.Discriminate,
-					processType: '甄别审批',
-					orderDetail,
-					extra: {
-						dialogTitle: '甄别审批',
-						inputPlaceholder: '审批意见',
-						annexName: '甄别附件',
-						classify: '甄别上传',
-					},
-				};
-				processAuditRef.value.openDialog(params);
-				break;
-			case 2: // 审批完成
-				break;
 			case 3: // 审批拒绝 重新申请
 				params = {
 					id: state.ruleForm.workflowId,
@@ -167,7 +155,28 @@ const onAudit = () => {
 				};
 				processAuditRef.value.openDialog(params);
 				break;
+			case 5: // 退回申请人 重新申请
+				if(state.ruleForm.sendBackApply){ // 退回到申请人 修改甄别
+					// 退回到了开始 需要重新打开编辑页面在发起流程
+					discernEditRef.value.openDialog(state.ruleForm);
+				}else{ // 审批
+					params = {
+						id: state.ruleForm.workflowId,
+						commonEnum: commonEnum.Discriminate,
+						processType: '甄别审批',
+						orderDetail,
+						extra: {
+							dialogTitle: '甄别审批',
+							inputPlaceholder: '审批意见',
+							annexName: '甄别附件',
+							classify: '甄别上传',
+						},
+					};
+					processAuditRef.value.openDialog(params);
+				}
+				break;
 			default:
+				break;
 		}
 	} catch (error) {
 		console.log(error);

+ 1 - 3
src/views/judicial/statistics/detailDepartment.vue

@@ -26,7 +26,7 @@
 </template>
 <script setup lang="tsx" name="judicialDetailDepartment">
 import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
-import { useRoute, useRouter } from 'vue-router';
+import { useRoute } from 'vue-router';
 import { formatDate } from '@/utils/formatTime';
 import { departmentStatisticsDetail, departmentStatisticsDetailExport } from '@/api/judicial';
 
@@ -46,9 +46,7 @@ const state = reactive<any>({
 	loading: false, // 加载
 	total: 0, // 总数
 });
-const ruleFormRef = ref<RefType>(); // 表单ref
 const route = useRoute(); // 路由
-const router = useRouter(); // 路由
 const proTableRef = ref<RefType>(); // 表格ref
 // 表格配置项
 const columns = ref<any[]>([

+ 1 - 0
tsconfig.json

@@ -10,6 +10,7 @@
 		// "allowJs": true,                       /* Allow javascript files to be compiled. */
 		// "checkJs": true,                       /* Report errors in .js files. */
 		"jsx": "preserve" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
+		"jsxImportSource": "vue",
 		"jsxFactory": "h",
 		"jsxFragmentFactory": "Fragment",
 		// "declaration": true /* Generates corresponding '.d.ts' file. */,