Merge pull request 'master' (#264) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/264
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"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -82,3 +82,18 @@ export const deleteDemand = (id) => {
|
||||
method: "delete"
|
||||
});
|
||||
};
|
||||
//需求征集附件列表(归档)
|
||||
export const getRequirementAttachment = (params) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/attachments',
|
||||
method: "get",
|
||||
params:params
|
||||
});
|
||||
};
|
||||
export const uploadRequirementAttachment= (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/upload',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
@@ -27,6 +27,20 @@ export const resubmitApply = (data) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const getInitiationAttachment = (params) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/approval/attachments',
|
||||
method: "get",
|
||||
params:params
|
||||
});
|
||||
};
|
||||
export const uploadInitiationAttachment= (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/approval/upload',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
//项目实施
|
||||
export const getCheckDetail = (projectId) => {
|
||||
return request({
|
||||
@@ -77,13 +91,11 @@ export const addLedger = (data) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getTags = (projectId) => {
|
||||
export const getTags = (params) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/implementation/tags',
|
||||
url: '/workflow/mosr/project/implementation/option',
|
||||
method: "get",
|
||||
params:{
|
||||
projectId:projectId
|
||||
}
|
||||
params:params
|
||||
});
|
||||
};
|
||||
//项目归档
|
||||
@@ -114,3 +126,17 @@ export const getProjectConclusionProcess = () => {
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const getFilingAttachment = (params) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/filing/attachments',
|
||||
method: "get",
|
||||
params:params
|
||||
});
|
||||
};
|
||||
export const uploadFilingAttachment= (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/filing/upload',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<el-button type="danger" link @click="deleteOtherFile(singleFile,1)">删除</el-button>
|
||||
</template>
|
||||
<template v-else-if="!preview||JSON.stringify(singleFile) === '{}'||singleFile==null">
|
||||
<file-upload @getFile="getAttachment" :showFileList="showFileList" :maxSize="0" @delete="deleteAttachment"/>
|
||||
<file-upload @getFile="getAttachment" :showFileList="showFileList" :multiple="false" :maxSize="1" :disabled="isSingleFile" @delete="deleteAttachment"/>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import FileUpload from '@/components/FileUpload.vue'
|
||||
import {deleteFile, downloadFile} from "../api/project-demand";
|
||||
import {deleteFile, downloadFile} from "@/api/project-demand";
|
||||
import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
||||
|
||||
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||
@@ -63,20 +63,21 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
// {
|
||||
// prop: 'oper',
|
||||
// label: '操作',
|
||||
// align: 'center',
|
||||
// showOverflowTooltip: false,
|
||||
// currentRender: ({row, index}) => {
|
||||
// return (
|
||||
// <div>
|
||||
// <el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
// <el-button type="primary" size="large" link onClick={() => deleteOtherFile(row)}>删除</el-button>
|
||||
// </div>
|
||||
// )
|
||||
// }
|
||||
// }
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// <el-button type="primary" size="large" link onClick={() => deleteOtherFile(row)}>删除</el-button>
|
||||
]
|
||||
})
|
||||
const rules = reactive({
|
||||
@@ -84,6 +85,7 @@ const rules = reactive({
|
||||
})
|
||||
const applyForm = ref()
|
||||
const singleFile = ref()
|
||||
const isSingleFile = ref(false)
|
||||
const allFileList = ref([])
|
||||
const props = defineProps({
|
||||
showFileList: {
|
||||
@@ -110,22 +112,34 @@ watch(() => props.showTable, (newVal) => {
|
||||
props.showTable = newVal
|
||||
}, {deep: true})
|
||||
watch(() => props.otherFileList, (newVal) => {
|
||||
newVal.forEach(item => {
|
||||
allFileList.value.push(item)
|
||||
})
|
||||
console.log('newotherFileList',newVal)
|
||||
if (props.preview) {
|
||||
if(props.formData.fileList==null){
|
||||
allFileList.value=newVal
|
||||
}else {
|
||||
newVal?.forEach(item => {
|
||||
allFileList.value.push(item)
|
||||
})
|
||||
}
|
||||
|
||||
}else {
|
||||
allFileList.value=newVal
|
||||
}
|
||||
}, {deep: true})
|
||||
watch(() => props.formData.fileList, (newVal) => {
|
||||
console.log('newVal-fileList',newVal)
|
||||
if (props.preview) {
|
||||
newVal.forEach(item => {
|
||||
allFileList.value.push(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) => {
|
||||
isSingleFile.value=true
|
||||
emit('getAttachment', val)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
@@ -134,7 +148,12 @@ const getOtherFile = (val) => {
|
||||
const deleteAttachment = (val) => {
|
||||
deleteFile(val).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success("删除成功");
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message:"删除成功",
|
||||
type:'success'
|
||||
})
|
||||
isSingleFile.value=false
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司">
|
||||
<span>{{ formData.companyIds }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="所属公司">-->
|
||||
<!-- <span>{{ formData.companyIds }}</span>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="征集类型">
|
||||
<span>{{ formData.collectType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="截止时间">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
@@ -71,13 +71,11 @@
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {matterTree} from '@/utils/matterTree.js';
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const emit = defineEmits(['getInfo',"update:formData"])
|
||||
const form = ref()
|
||||
const showTable = ref(false)
|
||||
const companyNameArray = ref([])
|
||||
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
@@ -146,28 +144,11 @@ const handleDownload = (row) => {
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const getCompanyOptionItem = (val) => {
|
||||
if (val instanceof Array) {
|
||||
val.forEach(item => {
|
||||
matterTree(companyNameArray.value, props.companyOption, item)
|
||||
})
|
||||
}
|
||||
let uniqueArr = Array.from(new Set(companyNameArray.value));
|
||||
return uniqueArr.join(',');
|
||||
}
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
|
||||
watch(() => props.companyOption, (newVal) => {
|
||||
props.companyOption = newVal
|
||||
}, {deep: true})
|
||||
watch(() => props.formData, (newVal) => {
|
||||
if(newVal!=null){
|
||||
props.formData.companyIds = getCompanyOptionItem(newVal.companyIds)
|
||||
}
|
||||
}, {deep: true})
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
props.processViewer = newVal
|
||||
}, {deep: true})
|
||||
|
||||
@@ -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,7 @@ const schema = computed(() => {
|
||||
props: {
|
||||
placeholder: '请输入审核意见',
|
||||
type: 'textarea',
|
||||
maxlength: 140
|
||||
rows: 3
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -51,7 +51,13 @@ const back = () => {
|
||||
router.push({name: 'Filing'})
|
||||
break;
|
||||
case 'Implementation/detail':
|
||||
router.push({name: 'Implementation'})
|
||||
if (route.query.step === '20') {
|
||||
router.push({name: 'Initiation'})
|
||||
} else if (route.query.step === '40') {
|
||||
router.push({name: 'Implementation'})
|
||||
} else if (route.query.step === '50') {
|
||||
router.push({name: 'Filing'})
|
||||
}
|
||||
break;
|
||||
case 'Summary/detail':
|
||||
router.push({name: 'Summary'})
|
||||
@@ -59,6 +65,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;
|
||||
}
|
||||
}
|
||||
// 驳回
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专项资金" prop="specialFund">
|
||||
<span>{{ localFormData.specialFund }}</span>
|
||||
<el-form-item label="专项资金" prop="specialFund" v-if="localFormData.specialFund">
|
||||
<span>{{ changeName(fundOption, localFormData.specialFund) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -22,59 +22,54 @@
|
||||
<span>{{ formData.endTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司" prop="affiliatedCompanyId">
|
||||
<span>{{ localFormData.affiliatedCompanyId }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<span>{{ localFormData.projectType }}</span>
|
||||
<span>{{ filterDict(cacheStore.getDict('project_type'), localFormData.projectType) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="研发主体" prop="rdSubject">
|
||||
<span>{{ localFormData.rdSubject }}</span>
|
||||
<span>{{ filterDict(cacheStore.getDict('rd_subject'), localFormData.rdSubject) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出资类型" prop="investmentType">
|
||||
<span>{{ localFormData.investmentType }}</span>
|
||||
<span>{{ filterDict(cacheStore.getDict('invest_type'), localFormData.investmentType) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目影响" prop="projectImpact">
|
||||
<span>{{ localFormData.projectImpact }}</span>
|
||||
<span>{{ filterDict(cacheStore.getDict('project_impact'), localFormData.projectImpact) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属业务板块" prop="businessSegment">
|
||||
<span>{{ localFormData.businessSegment }}</span>
|
||||
<span>{{ filterDict(cacheStore.getDict('business_segment'), localFormData.businessSegment) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预期成果形式" prop="resultForm">
|
||||
<span>{{ localFormData.resultForm }}</span>
|
||||
<span>{{ filterDict(cacheStore.getDict('result_form'), localFormData.resultForm) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预期技术标准制定" prop="technicalStandard">
|
||||
<span>{{ localFormData.technicalStandard }}</span>
|
||||
<span>{{ filterDict(cacheStore.getDict('technical_standard'), localFormData.technicalStandard)}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||
<span>{{ localFormData.industryUniversityResearch }}</span>
|
||||
<span>{{ filterDict(cacheStore.getDict('industry_university'), localFormData.industryUniversityResearch) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||
<span>{{ localFormData.governmentDeclaration }}</span>
|
||||
<span>{{ filterDict(cacheStore.getDict('government_declaration'), localFormData.governmentDeclaration) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
||||
<span>{{ localFormData.intellectualProperty }}</span>
|
||||
<span>{{ filterDict(cacheStore.getDict('intellectual_property'), localFormData.intellectualProperty)}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -139,32 +134,32 @@
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="localFormData.auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <div v-if="data.taskId">-->
|
||||
<!-- <baseTitle title="审核意见"></baseTitle>-->
|
||||
<!-- <el-form-item prop="auditOpinion">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="localFormData.auditOpinion"-->
|
||||
<!-- :rows="3"-->
|
||||
<!-- type="textarea"-->
|
||||
<!-- placeholder="请输入审核意见"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/>
|
||||
<process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="oper-page-btn" v-if="data.state === '1' && data.taskId">-->
|
||||
<!-- <el-button @click="handleReject(summaryForm)">驳回</el-button>-->
|
||||
<!-- <el-button color="#DED0B2" @click="handleAgree">同意</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="oper-page-btn" v-if="data.state === '1' && data.taskId">-->
|
||||
<!-- <el-button @click="handleReject(summaryForm)">驳回</el-button>-->
|
||||
<!-- <el-button color="#DED0B2" @click="handleAgree">同意</el-button>-->
|
||||
<!-- </div>-->
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
@@ -173,11 +168,13 @@
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {ElMessage, ElNotification} from "element-plus";
|
||||
import {agreeTask, rejectTask} from "@/api/project-demand";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const cacheStore = useCacheStore()
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
@@ -234,52 +231,38 @@ const tableConfig = reactive({
|
||||
]
|
||||
})
|
||||
const router = useRouter()
|
||||
const summaryForm = ref()
|
||||
const fundOption = ref([])
|
||||
const companyOption = ref([])
|
||||
const dictName = ref({})
|
||||
const rules = reactive({
|
||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||
})
|
||||
const handleReject = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
let approve = {
|
||||
taskId: props.data.taskId,
|
||||
auditOpinion: localFormData.value.auditOpinion,
|
||||
}
|
||||
rejectTask(approve).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label=''
|
||||
if (data instanceof Array) {
|
||||
data.find(item =>{
|
||||
if( item.value == value){
|
||||
label= item.label
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
const handleAgree = () => {
|
||||
let approve = {
|
||||
taskId: props.data.taskId,
|
||||
auditOpinion: localFormData.value.auditOpinion,
|
||||
formData: localFormData.value
|
||||
}
|
||||
agreeTask(approve).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
return label
|
||||
}
|
||||
const getFundOptions = async () => {
|
||||
const resFund = await getFundOption()
|
||||
fundOption.value = resFund.data
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
const changeName = (option, value) => {
|
||||
let name = ''
|
||||
option.forEach(item => {
|
||||
if (item.value == value) {
|
||||
name = item.label
|
||||
}
|
||||
})
|
||||
return name
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
@@ -291,11 +274,6 @@ const handleDownload = (row) => {
|
||||
})
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.formData,
|
||||
(val) => {
|
||||
}
|
||||
)
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
props.processViewer = newVal
|
||||
}, {deep: true})
|
||||
@@ -304,8 +282,9 @@ watch(() => props.loading, (newVal) => {
|
||||
}, {deep: true})
|
||||
|
||||
watchEffect(() => {
|
||||
Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||
return Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||
})
|
||||
getFundOptions()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
:headers="headers"
|
||||
:limit="maxSize"
|
||||
with-credentials
|
||||
:multiple="maxSize > 0"
|
||||
:multiple="multiple"
|
||||
:data="uploadParams"
|
||||
:show-file-list="showFileList"
|
||||
:auto-upload="true"
|
||||
@@ -19,8 +19,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ElMessage,ElMessageBox} from "element-plus";
|
||||
import { ElMessageBox, ElNotification} from "element-plus";
|
||||
import {getToken} from '@/utils/auth'
|
||||
|
||||
const baseURL = import.meta.env.VITE_BASE_URL
|
||||
const uploadFileUrl = ref(baseURL + "/workflow/process/file/upload")
|
||||
const headers = reactive({
|
||||
@@ -43,13 +44,16 @@ const props = defineProps({
|
||||
showFileList: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},disabled: {
|
||||
}, disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}, multiple: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(["input", "getFile","delete"])
|
||||
const emit = defineEmits(["input", "getFile", "delete"])
|
||||
const fileList = ref([])
|
||||
const _value = computed({
|
||||
get() {
|
||||
@@ -59,7 +63,7 @@ const _value = computed({
|
||||
emit("input", val);
|
||||
}
|
||||
})
|
||||
const beforeRemove = (file, fileList) => {
|
||||
const beforeRemove = (file) => {
|
||||
return ElMessageBox.confirm(`确认删除名称为${file.name}的文件吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -67,38 +71,32 @@ const beforeRemove = (file, fileList) => {
|
||||
}).then(() => true)
|
||||
}
|
||||
|
||||
const handleRemove = (file, fileList) => {
|
||||
emit("delete",file.response.data.id)
|
||||
const handleRemove = (file) => {
|
||||
emit("delete", file.response.data.id)
|
||||
}
|
||||
const beforeUpload = (file) => {
|
||||
// const FileExt = file.name.replace(/.+\./, "");
|
||||
// if (['zip', 'rar', 'pdf', 'doc', 'docx', 'xlsx'].indexOf(FileExt.toLowerCase()) === -1) {
|
||||
// ElMessage.warning('请上传后缀名为pdf、doc、docx、xlsx、zip或rar的文件!');
|
||||
// return false;
|
||||
// } else
|
||||
// if (props.maxSize > 0 && file.size / 1024 / 1024 > props.maxSize) {
|
||||
// ElMessage.warning(`每个文件最大不超过 ${props.maxSize}MB`)
|
||||
// } else {
|
||||
const beforeUpload = () => {
|
||||
loading.value = true
|
||||
return true
|
||||
// }
|
||||
}
|
||||
const handleUploadSuccess = (res, file) => {
|
||||
if (res.code !== 1000) {
|
||||
loading.value = false
|
||||
ElMessage.error("上传失败")
|
||||
} else {
|
||||
loading.value = false
|
||||
ElMessage.success("上传成功")
|
||||
}
|
||||
const handleUploadSuccess = (res) => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.code === 1000 ? '上传成功' : '上传失败',
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
loading.value = false
|
||||
showTable.value = true
|
||||
let data = res.data
|
||||
fileList.value.push(data)
|
||||
emit("getFile", res.data)
|
||||
}
|
||||
const uploadError=(err)=>{
|
||||
const uploadError = () => {
|
||||
loading.value = false
|
||||
ElMessage.error("上传失败,请稍后再试!")
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: "上传失败,请稍后再试!",
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -108,6 +106,7 @@ a {
|
||||
font-size: 14px;
|
||||
color: #2a99ff;
|
||||
}
|
||||
|
||||
:deep(.el-upload-list) {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
148
src/components/SearchFilesByTag.vue
Normal file
148
src/components/SearchFilesByTag.vue
Normal file
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<el-form :model="attachment" inline>
|
||||
<el-form-item label="关键词" prop="name">
|
||||
<el-input v-model="attachment.name" placeholder="请输入" clearable filterable style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="标签" prop="tag" v-if="type==='3'">
|
||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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>
|
||||
<el-card style="width: 100%">
|
||||
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getTags} from "@/api/project-manage";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const attachment = reactive({
|
||||
name: '',
|
||||
tag: ''
|
||||
})
|
||||
const emit = defineEmits(['search'])
|
||||
const props = defineProps({
|
||||
otherFileList: {
|
||||
type: Array,
|
||||
default: []
|
||||
}, type: {
|
||||
type: String,
|
||||
default: '0'
|
||||
}
|
||||
})
|
||||
const tagsOption = ref([])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '附件名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '自定义标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'processNodeTag',
|
||||
label: '内置标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
label: '上传时间',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const showTable = ref(true)
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.id) return
|
||||
let params = {
|
||||
projectId: route.query.id
|
||||
}
|
||||
getTags(params).then(res => {
|
||||
|
||||
if (res.code === 1000) {
|
||||
tagsOption.value = res.data
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleSearch = () => {
|
||||
emit('search', attachment)
|
||||
}
|
||||
const handleUpload = () => {
|
||||
emit('upload')
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
watch(() => props.type, (val) => {
|
||||
console.log('va四川省l',val)
|
||||
props.type = val
|
||||
if (val === '3') {
|
||||
getTagsOption()
|
||||
}
|
||||
})
|
||||
watch(() => props.otherFileList, (val) => {
|
||||
showTable.value = false
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
props.otherFileList = val
|
||||
})
|
||||
if (props.type === '3') {
|
||||
getTagsOption()
|
||||
}
|
||||
defineExpose({
|
||||
tagsOption
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
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: 300px" v-if="showInput"/>
|
||||
<el-select v-model="formData.tagName" placeholder="请选择标签" clearable filterable style="width: 300px" 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: true
|
||||
},
|
||||
})
|
||||
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);
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<div class="fv-table-btn" v-if="tableConfig.btns">
|
||||
<div class="table-head-btn">
|
||||
<el-button
|
||||
v-for="btn in tableConfig.btns"
|
||||
:key="btn.key"
|
||||
:type="btn.type || ''"
|
||||
:color="btn.color || ''"
|
||||
v-perm="btn.auth || ['*:*:*']"
|
||||
@click="handleClickBtns(btn.key)"
|
||||
v-for="btn in tableConfig.btns"
|
||||
:key="btn.key"
|
||||
:type="btn.type || ''"
|
||||
:color="btn.color || ''"
|
||||
v-perm="btn.auth || ['*:*:*']"
|
||||
@click="handleClickBtns(btn.key)"
|
||||
>
|
||||
{{ btn.name }}
|
||||
</el-button>
|
||||
@@ -19,7 +19,9 @@
|
||||
<div v-if="isSettingCol" style="float: right">
|
||||
<el-tooltip effect="dark" content="列配置" placement="bottom">
|
||||
<el-button ref="buttonRef" link>
|
||||
<el-icon size="18"><Setting /></el-icon>
|
||||
<el-icon size="18">
|
||||
<Setting/>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-popover
|
||||
@@ -30,7 +32,8 @@
|
||||
virtual-triggering
|
||||
trigger="click">
|
||||
<div class="col-setting-checkall">
|
||||
<el-checkbox label="列展示" v-model="localData.allColShow" :indeterminate="localData.indeterminate" @change="changeIsShowAll"></el-checkbox>
|
||||
<el-checkbox label="列展示" v-model="localData.allColShow" :indeterminate="localData.indeterminate"
|
||||
@change="changeIsShowAll"></el-checkbox>
|
||||
</div>
|
||||
<div class="col-setting-list">
|
||||
<el-checkbox-group v-model="localData.checkGroup" @change="changeColShow">
|
||||
@@ -49,19 +52,19 @@
|
||||
<!-- 表格部分 -->
|
||||
<div class="fv-table">
|
||||
<el-table
|
||||
:data="localData.list"
|
||||
v-loading="localData.loading"
|
||||
:row-key="tableConfig?.rowKey || 'id'"
|
||||
v-bind="$attrs"
|
||||
table-layout="auto"
|
||||
:show-overflow-tooltip="true"
|
||||
highlight-current-row
|
||||
@selection-change="selectionChange"
|
||||
@row-click="rowClick"
|
||||
@row-dblclick="rowDblclick"
|
||||
@cell-click="cellClick"
|
||||
v-tabh
|
||||
ref="tableInstance"
|
||||
:data="localData.list"
|
||||
v-loading="localData.loading"
|
||||
:row-key="tableConfig?.rowKey || 'id'"
|
||||
v-bind="$attrs"
|
||||
table-layout="auto"
|
||||
:show-overflow-tooltip="true"
|
||||
highlight-current-row
|
||||
@selection-change="selectionChange"
|
||||
@row-click="rowClick"
|
||||
@row-dblclick="rowDblclick"
|
||||
@cell-click="cellClick"
|
||||
v-tabh
|
||||
ref="tableInstance"
|
||||
>
|
||||
<template #default>
|
||||
<fvTableColumn v-for="column in localData.columns" :key="column.prop" :columns="column">
|
||||
@@ -82,22 +85,22 @@
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<fvPagination
|
||||
v-if="pagination"
|
||||
:current-page="localData.query.pageNum"
|
||||
:page-size="localData.query.pageSize"
|
||||
:page-sizes="[10, 20, 30, 40,50]"
|
||||
:total="localData.total"
|
||||
@changeSize="handleSizeChange"
|
||||
@goPage="handleCurrentChange"
|
||||
>
|
||||
v-if="pagination"
|
||||
:current-page="localData.query.pageNum"
|
||||
:page-size="localData.query.pageSize"
|
||||
:page-sizes="[10, 20, 30, 40,50]"
|
||||
:total="localData.total"
|
||||
@changeSize="handleSizeChange"
|
||||
@goPage="handleCurrentChange"
|
||||
>
|
||||
</fvPagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { requestList } from '../../api/common';
|
||||
import {ElNotification} from 'element-plus';
|
||||
import {requestList} from '../../api/common';
|
||||
|
||||
const props = defineProps({
|
||||
//表格配置
|
||||
@@ -148,8 +151,8 @@ const handleClickBtns = (key) => {
|
||||
}
|
||||
|
||||
const filterColumns = () => {
|
||||
localData.columns = props.tableConfig.columns.map(item=>{
|
||||
if(item.prop) {
|
||||
localData.columns = props.tableConfig.columns.map(item => {
|
||||
if (item.prop) {
|
||||
return {
|
||||
...item
|
||||
}
|
||||
@@ -158,10 +161,10 @@ const filterColumns = () => {
|
||||
}
|
||||
|
||||
const changeIsShowAll = (val) => {
|
||||
if(val) {
|
||||
if (val) {
|
||||
filterColumns()
|
||||
localData.indeterminate = false
|
||||
localData.checkGroup = props.tableConfig.columns.map(item=>item.prop)
|
||||
localData.checkGroup = props.tableConfig.columns.map(item => item.prop)
|
||||
} else {
|
||||
localData.columns.length = 0
|
||||
localData.checkGroup.length = 0
|
||||
@@ -170,10 +173,10 @@ const changeIsShowAll = (val) => {
|
||||
}
|
||||
|
||||
const changeColShow = (val) => {
|
||||
if(val.length == props.tableConfig.columns.length) {
|
||||
if (val.length == props.tableConfig.columns.length) {
|
||||
localData.indeterminate = false
|
||||
localData.allColShow = true
|
||||
} else if(val.length !== props.tableConfig.columns.length && val.length != 0) {
|
||||
} else if (val.length !== props.tableConfig.columns.length && val.length != 0) {
|
||||
localData.allColShow = false
|
||||
localData.indeterminate = true
|
||||
} else {
|
||||
@@ -181,9 +184,9 @@ const changeColShow = (val) => {
|
||||
localData.allColShow = false
|
||||
}
|
||||
const template = []
|
||||
props.tableConfig.columns.forEach(item=>{
|
||||
val.forEach(v=>{
|
||||
if(item.prop == v) {
|
||||
props.tableConfig.columns.forEach(item => {
|
||||
val.forEach(v => {
|
||||
if (item.prop == v) {
|
||||
template.push(item)
|
||||
}
|
||||
})
|
||||
@@ -194,22 +197,31 @@ const changeColShow = (val) => {
|
||||
filterColumns()
|
||||
|
||||
const getList = async () => {
|
||||
const { api, params } = props.tableConfig
|
||||
const {api, params} = props.tableConfig
|
||||
const queryParmas = {...localData.query, ...params}
|
||||
if(api) {
|
||||
if (api) {
|
||||
localData.loading = true
|
||||
try {
|
||||
const { code, data, msg } = await requestList(api, queryParmas)
|
||||
if ( code === 1000 ) {
|
||||
const {code, data, msg} = await requestList(api, queryParmas)
|
||||
|
||||
if (code === 1000) {
|
||||
localData.list = data.rows
|
||||
localData.total = data.total
|
||||
localData.loading = false
|
||||
} else {
|
||||
ElMessage.error(msg)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
localData.loading = false
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage.error('请求数据失败')
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请求数据失败',
|
||||
type: 'error'
|
||||
})
|
||||
localData.loading = false
|
||||
}
|
||||
} else {
|
||||
@@ -246,13 +258,13 @@ const handleCurrentChange = (val) => {
|
||||
getList()
|
||||
}
|
||||
|
||||
watchEffect(()=>{
|
||||
if(localData.allColShow) {
|
||||
localData.checkGroup = props.tableConfig.columns.map(item=>item.prop)
|
||||
watchEffect(() => {
|
||||
if (localData.allColShow) {
|
||||
localData.checkGroup = props.tableConfig.columns.map(item => item.prop)
|
||||
}
|
||||
})
|
||||
//刷新
|
||||
const refresh = ({resetPage=false}={}) => {
|
||||
const refresh = ({resetPage = false} = {}) => {
|
||||
resetPage ? localData.query.pageNum = 1 : null
|
||||
getList()
|
||||
}
|
||||
@@ -265,7 +277,7 @@ const getQuery = () => {
|
||||
return localData.query
|
||||
}
|
||||
|
||||
defineExpose({ refresh, updateLoading, getQuery, tableInstance })
|
||||
defineExpose({refresh, updateLoading, getQuery, tableInstance})
|
||||
|
||||
onMounted(() => {
|
||||
getList()
|
||||
@@ -277,20 +289,24 @@ onMounted(() => {
|
||||
.col-setting-checkall {
|
||||
border-bottom: 1px solid rgb(210, 210, 213);
|
||||
}
|
||||
|
||||
.col-setting-list {
|
||||
max-height: 45vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.table-head-btn {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.fv-table-btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.fv-table {
|
||||
:deep(.el-tooltip) {
|
||||
width: 100% !important;
|
||||
|
||||
@@ -26,9 +26,11 @@ import Breadcrumb from './Breadcrumb.vue';
|
||||
import Hamburger from './Hamburger.vue';
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import {usePermisstionStroe} from '@/stores/permisstion'
|
||||
import { useTagsView } from '@/stores/tagsview';
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const permisstionStore = usePermisstionStroe()
|
||||
const tagsViewStore = useTagsView()
|
||||
const userInfo = ref({})
|
||||
const visitedP = ref(false)
|
||||
const router = useRouter()
|
||||
@@ -57,6 +59,8 @@ const handleLogout = () => {
|
||||
visitedP.value = !visitedP.value
|
||||
authStore.userLogout()
|
||||
permisstionStore.removeMenu()
|
||||
permisstionStore.setIsSuccessReq()
|
||||
tagsViewStore.removeAllTagView()
|
||||
router.push('/login')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -56,11 +56,16 @@ export const useTagsView = defineStore('tagsView',()=>{
|
||||
router.push(lastTagView.path)
|
||||
}
|
||||
|
||||
const removeAllTagView = () => {
|
||||
visitedViews.value.length = 0
|
||||
}
|
||||
|
||||
return {
|
||||
visitedViews,
|
||||
addVisitedViews,
|
||||
delVisitedViews,
|
||||
delOtherVisitedViews,
|
||||
delViewAndGoView
|
||||
delViewAndGoView,
|
||||
removeAllTagView
|
||||
}
|
||||
})
|
||||
|
||||
@@ -97,12 +97,12 @@
|
||||
<!-- </el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="subtotal" label="小计">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.subtotal" placeholder="请输入小计" clearable>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="subtotal" label="小计">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input v-model="scope.row.subtotal" placeholder="请输入小计" clearable>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="oper" label="操作">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="handleCopy(scope.row)" link style="font-size: 18px">复制</el-button>
|
||||
@@ -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()
|
||||
@@ -138,7 +147,7 @@ const form = ref()
|
||||
const nameOptions = ref([
|
||||
{
|
||||
label: "某项目",
|
||||
value: '2'
|
||||
value: '42'
|
||||
}
|
||||
])
|
||||
const researchOptions = ref([
|
||||
@@ -159,7 +168,7 @@ const tableData = ref([
|
||||
annuity: '',
|
||||
workday: '',
|
||||
researchDuration: '',
|
||||
subtotal: '',
|
||||
// subtotal: '',
|
||||
}
|
||||
])
|
||||
const handleAdd = () => {
|
||||
@@ -174,7 +183,7 @@ const handleAdd = () => {
|
||||
annuity: '',
|
||||
workday: '',
|
||||
researchDuration: '',
|
||||
subtotal: '',
|
||||
// subtotal: '',
|
||||
}
|
||||
tableData.value.push(row)
|
||||
}
|
||||
@@ -190,7 +199,8 @@ const handleSubmit = (instance) => {
|
||||
if (!valid) return
|
||||
let params = {
|
||||
...formData.value,
|
||||
usrAllocations: tableData.value
|
||||
usrAllocations: tableData.value,
|
||||
deploymentId: processInstanceData.value.deploymentId,
|
||||
}
|
||||
const {code, msg} = await addAllocation(params)
|
||||
ElNotification({
|
||||
@@ -219,11 +229,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>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
// import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
|
||||
const router = useRouter();
|
||||
const searchConfig = reactive([
|
||||
@@ -42,16 +42,17 @@ const searchConfig = reactive([
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
},
|
||||
colProps: {}
|
||||
}, {
|
||||
label: '状态',
|
||||
prop: 'state',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择状态',
|
||||
clearable: true,
|
||||
cacheKey: 'special_fund'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: '状态',
|
||||
// prop: 'state',
|
||||
// component: shallowRef(fvSelect),
|
||||
// props: {
|
||||
// placeholder: '请选择状态',
|
||||
// clearable: true,
|
||||
// cacheKey: 'special_fund'
|
||||
// }
|
||||
// },
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
@@ -76,7 +77,7 @@ const tableConfig = reactive({
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'special_fund'} value={row.state}/>)
|
||||
// currentRender: ({row, index}) => (<Tag dictType={'special_fund'} value={row.state}/>)
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
@@ -89,28 +90,25 @@ const tableConfig = reactive({
|
||||
if(row.buttons){
|
||||
buttons = new Set(Array.from(row.buttons))
|
||||
}
|
||||
// if (buttons.has("details")) {
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
// }
|
||||
// if (buttons.has("edit")) {
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
// }
|
||||
// if (buttons.has("delete")) {
|
||||
// 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'})
|
||||
// }
|
||||
// if (buttons.has("report")) {
|
||||
}
|
||||
if (buttons.has("report")) {
|
||||
btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
// }
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
v-perm={item.prem}
|
||||
// v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
@@ -119,11 +117,11 @@ const tableConfig = reactive({
|
||||
))
|
||||
}
|
||||
{
|
||||
// buttons.has("delete") ?
|
||||
buttons.has("delete") ?
|
||||
<popover-delete name={row.requirementName} type={'费用分摊'} btnType={'danger'}
|
||||
perm={['mosr:requirement:del']}
|
||||
onDelete={() => handleDelete(row)}/>
|
||||
// : ''
|
||||
: ''
|
||||
}
|
||||
</div>
|
||||
)
|
||||
@@ -151,7 +149,7 @@ const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Share/detail',
|
||||
query: {
|
||||
id:row.id
|
||||
id:row.allocationId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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: 600px;height: 600px" 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,12 +233,9 @@ 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: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
processInstanceData.value = data
|
||||
@@ -226,7 +251,12 @@ const init = async () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
} else {
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -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: 600px;
|
||||
}
|
||||
.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>
|
||||
@@ -35,7 +40,7 @@
|
||||
<baseTitle title="附件列表"></baseTitle>
|
||||
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig"
|
||||
<fvTable style="width: 100%;max-height: 600px;height: 600px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
@@ -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>
|
||||
@@ -79,9 +86,10 @@ import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.v
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getInfo, agreeTask, rejectTask, downloadFile} from "@/api/project-demand/index.js";
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {ElMessage} from "element-plus";
|
||||
import {ElNotification} 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)
|
||||
@@ -161,14 +170,16 @@ const handleSubmit = () => {
|
||||
formData: formData.value
|
||||
}
|
||||
agreeTask(approve).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Requirement'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -181,14 +192,16 @@ const handleReject = (instance) => {
|
||||
auditOpinion: formData.value.auditOpinion,
|
||||
}
|
||||
rejectTask(approve).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Requirement'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -197,8 +210,12 @@ 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) => {
|
||||
const getCompanyOptionItem = (val) => {
|
||||
if (val !== undefined) {
|
||||
val.forEach(item => {
|
||||
matterTree(companyNameArray.value, companyOption.value, item)
|
||||
@@ -219,11 +236,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)
|
||||
data.formData.companyIds = getCompanyOptionItem(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;
|
||||
@@ -247,7 +272,9 @@ onMounted(async () => {
|
||||
:deep(.el-empty__description) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
:deep(.el-table--fit ){
|
||||
height: 600px;
|
||||
}
|
||||
.detail-block {
|
||||
overflow: hidden;
|
||||
padding-right: 10px;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import Tag from '@/components/Tag.vue'
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {ElMessage, ElNotification} from "element-plus";
|
||||
import { ElNotification} from "element-plus";
|
||||
import {deleteDemand} from "@/api/project-demand";
|
||||
|
||||
const authStore = useAuthStore()
|
||||
@@ -112,11 +112,8 @@ const tableConfig = reactive({
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
// 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'})
|
||||
btn.push({label: '需求上报', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
@@ -134,7 +131,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 +152,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
|
||||
}
|
||||
@@ -178,17 +170,17 @@ const handleEdit = (row) => {
|
||||
}
|
||||
const handleDelete = (row) => {
|
||||
deleteDemand(row.requirementId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tableIns.value.refresh()
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tableIns.value.refresh()
|
||||
})
|
||||
}
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name:'Requirement/detail',
|
||||
name: 'Requirement/detail',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
@@ -196,9 +188,9 @@ const handleDetail = (row) => {
|
||||
}
|
||||
const handleReport = (row) => {
|
||||
router.push({
|
||||
name:'Summary/add',
|
||||
name: 'Summary/add',
|
||||
query: {
|
||||
id:row.requirementId
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
132
src/views/project-demand/requirement/upload.vue
Normal file
132
src/views/project-demand/requirement/upload.vue
Normal file
@@ -0,0 +1,132 @@
|
||||
<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: 300px"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<baseTitle title="上传附件"></baseTitle>
|
||||
<el-card style="width: 100%;margin: 15px 0">
|
||||
<file-upload @getFile="getFile" />
|
||||
<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">提交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {uploadRequirementAttachment} from "@/api/project-demand";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const fileList = ref([])
|
||||
const formData = ref({
|
||||
tagName:''
|
||||
})
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '附件名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
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 showTable = ref(true)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const rules = reactive({
|
||||
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||
})
|
||||
const compositeParam = (item) => {
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
tag:'需求征集'
|
||||
}
|
||||
}
|
||||
const getFile = (val) => {
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
fileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
tag:item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
let files = []
|
||||
fileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
mosrUserFileDtoList: files,
|
||||
projectId: route.query.id,
|
||||
}
|
||||
console.log('params', params)
|
||||
let res = await uploadRequirementAttachment(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Filing/attachment',
|
||||
query:{
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -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,12 +54,6 @@
|
||||
</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-col :span="12">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
|
||||
@@ -139,18 +141,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 +234,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 +249,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,19 +264,19 @@ const tagsViewStore = useTagsView()
|
||||
const companyOption = ref([])
|
||||
const summaryForm = ref()
|
||||
const deploymentId = ref()
|
||||
const specialFundOption = 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'}],
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
|
||||
rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}],
|
||||
// affiliatedCompanyId: [{required: true, message: '请输入所属公司', trigger: 'blur'}],
|
||||
projectType: [{required: true, message: '请选择项目类型', trigger: 'blur'}],
|
||||
endTime: [{required: true, message: '请选择结束时间', trigger: 'blur'}],
|
||||
investmentType: [{required: true, message: '请选择出资类型', trigger: 'blur'}],
|
||||
@@ -290,6 +297,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 +321,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,83 +342,102 @@ 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
|
||||
let singleFile = {}
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
const handleSubmit = debounce(async (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid, fields) => {
|
||||
if (!valid) return
|
||||
// if (JSON.stringify(file.value) === "{}") {
|
||||
// attachment.value.validate()
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
|
||||
let singleFile = {}
|
||||
if (file.value.fileId !== undefined) {
|
||||
singleFile = {
|
||||
fileId: file.value.fileId
|
||||
}
|
||||
}
|
||||
}
|
||||
let otherFiles = []
|
||||
otherFileList.value.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
// let params = {
|
||||
// "specialFund": "2",
|
||||
// "projectName": "重新提交全流程测试2024520",
|
||||
// "startTime": "2024-05-24 00:00:00",
|
||||
// "endTime": "2024-05-29 00:00:00",
|
||||
// "projectType": "3",
|
||||
// "investmentType": "3",
|
||||
// "businessSegment": "2",
|
||||
// "technicalStandard": "2",
|
||||
// "governmentDeclaration": 0,
|
||||
// "inventionPatent": "3",
|
||||
// "newPatent": "3",
|
||||
// "economicEstimate": "3",
|
||||
// "other": "3",
|
||||
// "copyright": "3",
|
||||
// "softwareCopyright": "3",
|
||||
// "industryUniversityResearch": 0,
|
||||
// "intellectualProperty": "00",
|
||||
// "resultForm": "3",
|
||||
// "projectImpact": "3",
|
||||
// "rdSubject": "3",
|
||||
// // "affiliatedCompanyId": formData.value.affiliatedCompanyId,
|
||||
// "serviceDescription": "3",
|
||||
// "contentDescription": "3",
|
||||
// "specialFundAmount": "3",
|
||||
// deploymentId: deploymentId.value,
|
||||
// "singleFile": singleFile,
|
||||
// "fileList": otherFiles,
|
||||
// "requirementId":route.query.id
|
||||
// }
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
requirementId: route.query.id
|
||||
}
|
||||
let res = await requirementReported(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Summary'
|
||||
let otherFiles = []
|
||||
otherFileList.value.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
// })
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
// let params = {
|
||||
// "specialFund": "2",
|
||||
// "projectName": "测试全流程功能-上报",
|
||||
// "startTime": "2024-05-24 00:00:00",
|
||||
// "endTime": "2024-05-29 00:00:00",
|
||||
// "projectType": "3",
|
||||
// "investmentType": "3",
|
||||
// "businessSegment": "2",
|
||||
// "technicalStandard": "2",
|
||||
// "governmentDeclaration": 0,
|
||||
// "inventionPatent": "3",
|
||||
// "newPatent": "3",
|
||||
// "economicEstimate": "3",
|
||||
// "other": "3",
|
||||
// "copyright": "3",
|
||||
// "softwareCopyright": "3",
|
||||
// "industryUniversityResearch": 0,
|
||||
// "intellectualProperty": "00",
|
||||
// "resultForm": "3",
|
||||
// "projectImpact": "3",
|
||||
// "rdSubject": "3",
|
||||
// "serviceDescription": "3",
|
||||
// "contentDescription": "3",
|
||||
// "specialFundAmount": "3",
|
||||
// deploymentId: deploymentId.value,
|
||||
// "singleFile": singleFile,
|
||||
// "fileList": otherFiles,
|
||||
// "requirementId":route.query.id
|
||||
// }
|
||||
let params = {
|
||||
...formData.value,
|
||||
isSpecialFund:false,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
singleFile: singleFile,
|
||||
requirementId: route.query.id
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params', params)
|
||||
let res = await requirementReported(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
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 {
|
||||
@@ -424,6 +459,17 @@ const handleResubmit = () => {
|
||||
singleFile: singleFile,
|
||||
requirementId: route.query.id
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitReported(params).then(res => {
|
||||
ElNotification({
|
||||
@@ -438,7 +484,8 @@ const handleResubmit = () => {
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const getDetailInfo = async () => {
|
||||
getDetail(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
@@ -453,14 +500,12 @@ 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 => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value = data.deploymentId
|
||||
@@ -473,6 +518,12 @@ const init = async () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -38,3 +38,18 @@ export const resubmitReported = (data) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const getCollectAttachment = (params) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/collect/attachments',
|
||||
method: "get",
|
||||
params:params
|
||||
});
|
||||
};
|
||||
export const uploadCollectAttachment= (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/requirement/collect/upload',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<steps :active="1" @setDetail="setDetail" @stepChange="stepChange">
|
||||
<template #content>
|
||||
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer" :companyOption="companyOption" :loading="loading"/>
|
||||
:processViewer="summaryProcessViewer" :loading="loading"/>
|
||||
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
|
||||
:processViewer="summaryProcessViewer" :loading="loading"/>
|
||||
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
||||
@@ -21,34 +21,20 @@ import SummaryDetail from '@/components/DetailComponent/SummaryDetail.vue';
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
const companyOption = ref([])
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const loading = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const active = ref(route.query.state)
|
||||
const showActive = ref()
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
const getInfo = async (state) => {
|
||||
const projectId = route.query.projectId
|
||||
if(showActive == '00'){
|
||||
await getCompanyOption()
|
||||
}
|
||||
summaryProcessViewer.value = false
|
||||
loading.value = true
|
||||
const {code, data,msg} = await getMapProjectStateInfo(projectId, state)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if(data===undefined)return;
|
||||
if(code===1000){
|
||||
summaryData.value = data;
|
||||
@@ -62,24 +48,15 @@ const getInfo = async (state) => {
|
||||
nextTick(() => {
|
||||
summaryProcessViewer.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
// const back = () => {
|
||||
// switch (route.name) {
|
||||
// case 'Summary/detail':
|
||||
// setDetail('1')
|
||||
// break;
|
||||
// case 'Initiation/detail':
|
||||
// setDetail('2')
|
||||
// break;
|
||||
// case 'Implementation/detail':
|
||||
// setDetail('3')
|
||||
// break;
|
||||
// case 'Filing/detail':
|
||||
// setDetail('4')
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
getInfo(active)
|
||||
@@ -89,7 +66,6 @@ const stepChange = (data) => {
|
||||
showActive.value = data.active
|
||||
getInfo(data.active)
|
||||
}
|
||||
// back()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -96,17 +96,41 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'rdSubject',
|
||||
label: '研发主体',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'projectImpact',
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
@@ -143,9 +167,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 +184,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>
|
||||
)
|
||||
}
|
||||
|
||||
132
src/views/project-demand/summary/upload.vue
Normal file
132
src/views/project-demand/summary/upload.vue
Normal file
@@ -0,0 +1,132 @@
|
||||
<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: 300px"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<baseTitle title="上传附件"></baseTitle>
|
||||
<el-card style="width: 100%;margin: 15px 0">
|
||||
<file-upload @getFile="getFile"/>
|
||||
<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">提交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {uploadCollectAttachment} from "./api";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const fileList = ref([])
|
||||
const formData = ref({
|
||||
tagName:''
|
||||
})
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '附件名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
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 showTable = ref(true)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const rules = reactive({
|
||||
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||
})
|
||||
const compositeParam = (item) => {
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
tag:'需求上报',
|
||||
}
|
||||
}
|
||||
const getFile = (val) => {
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
fileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
tag:item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
let files = []
|
||||
fileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
mosrUserFileDtoList: files,
|
||||
projectId: route.query.id,
|
||||
}
|
||||
console.log('params', params)
|
||||
let res = await uploadCollectAttachment(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Filing/attachment',
|
||||
query:{
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,83 +1,214 @@
|
||||
<template>
|
||||
<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"
|
||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="需求征集" name="0">
|
||||
<search-files-by-tag @search="searchRequirement" @upload="upload"
|
||||
:otherFileList="otherFileList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="需求上报" name="1">
|
||||
<search-files-by-tag @search="searchReport" @upload="upload"
|
||||
:otherFileList="otherFileList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="项目立项" name="2">
|
||||
<search-files-by-tag @search="searchInitiation" @upload="upload"
|
||||
:otherFileList="otherFileList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="项目实施" name="3">
|
||||
<search-files-by-tag type="3" @search="searchImplementation" @upload="upload" ref="implementation"
|
||||
:otherFileList="otherFileList"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="项目归档" name="4">
|
||||
<search-files-by-tag @search="searchFiling" @upload="upload"
|
||||
:otherFileList="otherFileList"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getImplementationAttachment} from "@/api/project-manage";
|
||||
import {getRequirementAttachment} from "@/api/project-demand";
|
||||
import {getCollectAttachment} from "@/views/project-demand/summary/api";
|
||||
import {getFilingAttachment, getInitiationAttachment} from "@/api/project-manage";
|
||||
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '关键词',
|
||||
prop: 'collectType',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const activeName = ref('4')
|
||||
const attachment = ref({})
|
||||
const showTable = ref(true)
|
||||
const implementation = ref()
|
||||
const otherFileList = ref([])
|
||||
const handleClick = (tab) => {
|
||||
let name = {}
|
||||
switchSearch(name, tab.index)
|
||||
}
|
||||
const getParams = (param, type) => {
|
||||
let targetId
|
||||
let params
|
||||
if (type === 1) {
|
||||
targetId = route.query.requirementId
|
||||
params = {
|
||||
targetId: targetId,
|
||||
...param
|
||||
}
|
||||
}
|
||||
])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '附件名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
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>
|
||||
)
|
||||
} else if (type === 2){
|
||||
targetId = route.query.id
|
||||
if(JSON.stringify(param) !== '{}'){
|
||||
if (param.tag &&!param.name) {
|
||||
implementation.value.tagsOption?.forEach(item => {
|
||||
if (item.value === param.tag) {
|
||||
param.tag = item.label
|
||||
}
|
||||
})
|
||||
params = {
|
||||
targetId: targetId,
|
||||
tag:param.tag
|
||||
}
|
||||
}else if(!param.tag &¶m.name){
|
||||
params = {
|
||||
targetId: targetId,
|
||||
...param
|
||||
}
|
||||
} else if (!param.tag &&!param.name) {
|
||||
params = {
|
||||
targetId: targetId,
|
||||
}
|
||||
}
|
||||
}else {
|
||||
params = {
|
||||
targetId: targetId
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const showTable=ref(true)
|
||||
const otherFileList = ref([])
|
||||
const getOtherFile = () => {
|
||||
}else {
|
||||
targetId = route.query.id
|
||||
params = {
|
||||
targetId: targetId,
|
||||
...param
|
||||
}
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
const searchRequirement = async (param) => {
|
||||
await search(param)
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href=URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
const search = async (param, type) => {
|
||||
const res = await getRequirementAttachment(getParams(param, type))
|
||||
changeFileList(res)
|
||||
}
|
||||
const searchReport = async (param) => {
|
||||
const res = await getCollectAttachment(getParams(param))
|
||||
changeFileList(res)
|
||||
}
|
||||
const searchInitiation = async (param) => {
|
||||
const res = await getInitiationAttachment(getParams(param))
|
||||
changeFileList(res)
|
||||
}
|
||||
const searchImplementation = async (param) => {
|
||||
const res = await getImplementationAttachment(getParams(param,2))
|
||||
changeFileList(res)
|
||||
}
|
||||
const searchFiling = async (param) => {
|
||||
const res = await getFilingAttachment(getParams(param))
|
||||
changeFileList(res)
|
||||
}
|
||||
const changeFileList = (res) => {
|
||||
showTable.value = false
|
||||
if (res.code === 1000) {
|
||||
otherFileList.value = res.data
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
const upload = () => {
|
||||
if(activeName.value==='3'){
|
||||
router.push({
|
||||
name: 'Implementation/upload',
|
||||
query: {
|
||||
id: route.query.id,
|
||||
type:'3'
|
||||
}
|
||||
})
|
||||
}else {
|
||||
router.push({
|
||||
name: switchUpload(activeName.value),
|
||||
query: {
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
const switchUpload=(index)=>{
|
||||
switch (index) {
|
||||
case '0':
|
||||
return 'Requirement/upload';
|
||||
case '1':
|
||||
return 'Summary/upload';
|
||||
case '2':
|
||||
return 'Initiation/upload';
|
||||
case '3':
|
||||
return 'Implementation/upload';
|
||||
case '4':
|
||||
return 'Filing/upload';
|
||||
}
|
||||
}
|
||||
const switchSearch = (name, index) => {
|
||||
switch (index) {
|
||||
case '0':
|
||||
search(name, 1)
|
||||
break
|
||||
case '1':
|
||||
searchReport(name)
|
||||
break
|
||||
case '2':
|
||||
searchInitiation(name)
|
||||
break
|
||||
case '3':
|
||||
searchImplementation(name)
|
||||
break
|
||||
case '4':
|
||||
searchFiling(name)
|
||||
break
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
if (activeName.value === '4') {
|
||||
let name = {
|
||||
name: ''
|
||||
}
|
||||
searchFiling(name)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-tabs__header) {
|
||||
margin: 15px 0 30px 0;
|
||||
}
|
||||
|
||||
: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>
|
||||
|
||||
@@ -128,11 +128,12 @@ const getFileParam = (item) => {
|
||||
}
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
if (JSON.stringify(file.value) === "{}") {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// if (JSON.stringify(file.value) === "{}") {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
let files = []
|
||||
let singleFile = {}
|
||||
if (file.value.fileId !== undefined) {
|
||||
@@ -150,6 +151,17 @@ const handleSubmit = async () => {
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params', params)
|
||||
let res = await projectConclusion(params)
|
||||
ElNotification({
|
||||
@@ -168,11 +180,12 @@ const handleResubmit = () => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
if (attachment.value.singleFile !== null && name.value === 'Filing/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
@@ -197,6 +210,17 @@ const handleResubmit = () => {
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitConclusion(params).then(res => {
|
||||
ElNotification({
|
||||
@@ -227,11 +251,6 @@ const getDetailInfo = async () => {
|
||||
}
|
||||
const init = () => {
|
||||
getProjectConclusionProcess().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
@@ -246,6 +265,12 @@ const init = () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
:formData="commonForm.formData"
|
||||
:data="commonForm"
|
||||
:processViewer="commonProvessViewer"
|
||||
:companyOption="companyOption"
|
||||
v-show="showActive == '00'"
|
||||
:loading="loading"
|
||||
/>
|
||||
@@ -24,52 +23,35 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getInfo} from "@/api/project-demand/index.js";
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||
import {ElLoading} from "element-plus";
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
const companyOption = ref([])
|
||||
const showActive = ref()
|
||||
const loading = ref(false)
|
||||
|
||||
const processStore = useProcessStore()
|
||||
const activeName = ref('first')
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event)
|
||||
if (tab.index.value === 0) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
|
||||
|
||||
const commonForm = ref({})
|
||||
const commonProvessViewer = ref(true)
|
||||
|
||||
const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
state == '00' && (await getCompanyOption())
|
||||
commonProvessViewer.value = false
|
||||
loading.value = true
|
||||
const {data, code} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
// if(state == '00') {
|
||||
// collectionData.value = data;
|
||||
// } else if(state == '10') {
|
||||
// summaryData.value = data;
|
||||
// }
|
||||
const {data, code,msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(code===1000){
|
||||
loading.value = false
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
if(data===undefined)return;
|
||||
commonForm.value = data
|
||||
@@ -80,18 +62,14 @@ const getAllInfo = async (state) => {
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
// summaryProcessViewer.value = true
|
||||
commonProvessViewer.value = true
|
||||
})
|
||||
loading.close()
|
||||
} catch {
|
||||
loading.close()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const showActive = ref()
|
||||
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
getAllInfo(active)
|
||||
|
||||
@@ -153,21 +153,45 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'rdSubject',
|
||||
label: '研发主体',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'projectImpact',
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概况',
|
||||
label: '经济概算(万元)',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
@@ -190,7 +214,7 @@ const tableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||
return (<Tag dictType={'project_filing'} value={row.state}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
@@ -208,12 +232,7 @@ const tableConfig = reactive({
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("attachments")) {
|
||||
btn.push({
|
||||
label: '附件',
|
||||
prem: ['mosr:requirement:resubmit'],
|
||||
func: () => handleAttachment(row),
|
||||
type: 'primary'
|
||||
})
|
||||
btn.push({label: '附件', prem: ['mosr:requirement:resubmit'], func: () => handleAttachment(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("entry")) {
|
||||
btn.push({label: '结项', prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'})
|
||||
@@ -270,8 +289,8 @@ const handleAttachment = (row) => {
|
||||
router.push({
|
||||
name: 'Filing/attachment',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
id: row.projectId,
|
||||
requirementId:row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
131
src/views/project-management/filing/upload.vue
Normal file
131
src/views/project-management/filing/upload.vue
Normal file
@@ -0,0 +1,131 @@
|
||||
<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: 300px"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<baseTitle title="上传附件"></baseTitle>
|
||||
<el-card style="width: 100%;margin: 15px 0">
|
||||
<file-upload @getFile="getFile" />
|
||||
<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">提交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {uploadFilingAttachment} from "@/api/project-manage";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const fileList = ref([])
|
||||
const formData = ref({
|
||||
tagName:''
|
||||
})
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '附件名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
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 showTable = ref(true)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const rules = reactive({
|
||||
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||
})
|
||||
const compositeParam = (item) => {
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
tag: '项目归档',
|
||||
}
|
||||
}
|
||||
const getFile = (val) => {
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
fileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
tag:item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
let files = []
|
||||
fileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
mosrUserFileDtoList: files,
|
||||
projectId: route.query.id,
|
||||
}
|
||||
let res = await uploadFilingAttachment(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Filing/attachment',
|
||||
query:{
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<el-form :model="attachment" inline class="query-form">
|
||||
<el-form :model="attachment" inline style="margin-top: 15px">
|
||||
<el-form-item label="标签" prop="tag">
|
||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 200px">
|
||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
:key="item.label"
|
||||
:label="item.value"
|
||||
:value="item.label"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {getImplementationAttachment,getTags} from "@/api/project-manage";
|
||||
import {getTags,getImplementationAttachment} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
@@ -80,7 +80,10 @@ const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.id) return
|
||||
getTags(route.query.id).then(res => {
|
||||
let params={
|
||||
projectId: route.query.id
|
||||
}
|
||||
getTags(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
@@ -94,13 +97,18 @@ const getTagsOption = () => {
|
||||
const handleSearch = () => {
|
||||
let params
|
||||
if (attachment.tag) {
|
||||
tagsOption.value.forEach(item => {
|
||||
if (item.value === attachment.tag) {
|
||||
attachment.tag = item.label
|
||||
}
|
||||
})
|
||||
params = {
|
||||
projectId: route.query.id,
|
||||
targetId: route.query.id,
|
||||
tag: attachment.tag
|
||||
}
|
||||
} else {
|
||||
params = {
|
||||
projectId: route.query.id
|
||||
targetId: route.query.id
|
||||
}
|
||||
}
|
||||
getImplementationAttachment(params).then(res => {
|
||||
@@ -135,7 +143,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()
|
||||
}
|
||||
@@ -115,6 +116,17 @@ const handleSubmit = (instance) => {
|
||||
singleFile: singleFile,
|
||||
projectId:route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params-提交',params)
|
||||
let res = await projectCheck(params)
|
||||
ElNotification({
|
||||
@@ -137,11 +149,12 @@ const handleResubmit = (instance) => {
|
||||
let singleFile = {}
|
||||
let otherFiles = []
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
if (attachment.value.singleFile!==null&&name.value === 'Implementation/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
@@ -166,6 +179,17 @@ const handleResubmit = (instance) => {
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('重新提交params', params)
|
||||
resubmitCheck(params).then(res => {
|
||||
ElNotification({
|
||||
@@ -197,11 +221,6 @@ const getDetailInfo = async () => {
|
||||
}
|
||||
const init = () => {
|
||||
getProjectCheckProcess(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
@@ -216,6 +235,12 @@ const init = () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
:formData="commonForm.formData"
|
||||
:data="commonForm"
|
||||
:processViewer="commonProvessViewer"
|
||||
:companyOption="companyOption"
|
||||
v-show="showActive == '00'"
|
||||
:loading="loading"
|
||||
/>
|
||||
@@ -21,65 +20,42 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getInfo} from "@/api/project-demand/index.js";
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||
import { getMapProjectStateInfo } from '@/components/steps/api';
|
||||
import { ElLoading } from "element-plus";
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||
|
||||
// const activeName = ref('first')
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event)
|
||||
if(tab.index.value === 0){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const route = useRoute()
|
||||
const activeName = ref('first')
|
||||
const collectionData = ref({})
|
||||
const summaryData = ref({})
|
||||
const loading = ref(false)
|
||||
const collectionProcessViewer = ref(true)
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
const cuurentStep = ref()
|
||||
route.query.step == '10' && (cuurentStep.value = 1)
|
||||
route.query.step == '20' && (cuurentStep.value = 2)
|
||||
route.query.step == '40' && (cuurentStep.value = 3)
|
||||
route.query.step == '50' && (cuurentStep.value = 4)
|
||||
const rules = reactive({
|
||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||
})
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
|
||||
|
||||
const showActive = ref()
|
||||
const commonForm = ref({})
|
||||
const commonProvessViewer = ref(true)
|
||||
|
||||
const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
state == '00' && ( await getCompanyOption() )
|
||||
commonProvessViewer.value = false
|
||||
loading.value = true
|
||||
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(state == '00') {
|
||||
collectionData.value = data;
|
||||
} else if(state == '10') {
|
||||
summaryData.value = data;
|
||||
}
|
||||
const { data, code ,msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(code===1000){
|
||||
loading.value = false
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
loading.close()
|
||||
}
|
||||
if(data===undefined)return;
|
||||
commonForm.value = data
|
||||
@@ -90,17 +66,14 @@ const getAllInfo = async (state) => {
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
// summaryProcessViewer.value = true
|
||||
commonProvessViewer.value = true
|
||||
})
|
||||
loading.close()
|
||||
} catch {
|
||||
loading.close()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const showActive = ref()
|
||||
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
|
||||
@@ -158,21 +158,45 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'rdSubject',
|
||||
label: '研发主体',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'projectImpact',
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概况',
|
||||
label: '经济概算(万元)',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
@@ -218,12 +242,12 @@ const tableConfig = reactive({
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
// if (buttons.has("standing")) {
|
||||
if (buttons.has("standing")) {
|
||||
btn.push({label: '台账', prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
||||
// }
|
||||
// if (buttons.has("attachments")) {
|
||||
}
|
||||
if (buttons.has("attachments")) {
|
||||
btn.push({label: '附件', prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
||||
// }
|
||||
}
|
||||
if (buttons.has("viewAllocation")) {
|
||||
btn.push({label: '查看分摊', prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
||||
}
|
||||
|
||||
@@ -2,20 +2,21 @@
|
||||
<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-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px" v-if="showInput"/>
|
||||
<el-select v-model="formData.tagName" placeholder="请选择标签名称" clearable filterable style="width: 300px" v-else>
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
:key="item.label"
|
||||
:label="item.value"
|
||||
:value="item.label"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button type="primary" link @click="changeInput">{{showInput? '选择': '输入'}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<baseTitle title="其他文件"></baseTitle>
|
||||
<el-card style="width: 100%;margin: 15px 0">
|
||||
<file-upload @getFile="getFile"/>
|
||||
<file-upload @getFile="getFile" :disabled="!formData.tagName" :title="!formData.tagName?'请先选择/输入标签!':''"/>
|
||||
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
@@ -29,7 +30,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'
|
||||
|
||||
@@ -86,9 +87,16 @@ const name = ref(router.currentRoute.value.name)
|
||||
const rules = reactive({
|
||||
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||
})
|
||||
const changeInput=()=>{
|
||||
showInput.value=!showInput.value;
|
||||
formData.value.tagName='';
|
||||
}
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.id) return
|
||||
getTags(route.query.id).then(res => {
|
||||
let params={
|
||||
projectId: route.query.id
|
||||
}
|
||||
getTags(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
@@ -102,6 +110,11 @@ const getTagsOption = () => {
|
||||
}
|
||||
|
||||
const compositeParam = (item) => {
|
||||
tagsOption.value.forEach(item => {
|
||||
if (item.value == formData.value.tagName) {
|
||||
formData.value.tagName = item.label
|
||||
}
|
||||
})
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
@@ -147,16 +160,25 @@ const handleSubmit = async (instance) => {
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Implementation/attachment',
|
||||
query:{
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
if(route.query.type=='3'){
|
||||
await router.push({
|
||||
name: 'Filing/attachment',
|
||||
query:{
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
}else {
|
||||
await router.push({
|
||||
name: 'Implementation/attachment',
|
||||
query:{
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// getTagsOption()
|
||||
getTagsOption()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="apply-block">
|
||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||
<baseTitle title="项目立项申请"></baseTitle>
|
||||
<baseTitle title="项目立项"></baseTitle>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="前置流程">
|
||||
@@ -93,7 +93,7 @@ const name = ref(router.currentRoute.value.name)
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (name.value === 'Initiation/apply' || name.value === 'Initiation/edit') {
|
||||
tag = '项目立项申请'
|
||||
tag = '项目立项'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
@@ -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()
|
||||
}
|
||||
@@ -142,6 +148,17 @@ const handleSubmit = (instance) => {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
@@ -149,6 +166,7 @@ const handleSubmit = (instance) => {
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
|
||||
console.log('params', params)
|
||||
let res = await projectApply(params)
|
||||
ElNotification({
|
||||
@@ -168,11 +186,12 @@ const handleResubmit = async () => {
|
||||
let files = []
|
||||
let singleFile = {}
|
||||
let fileArray
|
||||
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
attachment.value.validate()
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||
// attachment.value.validate()
|
||||
// return;
|
||||
// } else {
|
||||
// attachment.value.clearValidate()
|
||||
// }
|
||||
if (attachment.value.singleFile !== null && name.value === 'Initiation/edit') {
|
||||
singleFile = {
|
||||
fileId: attachment.value.singleFile.fileId
|
||||
@@ -196,6 +215,17 @@ const handleResubmit = async () => {
|
||||
singleFile: singleFile,
|
||||
projectId: route.query.projectId,
|
||||
}
|
||||
if (JSON.stringify(singleFile) === "{}") {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params', params)
|
||||
let res = await resubmitApply(params)
|
||||
ElNotification({
|
||||
@@ -225,11 +255,6 @@ const getDetailInfo = async () => {
|
||||
}
|
||||
const init = () => {
|
||||
getApplyProcess(route.query.projectId).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
processDiagramViewer.value = false
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
@@ -244,6 +269,12 @@ const init = () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
:formData="commonForm.formData"
|
||||
:data="commonForm"
|
||||
:processViewer="commonProvessViewer"
|
||||
:companyOption="companyOption"
|
||||
v-show="showActive == '00'"
|
||||
:loading="loading"
|
||||
/>
|
||||
@@ -22,101 +21,38 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getInfo} from "@/api/project-demand/index.js";
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||
import { getMapProjectStateInfo } from '@/components/steps/api';
|
||||
import { ElLoading } from "element-plus";
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||
|
||||
const route = useRoute()
|
||||
const activeName = ref('first')
|
||||
const collectionData = ref({})
|
||||
const summaryData = ref({})
|
||||
const collectionProcessViewer = ref(true)
|
||||
const loading = ref(false)
|
||||
const active = ref(route.query.state)
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
const rules = reactive({
|
||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||
})
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
|
||||
const getDemandCollectionInfo = async () => {
|
||||
if (!route.query.id) return
|
||||
await getCompanyOption()
|
||||
collectionProcessViewer.value = false
|
||||
getInfo(route.query.id).then(res => {
|
||||
let data = res.data
|
||||
collectionData.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(() => {
|
||||
collectionProcessViewer.value = true
|
||||
})
|
||||
})
|
||||
}
|
||||
const getDemandSummaryInfo = async () => {
|
||||
if (!route.query.id) return
|
||||
// await getCompanyOption()
|
||||
summaryProcessViewer.value = false
|
||||
getInfo(route.query.id).then(res => {
|
||||
let data = res.data
|
||||
summaryData.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(() => {
|
||||
summaryProcessViewer.value = true
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event)
|
||||
if (tab.props.name === 'first') {
|
||||
getDemandCollectionInfo()
|
||||
} else if (tab.props.name === 'second') {
|
||||
getDemandSummaryInfo()
|
||||
}
|
||||
}
|
||||
// getDemandCollectionInfo()
|
||||
|
||||
const showActive = ref()
|
||||
const commonForm = ref({})
|
||||
const commonProvessViewer = ref(true)
|
||||
|
||||
const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
try {
|
||||
state == '00' && ( await getCompanyOption() )
|
||||
commonProvessViewer.value = false
|
||||
loading.value = true
|
||||
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(state == '00') {
|
||||
collectionData.value = data;
|
||||
} else if(state == '10') {
|
||||
summaryData.value = data;
|
||||
}
|
||||
const { data, code,msg } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if(code===1000){
|
||||
loading.value = false
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
console.log(data, 'data--22');
|
||||
if(data===undefined)return;
|
||||
commonForm.value = data
|
||||
processStore.setDesign(data)
|
||||
@@ -126,17 +62,14 @@ const getAllInfo = async (state) => {
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
// summaryProcessViewer.value = true
|
||||
commonProvessViewer.value = true
|
||||
})
|
||||
loading.close()
|
||||
} catch {
|
||||
loading.close()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const showActive = ref()
|
||||
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
|
||||
@@ -152,21 +152,45 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'rdSubject',
|
||||
label: '研发主体',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'projectImpact',
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概况',
|
||||
label: '经济概算(万元)',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
@@ -187,7 +211,7 @@ const tableConfig = reactive({
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) =>{
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||
} else {
|
||||
@@ -207,13 +231,13 @@ const tableConfig = reactive({
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑',prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
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 (
|
||||
<div style={{width: '100%'}}>
|
||||
|
||||
131
src/views/project-management/initiation/upload.vue
Normal file
131
src/views/project-management/initiation/upload.vue
Normal file
@@ -0,0 +1,131 @@
|
||||
<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: 300px"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<baseTitle title="上传附件"></baseTitle>
|
||||
<el-card style="width: 100%;margin: 15px 0">
|
||||
<file-upload @getFile="getFile"/>
|
||||
<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">提交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {uploadInitiationAttachment} from "@/api/project-manage";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const fileList = ref([])
|
||||
const formData = ref({
|
||||
tagName:''
|
||||
})
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '附件名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
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 showTable = ref(true)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const rules = reactive({
|
||||
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||
})
|
||||
const compositeParam = (item) => {
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
tag: '项目立项',
|
||||
}
|
||||
}
|
||||
const getFile = (val) => {
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
fileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
tag:item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
let files = []
|
||||
fileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
mosrUserFileDtoList: files,
|
||||
projectId: route.query.id,
|
||||
}
|
||||
let res = await uploadInitiationAttachment(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Filing/attachment',
|
||||
query:{
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</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>
|
||||
)
|
||||
}
|
||||
|
||||
16
src/views/system/department/api/index.js
Normal file
16
src/views/system/department/api/index.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export const getInfoById = (id) => {
|
||||
return request({
|
||||
url: `/admin/mosr/department/info/${id}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export const setDeptInfo = (data) => {
|
||||
return request({
|
||||
url: '/admin/mosr/department/leader',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<el-button type="primary" link >
|
||||
{{ modelValue || '请选择' }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, watchEffect } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
// const emit = defineEmits('update: modelValue')
|
||||
|
||||
const localText = ref('')
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
148
src/views/system/department/edit.vue
Normal file
148
src/views/system/department/edit.vue
Normal file
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<baseTitle title="基础信息"></baseTitle>
|
||||
<fv-Form :schema="schema" @getInstance="(e)=>form = e"></fv-Form>
|
||||
<UserPicker ref="usrPickershipIds" @ok="editshipIds"></UserPicker>
|
||||
<UserPicker ref="usrPickerHeadIds" @ok="editheadIds"></UserPicker>
|
||||
<UserPicker ref="usrPickerDeputyIds" @ok="editdeputyIds"></UserPicker>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { getInfoById, setDeptInfo } from './api'
|
||||
import UserPicker from '../../workflow/process/common/UserPicker.vue';
|
||||
import Ttsup from './components/ToolToShowUserPicker.vue'
|
||||
import { reactive, ref } from 'vue';
|
||||
const route = useRoute()
|
||||
|
||||
const form = ref()
|
||||
const usrPickershipIds = ref()
|
||||
const usrPickerHeadIds = ref()
|
||||
const usrPickerDeputyIds = ref()
|
||||
|
||||
const departmentChargeLeadershipNames = ref()
|
||||
const departmentHeadNames = ref()
|
||||
const departmentalDeputyNames = ref()
|
||||
|
||||
const departmentChargeLeadershipIds = ref()
|
||||
|
||||
const departmentHeadIds = ref()
|
||||
|
||||
const departmentalDeputyIds = ref()
|
||||
|
||||
const schema = reactive([
|
||||
{
|
||||
label: '部门名字:',
|
||||
prop: 'departmentName',
|
||||
},
|
||||
{
|
||||
label: '部门标志:',
|
||||
prop: 'departmentMark'
|
||||
},
|
||||
{
|
||||
label: '部门分管领导:',
|
||||
prop: 'departmentChargeLeadershipIds',
|
||||
component: ()=><Ttsup modelValue={departmentChargeLeadershipNames.value} onClick={()=>{usrPickershipIds.value.showUserPicker()} } />
|
||||
},
|
||||
{
|
||||
label: '部门负责人:',
|
||||
prop: 'departmentHeadIds',
|
||||
component: ()=><Ttsup modelValue={departmentHeadNames.value} onClick={()=>{usrPickerHeadIds.value.showUserPicker()} } />
|
||||
},
|
||||
{
|
||||
label: '部门副职用户:',
|
||||
prop: 'departmentalDeputyIds',
|
||||
component: ()=><Ttsup modelValue={departmentalDeputyNames.value} onClick={()=>{departmentalDeputyIds.value.showUserPicker()} } />
|
||||
},
|
||||
{
|
||||
label: '创建时间:',
|
||||
prop: 'createTime'
|
||||
}
|
||||
])
|
||||
|
||||
const getInfo = async () => {
|
||||
const { data } = await getInfoById(route.query.id)
|
||||
console.log("🚀 ~ getInfo ~ res:", data)
|
||||
const params = {
|
||||
createTime: data.createTime,
|
||||
departmentMark: data.departmentMark,
|
||||
departmentName: data.departmentName
|
||||
}
|
||||
departmentChargeLeadershipIds.value = data.departmentChargeLeadershipIds
|
||||
departmentHeadIds.value = data.departmentHeadIds
|
||||
departmentalDeputyIds.value = data.departmentalDeputyIds
|
||||
params.departmentChargeLeadershipIds = formatIdsToNames(data.departmentChargeLeadershipIds, data.departmentChargeLeadershipInfo, 'userId', 'nickName')
|
||||
departmentChargeLeadershipNames.value = params.departmentChargeLeadershipIds
|
||||
params.departmentHeadIds = formatIdsToNames(data.departmentHeadIds, data.departmentHeadInfo, 'userId', 'nickName')
|
||||
departmentHeadNames.value = params.departmentHeadIds
|
||||
params.departmentalDeputyIds = formatIdsToNames(data.departmentalDeputyIds, data.departmentalDeputyInfo, 'userId', 'nickName')
|
||||
departmentalDeputyNames.value = params.departmentalDeputyIds
|
||||
form.value.setValues(params)
|
||||
|
||||
}
|
||||
|
||||
|
||||
const formatIdsToNames = (ids, infoList, key, viewKey) => {
|
||||
const resArr = []
|
||||
if(!ids?.length) return
|
||||
ids.forEach(item=>{
|
||||
infoList.forEach(v=>{
|
||||
item == v[key] && resArr.push(v[viewKey])
|
||||
})
|
||||
})
|
||||
return resArr.join(',')
|
||||
}
|
||||
|
||||
const editshipIds = (list) => {
|
||||
// console.log("🚀 ~ editshipIds ~ list:", list)
|
||||
const arr = list.map(item=>item.name)
|
||||
departmentChargeLeadershipIds.value = list.map(item=>item.id)
|
||||
departmentChargeLeadershipNames.value = arr.join(',')
|
||||
setDeptmentInfo({
|
||||
departmentChargeLeadershipIds: departmentChargeLeadershipIds.value,
|
||||
departmentalDeputyIds: departmentalDeputyIds.value,
|
||||
departmentHeadIds: departmentHeadIds.value
|
||||
})
|
||||
}
|
||||
|
||||
const editheadIds = (list) => {
|
||||
// console.log("🚀 ~ editshipIds ~ list:", list)
|
||||
const arr = list.map(item=>item.name)
|
||||
departmentHeadIds.value = list.map(item=>item.id)
|
||||
departmentHeadNames.value = arr.join(',')
|
||||
setDeptmentInfo({
|
||||
departmentChargeLeadershipIds: departmentChargeLeadershipIds.value,
|
||||
departmentalDeputyIds: departmentalDeputyIds.value,
|
||||
departmentHeadIds: departmentHeadIds.value
|
||||
})
|
||||
}
|
||||
|
||||
const editdeputyIds = (list) => {
|
||||
// console.log("🚀 ~ editshipIds ~ list:", list)
|
||||
const arr = list.map(item=>item.name)
|
||||
departmentalDeputyIds.value = list.map(item=>item.id)
|
||||
departmentalDeputyNames.value = arr.join(',')
|
||||
setDeptmentInfo({
|
||||
departmentChargeLeadershipIds: departmentChargeLeadershipIds.value,
|
||||
departmentalDeputyIds: departmentalDeputyIds.value,
|
||||
departmentHeadIds: departmentHeadIds.value
|
||||
})
|
||||
}
|
||||
|
||||
const setDeptmentInfo = async ({ departmentChargeLeadershipIds = [], departmentHeadIds = [], departmentalDeputyIds = []}) => {
|
||||
|
||||
const params = {
|
||||
departmentChargeLeadershipIds,
|
||||
departmentHeadIds,
|
||||
departmentalDeputyIds,
|
||||
departmentId: route.query.id
|
||||
}
|
||||
const res = await setDeptInfo(params)
|
||||
console.log(res.data);
|
||||
}
|
||||
|
||||
getInfo()
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
@@ -33,18 +33,25 @@
|
||||
<el-table-column prop="departmentCode" label="部门编码"/>
|
||||
<el-table-column prop="departmentName" label="部门名称"/>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column prop="oper" label="操作">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" v-perm="['admin:department:update']" link @click="goEdit(row.departmentId)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {Search, Refresh,Sort} from "@element-plus/icons-vue";
|
||||
import {getDepartmentList} from "@/api/subsidiary";
|
||||
import { useRouter } from "vue-router";
|
||||
const queryInstance = ref()
|
||||
const queryParams = reactive({
|
||||
departmentCode: '',
|
||||
departmentMark: '',
|
||||
departmentName: ''
|
||||
})
|
||||
const router = useRouter()
|
||||
const loading = ref(true)
|
||||
const isExpand = ref(true)
|
||||
const list = ref([])
|
||||
@@ -80,6 +87,15 @@ const getList = () => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const goEdit = (id) => {
|
||||
router.push({
|
||||
name: 'Mosrdeptedit',
|
||||
query: {
|
||||
id
|
||||
}
|
||||
})
|
||||
}
|
||||
getList()
|
||||
</script>
|
||||
|
||||
|
||||
@@ -135,18 +135,18 @@ const tableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '修改', auth: auths.edit, func: ()=>handleEdit(row) , type: 'primary'}]
|
||||
btn.push(
|
||||
{
|
||||
label: '分配用户',
|
||||
auth: auths.edit,
|
||||
func: ()=>handleAssign(row),
|
||||
type: 'primary'
|
||||
}
|
||||
)
|
||||
// btn.push(
|
||||
// {
|
||||
// label: '分配用户',
|
||||
// auth: auths.edit,
|
||||
// func: ()=>handleAssign(row),
|
||||
// type: 'primary'
|
||||
// }
|
||||
// )
|
||||
if(authStore.roles.includes('superAdmin')) {
|
||||
btn.push({label: '删除', auth: auths.edit, func: ()=>handleDel(row) , type: 'danger'})
|
||||
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
|
||||
} else if(!row.template) {
|
||||
btn.push({label: '删除', auth: auths.edit, func: ()=>handleDel(row) , type: 'danger'})
|
||||
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
@@ -200,7 +200,7 @@ const formatDataScope = (dataScope) => {
|
||||
|
||||
const handleAdd = () => {
|
||||
router.push({
|
||||
path: '/system/roleadd',
|
||||
name: 'Roleadd',
|
||||
query: {
|
||||
isAdd: 1
|
||||
}
|
||||
@@ -209,7 +209,7 @@ const handleAdd = () => {
|
||||
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
path: '/system/roleedit',
|
||||
name: 'Roleedit',
|
||||
query: {
|
||||
id: row.roleId
|
||||
}
|
||||
@@ -221,14 +221,14 @@ const handleAssign = (row) => {
|
||||
}
|
||||
|
||||
const handleDel = (row) => {
|
||||
if (!(row.template && authStore.roles.includes('superAdmin'))) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '模版角色只能由超级管理员删除!',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
// if (!(row.template && authStore.roles.includes('superAdmin'))) {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '模版角色只能由超级管理员删除!',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
ElMessageBox.confirm('确定删除该条数据吗?', '确定删除', {
|
||||
type: 'warning',
|
||||
|
||||
@@ -119,10 +119,10 @@ const tableConfig = reactive({
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={()=>handleEdit(row)}>编辑</el-button>
|
||||
<el-button type="primary" link onClick={()=>handleEdit(row)} v-perm={['admin:user:edit']}>编辑</el-button>
|
||||
{
|
||||
row.userType != 0 ?
|
||||
<el-button type="danger" link onClick={()=>handleDel(row)}>删除</el-button> :
|
||||
<el-button type="danger" link onClick={()=>handleDel(row)} v-perm={['admin:user:del']}>删除</el-button> :
|
||||
null
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
<!-- <form-design ref="formDesign"/>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<el-dialog v-model="validVisible" title="设置项检查">
|
||||
<el-steps align-center :active="validStep" finish-status="success">
|
||||
@@ -89,7 +87,10 @@ const validOptions = ref([
|
||||
{title: '审批流程', description: '', icon: '', status: ''},
|
||||
// {title: '扩展设置', description: '', icon: '', status: ''}
|
||||
])
|
||||
|
||||
onActivated(()=>{
|
||||
activeSelect.value = 'processDesign'
|
||||
init()
|
||||
})
|
||||
|
||||
const errTitle = computed(() => {
|
||||
if (validResult.finished && !validResult.success) {
|
||||
|
||||
@@ -28,7 +28,6 @@ const processData = computed(() => {
|
||||
return processStore.getDesign()
|
||||
})
|
||||
|
||||
|
||||
const validate = () => {
|
||||
return []
|
||||
}
|
||||
|
||||
@@ -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