Merge pull request 'master' (#391) from master into prod

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/391
This commit is contained in:
2024-06-24 03:09:53 +00:00
3 changed files with 140 additions and 107 deletions

View File

@@ -1,160 +1,174 @@
import request from '@/utils/request.js' import request from '@/utils/request.js'
import axios from "axios";
import {getToken} from "@/utils/auth";
//项目立项 //项目立项
export const getApplyProcess = (projectId) => { export const getApplyProcess = (projectId) => {
return request({ return request({
url: `/workflow/mosr/project/approval/initiation/process/${projectId}`, url: `/workflow/mosr/project/approval/initiation/process/${projectId}`,
method: "get" method: "get"
}); });
}; };
export const projectApply = (data) => { export const projectApply = (data) => {
return request({ return request({
url: '/workflow/mosr/project/approval/initiation/apply', url: '/workflow/mosr/project/approval/initiation/apply',
method: "post", method: "post",
data: data data: data
}); });
}; };
export const getApplyDetail = (ProjectId) => { export const getApplyDetail = (ProjectId) => {
return request({ return request({
url: `/workflow/mosr/project/approval/info/${ProjectId}`, url: `/workflow/mosr/project/approval/info/${ProjectId}`,
method: "get" method: "get"
}); });
}; };
export const resubmitApply = (data) => { export const resubmitApply = (data) => {
return request({ return request({
url: '/workflow/mosr/project/approval/initiation/resubmit', url: '/workflow/mosr/project/approval/initiation/resubmit',
method: "post", method: "post",
data: data data: data
}); });
}; };
export const getInitiationAttachment = (params) => { export const getInitiationAttachment = (params) => {
return request({ return request({
url: '/workflow/mosr/project/approval/attachments', url: '/workflow/mosr/project/approval/attachments',
method: "get", method: "get",
params:params params: params
}); });
}; };
//项目实施 //项目实施
export const getCheckDetail = (projectId) => { export const getCheckDetail = (projectId) => {
return request({ return request({
url: `/workflow/mosr/project/implementation/info/${projectId}`, url: `/workflow/mosr/project/implementation/info/${projectId}`,
method: "get" method: "get"
}); });
}; };
export const resubmitCheck = (data) => { export const resubmitCheck = (data) => {
return request({ return request({
url: '/workflow/mosr/project/implementation/resubmit', url: '/workflow/mosr/project/implementation/resubmit',
method: "post", method: "post",
data: data data: data
}); });
}; };
export const projectCheck = (data) => { export const projectCheck = (data) => {
return request({ return request({
url: '/workflow/mosr/project/implementation/initiation/check', url: '/workflow/mosr/project/implementation/initiation/check',
method: "post", method: "post",
data: data data: data
}); });
}; };
export const getProjectCheckProcess = (projectId) => { export const getProjectCheckProcess = (projectId) => {
return request({ return request({
url: `/workflow/mosr/project/implementation/process/${projectId}`, url: `/workflow/mosr/project/implementation/process/${projectId}`,
method: "get" method: "get"
}); });
}; };
export const addLedger = (data) => { export const addLedger = (data) => {
return request({ return request({
url: '/workflow/mosr/expense/ledger', url: '/workflow/mosr/expense/ledger',
method: "post", method: "post",
data: data data: data
}); });
}; };
export const getTags = (projectId) => { export const getTags = (projectId) => {
return request({ return request({
url: `/workflow/mosr/attachment/option/${projectId}`, url: `/workflow/mosr/attachment/option/${projectId}`,
method: "get" method: "get"
}); });
}; };
export const getPhaseProcess = () => { export const getPhaseProcess = () => {
return request({ return request({
url: '/workflow/phase/change/process', url: '/workflow/phase/change/process',
method: "get" method: "get"
}); });
}; };
export const submitPhaseChange = (data) => { export const submitPhaseChange = (data) => {
return request({ return request({
url: '/workflow/phase/change', url: '/workflow/phase/change',
method: "post", method: "post",
data: data data: data
}); });
}; };
export const getPhaseDetail = (projectId) => { export const getPhaseDetail = (projectId) => {
return request({ return request({
url: `/workflow/phase/change/info/${projectId}`, url: `/workflow/phase/change/info/${projectId}`,
method: "get" method: "get"
}); });
}; };
export const getPhaseForm = (projectId) => { export const getPhaseForm = (projectId) => {
return request({ return request({
url: `/workflow/phase/change/from/${projectId}`, url: `/workflow/phase/change/from/${projectId}`,
method: "get" method: "get"
}); });
}; };
export const resubmitPhaseForm = (data) => { export const resubmitPhaseForm = (data) => {
return request({ return request({
url: '/workflow/phase/change/resubmit', url: '/workflow/phase/change/resubmit',
method: "post", method: "post",
data: data data: data
}); });
}; };
//项目归档 //项目归档
export const getConclusionDetail = (ProjectId) => { export const getConclusionDetail = (ProjectId) => {
return request({ return request({
url: `/workflow/mosr/project/filing/info/${ProjectId}`, url: `/workflow/mosr/project/filing/info/${ProjectId}`,
method: "get" method: "get"
}); });
}; };
export const resubmitConclusion = (data) => { export const resubmitConclusion = (data) => {
return request({ return request({
url: '/workflow/mosr/project/filing/resubmit', url: '/workflow/mosr/project/filing/resubmit',
method: "post", method: "post",
data: data data: data
}); });
}; };
export const projectConclusion = (data) => { export const projectConclusion = (data) => {
return request({ return request({
url: '/workflow/mosr/project/filing/project/entry', url: '/workflow/mosr/project/filing/project/entry',
method: "post", method: "post",
data: data data: data
}); });
}; };
export const getProjectConclusionProcess = () => { export const getProjectConclusionProcess = () => {
return request({ return request({
url: '/workflow/mosr/project/filing/process', url: '/workflow/mosr/project/filing/process',
method: "get" method: "get"
}); });
}; };
//获取前置流程 //获取前置流程
export const getPreProcess= () => { export const getPreProcess = () => {
return request({ return request({
url: '/workflow/details/pre/process', url: '/workflow/details/pre/process',
method: "get" method: "get"
}); });
}; };
export const updateLedger = (data) => { export const updateLedger = (data) => {
return request({ return request({
url: '/workflow/mosr/expense/ledger/replenishment', url: '/workflow/mosr/expense/ledger/replenishment',
method: "post", method: "post",
data: data data: data
}); });
}; };
export const searchUpdateLedgerData = (projectId) => { export const searchUpdateLedgerData = (projectId) => {
return request({ return request({
url: `/workflow/mosr/expense/ledger/${projectId}`, url: `/workflow/mosr/expense/ledger/${projectId}`,
method: "get" method: "get"
}); });
};
export const exportExcel = (data) => {
return axios.post(
`${import.meta.env.VITE_BASE_URL}/workflow/mosr/project/implementation/export`,
data, {
responseType: 'blob',
headers: {
Authorization: getToken()
}
}
);
}; };

View File

@@ -2,6 +2,7 @@
<baseTitle title="基础信息"></baseTitle> <baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm> <fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm> <fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
<el-button @click="exportExcelHandler">导出</el-button>
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"> <fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
<template #empty> <template #empty>
<el-empty description="暂无数据"/> <el-empty description="暂无数据"/>
@@ -13,8 +14,7 @@
import fvSelect from '@/fvcomponents/fvSelect/index.vue' import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {toThousands} from '@/utils/changePrice.js' import {toThousands} from '@/utils/changePrice.js'
import {getBaseInfoApi} from "@/components/steps/api"; import {getBaseInfoApi} from "@/components/steps/api";
import {searchUpdateLedgerData} from "@/api/project-manage"; import {searchUpdateLedgerData,exportExcel} from "@/api/project-manage";
import {ElNotification} from "element-plus";
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
@@ -270,6 +270,25 @@ const handleUploadFee = () => {
}) })
} }
const exportExcelHandler = () => {
let data = {
projectId: 113
}
exportExcel(data).then(res => {
console.log(res)
let reg = /filename=([^&]+)/;
let contentDisposition = decodeURI(res.headers['content-disposition'])
let result = reg.exec(contentDisposition)
let fileName = result[1]
fileName = fileName.replace(/\"/g, '')
const blob = new Blob([res.data])
let a = document.createElement('a')
a.href = URL.createObjectURL(blob)
a.download = fileName
a.click()
})
}
const search = (val) => { const search = (val) => {
tableConfig.params = {...val, projectId: route.query.id} tableConfig.params = {...val, projectId: route.query.id}
tableIns.value.refresh() tableIns.value.refresh()

View File

@@ -199,7 +199,7 @@ const showUserPicker = () => {
radio.value = 0; radio.value = 0;
visible.value = true; visible.value = true;
expandedKeys.value = []; expandedKeys.value = [];
filterText.value='' filterText.value = ''
getList(); getList();
}; };
const handleChange = (item, data) => { const handleChange = (item, data) => {