Merge pull request 'dj' (#257) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/257
This commit is contained in:
2024-05-31 12:57:30 +00:00
32 changed files with 545 additions and 162 deletions

View File

@@ -13,3 +13,9 @@ export const getAllocationDetail = (allocationId) => {
method: "get" method: "get"
}); });
}; };
export const getAllocationProcess = () => {
return request({
url: '/workflow/mosr/cost/allocation/process',
method: "get"
});
};

View File

@@ -79,7 +79,7 @@ export const addLedger = (data) => {
export const getTags = (projectId) => { export const getTags = (projectId) => {
return request({ return request({
url: '/workflow/mosr/project/implementation/tags', url: '/workflow/mosr/project/implementation/option',
method: "get", method: "get",
params:{ params:{
projectId:projectId projectId:projectId

View File

@@ -1,11 +1,29 @@
import request from '@/utils/request.js' import request from '@/utils/request.js'
export const getFundDetail = (specialFundId) => { export const getFundDetail = (specialFundId) => {
return request({
url: `/workflow/mosr/special/fund/from/${specialFundId}`,
method: "get"
});
};
export const getFundDetailProcess = (specialFundId) => {
return request({ return request({
url: `/workflow/mosr/special/fund/info/${specialFundId}`, url: `/workflow/mosr/special/fund/info/${specialFundId}`,
method: "get" method: "get"
}); });
}; };
export const getFundOption = () => {
return request({
url: '/workflow/mosr/special/fund/option',
method: "get"
});
};
export const getFundProcess = (specialFundId) => {
return request({
url: '/workflow/mosr/special/fund/process',
method: "get"
});
};
export const addFund= (data) => { export const addFund= (data) => {
return request({ return request({
url: '/workflow/mosr/special/fund', url: '/workflow/mosr/special/fund',

View File

@@ -110,19 +110,20 @@ watch(() => props.showTable, (newVal) => {
props.showTable = newVal props.showTable = newVal
}, {deep: true}) }, {deep: true})
watch(() => props.otherFileList, (newVal) => { watch(() => props.otherFileList, (newVal) => {
newVal.forEach(item => { console.log('new',newVal)
allFileList.value.push(item) // newVal?.forEach(item => {
}) allFileList.value=newVal
// })
}, {deep: true}) }, {deep: true})
watch(() => props.formData.fileList, (newVal) => { watch(() => props.formData.fileList, (newVal) => {
if (props.preview) { if (props.preview) {
newVal.forEach(item => { newVal?.forEach(item => {
allFileList.value.push(item) allFileList.value.push(item)
}) })
} }
}, {deep: true}) }, {deep: true})
watch(() => props.formData.singleFile, (newVal) => { watch(() => props.formData.singleFile, (newVal) => {
// singleFile.value = {} console.log('singleFile',newVal)
singleFile.value = newVal singleFile.value = newVal
}, {deep: true}) }, {deep: true})
const getAttachment = (val) => { const getAttachment = (val) => {

View File

@@ -2,16 +2,16 @@
<div v-loading="loading"> <div v-loading="loading">
<el-form :model="formData" ref="form" class="query-form" label-width="auto"> <el-form :model="formData" ref="form" class="query-form" label-width="auto">
<el-row> <el-row>
<el-col :span="12"> <!-- <el-col :span="12">-->
<el-form-item label="分摊名称"> <!-- <el-form-item label="分摊名称">-->
<span>{{ formData.shareName }}</span> <!-- <span>{{ formData.shareName }}</span>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="12"> <!-- <el-col :span="12">-->
<el-form-item label="分摊月份"> <!-- <el-form-item label="分摊月份">-->
<span>{{ formData.apportionmentMonth }}</span> <!-- <span>{{ formData.apportionmentMonth }}</span>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="24"> <el-col :span="24">
<el-form-item> <el-form-item>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm> <fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>

View File

@@ -37,7 +37,8 @@ const schema = computed(() => {
props: { props: {
placeholder: '请输入审核意见', placeholder: '请输入审核意见',
type: 'textarea', type: 'textarea',
maxlength: 140 // maxlength: 140,
rows:3
} }
} }
] ]
@@ -59,6 +60,12 @@ const back = () => {
case 'Requirement/detail': case 'Requirement/detail':
router.push({name: 'Requirement'}) router.push({name: 'Requirement'})
break; break;
case 'Fund/detail':
router.push({name: 'Fund'})
break;
case 'Share/detail':
router.push({name: 'Expense/share'})
break;
} }
} }
// 驳回 // 驳回

View File

@@ -0,0 +1,118 @@
<template>
<baseTitle title="标签名称"></baseTitle>
<el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
<el-form-item label="标签名称" prop="tagName">
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 400px" v-if="showInput"/>
<el-select v-model="formData.tagName" placeholder="请选择标签" clearable filterable style="width: 200px" v-else>
<el-option
v-for="item in tagsOption"
:key="item.label"
:label="item.value"
:value="item.label"
/>
</el-select>
</el-form-item>
</el-form>
<baseTitle title="其他文件"></baseTitle>
<el-card style="width: 100%;margin: 15px 0">
<file-upload @getFile="getFiles"/>
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
:data="fileList" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
</template>
</fvTable>
</el-card>
<div class="oper-page-btn">
<el-button color="#DED0B2" @click="handleSubmit(tagForm)">提交</el-button>
</div>
</template>
<script setup lang="jsx">
const props = defineProps({
tagsOption: {
type: Array,
default: []
}, formData: {
type: Array,
default: []
}, showInput: {
type: Boolean,
default: false
},
})
const rules = reactive({
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
})
const tagForm = ref()
const showTable = ref(true)
const emits = defineEmits(['getFile'])
const fileList = ref([])
const tableConfig = reactive({
columns: [
{
prop: 'index',
type: 'index',
label: '序号',
align: 'center',
width: '80',
},
{
prop: 'originalFileName',
label: '附件名称',
align: 'center',
},
{
prop: 'tag',
label: '标签',
align: 'center'
},
{
prop: 'tag',
label: '文件大小',
align: 'center'
},
{
prop: 'oper',
label: '操作',
align: 'center',
currentRender: ({row, index}) => {
return (
<div>
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
</div>
)
}
}
]
})
const compositeParam = (item) => {
return {
fileId: item.id,
size: item.size,
originalFileName: item.originalFilename,
fileType: item.fileType,
url: item.url,
tag: formData.value.tagName,
}
}
const getFiles = (val) => {
showTable.value = false
let fileObj = compositeParam(val)
// emit("getFile", fileObj)
fileList.value.push(fileObj)
nextTick(() => {
showTable.value = true
})
}
watch(() => fileList.value, (val) => {
fileList.value = val
})
defineExpose({
fileList
})
</script>
<style scoped>
</style>

View File

@@ -74,7 +74,7 @@ const props = defineProps({
}, },
height:{ height:{
type: Number, type: Number,
default: 450 default: 650
} }
}) })
const content = ref(props.value); const content = ref(props.value);

View File

@@ -113,6 +113,10 @@
<div style="width:100%;text-align: center;padding: 10px"> <div style="width:100%;text-align: center;padding: 10px">
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button> <el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
</div> </div>
<div class="approval-record">
<baseTitle title="流程"></baseTitle>
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
</div>
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button color="#DED0B2" @click="handleSubmit(form)">提交</el-button> <el-button color="#DED0B2" @click="handleSubmit(form)">提交</el-button>
<el-button @click="handleBack">返回</el-button> <el-button @click="handleBack">返回</el-button>
@@ -123,12 +127,17 @@
<script setup lang="jsx"> <script setup lang="jsx">
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
import {addAllocation, getAllocationDetail} from "@/api/expense-manage"; import {addAllocation, getAllocationDetail,getAllocationProcess} from "@/api/expense-manage";
import {useProcessStore} from '@/stores/processStore.js';
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
const rules = reactive({ const rules = reactive({
shareName: [{required: true, message: '请输入分摊名称', trigger: 'blur'}], shareName: [{required: true, message: '请输入分摊名称', trigger: 'blur'}],
apportionmentMonth: [{required: true, message: '请选择月份', trigger: 'blur'}] apportionmentMonth: [{required: true, message: '请选择月份', trigger: 'blur'}]
}) })
const processStore = useProcessStore()
const processInstanceData = ref()
const processDiagramViewer = ref(false)
const loading = ref(false) const loading = ref(false)
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
@@ -219,11 +228,34 @@ const getDetailInfo = async () => {
} }
}) })
} }
const init = async () => {
processDiagramViewer.value = false
getAllocationProcess().then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
let data = res.data
processInstanceData.value = data
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;
processStore.noTakeList.value = data.noTakeList;
processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList;
nextTick(() => {
processDiagramViewer.value = true
})
}
})
}
const handleBack = () => { const handleBack = () => {
history.back() history.back()
} }
onMounted(async () => { onMounted(async () => {
// await init() await init()
if (route.query.id) { if (route.query.id) {
loading.value = true loading.value = true
await getDetailInfo() await getDetailInfo()

View File

@@ -1,23 +1,58 @@
<template> <template>
<expense-detail :formData="shareData.formData" :data="shareData" :showTable="showTable" :processViewer="shareProcessViewer" <el-form :model="formData" ref="form" class="query-form" label-width="auto">
:loading="loading"/> <el-row>
<el-col :span="12">
<el-form-item label="分摊名称">
<span>{{ formData.shareName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="分摊月份">
<span>{{ formData.apportionmentMonth }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="分摊明细" name="first">
<expense-detail :formData="shareData.formData" :data="shareData" :showTable="showTable"
:processViewer="shareProcessViewer"
:loading="loading"/>
</el-tab-pane>
<el-tab-pane label="分摊汇总" name="second">
</el-tab-pane>
</el-tabs>
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="process">
<operation-render v-if="shareProcessViewer" :operation-list="shareData.operationList"
:state="data.state"/>
<process-diagram-viewer v-if="shareProcessViewer" id-name="fundProcess"/>
</div>
</div>
<opinion v-if="shareData.taskId" :formData="shareData.formData" :taskId="shareData.taskId"></opinion>
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
import {getAllocationDetail} from "@/api/expense-manage"; import {getAllocationDetail} from "@/api/expense-manage";
const processStore = useProcessStore() const processStore = useProcessStore()
const route = useRoute() const route = useRoute()
const shareData = ref({}) const shareData = ref({})
const formData = ref({})
const shareProcessViewer = ref(true) const shareProcessViewer = ref(true)
const showTable = ref(true) const showTable = ref(true)
const loading = ref(false) const loading = ref(false)
const activeName = ref('first')
const getDetail = async () => { const getDetail = async () => {
// const specialFundId = route.query.id const id = route.query.id
showTable.value = false showTable.value = false
shareProcessViewer.value = false
loading.value = true loading.value = true
const {code, data, msg} = await getAllocationDetail(12) const {code, data, msg} = await getAllocationDetail(id)
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: msg, message: msg,
@@ -25,24 +60,43 @@ const getDetail = async () => {
}) })
if (code === 1000) { if (code === 1000) {
shareData.value = data shareData.value = data
formData.value = data.formData
loading.value = false loading.value = false
if(data.operationList==null)return;
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;
processStore.noTakeList.value = data.noTakeList;
processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList;
nextTick(() => { nextTick(() => {
shareProcessViewer.value = true
showTable.value = true showTable.value = true
}) })
// if(data.operationList==null)return; } else {
// processStore.setDesign(data)
// processStore.runningList.value = data.runningList;
// processStore.endList.value = data.endList;
// processStore.noTakeList.value = data.noTakeList;
// processStore.refuseList.value = data.refuseList;
// processStore.passList.value = data.passList;
}else {
loading.value = false loading.value = false
} }
} }
getDetail() getDetail()
</script> </script>
<style scoped> <style scoped lang="scss">
:deep(.el-tabs__nav-scroll) {
width: 100%;
display: flex;
.el-tabs__nav {
display: flex;
flex: 1;
.el-tabs__item {
flex: 1;
font-size: 16px;
}
.is-active {
color: black;
//background-color: #DED0B2;
}
}
}
</style> </style>

View File

@@ -29,13 +29,35 @@
/> />
</el-config-provider> </el-config-provider>
</el-form-item> </el-form-item>
<el-row>
<el-col :span="5">
<el-form-item label="是否专项资金" prop="isSpecialFund">
<el-radio-group v-model="formData.isSpecialFund" size="mini">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="6" v-if="formData.isSpecialFund">
<el-form-item label="专项资金" prop="specialFund">
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
<el-option
v-for="item in specialFundOption"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<baseTitle title="征集说明"></baseTitle> <baseTitle title="征集说明"></baseTitle>
<Tinymce v-if="showTinymce" image-url="/notice/file" file-url="/notice/file" <Tinymce v-if="showTinymce" image-url="/notice/file" file-url="/notice/file"
v-model:value="formData.collectExplain" height="300" /> v-model:value="formData.collectExplain" />
<baseTitle title="申请文件"></baseTitle> <baseTitle title="申请文件"></baseTitle>
<file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/> <file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/>
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" <fvTable style="width: 100%;max-height: 650px;" v-if="showTable"
:tableConfig="tableConfig" :data="formData.fileList" :tableConfig="tableConfig" :data="formData.fileList"
:isSettingCol="false" :pagination="false"> :isSettingCol="false" :pagination="false">
<template #empty> <template #empty>
@@ -74,6 +96,7 @@ import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
import {useRoute, useRouter} from 'vue-router' import {useRoute, useRouter} from 'vue-router'
import {getSubCompOpt} from '@/api/user/user.js' import {getSubCompOpt} from '@/api/user/user.js'
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
import {getFundOption} from "@/api/special-fund";
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
const authStore = useAuthStore() const authStore = useAuthStore()
@@ -87,7 +110,8 @@ const formData = ref({
collectType: '', collectType: '',
deadline: '', deadline: '',
collectExplain: '', collectExplain: '',
fileList: [] fileList: [],
isSpecialFund:false
}) })
const showTinymce = ref(true) const showTinymce = ref(true)
const routerName = ref(router.currentRoute.value.name) const routerName = ref(router.currentRoute.value.name)
@@ -99,6 +123,7 @@ const typeOption = ref([
} }
]) ])
const companyOption = ref([]) const companyOption = ref([])
const specialFundOption = ref([])
const form = ref(null) const form = ref(null)
const fileList = ref([]) const fileList = ref([])
const loading = ref(false) const loading = ref(false)
@@ -111,6 +136,7 @@ const rules = reactive({
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}], companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}], collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}], deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
}) })
const tableConfig = reactive({ const tableConfig = reactive({
@@ -178,8 +204,10 @@ const compositeParam = (item) => {
let tag = '' let tag = ''
if (!formData.value.collectType && routerName.value === 'Requirement/add') { if (!formData.value.collectType && routerName.value === 'Requirement/add') {
tag = '需求征集' tag = '需求征集'
}else if(routerName.value === 'Requirement/edit'){ }else if(!formData.value.collectType &&routerName.value === 'Requirement/edit'){
tag = '需求征集' tag = '需求征集'
}if (formData.value.collectType) {
tag = formData.value.collectType
} }
return { return {
fileId: item.id, fileId: item.id,
@@ -205,6 +233,8 @@ const getFile = (val) => {
const init = async () => { const init = async () => {
const res = await getSubCompOpt() const res = await getSubCompOpt()
companyOption.value = res.data companyOption.value = res.data
const resFund = await getFundOption()
specialFundOption.value = resFund.data
getWorkflowInfo().then(res => { getWorkflowInfo().then(res => {
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -247,7 +277,9 @@ const submitParam = (item) => {
requirementId: item.requirementId ? item.requirementId : 0, requirementId: item.requirementId ? item.requirementId : 0,
requirementName: item.requirementName, requirementName: item.requirementName,
fileList: files, fileList: files,
deploymentId: processInstanceData.value.deploymentId deploymentId: processInstanceData.value.deploymentId,
isSpecialFund:item.isSpecialFund,
specialFund:item.specialFund
} }
} }
const handleSubmit = async (instance) => { const handleSubmit = async (instance) => {
@@ -334,7 +366,9 @@ onMounted(async () => {
:deep(.el-empty__description) { :deep(.el-empty__description) {
margin-top: 0; margin-top: 0;
} }
:deep(.el-table--fit ){
height: 400px;
}
.add-block { .add-block {
//display: flex; //display: flex;
//justify-content: space-between; //justify-content: space-between;

View File

@@ -23,6 +23,11 @@
<span>{{ formData.deadline }}</span> <span>{{ formData.deadline }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" v-if="formData.isSpecialFund">
<el-form-item label="专项资金">
<span>{{ formData.specialFund }}</span>
</el-form-item>
</el-col>
<baseTitle title="征集说明"></baseTitle> <baseTitle title="征集说明"></baseTitle>
<el-col :span="24" v-if="checkFormPrem('collectExplain')"> <el-col :span="24" v-if="checkFormPrem('collectExplain')">
<el-form-item> <el-form-item>
@@ -43,6 +48,16 @@
</fvTable> </fvTable>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="process">
<operation-render v-if="processDiagramViewer" :operation-list="processInstanceData.operationList"
:state="processInstanceData.state"/>
<process-diagram-viewer v-if="processDiagramViewer"/>
</div>
</div>
</el-col>
<el-col :span="24"> <el-col :span="24">
<div v-if="processInstanceData.taskId"> <div v-if="processInstanceData.taskId">
<baseTitle title="审核意见"></baseTitle> <baseTitle title="审核意见"></baseTitle>
@@ -57,14 +72,6 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="process">
<operation-render v-if="processDiagramViewer" :operation-list="processInstanceData.operationList"
:state="processInstanceData.state"/>
<process-diagram-viewer v-if="processDiagramViewer"/>
</div>
</div>
</el-form> </el-form>
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId"> <div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
<el-button @click="handleReject(demandForm)">驳回</el-button> <el-button @click="handleReject(demandForm)">驳回</el-button>
@@ -82,6 +89,7 @@ import {getSubCompOpt} from '@/api/user/user.js'
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
import {matterTree} from '@/utils/matterTree.js'; import {matterTree} from '@/utils/matterTree.js';
import {getFundOption} from "@/api/special-fund";
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
const router = useRouter() const router = useRouter()
@@ -91,6 +99,7 @@ const loading = ref(false)
const demandForm = ref() const demandForm = ref()
const processStore = useProcessStore() const processStore = useProcessStore()
const companyOption = ref([]) const companyOption = ref([])
const specialFundOption = ref([])
const formPermMap = ref(new Map()); const formPermMap = ref(new Map());
const processInstanceData = ref({}) const processInstanceData = ref({})
const showTable = ref(false) const showTable = ref(false)
@@ -197,6 +206,10 @@ const getCompanyOption = async () => {
const res = await getSubCompOpt() const res = await getSubCompOpt()
companyOption.value = res.data companyOption.value = res.data
} }
const getFundOptions = async () => {
const res = await getFundOption()
specialFundOption.value = res.data
}
const getDataSourceOptionItem = (val) => { const getDataSourceOptionItem = (val) => {
if (val !== undefined) { if (val !== undefined) {
@@ -219,11 +232,19 @@ const handleDownload = (row) => {
const init = async () => { const init = async () => {
if (!route.query.id) return; if (!route.query.id) return;
await getCompanyOption() await getCompanyOption()
await getFundOptions()
getInfo(route.query.id).then(res => { getInfo(route.query.id).then(res => {
loading.value = false loading.value = false
let data = res.data let data = res.data
formData.value = data.formData; formData.value = data.formData;
data.formData.companyIds = getDataSourceOptionItem(data.formData.companyIds) data.formData.companyIds = getDataSourceOptionItem(data.formData.companyIds)
if(data.formData.specialFund){
specialFundOption.value.forEach(item => {
if(data.formData.specialFund==item.value){
data.formData.specialFund = item.label
}
})
}
processInstanceData.value = data processInstanceData.value = data
processStore.setDesign(data) processStore.setDesign(data)
processStore.runningList.value = data.runningList; processStore.runningList.value = data.runningList;

View File

@@ -115,9 +115,9 @@ const tableConfig = reactive({
// if (buttons.has("delete")) { // if (buttons.has("delete")) {
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'}) // btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
// } // }
if (buttons.has("report")) { // if (buttons.has("report")) {
btn.push({label: '需求上报',prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'}) btn.push({label: '需求上报', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
} // }
return ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>
{ {
@@ -134,7 +134,8 @@ const tableConfig = reactive({
} }
{ {
buttons.has("delete") ? buttons.has("delete") ?
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'} perm={['mosr:requirement:del']} <popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'}
perm={['mosr:requirement:del']}
onDelete={() => handleDelete(row)}/> : '' onDelete={() => handleDelete(row)}/> : ''
} }
</div> </div>
@@ -154,23 +155,17 @@ const search = (val) => {
tableConfig.params = {...val} tableConfig.params = {...val}
tableIns.value.refresh() tableIns.value.refresh()
} }
const handleAdd = () => { const handleAdd = (row) => {
try{ router.push({
router.push({ name: 'Requirement/add',
name:'Requirement/add', query: {
query:{} id: row.requirementId
}) }
}catch (err){ })
// ElNotification({
// title: '提示',
// message: '该用户无新增权限',
// type: 'warning'
// })
}
} }
const handleEdit = (row) => { const handleEdit = (row) => {
router.push({ router.push({
name:'Requirement/edit', name: 'Requirement/edit',
query: { query: {
id: row.requirementId id: row.requirementId
} }
@@ -188,7 +183,7 @@ const handleDelete = (row) => {
} }
const handleDetail = (row) => { const handleDetail = (row) => {
router.push({ router.push({
name:'Requirement/detail', name: 'Requirement/detail',
query: { query: {
id: row.requirementId id: row.requirementId
} }
@@ -196,9 +191,9 @@ const handleDetail = (row) => {
} }
const handleReport = (row) => { const handleReport = (row) => {
router.push({ router.push({
name:'Summary/add', name: 'Summary/add',
query: { query: {
id:row.requirementId id: row.requirementId
} }
}) })
} }

View File

@@ -8,11 +8,19 @@
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input> <el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="5">
<el-form-item label="专项资金" prop="specialFund"> <el-form-item label="是否专项资金" prop="isSpecialFund">
<el-radio-group v-model="formData.isSpecialFund" >
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="专项资金" prop="specialFund" v-if="formData.isSpecialFund">
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable> <el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
<el-option <el-option
v-for="item in cacheStore.getDict('todo_type')" v-for="item in specialFundOption"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@@ -46,11 +54,11 @@
</el-config-provider> </el-config-provider>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-form-item label="所属公司" prop="affiliatedCompanyId">--> <!-- <el-form-item label="所属公司" prop="affiliatedCompanyId">-->
<!-- <el-tree-select v-model="formData.affiliatedCompanyId" :data="companyOption" style="width: 100%;"--> <!-- <el-tree-select v-model="formData.affiliatedCompanyId" :data="companyOption" style="width: 100%;"-->
<!-- filterable clearable :check-strictly="true"/>--> <!-- filterable clearable :check-strictly="true"/>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col> <el-col :span="12">--> <!-- </el-col> <el-col :span="12">-->
<el-col :span="12"> <el-col :span="12">
<el-form-item label="项目类型" prop="projectType"> <el-form-item label="项目类型" prop="projectType">
@@ -139,18 +147,20 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="产学研联合" prop="industryUniversityResearch"> <el-form-item label="产学研联合" prop="industryUniversityResearch">
<el-radio-group v-model="formData.industryUniversityResearch"> <el-radio-group v-model="formData.industryUniversityResearch">
<el-radio v-for="item in cacheStore.getDict('industry_university')" <el-radio v-for="item in cacheStore.getDict('industry_university')"
:key="item.value" :key="item.value"
:label="item.value">{{item.label}}</el-radio> :label="item.value">{{ item.label }}
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="开展政府申报" prop="governmentDeclaration"> <el-form-item label="开展政府申报" prop="governmentDeclaration">
<el-radio-group v-model="formData.governmentDeclaration"> <el-radio-group v-model="formData.governmentDeclaration">
<el-radio v-for="item in cacheStore.getDict('government_declaration')" <el-radio v-for="item in cacheStore.getDict('government_declaration')"
:key="item.value" :key="item.value"
:label="item.value">{{item.label}}</el-radio> :label="item.value">{{ item.label }}
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -230,13 +240,14 @@
</div> </div>
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button type="info" @click="staging">存为草稿</el-button> <el-button type="info" @click="staging">存为草稿</el-button>
<el-button color="#DED0B2" v-if="name==='Summary/add'" @click="handleSubmit(summaryForm)">发布</el-button> <el-button color="#DED0B2" v-if="name==='Summary/add'" @click="handleSubmit(summaryForm)">发布</el-button>
<el-button color="#DED0B2" v-else @click="handleResubmit">重新发布</el-button> <el-button color="#DED0B2" v-else @click="handleResubmit">重新发布</el-button>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import {debounce} from 'lodash'
import {getDetail, getProcessInfo, requirementReported, resubmitReported} from "./api"; import {getDetail, getProcessInfo, requirementReported, resubmitReported} from "./api";
import {ElMessage, ElNotification} from "element-plus"; import {ElMessage, ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
@@ -244,6 +255,8 @@ import {useCacheStore} from '@/stores/cache.js'
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
import {getSubCompOpt} from "@/api/user/user"; import {getSubCompOpt} from "@/api/user/user";
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'; import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import {getFormInfo} from "@/api/project-demand";
import {getFundOption} from "@/api/special-fund";
const cacheStore = useCacheStore() const cacheStore = useCacheStore()
const processStore = useProcessStore() const processStore = useProcessStore()
@@ -257,12 +270,14 @@ const tagsViewStore = useTagsView()
const companyOption = ref([]) const companyOption = ref([])
const summaryForm = ref() const summaryForm = ref()
const deploymentId = ref() const deploymentId = ref()
const specialFundOption = ref([])
const isSpecialFund = ref()
const showTable = ref(true) const showTable = ref(true)
const otherFileList = ref([]) const otherFileList = ref([])
const file = ref({}) const file = ref({})
const formData = ref({ const formData = ref({
industryUniversityResearch:'0', industryUniversityResearch: '0',
governmentDeclaration:'0', governmentDeclaration: '0',
}) })
const rules = reactive({ const rules = reactive({
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}], projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
@@ -290,6 +305,16 @@ const rules = reactive({
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}], serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}],
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}] contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
}) })
const getIsFund = async () => {
getFormInfo(route.query.id).then(res => {
if (res.code === 1000) {
formData.value.isSpecialFund = res.data.isSpecialFund
if(res.data.isSpecialFund){
formData.value.specialFund = Number(res.data.specialFund)
}
}
})
}
const compositeParam = (item, type) => { const compositeParam = (item, type) => {
let tag = '' let tag = ''
if (name.value === 'Summary/add' || name.value === 'Summary/edit') { if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
@@ -304,12 +329,11 @@ const compositeParam = (item, type) => {
tag: tag tag: tag
} }
} }
const getEditOtherFile = (val) => {
console.log('getEditOtherFile', val)
}
const getAttachment = (val) => { const getAttachment = (val) => {
console.log('上传文件getAttachment', val) console.log('上传文件getAttachment', val)
file.value = compositeParam(val) file.value = compositeParam(val)
formData.value.singleFile = compositeParam(val)
} }
const getOtherFile = (val) => { const getOtherFile = (val) => {
console.log('上传文件getOtherFile', val) console.log('上传文件getOtherFile', val)
@@ -326,15 +350,16 @@ const getFileParam = (item) => {
tag: item.tag tag: item.tag
} }
} }
const handleSubmit = async (instance) => { const handleSubmit = debounce(async (instance) => {
// if (!instance) return console.log('formData.value',formData.value)
// instance.validate(async (valid, fields) => { if (!instance) return
// if(JSON.stringify(file.value) == "{}"){ instance.validate(async (valid, fields) => {
// attachment.value.validate() if (JSON.stringify(file.value) === "{}") {
// } else { attachment.value.validate()
// attachment.value.clearValidate() } else {
// } attachment.value.clearValidate()
// if (!valid) return }
if (!valid) return
let singleFile = {} let singleFile = {}
if (file.value.fileId !== undefined) { if (file.value.fileId !== undefined) {
singleFile = { singleFile = {
@@ -394,15 +419,21 @@ const handleSubmit = async (instance) => {
name: 'Summary' name: 'Summary'
}) })
} }
// }) })
} })
const handleResubmit = () => { const handleResubmit = debounce(() => {
let singleFile = {} let singleFile = {}
let otherFiles = [] let otherFiles = []
let fileArray let fileArray
if (name.value === 'Summary/edit') { if (name.value === 'Summary/edit') {
console.log('attachment.value', attachment.value.singleFile)
if (attachment.value.singleFile === null) {
attachment.value.validate()
} else {
attachment.value.clearValidate()
}
singleFile = { singleFile = {
fileId: attachment.value.singleFile.fileId fileId: attachment.value.singleFile?.fileId
} }
fileArray = attachment.value.allFileList fileArray = attachment.value.allFileList
} else { } else {
@@ -438,7 +469,7 @@ const handleResubmit = () => {
}) })
} }
}) })
} })
const getDetailInfo = async () => { const getDetailInfo = async () => {
getDetail(route.query.projectId).then(res => { getDetail(route.query.projectId).then(res => {
ElNotification({ ElNotification({
@@ -453,6 +484,9 @@ const getDetailInfo = async () => {
}) })
} }
const init = async () => { const init = async () => {
const resFund = await getFundOption()
specialFundOption.value = resFund.data
await getIsFund()
const res = await getSubCompOpt() const res = await getSubCompOpt()
companyOption.value = res.data companyOption.value = res.data
getProcessInfo().then(res => { getProcessInfo().then(res => {

View File

@@ -143,9 +143,6 @@ const tableConfig = reactive({
if (buttons.has("edit")) { if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'}) btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
} }
// if (buttons.has("delete")) {
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
// }
if (buttons.has("report")) { if (buttons.has("report")) {
btn.push({label: '上报', prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'}) btn.push({label: '上报', prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'})
} }
@@ -163,6 +160,12 @@ const tableConfig = reactive({
</el-button> </el-button>
)) ))
} }
{
buttons.has("delete") ?
<popover-delete name={row.requirementName} type={'需求'} btnType={'danger'}
perm={['mosr:collect:del']} onDelete={() => handleDelete(row)}/>
: ''
}
</div> </div>
) )
} }

View File

@@ -1,5 +1,14 @@
<template> <template>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm> <el-form :model="attachment" inline class="query-form">
<el-form-item label="关键词" prop="tag">
<el-input v-model="attachment.tag" placeholder="请输入" clearable filterable style="width: 200px"/>
</el-form-item>
<el-form-item>
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
<el-button color="#DED0B2" @click="handleUpload">上传附件</el-button>
</el-form-item>
</el-form>
<!-- <fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>-->
<el-card style="width: 100%"> <el-card style="width: 100%">
<file-upload @getFile="getOtherFile" :showFileList="true"/> <file-upload @getFile="getOtherFile" :showFileList="true"/>
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig" <fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
@@ -14,6 +23,11 @@
<script setup lang="jsx"> <script setup lang="jsx">
import {downloadFile} from "@/api/project-demand"; import {downloadFile} from "@/api/project-demand";
const route = useRoute()
const router = useRouter()
const attachment = reactive({
tag: ''
})
const searchConfig = reactive([ const searchConfig = reactive([
{ {
label: '关键词', label: '关键词',
@@ -64,9 +78,15 @@ const tableConfig = reactive({
}) })
const showTable=ref(true) const showTable=ref(true)
const otherFileList = ref([]) const otherFileList = ref([])
const getOtherFile = () => { const handleUpload = () => {
router.push({
name: 'Filing/upload',
query: {
id: route.query.id
}
})
} }
const handleDownload = (row) => { const handleDownload = (row) => {
downloadFile(row.fileId).then(res => { downloadFile(row.fileId).then(res => {
const blob = new Blob([res]) const blob = new Blob([res])

View File

@@ -130,6 +130,7 @@ const getFileParam = (item) => {
const handleSubmit = async () => { const handleSubmit = async () => {
if (JSON.stringify(file.value) === "{}") { if (JSON.stringify(file.value) === "{}") {
attachment.value.validate() attachment.value.validate()
return;
} else { } else {
attachment.value.clearValidate() attachment.value.clearValidate()
} }
@@ -170,6 +171,7 @@ const handleResubmit = () => {
let fileArray let fileArray
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) { if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
attachment.value.validate() attachment.value.validate()
return;
} else { } else {
attachment.value.clearValidate() attachment.value.clearValidate()
} }

View File

@@ -167,7 +167,7 @@ const tableConfig = reactive({
}, },
{ {
prop: 'economicEstimate', prop: 'economicEstimate',
label: '经济概', label: '经济概',
align: 'center' align: 'center'
}, },
{ {

View File

@@ -135,7 +135,7 @@ const handleDownload = (row) => {
a.click() a.click()
}) })
} }
// getTagsOption() getTagsOption()
handleSearch() handleSearch()
</script> </script>

View File

@@ -85,6 +85,7 @@ const handleSubmit = (instance) => {
if (!valid) return if (!valid) return
if(JSON.stringify(file.value) === "{}"){ if(JSON.stringify(file.value) === "{}"){
attachment.value.validate() attachment.value.validate()
return;
}else { }else {
attachment.value.clearValidate() attachment.value.clearValidate()
} }
@@ -139,6 +140,7 @@ const handleResubmit = (instance) => {
let fileArray let fileArray
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) { if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
attachment.value.validate() attachment.value.validate()
return;
} else { } else {
attachment.value.clearValidate() attachment.value.clearValidate()
} }

View File

@@ -172,7 +172,7 @@ const tableConfig = reactive({
}, },
{ {
prop: 'economicEstimate', prop: 'economicEstimate',
label: '经济概', label: '经济概',
align: 'center' align: 'center'
}, },
{ {

View File

@@ -29,7 +29,7 @@
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import {uploadAttachment} from "@/api/project-manage"; import {uploadAttachment,getTags} from "@/api/project-manage";
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
@@ -156,7 +156,7 @@ const handleSubmit = async (instance) => {
} }
}) })
} }
// getTagsOption() getTagsOption()
</script> </script>
<style scoped> <style scoped>

View File

@@ -128,6 +128,12 @@ const handleSubmit = (instance) => {
instance.validate(async (valid) => { instance.validate(async (valid) => {
if (JSON.stringify(file.value) === "{}") { if (JSON.stringify(file.value) === "{}") {
attachment.value.validate() attachment.value.validate()
ElNotification({
title: '提示',
message: '请上传申请书附件',
type: 'error'
})
return;
} else { } else {
attachment.value.clearValidate() attachment.value.clearValidate()
} }
@@ -170,6 +176,7 @@ const handleResubmit = async () => {
let fileArray let fileArray
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) { if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
attachment.value.validate() attachment.value.validate()
return;
} else { } else {
attachment.value.clearValidate() attachment.value.clearValidate()
} }

View File

@@ -166,7 +166,7 @@ const tableConfig = reactive({
}, },
{ {
prop: 'economicEstimate', prop: 'economicEstimate',
label: '经济概', label: '经济概',
align: 'center' align: 'center'
}, },
{ {
@@ -212,9 +212,9 @@ const tableConfig = reactive({
// if (buttons.has("delete")) { // if (buttons.has("delete")) {
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'}) // btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
// } // }
if (buttons.has("apply")) { // if (buttons.has("apply")) {
btn.push({label: '申请',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'}) btn.push({label: '申请',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'})
} // }
return ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>
{ {

View File

@@ -0,0 +1,11 @@
<template>
<tag-and-file-upload :showInput="true"/>
</template>
<script setup lang="jsx">
</script>
<style scoped>
</style>

View File

@@ -5,16 +5,16 @@
<el-form-item label="专项资金名称" prop="name"> <el-form-item label="专项资金名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入专项资金名称" clearable></el-input> <el-input v-model="formData.name" placeholder="请输入专项资金名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="金额" prop="fundAmount"> <el-form-item label="金额(万元)" prop="fundAmount">
<el-input v-model="formData.fundAmount" placeholder="请输入金额" clearable></el-input> <el-input v-model="formData.fundAmount" placeholder="请输入金额" clearable></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<baseTitle title="介绍"></baseTitle> <baseTitle title="介绍"></baseTitle>
<Tinymce image-url="/notice/file" file-url="/notice/file" v-if="showTinymce" <Tinymce image-url="/notice/file" file-url="/notice/file" v-if="showTinymce"
v-model:value="formData.introduce" height="300"/> v-model:value="formData.introduce"/>
<baseTitle title="申请文件"></baseTitle> <baseTitle title="申请文件"></baseTitle>
<file-upload @getFile="getFile"/> <file-upload @getFile="getFile"/>
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" <fvTable style="width: 100%;max-height: 650px;" v-if="showTable"
:tableConfig="tableConfig" :data="formData.files" :tableConfig="tableConfig" :data="formData.files"
:isSettingCol="false" :pagination="false"> :isSettingCol="false" :pagination="false">
<template #empty> <template #empty>
@@ -34,11 +34,11 @@
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {addFund, resubmitFund, getFundDetail} from "@/api/special-fund"; import {addFund, resubmitFund, getFundDetail,getFundProcess} from "@/api/special-fund";
import {useRouter} from "vue-router"; import {useRouter} from "vue-router";
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
@@ -145,7 +145,7 @@ const submitParam = (item) => {
introduce: item.introduce, introduce: item.introduce,
name: item.name, name: item.name,
files: files, files: files,
// deploymentId: processInstanceData.value.deploymentId deploymentId: processInstanceData.value.deploymentId
} }
} }
const handleSubmit = async (instance) => { const handleSubmit = async (instance) => {
@@ -187,7 +187,8 @@ const handleResubmit = () => {
}) })
} }
const init = async () => { const init = async () => {
getWorkflowInfo().then(res => { processDiagramViewer.value = false
getFundProcess().then(res => {
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: res.msg, message: res.msg,
@@ -216,7 +217,7 @@ const getDetailInfo = async () => {
type: res.code === 1000 ? 'success' : 'error' type: res.code === 1000 ? 'success' : 'error'
}) })
if (res.code === 1000) { if (res.code === 1000) {
formData.value = res.data.formData formData.value = res.data
showTinymce.value = false showTinymce.value = false
showTable.value = false showTable.value = false
nextTick(() => { nextTick(() => {
@@ -228,7 +229,7 @@ const getDetailInfo = async () => {
} }
onMounted(async () => { onMounted(async () => {
loading.value = true loading.value = true
// await init() await init()
if (route.query.id) { if (route.query.id) {
await getDetailInfo() await getDetailInfo()
} }

View File

@@ -5,8 +5,8 @@
<script setup lang="jsx"> <script setup lang="jsx">
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {getFundDetail} from "@/api/special-fund";
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
import {getFundDetailProcess} from "@api/special-fund";
const processStore = useProcessStore() const processStore = useProcessStore()
const route = useRoute() const route = useRoute()
const fundData = ref({}) const fundData = ref({})
@@ -17,7 +17,8 @@ const getDetail = async () => {
const specialFundId = route.query.id const specialFundId = route.query.id
showTable.value = false showTable.value = false
loading.value = true loading.value = true
const {code, data, msg} = await getFundDetail(specialFundId) fundProcessViewer.value = false
const {code, data, msg} = await getFundDetailProcess(specialFundId)
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: msg, message: msg,
@@ -26,17 +27,17 @@ const getDetail = async () => {
if (code === 1000) { if (code === 1000) {
fundData.value = data fundData.value = data
loading.value = false loading.value = false
if(data.operationList==null)return;
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;
processStore.noTakeList.value = data.noTakeList;
processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList;
nextTick(() => { nextTick(() => {
fundProcessViewer.value = true
showTable.value = true showTable.value = true
}) })
// if(data.operationList==null)return;
// processStore.setDesign(data)
// processStore.runningList.value = data.runningList;
// processStore.endList.value = data.endList;
// processStore.noTakeList.value = data.noTakeList;
// processStore.refuseList.value = data.refuseList;
// processStore.passList.value = data.passList;
}else { }else {
loading.value = false loading.value = false
} }

View File

@@ -33,7 +33,7 @@ const searchConfig = reactive([
} }
}, },
{ {
label: '资金金额', label: '资金金额(万元)',
prop: 'fundAmount', prop: 'fundAmount',
component: 'el-input', component: 'el-input',
props: { props: {
@@ -41,7 +41,7 @@ const searchConfig = reactive([
placeholder: '请输入资金金额查询' placeholder: '请输入资金金额查询'
} }
}, { }, {
label: '剩余金额', label: '剩余金额(万元)',
prop: 'residualAmount', prop: 'residualAmount',
component: 'el-input', component: 'el-input',
props: { props: {
@@ -65,14 +65,19 @@ const tableConfig = reactive({
label: '专项资金名称', label: '专项资金名称',
align: 'center' align: 'center'
}, },
{
prop: 'approveName',
label: '审批人',
align: 'center'
},
{ {
prop: 'fundAmount', prop: 'fundAmount',
label: '资金金额', label: '资金金额(万元)',
align: 'center' align: 'center'
}, },
{ {
prop: 'residualAmount', prop: 'residualAmount',
label: '剩余金额', label: '剩余金额(万元)',
align: 'center' align: 'center'
}, },
{ {
@@ -80,13 +85,18 @@ const tableConfig = reactive({
label: '项目数量', label: '项目数量',
align: 'center' align: 'center'
}, },
{
prop: 'taskNode',
label: '当前节点',
align: 'center'
},
{ {
prop: 'state', prop: 'state',
label: '状态', label: '状态',
align: 'center', align: 'center',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
if (row.state == undefined) { if (row.state == undefined||row.state == 0) {
return '--' return '--'
} else { } else {
return (<Tag dictType={'special_fund'} value={row.state}/>) return (<Tag dictType={'special_fund'} value={row.state}/>)
@@ -100,13 +110,13 @@ const tableConfig = reactive({
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [] let btn = []
// let buttons = new Set(Array.from(row.buttons)) let buttons = new Set(Array.from(row.buttons))
// if (buttons.has("details")) { if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'}) btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
// } }
// if (buttons.has("edit")) { if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'}) btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
// } }
// if (buttons.has("delete")) { // if (buttons.has("delete")) {
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'}) // btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
// } // }
@@ -124,6 +134,13 @@ const tableConfig = reactive({
</el-button> </el-button>
)) ))
} }
{
buttons.has("delete") ?
<popover-delete name={row.name} type={'专项资金'} btnType={'danger'}
perm={['mosr:requirement:del']}
onDelete={() => handleDelete(row)}/>
: ''
}
</div> </div>
) )
} }

View File

@@ -63,27 +63,27 @@ const nullBlockClick = (e) => {
disVisible() disVisible()
} }
} }
const addApprovalNode = debounce(() => { const addApprovalNode = () => {
emit('insertNode', "APPROVAL") emit('insertNode', "APPROVAL")
disVisible() disVisible()
}) }
const addCcNode = debounce(() => { const addCcNode = () => {
emit('insertNode', "CC") emit('insertNode', "CC")
disVisible() disVisible()
}) }
const addDelayNode = debounce(() => { const addDelayNode =() => {
emit('insertNode', "DELAY") emit('insertNode', "DELAY")
disVisible() disVisible()
}) }
const addConditionsNode = debounce(() => { const addConditionsNode = () => {
emit('insertNode', "CONDITIONS") emit('insertNode', "CONDITIONS")
disVisible() disVisible()
}) }
const addConcurrentsNode = debounce(() => { const addConcurrentsNode = () => {
emit('insertNode', "CONCURRENTS") emit('insertNode', "CONCURRENTS")
disVisible() disVisible()
}) }
const addTriggerNode = () => { const addTriggerNode = () => {
emit('insertNode', "TRIGGER") emit('insertNode', "TRIGGER")
disVisible() disVisible()

View File

@@ -91,7 +91,6 @@ const formPermsLoadMosr = (oldPermMap, perms) => {
old.required = perm.required; old.required = perm.required;
formPerms.value.push(old); formPerms.value.push(old);
} else { } else {
console.log(perm)
if (perm.id === 'fileList'){ if (perm.id === 'fileList'){
formPerms.value.push({ formPerms.value.push({
id: perm.id, //todo ,id 就是字段名称 id: perm.id, //todo ,id 就是字段名称

View File

@@ -16,9 +16,9 @@
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" @click="getList" :icon="Search">搜索</el-button> <el-button type="primary" @click="getList" :icon="Search">搜索</el-button>
<el-button type="primary" v-perm="['rapid:regular:add']" @click="handleAdd" :icon="Plus">新增</el-button> <el-button type="primary" @click="handleAdd" :icon="Plus">新增</el-button>
<el-button type="primary" @click="handleReset" :icon="Refresh" plain>重置</el-button> <el-button type="primary" @click="handleReset" :icon="Refresh" plain>重置</el-button>
<el-button type="primary" v-perm="['rapid:regular:export']" @click="handleExport" :icon="Download" plain>导出 <el-button type="primary" @click="handleExport" :icon="Download" plain>导出
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>

View File

@@ -69,8 +69,8 @@ export default defineConfig({
open: true, open: true,
proxy: { proxy: {
// '/api/workflow': { // '/api/workflow': {
// target: 'http://frp.feashow.cn:31800/', // // target: 'http://frp.feashow.cn:31800/',
// // target: 'http://clay.frp.feashow.cn/', // target: 'http://clay.frp.feashow.cn/',
// // target: 'http://192.168.31.175:8000', // // target: 'http://192.168.31.175:8000',
// changeOrigin: true, // changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, '') // rewrite: (path) => path.replace(/^\/api/, '')