催办接口完成
This commit is contained in:
@@ -44,3 +44,11 @@ export function useAiAnalysisApi(id: number, stepId: number, params: {action: st
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 催办
|
||||
export function urgeApi(id: number) {
|
||||
return request({
|
||||
url: `/api/changes/${id}/urge`,
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { tagTextColor, tagBgColor, tagBorderColor, getTimeRangeStamp, formatTime
|
||||
import { systemConfigApi } from '@/service/api/system';
|
||||
import { orgListApi } from '@/service/api/user';
|
||||
import { changeLedgerListApi } from '@/service/api/changeLedger';
|
||||
import { urgeApi } from '@/service/api/change';
|
||||
|
||||
const { routerPushByKey } = useRouterPush();
|
||||
const themeStore = useThemeStore();
|
||||
@@ -237,8 +238,13 @@ const downloadFiles = (r:any,type:string) => {
|
||||
}
|
||||
|
||||
// 催办
|
||||
const urge = (r:any) => {
|
||||
window.$message?.info('还差接口');
|
||||
const urge = async (r:any) => {
|
||||
loading.value = true;
|
||||
const {error} = await urgeApi(r.id);
|
||||
if(!error){
|
||||
window.$message?.success('催办成功');
|
||||
}
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
// 分页改变
|
||||
@@ -478,7 +484,7 @@ onMounted(async () => {
|
||||
<!-- 已关闭 -->
|
||||
<NButton v-if="r.status==='CLOSED'" size="small" ghost type="success" class="text-xs" @click="downloadFiles(r,'closed')">下载归档包</NButton>
|
||||
<!-- 催办(超期) -->
|
||||
<NButton v-if="r.overdue_days" size="small" ghost type="error" class="text-xs" @click="urge(r)">催办</NButton>
|
||||
<NButton v-if="r.overdue_days && r.status!=='CLOSED' && r.status!=='WITHDRAWN' && r.status!=='REJECTED'" size="small" ghost type="error" :disabled="loading" class="text-xs" @click="urge(r)">催办</NButton>
|
||||
<NButton size="small" type="primary" class="text-xs" @click="jumpTo(r)">详情</NButton>
|
||||
<NButton size="small" type="default" class="text-xs" @click="openProgress(r)">进度</NButton>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useRoute } from 'vue-router';
|
||||
import { getColorWithOpacity, tagTextColor, tagBgColor, tagBorderColor, formatTimestamp } from '@/utils/common';
|
||||
import { AiError, aiTypeJudge } from "@/service/api/ai";
|
||||
import { systemConfigApi } from '@/service/api/system';
|
||||
import { getChangeDetailApi } from '@/service/api/change';
|
||||
import { getChangeDetailApi, urgeApi } from '@/service/api/change';
|
||||
import { myTasksDisposalSubmitApi, myTasksAddItemApi } from '@/service/api/myTasks';
|
||||
import previewComponent from '@/components/previewFile/index.vue'
|
||||
|
||||
@@ -225,9 +225,14 @@ const openPreview = (file:any) => {
|
||||
}
|
||||
|
||||
// 催办
|
||||
const handleReminder = (m: any) => {
|
||||
window.$message?.info('还差接口')
|
||||
window.$message?.success(`已催办 ${m.user_name}(系统消息 + 企业微信 + 短信),连续 2 次未响应将上报部门负责人`)
|
||||
const handleReminder = async (m: any) => {
|
||||
if(loading.value) return;
|
||||
loading.value = true;
|
||||
const {error} = await urgeApi(currentId.value);
|
||||
if(!error){
|
||||
window.$message?.success('催办成功');
|
||||
}
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
// 更新选中审批人 user_id
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useRoute } from 'vue-router';
|
||||
import { tagTextColor, tagBgColor, tagBorderColor, downloadFileFun } from '@/utils/common';
|
||||
import { AiError, aiTypeJudge } from "@/service/api/ai";
|
||||
import { systemConfigApi } from '@/service/api/system';
|
||||
import { getChangeDetailApi } from '@/service/api/change';
|
||||
import { getChangeDetailApi, urgeApi } from '@/service/api/change';
|
||||
import previewComponent from '@/components/previewFile/index.vue'
|
||||
|
||||
const themeStore = useThemeStore();
|
||||
@@ -197,9 +197,14 @@ const openPreview = (file:any) => {
|
||||
}
|
||||
|
||||
// 催办
|
||||
const handleReminder = (m: any) => {
|
||||
window.$message?.info('还差接口')
|
||||
window.$message?.success(`已催办 ${m.user_name}(系统消息 + 企业微信 + 短信),连续 2 次未响应将上报部门负责人`)
|
||||
const handleReminder = async (m: any) => {
|
||||
if(loading.value) return;
|
||||
loading.value = true;
|
||||
const {error} = await urgeApi(currentId.value);
|
||||
if(!error){
|
||||
window.$message?.success('催办成功');
|
||||
}
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
// 匹配评分依据
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!-- PSSR监督 -->
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { Icon } from '@iconify/vue'
|
||||
@@ -146,7 +147,6 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<NSpace vertical :size="16">
|
||||
<!-- PSSR监督 -->
|
||||
<NSpin :show="loading" size="small">
|
||||
<NCard :bordered="false" size="small" :style="{ borderRadius: themeStore.themeRadius + 'px' }">
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user