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:
@@ -13,3 +13,9 @@ export const getAllocationDetail = (allocationId) => {
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const getAllocationProcess = () => {
|
||||
return request({
|
||||
url: '/workflow/mosr/cost/allocation/process',
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -79,7 +79,7 @@ export const addLedger = (data) => {
|
||||
|
||||
export const getTags = (projectId) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/implementation/tags',
|
||||
url: '/workflow/mosr/project/implementation/option',
|
||||
method: "get",
|
||||
params:{
|
||||
projectId:projectId
|
||||
|
||||
@@ -1,11 +1,29 @@
|
||||
import request from '@/utils/request.js'
|
||||
|
||||
export const getFundDetail = (specialFundId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/special/fund/from/${specialFundId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const getFundDetailProcess = (specialFundId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/special/fund/info/${specialFundId}`,
|
||||
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) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/special/fund',
|
||||
|
||||
@@ -110,19 +110,20 @@ watch(() => props.showTable, (newVal) => {
|
||||
props.showTable = newVal
|
||||
}, {deep: true})
|
||||
watch(() => props.otherFileList, (newVal) => {
|
||||
newVal.forEach(item => {
|
||||
allFileList.value.push(item)
|
||||
})
|
||||
console.log('new',newVal)
|
||||
// newVal?.forEach(item => {
|
||||
allFileList.value=newVal
|
||||
// })
|
||||
}, {deep: true})
|
||||
watch(() => props.formData.fileList, (newVal) => {
|
||||
if (props.preview) {
|
||||
newVal.forEach(item => {
|
||||
newVal?.forEach(item => {
|
||||
allFileList.value.push(item)
|
||||
})
|
||||
}
|
||||
}, {deep: true})
|
||||
watch(() => props.formData.singleFile, (newVal) => {
|
||||
// singleFile.value = {}
|
||||
console.log('singleFile',newVal)
|
||||
singleFile.value = newVal
|
||||
}, {deep: true})
|
||||
const getAttachment = (val) => {
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
<div v-loading="loading">
|
||||
<el-form :model="formData" ref="form" class="query-form" label-width="auto">
|
||||
<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-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-col :span="24">
|
||||
<el-form-item>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
|
||||
@@ -37,7 +37,8 @@ const schema = computed(() => {
|
||||
props: {
|
||||
placeholder: '请输入审核意见',
|
||||
type: 'textarea',
|
||||
maxlength: 140
|
||||
// maxlength: 140,
|
||||
rows:3
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -59,6 +60,12 @@ const back = () => {
|
||||
case 'Requirement/detail':
|
||||
router.push({name: 'Requirement'})
|
||||
break;
|
||||
case 'Fund/detail':
|
||||
router.push({name: 'Fund'})
|
||||
break;
|
||||
case 'Share/detail':
|
||||
router.push({name: 'Expense/share'})
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 驳回
|
||||
|
||||
118
src/components/TagAndFileUpload.vue
Normal file
118
src/components/TagAndFileUpload.vue
Normal 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>
|
||||
@@ -74,7 +74,7 @@ const props = defineProps({
|
||||
},
|
||||
height:{
|
||||
type: Number,
|
||||
default: 450
|
||||
default: 650
|
||||
}
|
||||
})
|
||||
const content = ref(props.value);
|
||||
|
||||
@@ -113,6 +113,10 @@
|
||||
<div style="width:100%;text-align: center;padding: 10px">
|
||||
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
|
||||
</div>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(form)">提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
@@ -123,12 +127,17 @@
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
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({
|
||||
shareName: [{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 route = useRoute()
|
||||
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 = () => {
|
||||
history.back()
|
||||
}
|
||||
onMounted(async () => {
|
||||
// await init()
|
||||
await init()
|
||||
if (route.query.id) {
|
||||
loading.value = true
|
||||
await getDetailInfo()
|
||||
|
||||
@@ -1,23 +1,58 @@
|
||||
<template>
|
||||
<expense-detail :formData="shareData.formData" :data="shareData" :showTable="showTable" :processViewer="shareProcessViewer"
|
||||
:loading="loading"/>
|
||||
<el-form :model="formData" ref="form" class="query-form" label-width="auto">
|
||||
<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>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getAllocationDetail} from "@/api/expense-manage";
|
||||
|
||||
const processStore = useProcessStore()
|
||||
const route = useRoute()
|
||||
const shareData = ref({})
|
||||
const formData = ref({})
|
||||
const shareProcessViewer = ref(true)
|
||||
const showTable = ref(true)
|
||||
const loading = ref(false)
|
||||
const activeName = ref('first')
|
||||
const getDetail = async () => {
|
||||
// const specialFundId = route.query.id
|
||||
const id = route.query.id
|
||||
showTable.value = false
|
||||
shareProcessViewer.value = false
|
||||
loading.value = true
|
||||
const {code, data, msg} = await getAllocationDetail(12)
|
||||
const {code, data, msg} = await getAllocationDetail(id)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
@@ -25,24 +60,43 @@ const getDetail = async () => {
|
||||
})
|
||||
if (code === 1000) {
|
||||
shareData.value = data
|
||||
formData.value = data.formData
|
||||
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(() => {
|
||||
shareProcessViewer.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
|
||||
}
|
||||
}
|
||||
getDetail()
|
||||
</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>
|
||||
|
||||
@@ -29,13 +29,35 @@
|
||||
/>
|
||||
</el-config-provider>
|
||||
</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>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<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>
|
||||
<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"
|
||||
:isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
@@ -74,6 +96,7 @@ import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
||||
import {useRoute, useRouter} from 'vue-router'
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const authStore = useAuthStore()
|
||||
@@ -87,7 +110,8 @@ const formData = ref({
|
||||
collectType: '',
|
||||
deadline: '',
|
||||
collectExplain: '',
|
||||
fileList: []
|
||||
fileList: [],
|
||||
isSpecialFund:false
|
||||
})
|
||||
const showTinymce = ref(true)
|
||||
const routerName = ref(router.currentRoute.value.name)
|
||||
@@ -99,6 +123,7 @@ const typeOption = ref([
|
||||
}
|
||||
])
|
||||
const companyOption = ref([])
|
||||
const specialFundOption = ref([])
|
||||
const form = ref(null)
|
||||
const fileList = ref([])
|
||||
const loading = ref(false)
|
||||
@@ -111,6 +136,7 @@ const rules = reactive({
|
||||
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
||||
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
||||
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
})
|
||||
|
||||
const tableConfig = reactive({
|
||||
@@ -178,8 +204,10 @@ const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (!formData.value.collectType && routerName.value === 'Requirement/add') {
|
||||
tag = '需求征集'
|
||||
}else if(routerName.value === 'Requirement/edit'){
|
||||
}else if(!formData.value.collectType &&routerName.value === 'Requirement/edit'){
|
||||
tag = '需求征集'
|
||||
}if (formData.value.collectType) {
|
||||
tag = formData.value.collectType
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
@@ -205,6 +233,8 @@ const getFile = (val) => {
|
||||
const init = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
const resFund = await getFundOption()
|
||||
specialFundOption.value = resFund.data
|
||||
getWorkflowInfo().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -247,7 +277,9 @@ const submitParam = (item) => {
|
||||
requirementId: item.requirementId ? item.requirementId : 0,
|
||||
requirementName: item.requirementName,
|
||||
fileList: files,
|
||||
deploymentId: processInstanceData.value.deploymentId
|
||||
deploymentId: processInstanceData.value.deploymentId,
|
||||
isSpecialFund:item.isSpecialFund,
|
||||
specialFund:item.specialFund
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
@@ -334,7 +366,9 @@ onMounted(async () => {
|
||||
:deep(.el-empty__description) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
:deep(.el-table--fit ){
|
||||
height: 400px;
|
||||
}
|
||||
.add-block {
|
||||
//display: flex;
|
||||
//justify-content: space-between;
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</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>
|
||||
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
||||
<el-form-item>
|
||||
@@ -43,6 +48,16 @@
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</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">
|
||||
<div v-if="processInstanceData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
@@ -57,14 +72,6 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</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>
|
||||
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
||||
<el-button @click="handleReject(demandForm)">驳回</el-button>
|
||||
@@ -82,6 +89,7 @@ import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {ElMessage} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {matterTree} from '@/utils/matterTree.js';
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
@@ -91,6 +99,7 @@ const loading = ref(false)
|
||||
const demandForm = ref()
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
const specialFundOption = ref([])
|
||||
const formPermMap = ref(new Map());
|
||||
const processInstanceData = ref({})
|
||||
const showTable = ref(false)
|
||||
@@ -197,6 +206,10 @@ const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
const getFundOptions = async () => {
|
||||
const res = await getFundOption()
|
||||
specialFundOption.value = res.data
|
||||
}
|
||||
|
||||
const getDataSourceOptionItem = (val) => {
|
||||
if (val !== undefined) {
|
||||
@@ -219,11 +232,19 @@ const handleDownload = (row) => {
|
||||
const init = async () => {
|
||||
if (!route.query.id) return;
|
||||
await getCompanyOption()
|
||||
await getFundOptions()
|
||||
getInfo(route.query.id).then(res => {
|
||||
loading.value = false
|
||||
let data = res.data
|
||||
formData.value = data.formData;
|
||||
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
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
|
||||
@@ -115,9 +115,9 @@ const tableConfig = reactive({
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
if (buttons.has("report")) {
|
||||
btn.push({label: '需求上报',prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
}
|
||||
// if (buttons.has("report")) {
|
||||
btn.push({label: '需求上报', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
@@ -134,7 +134,8 @@ const tableConfig = reactive({
|
||||
}
|
||||
{
|
||||
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)}/> : ''
|
||||
}
|
||||
</div>
|
||||
@@ -154,23 +155,17 @@ const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const handleAdd = () => {
|
||||
try{
|
||||
router.push({
|
||||
name:'Requirement/add',
|
||||
query:{}
|
||||
})
|
||||
}catch (err){
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '该用户无新增权限',
|
||||
// type: 'warning'
|
||||
// })
|
||||
}
|
||||
const handleAdd = (row) => {
|
||||
router.push({
|
||||
name: 'Requirement/add',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name:'Requirement/edit',
|
||||
name: 'Requirement/edit',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
@@ -188,7 +183,7 @@ const handleDelete = (row) => {
|
||||
}
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name:'Requirement/detail',
|
||||
name: 'Requirement/detail',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
@@ -196,9 +191,9 @@ const handleDetail = (row) => {
|
||||
}
|
||||
const handleReport = (row) => {
|
||||
router.push({
|
||||
name:'Summary/add',
|
||||
name: 'Summary/add',
|
||||
query: {
|
||||
id:row.requirementId
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -8,11 +8,19 @@
|
||||
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专项资金" prop="specialFund">
|
||||
<el-col :span="5">
|
||||
<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-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
v-for="item in specialFundOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -46,11 +54,11 @@
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-form-item label="所属公司" prop="affiliatedCompanyId">-->
|
||||
<!-- <el-tree-select v-model="formData.affiliatedCompanyId" :data="companyOption" style="width: 100%;"-->
|
||||
<!-- filterable clearable :check-strictly="true"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col> <el-col :span="12">-->
|
||||
<!-- <el-form-item label="所属公司" prop="affiliatedCompanyId">-->
|
||||
<!-- <el-tree-select v-model="formData.affiliatedCompanyId" :data="companyOption" style="width: 100%;"-->
|
||||
<!-- filterable clearable :check-strictly="true"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col> <el-col :span="12">-->
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
@@ -139,18 +147,20 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||
<el-radio-group v-model="formData.industryUniversityResearch">
|
||||
<el-radio v-for="item in cacheStore.getDict('industry_university')"
|
||||
:key="item.value"
|
||||
:label="item.value">{{item.label}}</el-radio>
|
||||
<el-radio v-for="item in cacheStore.getDict('industry_university')"
|
||||
:key="item.value"
|
||||
:label="item.value">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||
<el-radio-group v-model="formData.governmentDeclaration">
|
||||
<el-radio v-for="item in cacheStore.getDict('government_declaration')"
|
||||
:key="item.value"
|
||||
:label="item.value">{{item.label}}</el-radio>
|
||||
<el-radio v-for="item in cacheStore.getDict('government_declaration')"
|
||||
:key="item.value"
|
||||
:label="item.value">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -230,13 +240,14 @@
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<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-else @click="handleResubmit">重新发布</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>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {debounce} from 'lodash'
|
||||
import {getDetail, getProcessInfo, requirementReported, resubmitReported} from "./api";
|
||||
import {ElMessage, ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
@@ -244,6 +255,8 @@ import {useCacheStore} from '@/stores/cache.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {getFormInfo} from "@/api/project-demand";
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
const processStore = useProcessStore()
|
||||
@@ -257,12 +270,14 @@ const tagsViewStore = useTagsView()
|
||||
const companyOption = ref([])
|
||||
const summaryForm = ref()
|
||||
const deploymentId = ref()
|
||||
const specialFundOption = ref([])
|
||||
const isSpecialFund = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const file = ref({})
|
||||
const formData = ref({
|
||||
industryUniversityResearch:'0',
|
||||
governmentDeclaration:'0',
|
||||
industryUniversityResearch: '0',
|
||||
governmentDeclaration: '0',
|
||||
})
|
||||
const rules = reactive({
|
||||
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
|
||||
@@ -290,6 +305,16 @@ const rules = reactive({
|
||||
serviceDescription: [{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) => {
|
||||
let tag = ''
|
||||
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
|
||||
@@ -304,12 +329,11 @@ const compositeParam = (item, type) => {
|
||||
tag: tag
|
||||
}
|
||||
}
|
||||
const getEditOtherFile = (val) => {
|
||||
console.log('getEditOtherFile', val)
|
||||
}
|
||||
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
file.value = compositeParam(val)
|
||||
formData.value.singleFile = compositeParam(val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
@@ -326,15 +350,16 @@ const getFileParam = (item) => {
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
// if (!instance) return
|
||||
// instance.validate(async (valid, fields) => {
|
||||
// if(JSON.stringify(file.value) == "{}"){
|
||||
// attachment.value.validate()
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
// if (!valid) return
|
||||
const handleSubmit = debounce(async (instance) => {
|
||||
console.log('formData.value',formData.value)
|
||||
if (!instance) return
|
||||
instance.validate(async (valid, fields) => {
|
||||
if (JSON.stringify(file.value) === "{}") {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let singleFile = {}
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
@@ -394,15 +419,21 @@ const handleSubmit = async (instance) => {
|
||||
name: 'Summary'
|
||||
})
|
||||
}
|
||||
// })
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
})
|
||||
})
|
||||
const handleResubmit = debounce(() => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
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 = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
fileId: attachment.value.singleFile?.fileId
|
||||
}
|
||||
fileArray = attachment.value.allFileList
|
||||
} else {
|
||||
@@ -438,7 +469,7 @@ const handleResubmit = () => {
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
const getDetailInfo = async () => {
|
||||
getDetail(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
@@ -453,6 +484,9 @@ const getDetailInfo = async () => {
|
||||
})
|
||||
}
|
||||
const init = async () => {
|
||||
const resFund = await getFundOption()
|
||||
specialFundOption.value = resFund.data
|
||||
await getIsFund()
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
getProcessInfo().then(res => {
|
||||
|
||||
@@ -143,9 +143,6 @@ const tableConfig = reactive({
|
||||
if (buttons.has("edit")) {
|
||||
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")) {
|
||||
btn.push({label: '上报', prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'})
|
||||
}
|
||||
@@ -163,6 +160,12 @@ const tableConfig = reactive({
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
{
|
||||
buttons.has("delete") ?
|
||||
<popover-delete name={row.requirementName} type={'需求'} btnType={'danger'}
|
||||
perm={['mosr:collect:del']} onDelete={() => handleDelete(row)}/>
|
||||
: ''
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<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%">
|
||||
<file-upload @getFile="getOtherFile" :showFileList="true"/>
|
||||
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
@@ -14,6 +23,11 @@
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const attachment = reactive({
|
||||
tag: ''
|
||||
})
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '关键词',
|
||||
@@ -64,9 +78,15 @@ const tableConfig = reactive({
|
||||
})
|
||||
const showTable=ref(true)
|
||||
const otherFileList = ref([])
|
||||
const getOtherFile = () => {
|
||||
|
||||
const handleUpload = () => {
|
||||
router.push({
|
||||
name: 'Filing/upload',
|
||||
query: {
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
|
||||
@@ -130,6 +130,7 @@ const getFileParam = (item) => {
|
||||
const handleSubmit = async () => {
|
||||
if (JSON.stringify(file.value) === "{}") {
|
||||
attachment.value.validate()
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
@@ -170,6 +171,7 @@ const handleResubmit = () => {
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
attachment.value.validate()
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ const tableConfig = reactive({
|
||||
},
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概况',
|
||||
label: '经济概算',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -135,7 +135,7 @@ const handleDownload = (row) => {
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
// getTagsOption()
|
||||
getTagsOption()
|
||||
handleSearch()
|
||||
</script>
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ const handleSubmit = (instance) => {
|
||||
if (!valid) return
|
||||
if(JSON.stringify(file.value) === "{}"){
|
||||
attachment.value.validate()
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
@@ -139,6 +140,7 @@ const handleResubmit = (instance) => {
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||
attachment.value.validate()
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ const tableConfig = reactive({
|
||||
},
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概况',
|
||||
label: '经济概算',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {uploadAttachment} from "@/api/project-manage";
|
||||
import {uploadAttachment,getTags} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
@@ -156,7 +156,7 @@ const handleSubmit = async (instance) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
// getTagsOption()
|
||||
getTagsOption()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -128,6 +128,12 @@ const handleSubmit = (instance) => {
|
||||
instance.validate(async (valid) => {
|
||||
if (JSON.stringify(file.value) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传申请书附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
@@ -170,6 +176,7 @@ const handleResubmit = async () => {
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
attachment.value.validate()
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ const tableConfig = reactive({
|
||||
},
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概况',
|
||||
label: '经济概算',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
@@ -212,9 +212,9 @@ const tableConfig = reactive({
|
||||
// if (buttons.has("delete")) {
|
||||
// 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'})
|
||||
}
|
||||
// }
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
|
||||
11
src/views/project-management/initiation/upload.vue
Normal file
11
src/views/project-management/initiation/upload.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<tag-and-file-upload :showInput="true"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -5,16 +5,16 @@
|
||||
<el-form-item label="专项资金名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入专项资金名称" clearable></el-input>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
<baseTitle title="介绍"></baseTitle>
|
||||
<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>
|
||||
<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"
|
||||
:isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
@@ -34,11 +34,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
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 {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
@@ -145,7 +145,7 @@ const submitParam = (item) => {
|
||||
introduce: item.introduce,
|
||||
name: item.name,
|
||||
files: files,
|
||||
// deploymentId: processInstanceData.value.deploymentId
|
||||
deploymentId: processInstanceData.value.deploymentId
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
@@ -187,7 +187,8 @@ const handleResubmit = () => {
|
||||
})
|
||||
}
|
||||
const init = async () => {
|
||||
getWorkflowInfo().then(res => {
|
||||
processDiagramViewer.value = false
|
||||
getFundProcess().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
@@ -216,7 +217,7 @@ const getDetailInfo = async () => {
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data.formData
|
||||
formData.value = res.data
|
||||
showTinymce.value = false
|
||||
showTable.value = false
|
||||
nextTick(() => {
|
||||
@@ -228,7 +229,7 @@ const getDetailInfo = async () => {
|
||||
}
|
||||
onMounted(async () => {
|
||||
loading.value = true
|
||||
// await init()
|
||||
await init()
|
||||
if (route.query.id) {
|
||||
await getDetailInfo()
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getFundDetail} from "@/api/special-fund";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getFundDetailProcess} from "@api/special-fund";
|
||||
const processStore = useProcessStore()
|
||||
const route = useRoute()
|
||||
const fundData = ref({})
|
||||
@@ -17,7 +17,8 @@ const getDetail = async () => {
|
||||
const specialFundId = route.query.id
|
||||
showTable.value = false
|
||||
loading.value = true
|
||||
const {code, data, msg} = await getFundDetail(specialFundId)
|
||||
fundProcessViewer.value = false
|
||||
const {code, data, msg} = await getFundDetailProcess(specialFundId)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
@@ -26,17 +27,17 @@ const getDetail = async () => {
|
||||
if (code === 1000) {
|
||||
fundData.value = data
|
||||
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(() => {
|
||||
fundProcessViewer.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 {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ const searchConfig = reactive([
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '资金金额',
|
||||
label: '资金金额(万元)',
|
||||
prop: 'fundAmount',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
@@ -41,7 +41,7 @@ const searchConfig = reactive([
|
||||
placeholder: '请输入资金金额查询'
|
||||
}
|
||||
}, {
|
||||
label: '剩余金额',
|
||||
label: '剩余金额(万元)',
|
||||
prop: 'residualAmount',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
@@ -65,14 +65,19 @@ const tableConfig = reactive({
|
||||
label: '专项资金名称',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
label: '审批人',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'fundAmount',
|
||||
label: '资金金额',
|
||||
label: '资金金额(万元)',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'residualAmount',
|
||||
label: '剩余金额',
|
||||
label: '剩余金额(万元)',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
@@ -80,13 +85,18 @@ const tableConfig = reactive({
|
||||
label: '项目数量',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'taskNode',
|
||||
label: '当前节点',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state == undefined) {
|
||||
if (row.state == undefined||row.state == 0) {
|
||||
return '--'
|
||||
} else {
|
||||
return (<Tag dictType={'special_fund'} value={row.state}/>)
|
||||
@@ -100,13 +110,13 @@ const tableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
// let buttons = new Set(Array.from(row.buttons))
|
||||
// if (buttons.has("details")) {
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
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'})
|
||||
// }
|
||||
}
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
@@ -124,6 +134,13 @@ const tableConfig = reactive({
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
{
|
||||
buttons.has("delete") ?
|
||||
<popover-delete name={row.name} type={'专项资金'} btnType={'danger'}
|
||||
perm={['mosr:requirement:del']}
|
||||
onDelete={() => handleDelete(row)}/>
|
||||
: ''
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -63,27 +63,27 @@ const nullBlockClick = (e) => {
|
||||
disVisible()
|
||||
}
|
||||
}
|
||||
const addApprovalNode = debounce(() => {
|
||||
const addApprovalNode = () => {
|
||||
emit('insertNode', "APPROVAL")
|
||||
disVisible()
|
||||
})
|
||||
}
|
||||
|
||||
const addCcNode = debounce(() => {
|
||||
const addCcNode = () => {
|
||||
emit('insertNode', "CC")
|
||||
disVisible()
|
||||
})
|
||||
const addDelayNode = debounce(() => {
|
||||
}
|
||||
const addDelayNode =() => {
|
||||
emit('insertNode', "DELAY")
|
||||
disVisible()
|
||||
})
|
||||
const addConditionsNode = debounce(() => {
|
||||
}
|
||||
const addConditionsNode = () => {
|
||||
emit('insertNode', "CONDITIONS")
|
||||
disVisible()
|
||||
})
|
||||
const addConcurrentsNode = debounce(() => {
|
||||
}
|
||||
const addConcurrentsNode = () => {
|
||||
emit('insertNode', "CONCURRENTS")
|
||||
disVisible()
|
||||
})
|
||||
}
|
||||
const addTriggerNode = () => {
|
||||
emit('insertNode', "TRIGGER")
|
||||
disVisible()
|
||||
|
||||
@@ -91,7 +91,6 @@ const formPermsLoadMosr = (oldPermMap, perms) => {
|
||||
old.required = perm.required;
|
||||
formPerms.value.push(old);
|
||||
} else {
|
||||
console.log(perm)
|
||||
if (perm.id === 'fileList'){
|
||||
formPerms.value.push({
|
||||
id: perm.id, //todo ,id 就是字段名称
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<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" v-perm="['rapid:regular:export']" @click="handleExport" :icon="Download" plain>导出
|
||||
<el-button type="primary" @click="handleExport" :icon="Download" plain>导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -69,8 +69,8 @@ export default defineConfig({
|
||||
open: true,
|
||||
proxy: {
|
||||
// '/api/workflow': {
|
||||
// target: 'http://frp.feashow.cn:31800/',
|
||||
// // target: 'http://clay.frp.feashow.cn/',
|
||||
// // target: 'http://frp.feashow.cn:31800/',
|
||||
// target: 'http://clay.frp.feashow.cn/',
|
||||
// // target: 'http://192.168.31.175:8000',
|
||||
// changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||
|
||||
Reference in New Issue
Block a user