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

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/315
This commit is contained in:
2024-06-11 04:19:35 +00:00
22 changed files with 489 additions and 322 deletions

View File

@@ -5,7 +5,7 @@
<el-form-item :label="label" prop="attachment"> <el-form-item :label="label" prop="attachment">
<template v-if="preview&&JSON.stringify(singleFile) !== '{}'&&JSON.stringify(singleFile)!=='null'"> <template v-if="preview&&JSON.stringify(singleFile) !== '{}'&&JSON.stringify(singleFile)!=='null'">
<el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 16px"> <el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 16px">
{{ singleFile?.originalFileName }} {{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName }}
</el-button> </el-button>
<el-button type="danger" link @click="deleteSingleFile(singleFile,1)">删除</el-button> <el-button type="danger" link @click="deleteSingleFile(singleFile,1)">删除</el-button>
</template> </template>
@@ -35,7 +35,7 @@
<script setup lang="jsx"> <script setup lang="jsx">
import FileUpload from '@/components/FileUpload.vue' 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"; import {ElMessageBox, ElNotification} from "element-plus";
const props = defineProps({ const props = defineProps({
showFileList: { showFileList: {
@@ -59,12 +59,11 @@ const props = defineProps({
default: [] default: []
}, },
formData: { formData: {
type: Array, type: Object,
default: [] default: {}
} }
}) })
const emit = defineEmits(["getAttachment", "getOtherFile"]) const emit = defineEmits(["getAttachment", "getOtherFile"])
const formData = ref({})
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
{ {
@@ -115,11 +114,12 @@ const tableConfig = reactive({
)) ))
} }
{ {
row.newFile||props.preview||!props.preview ? <popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'} row.newFile || props.preview || !props.preview ?
perm={['mosr:requirement:del']} <popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'}
onDelete={() => handleDelete(row)}/> perm={['mosr:requirement:del']}
: '' onDelete={() => handleDelete(row)}/>
} : ''
}
</div> </div>
) )
} }
@@ -136,10 +136,18 @@ const allFileList = ref([])
watch(() => props.showTable, (newVal) => { watch(() => props.showTable, (newVal) => {
props.showTable = newVal props.showTable = newVal
}, {deep: true}) }, {deep: true})
watch(() => props.otherFileList, (newVal) => { watch(() => props.formData.fileList, (newVal) => {
console.log('newotherFileList', newVal) console.log('newVal-fileList', newVal)
if (props.preview) { if (props.preview) {
if (props.formData.fileList===null||props.formData.fileList.length===0) { newVal?.forEach(item => {
allFileList.value.push(item)
})
}
}, {deep: true})
watch(() => props.otherFileList, (newVal) => {
console.log('newotherFileList', newVal,props.formData)
if (props.preview) {
if (props.formData.fileList === null || props.formData.fileList.length === 0) {
allFileList.value = newVal allFileList.value = newVal
} else { } else {
newVal?.forEach(item => { newVal?.forEach(item => {
@@ -150,14 +158,6 @@ watch(() => props.otherFileList, (newVal) => {
allFileList.value = newVal allFileList.value = newVal
} }
}, {deep: true}) }, {deep: true})
watch(() => props.formData.fileList, (newVal) => {
console.log('newVal-fileList', newVal)
if (props.preview) {
newVal?.forEach(item => {
allFileList.value.push(item)
})
}
}, {deep: true})
watch(() => props.formData.singleFile, (newVal) => { watch(() => props.formData.singleFile, (newVal) => {
console.log('singleFile', newVal) console.log('singleFile', newVal)
singleFile.value = newVal singleFile.value = newVal
@@ -193,7 +193,7 @@ const deleteAttachment = (val) => {
type: 'success' type: 'success'
}) })
isSingleFile.value = false isSingleFile.value = false
singleFile.value=null singleFile.value = null
} }
}); });
} }
@@ -210,7 +210,7 @@ const deleteSingleFile = (row, type) => {
type: res.code === 1000 ? 'success' : 'error' type: res.code === 1000 ? 'success' : 'error'
}) })
if (res.code === 1000) { if (res.code === 1000) {
isSingleFile.value=false isSingleFile.value = false
if (type === 1) { if (type === 1) {
singleFile.value = null singleFile.value = null
} else { } else {
@@ -249,7 +249,7 @@ defineExpose({
</script> </script>
<style scoped> <style scoped>
:deep(.el-table--fit ){ :deep(.el-table--fit ) {
height: 300px!important; height: 300px !important;
} }
</style> </style>

View File

@@ -20,7 +20,7 @@
<div class="approval-record"> <div class="approval-record">
<baseTitle title="审批记录"></baseTitle> <baseTitle title="审批记录"></baseTitle>
<div class="process"> <div class="process">
<operation-render v-if="processViewer" :operation-list="data.operationList" <operation-render v-if="processViewer && data.operationList && data.operationList.length > 0" :operation-list="data.operationList"
:state="data.state"/> :state="data.state"/>
<process-diagram-viewer v-if="processViewer" :id-name="idName?idName:type"/> <process-diagram-viewer v-if="processViewer" :id-name="idName?idName:type"/>
</div> </div>
@@ -40,8 +40,8 @@ const props = defineProps({
default: {} default: {}
}, },
data: { data: {
type: Array, type: Object,
default: [] default: {}
}, },
processViewer: { processViewer: {
type: Boolean, type: Boolean,

View File

@@ -2,7 +2,7 @@
<div v-loading="loading"> <div v-loading="loading">
<el-form :model="formData" label-width="auto"> <el-form :model="formData" label-width="auto">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12" v-if="type==='singleDetail'">
<el-form-item label="征集名称"> <el-form-item label="征集名称">
<span>{{ formData.requirementName }}</span> <span>{{ formData.requirementName }}</span>
</el-form-item> </el-form-item>
@@ -17,7 +17,7 @@
<span>{{ formData.companyIds }}</span> <span>{{ formData.companyIds }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="type==='singleDetail'?12:24"> <el-col :span="12">
<el-form-item label="截止时间"> <el-form-item label="截止时间">
<span>{{ formData.deadline }}</span> <span>{{ formData.deadline }}</span>
</el-form-item> </el-form-item>
@@ -59,7 +59,7 @@
<div class="approval-record"> <div class="approval-record">
<baseTitle title="审批记录"></baseTitle> <baseTitle title="审批记录"></baseTitle>
<div class="process"> <div class="process">
<operation-render v-if="processViewer" :operation-list="data.operationList" <operation-render v-if="processViewer && data.operationList && data.operationList.length > 0" :operation-list="data.operationList"
:state="data.state"/> :state="data.state"/>
<process-diagram-viewer v-if="processViewer" id-name="collectionProcess"/> <process-diagram-viewer v-if="processViewer" id-name="collectionProcess"/>
</div> </div>

View File

@@ -1,32 +1,32 @@
<template> <template>
<div class="apply-block"> <div class="apply-block">
<el-form :model="formData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'"> <el-form :model="localFormData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="前置流程"> <el-form-item label="前置流程">
<el-input v-model="formData.requirementName" clearable></el-input> <el-input v-model="localFormData.requirementName" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<AttachmentUpload ref="attachment" :label="title+'附件'" :showTable="showTable" :otherFileList="otherFileList" <AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
:otherFileList="otherFileList"
@getAttachment="getAttachment" @getAttachment="getAttachment"
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" @getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
:preview="route.query.state==3"/> :preview="mode == 'resubmit'"/>
<div v-if="route.query.state==3"> <div v-if="mode === 'resubmit'">
<baseTitle title="审批记录"></baseTitle> <baseTitle title="审批记录"></baseTitle>
<div class="process"> <div class="process">
<operation-render v-if="processDiagramViewer" :operation-list="data.operationList" <operation-render :operation-list="data.operationList" :state="data.state"/>
:state="data.state"/>
</div> </div>
</div> </div>
<baseTitle title="流程"></baseTitle> <baseTitle title="流程"></baseTitle>
<div class="approval-record"> <div class="approval-record">
<process-diagram-viewer mode="view" idName="projectApply" v-if="processDiagramViewer"/> <process-diagram-viewer mode="view" :idName="title" v-if="processDiagramViewer"/>
</div> </div>
<div class="oper-page-btn"> <div class="oper-page-btn">
<el-button color="#DED0B2" v-if="route.query.state==0" @click="handleSubmit">提交</el-button> <el-button color="#DED0B2" v-if="mode === 'submit'" @click="handleSubmit">提交</el-button>
<el-button color="#DED0B2" v-else-if="route.query.state==3" @click="handleSubmit">重新提交</el-button> <el-button color="#DED0B2" v-else-if="mode === 'resubmit'" @click="handleSubmit">重新提交</el-button>
<el-button @click="handleBack">返回</el-button> <el-button @click="handleBack">返回</el-button>
</div> </div>
</div> </div>
@@ -40,14 +40,11 @@ import {
getApplyProcess, getApplyProcess,
projectApply, projectApply,
resubmitApply, resubmitApply,
getApplyDetail,
getProjectCheckProcess, getProjectCheckProcess,
projectCheck, projectCheck,
resubmitCheck, resubmitCheck,
getCheckDetail,
projectConclusion, projectConclusion,
resubmitConclusion, resubmitConclusion,
getConclusionDetail,
getProjectConclusionProcess getProjectConclusionProcess
} from "@/api/project-manage"; } from "@/api/project-manage";
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
@@ -59,15 +56,23 @@ const emit = defineEmits(["getAttachment", "getOtherFile"])
const props = defineProps({ const props = defineProps({
title: { title: {
type: String, type: String,
default: '项目立项' default: 'apply'
}, },
showTable: { showTable: {
type: Boolean, type: Boolean,
default: false default: false
}, },
mode: {
type: String,
default: "view"
},
data: { data: {
type: Array, type: Object,
default: [] default: {}
},
formData: {
type: Object,
default: {}
} }
}) })
const rules = reactive({ const rules = reactive({
@@ -76,16 +81,25 @@ const rules = reactive({
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
const processStore = useProcessStore() const processStore = useProcessStore()
const otherFileList = ref([]) const otherFileList = ref([])
const formData = ref({}) const localFormData = ref({})
const attachment = ref() const attachment = ref()
const showTable = ref(true) const showTable = ref(true)
const loading = ref(false) const loading = ref(false)
const processDiagramViewer = ref(false) const processDiagramViewer = ref(false)
const name = ref(router.currentRoute.value.name) const name = ref(router.currentRoute.value.name)
const formRef = ref()
const deploymentId = ref() const deploymentId = ref()
const projectId = ref(route.query.projectId) const projectId = ref(route.query.projectId)
const step = ref(route.query.step) const step = ref(route.query.step)
const getTitleName = (type) => {
switch (type) {
case 'apply':
return '项目立项'
case 'check':
return '项目验收'
case 'filing':
return '项目归档'
}
}
const handleBack = () => { const handleBack = () => {
history.back() history.back()
} }
@@ -97,12 +111,12 @@ const compositeParam = (item) => {
fileType: item.fileType, fileType: item.fileType,
url: item.url, url: item.url,
newFile: false, newFile: false,
tag: props.title tag: getTitleName(props.title)
} }
} }
const getAttachment = (val) => { const getAttachment = (val) => {
console.log('上传文件getAttachment', val) console.log('上传文件getAttachment', val)
formData.value.singleFile = compositeParam(val) localFormData.value.singleFile = compositeParam(val)
} }
const getOtherFile = (val) => { const getOtherFile = (val) => {
console.log('上传文件getOtherFile', val) console.log('上传文件getOtherFile', val)
@@ -119,23 +133,27 @@ const getFileParam = (item) => {
tag: item.tag tag: item.tag
} }
} }
const handleSubmit =async () => { const handleSubmit = async () => {
// if (!formRef.value) return // if (!formRef.value) return
// formRef.value.validate(async (valid) => { // formRef.value.validate(async (valid) => {
// if (!valid) return // if (!valid) return
let files = [] let files = []
if (route.query.state === '3') { if (props.mode === 'resubmit') {
attachment.value.allFileList.forEach(item => { attachment.value.allFileList.forEach(item => {
files.push(getFileParam(item)) files.push(getFileParam(item))
}) })
} else { } else {
otherFileList.value.forEach(item => { otherFileList.value.forEach(item => {
files.push(getFileParam(item)) files.push(getFileParam(item))
}) })
} }
// if (formData.value.singleFile !== undefined) { // if (localFormData.value.singleFile !== undefined) {
// formData.value.singleFile = getFileParam(formData.value.singleFile) // localFormData.value.singleFile = getFileParam(localFormData.value.singleFile)
// } // }
console.log('attachment.value.singleFile',attachment.value,attachment.value.singleFile)
if(localFormData.value.singleFile){
}else {
if (attachment.value.singleFile == null) { if (attachment.value.singleFile == null) {
attachment.value.validate() attachment.value.validate()
ElNotification({ ElNotification({
@@ -147,55 +165,57 @@ const handleSubmit =async () => {
} else { } else {
attachment.value.clearValidate() attachment.value.clearValidate()
} }
let params = { }
deploymentId: deploymentId.value,
requirementId: route.query.id, let params = {
fileList: files, deploymentId: deploymentId.value,
singleFile: formData.value.singleFile, requirementId: route.query.id,
projectId: projectId.value, fileList: files,
singleFile: localFormData.value.singleFile,
projectId: projectId.value,
}
console.log('params', params)
let res
if (step.value === '20') {
if (props.mode === 'resubmit') {
res = await resubmitApply(params)
} else {
res = await projectApply(params)
} }
console.log('params', params) } else if (step.value === '40') {
let res if (props.mode === 'resubmit') {
res = await resubmitCheck(params)
} else {
res = await projectCheck(params)
}
} else if (step.value === '50') {
if (props.mode === 'resubmit') {
res = await resubmitConclusion(params)
} else {
res = await projectConclusion(params)
}
}
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
if (step.value === '20') { if (step.value === '20') {
if (route.query.state === '3') { await router.push({
res = await resubmitApply(params) name: 'Initiation'
} else { })
res = await projectApply(params)
}
} else if (step.value === '40') { } else if (step.value === '40') {
if (route.query.state === '3') { await router.push({
res = await resubmitCheck(params) name: 'Implementation'
} else { })
res = await projectCheck(params)
}
} else if (step.value === '50') { } else if (step.value === '50') {
if (route.query.state === '3') { await router.push({
res = await resubmitConclusion(params) name: 'Filing'
} else { })
res = await projectConclusion(params)
}
}
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
if (step.value === '20') {
await router.push({
name: 'Initiation'
})
}else if (step.value === '40') {
await router.push({
name: 'Implementation'
})
}else if (step.value === '50') {
await router.push({
name: 'Filing'
})
}
} }
}
// }) // })
} }
const init = async () => { const init = async () => {
@@ -207,7 +227,7 @@ const init = async () => {
res = await getApplyProcess(id) res = await getApplyProcess(id)
} else if (step.value === '40') { } else if (step.value === '40') {
res = await getProjectCheckProcess(id) res = await getProjectCheckProcess(id)
}else if (step.value === '50') { } else if (step.value === '50') {
res = await getProjectConclusionProcess(id) res = await getProjectConclusionProcess(id)
} }
if (res.code === 1000) { if (res.code === 1000) {
@@ -230,35 +250,13 @@ const init = async () => {
}) })
} }
} }
const getDetailInfo = async () => {
let id = projectId.value
if (!id) return;
let res
loading.value = true
if (step.value === '20') {
res = await getApplyDetail(id)
} else if (step.value === '40') {
res = await getCheckDetail(id)
}else if (step.value === '50') {
res = await getConclusionDetail(id)
}
if (res.code === 1000) { watchEffect(() => {
formData.value = res.data.formData return Object.keys(props.formData).length && (localFormData.value = props.formData)
loading.value = false })
}else {
ElNotification({
title: '提示',
message: res.msg,
type: 'error'
})
}
}
onMounted(async () => { onMounted(async () => {
await init() await init()
if (route.query.state == 3) {
await getDetailInfo()
}
}) })
</script> </script>

View File

@@ -153,7 +153,7 @@
<div class="approval-record"> <div class="approval-record">
<baseTitle title="审批记录"></baseTitle> <baseTitle title="审批记录"></baseTitle>
<div class="process"> <div class="process">
<operation-render v-if="processViewer" :operation-list="data.operationList" <operation-render v-if="processViewer && data.operationList && data.operationList.length > 0" :operation-list="data.operationList"
:state="data.state"/> :state="data.state"/>
<process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/> <process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/>
</div> </div>

View File

@@ -99,13 +99,6 @@ const schema = computed(() => {
span: 12 span: 12
} }
}, },
{
label: '征集类型',
prop: 'collectType',
colProps: {
span: 12
}
},
{ {
label: '所属公司', label: '所属公司',
prop: 'affiliatedCompany', prop: 'affiliatedCompany',
@@ -114,8 +107,8 @@ const schema = computed(() => {
} }
}, },
{ {
label: '截止时间', label: '项目名称',
prop: 'deadline', prop: 'projectName',
colProps: { colProps: {
span: 12 span: 12
} }

View File

@@ -52,6 +52,13 @@ const searchConfig = reactive([
]) ])
const tableIns = ref() const tableIns = ref()
const userInfo = ref(authStore.userinfo) const userInfo = ref(authStore.userinfo)
const auths = {
edit: ['mosr:requirement:resubmit'],
detail: ['mosr:requirement:info'],
add: ['mosr:requirement:add'],
del: ['mosr:requirement:del'],
report: ['mosr:collect:reported'],
}
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
{ {
@@ -102,18 +109,19 @@ const tableConfig = reactive({
prop: 'oper', prop: 'oper',
label: '操作', label: '操作',
align: 'center', align: 'center',
fixed:'right',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [] let btn = []
let buttons = new Set(Array.from(row.buttons)) let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) { if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'}) btn.push({label: '详情', prem: auths.detail, 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'}) btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
} }
if (buttons.has("report")) { if (buttons.has("report")) {
btn.push({label: '需求上报', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'}) btn.push({label: '需求上报', prem: auths.report, func: () => handleReport(row), type: 'primary'})
} }
return ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>
@@ -132,7 +140,7 @@ const tableConfig = reactive({
{ {
buttons.has("delete") ? buttons.has("delete") ?
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'} <popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'}
perm={['mosr:requirement:del']} perm={auths.del}
onDelete={() => handleDelete(row)}/> : '' onDelete={() => handleDelete(row)}/> : ''
} }
</div> </div>
@@ -142,7 +150,7 @@ const tableConfig = reactive({
], ],
api: '/workflow/mosr/requirement', api: '/workflow/mosr/requirement',
btns: [ btns: [
{name: '新增', key: 'add', color: '#DED0B2'}, {name: '新增', key: 'add', color: '#DED0B2',auth: auths.add},
{name: '导出', key: 'export', type: ''}, {name: '导出', key: 'export', type: ''},
], ],
params: {} params: {}

View File

@@ -28,7 +28,7 @@ import SummaryDetail from '@/components/DetailComponent/SummaryDetail.vue';
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
import {getMapProjectStateInfo} from '@/components/steps/api'; import {getMapProjectStateInfo} from '@/components/steps/api';
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue"; import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
import {ElNotification} from "element-plus"; import {ElLoading, ElNotification} from "element-plus";
const route = useRoute() const route = useRoute()
const summaryData = ref({}) const summaryData = ref({})
@@ -40,36 +40,46 @@ const active = ref(route.query.state)
const auditOpinion = ref('') const auditOpinion = ref('')
const showActive = ref() const showActive = ref()
const getInfo = async (state) => { const getInfo = async (state) => {
fileListShow.value = 'READ' const loading = ElLoading.service({fullscreen: true})
const projectId = route.query.projectId try {
summaryProcessViewer.value = false fileListShow.value = 'READ'
loading.value = true const projectId = route.query.projectId
const {code, data, msg} = await getMapProjectStateInfo(projectId, state) summaryProcessViewer.value = false
if (code === 1000) { loading.value = true
summaryData.value = data; const {code, data, msg} = await getMapProjectStateInfo(projectId, state)
loading.value = false if (code === 1000) {
processStore.setDesign(data) summaryData.value = data;
processStore.runningList.value = data.runningList; loading.value = false
processStore.endList.value = data.endList; if(data.runningList===null) {
processStore.noTakeList.value = data.noTakeList; loading.close()
processStore.refuseList.value = data.refuseList; return;
processStore.passList.value = data.passList;
nextTick(() => {
summaryProcessViewer.value = true
if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
} }
}) processStore.setDesign(data)
} else { processStore.runningList.value = data.runningList;
ElNotification({ processStore.endList.value = data.endList;
title: '提示', processStore.noTakeList.value = data.noTakeList;
message: msg, processStore.refuseList.value = data.refuseList;
type: 'error' processStore.passList.value = data.passList;
}) nextTick(() => {
if (msg === '查询结果为空') { summaryProcessViewer.value = true
summaryData.value = [] if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
}
})
loading.close()
} else {
ElNotification({
title: '提示',
message: msg,
type: 'error'
})
if (msg === '查询结果为空') {
summaryData.value = []
}
loading.close()
} }
loading.value = false } catch {
loading.close()
} }
} }

View File

@@ -71,6 +71,11 @@ const searchConfig = reactive([
// colProps: {} // colProps: {}
// }, // },
]) ])
const auths = {
edit: ['mosr:collect:resubmit'],
detail: ['mosr:collect:info'],
report: ['mosr:collect:reported'],
}
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
{ {
@@ -156,19 +161,17 @@ const tableConfig = reactive({
prop: 'oper', prop: 'oper',
label: '操作', label: '操作',
align: 'center', align: 'center',
fixed:'right',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [] let btn = []
let buttons = new Set(Array.from(row.buttons)) let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) { if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'}) btn.push({label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary'})
} }
if (buttons.has("edit")) { if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'}) btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
} }
// if (buttons.has("report")) {
// btn.push({label: '上报', prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'})
// }
return ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>
{ {
@@ -197,7 +200,7 @@ const tableConfig = reactive({
api: '/workflow/mosr/requirement/collect', api: '/workflow/mosr/requirement/collect',
params: {}, params: {},
btns: [ btns: [
{name: '新增上报', key: 'add', color: '#DED0B2', auth: ''}, {name: '新增上报', key: 'add', color: '#DED0B2', auth:auths.report},
{name: '年度计划导出', key: '_export', auth: ''}, {name: '年度计划导出', key: '_export', auth: ''},
{name: '经费预算生成', key: 'preMonty', auth: ''}, {name: '经费预算生成', key: 'preMonty', auth: ''},
] ]

View File

@@ -1,4 +1,6 @@
<template> <template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane v-for="item in paneList" :label="item.label" :name="item.name"> <el-tab-pane v-for="item in paneList" :label="item.label" :name="item.name">
<search-files-by-tag @search="search" @upload="upload" :type="item.name==='40'?'40':''" <search-files-by-tag @search="search" @upload="upload" :type="item.name==='40'?'40':''"
@@ -10,6 +12,8 @@
<script setup lang="jsx"> <script setup lang="jsx">
import {searchFileList} from "@/api/project-manage/attachment.js"; import {searchFileList} from "@/api/project-manage/attachment.js";
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
@@ -20,6 +24,25 @@ const uploadState = ref(true)
const fileList = ref([]) const fileList = ref([])
const projectId = ref(route.query.id) const projectId = ref(route.query.id)
const requirementId = ref(route.query.requirementId) const requirementId = ref(route.query.requirementId)
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const paneList=ref([ const paneList=ref([
{ {
label:'需求征集', label:'需求征集',
@@ -42,7 +65,15 @@ const paneList=ref([
name:'50' name:'50'
} }
]) ])
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const handleClick = (tab) => { const handleClick = (tab) => {
activeName.value=tab.props.name activeName.value=tab.props.name
loading.value=true loading.value=true
@@ -90,7 +121,11 @@ const upload = () => {
}) })
} }
} }
watchEffect(() => {
if (requirementId.value === '-1') {
paneList.value = paneList.value.slice(1)
}
})
onMounted(() => { onMounted(() => {
if (activeName.value === '50') { if (activeName.value === '50') {
search({}) search({})

View File

@@ -227,21 +227,22 @@ const tableConfig = reactive({
prop: 'oper', prop: 'oper',
label: '操作', label: '操作',
align: 'center', align: 'center',
fixed:'right',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [] let btn = []
let buttons = new Set(Array.from(row.buttons)) let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) { if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'}) btn.push({label: '详情', prem: ['project:management:filing:detail'], func: () => handleDetail(row), type: 'primary'})
} }
if (buttons.has("attachments")) { if (buttons.has("attachments")) {
btn.push({label: '附件', prem: ['mosr:requirement:resubmit'], func: () => handleAttachment(row), type: 'primary'}) btn.push({label: '附件', prem: ['project:management:filing:attachment'], func: () => handleAttachment(row), type: 'primary'})
} }
if (buttons.has("entry")) { if (buttons.has("entry")) {
btn.push({label: '结项', prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'}) btn.push({label: '结项', prem: ['project:management:filing:conclusion'], func: () => handleConclusion(row), type: 'primary'})
} }
if (buttons.has("edit")) { if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'}) btn.push({label: '编辑', prem: ['project:management:filing:conclusion'], func: () => handleEdit(row), type: 'primary'})
} }
return ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>

View File

@@ -1,4 +1,6 @@
<template> <template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<baseTitle title="上传附件"></baseTitle> <baseTitle title="上传附件"></baseTitle>
<el-card style="width: 100%;margin: 15px 0"> <el-card style="width: 100%;margin: 15px 0">
<file-upload @getFile="getFile" /> <file-upload @getFile="getFile" />
@@ -18,6 +20,8 @@
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
import {uploadFileList} from "@/api/project-manage/attachment"; import {uploadFileList} from "@/api/project-manage/attachment";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
const route = useRoute() const route = useRoute()
@@ -26,6 +30,25 @@ const fileList = ref([])
const formData = ref({ const formData = ref({
tagName:'' tagName:''
}) })
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const tableConfig = reactive({ const tableConfig = reactive({
columns: [ columns: [
{ {
@@ -48,7 +71,8 @@ const tableConfig = reactive({
{ {
prop: 'size', prop: 'size',
label: '文件大小', label: '文件大小',
align: 'center' align: 'center',
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
}, },
{ {
prop: 'oper', prop: 'oper',
@@ -69,6 +93,15 @@ const name = ref(router.currentRoute.value.name)
const rules = reactive({ const rules = reactive({
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}], tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
}) })
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const compositeParam = (item) => { const compositeParam = (item) => {
let tag='' let tag=''
switch (route.query.name) { switch (route.query.name) {
@@ -119,7 +152,7 @@ const handleSubmit = async () => {
}) })
let params = { let params = {
fileList: files, fileList: files,
targetState:'', targetState:route.query.name,
projectId: route.query.id, projectId: route.query.id,
} }
let res = await uploadFileList(params) let res = await uploadFileList(params)

View File

@@ -1,4 +1,6 @@
<template> <template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm> <fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"> <fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
<template #empty> <template #empty>
@@ -10,9 +12,30 @@
<script setup lang="jsx"> <script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue' import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {toThousands} from '@/utils/changePrice.js' import {toThousands} from '@/utils/changePrice.js'
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const searchConfig = reactive([ const searchConfig = reactive([
{ {
label: '项目名称', label: '项目名称',
@@ -141,6 +164,15 @@ const tableConfig = reactive({
] ]
}) })
const tableIns=ref() const tableIns=ref()
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const headBtnClick = (key) => { const headBtnClick = (key) => {
switch (key) { switch (key) {
case 'add': case 'add':

View File

@@ -50,13 +50,6 @@ const schema = computed(() => {
span: 12 span: 12
} }
}, },
{
label: '征集类型',
prop: 'collectType',
colProps: {
span: 12
}
},
{ {
label: '项目名称', label: '项目名称',
prop: 'projectName', prop: 'projectName',
@@ -64,13 +57,6 @@ const schema = computed(() => {
span: 12 span: 12
} }
}, },
{
label: '所属公司',
prop: 'affiliatedCompany',
colProps: {
span: 12
}
}
] ]
}) })
const baseForm = ref() const baseForm = ref()

View File

@@ -2,31 +2,48 @@
<steps :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" @stepChange="stepChange" <steps :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" @stepChange="stepChange"
:reportType="route.query.id==='-1'?'direct':''"> :reportType="route.query.id==='-1'?'direct':''">
<template #content> <template #content>
<collection-detail <collection-detail :formData="detailData.formData"
:formData="commonForm.formData" :data="detailData"
:data="commonForm" :processViewer="commonProvessViewer"
:processViewer="commonProvessViewer" v-show="showActive == '00'"
v-show="showActive == '00'" :fileListShow="fileListShow"
v-model:value="auditOpinion" v-model:value="auditOpinion"
/> />
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm" <summary-detail v-show="showActive == '10'"
:processViewer="commonProvessViewer" :fileListShow="fileListShow" :formData="detailData.formData"
:data="detailData"
:processViewer="commonProvessViewer"
:fileListShow="fileListShow"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
<ApprovalDetail type="approval" v-show="showActive == '20'&&!showApply" :formData="commonForm.formData" <ApprovalDetail type="approval"
:data="commonForm" :processViewer="commonProvessViewer" v-if="showActive == '20'&&!editShow"
:fileListShow="fileListShow" v-model:value="auditOpinion"/> :formData="detailData.formData"
<ApprovalDetail type="execute" v-show="showActive == '40'&&!showCheck" :formData="commonForm.formData" :data="detailData"
:data="commonForm" :processViewer="commonProvessViewer" :processViewer="commonProvessViewer"
:fileListShow="fileListShow" v-model:value="auditOpinion"/> :fileListShow="fileListShow"
<ApprovalDetail type="archivist" v-show="showActive == '50'&&!showFiling" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :fileListShow="fileListShow"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
<project-apply v-if="showApply&&showActive == '20'" :data="commonForm"/> <ApprovalDetail type="execute"
<project-apply title="项目验收" v-if="showCheck&&showActive == '40'" :data="commonForm"/> v-if="showActive == '40'&&!editShow"
<project-apply title="项目结项" v-if="showFiling&&showActive == '50'" :data="commonForm"/> :formData="detailData.formData"
:data="detailData"
:processViewer="commonProvessViewer"
:fileListShow="fileListShow"
v-model:value="auditOpinion"/>
<ApprovalDetail type="archivist"
v-show="showActive == '50'&&!editShow"
:formData="detailData.formData"
:data="detailData"
:processViewer="commonProvessViewer"
:fileListShow="fileListShow"
v-model:value="auditOpinion"/>
<project-apply :title="applyTitle"
v-if="editShow"
:mode="mode"
:data="detailData"
:formData="detailData.formData"/>
</template> </template>
</steps> </steps>
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId" <opinion v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
</template> </template>
@@ -40,101 +57,83 @@ import {ElLoading, ElNotification} from "element-plus";
import Opinion from "@/components/DetailComponent/Opinion.vue"; import Opinion from "@/components/DetailComponent/Opinion.vue";
const route = useRoute() const route = useRoute()
const showApply = ref(false) const editShow = ref(false)
const showCheck = ref(false) const applyTitle = ref('apply')
const showFiling = ref(false)
const loading = ref(false) const loading = ref(false)
const processStore = useProcessStore() const processStore = useProcessStore()
const fileListShow = ref('READ') const fileListShow = ref('READ')
const mode = ref('')
const currentStep = ref() const currentStep = ref()
const auditOpinion = ref('') const auditOpinion = ref('')
// const step = ref(route.query.step)
route.query.step == '10' && (currentStep.value = 1) route.query.step == '10' && (currentStep.value = 1)
route.query.step == '20' && (currentStep.value = 2) route.query.step == '20' && (currentStep.value = 2)
route.query.step == '40' && (currentStep.value = 3) route.query.step == '40' && (currentStep.value = 3)
route.query.step == '50' && (currentStep.value = 4) route.query.step == '50' && (currentStep.value = 4)
const showActive = ref() const showActive = ref()
const commonForm = ref({}) const detailData = ref({})
const commonProvessViewer = ref(true) const commonProvessViewer = ref(true)
const getAllInfo = async (state) => { const getAllInfo = async (state) => {
const loading = ElLoading.service({fullscreen: true}) const loading = ElLoading.service({fullscreen: true})
try { try {
fileListShow.value = 'READ'
commonProvessViewer.value = false commonProvessViewer.value = false
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state) const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
if (code !== 1000) { if (code === 1000) {
detailData.value = data
mode.value = data.formData.mode
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(() => {
commonProvessViewer.value = true
if (data.formPermMap && data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
}
})
changeModel(state, mode.value)
loading.close()
} else {
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: msg, message: msg,
type: 'error' type: 'error'
}) })
if (msg === '查询结果为空') { if (msg === '查询结果为空') {
commonForm.value = [] detailData.value = []
detailData.value.formData = {}
} }
loading.close() loading.close()
} }
if (data === undefined) return;
commonForm.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(() => {
commonProvessViewer.value = true
if (data.formPermMap && data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
}
})
loading.close()
} catch { } catch {
loading.close() loading.close()
} }
} }
const changeModel = (active) => { const changeModel = (active, mode) => {
if (route.query.step === '20' && active === '20') { editShow.value = false
if (route.query.state === '0') { nextTick(() => {
showApply.value = true editShow.value = mode === 'submit' || mode === 'resubmit';
} else if (route.query.state === '3') { if (route.query.step === '20' && active === '20') {
showApply.value = true applyTitle.value = 'apply'
getAllInfo(active) } else if (route.query.step === '40' && active === '40') {
} else { applyTitle.value = 'check'
showApply.value = false } else if (route.query.step === '50' && active === '50') {
getAllInfo(active) applyTitle.value = 'filing'
} }
} else if (route.query.step === '40' && active === '40') { })
if (route.query.state === '0') {
showCheck.value = true
} else if (route.query.state === '3') {
showCheck.value = true
getAllInfo(active)
} else {
showCheck.value = false
getAllInfo(active)
}
} else if (route.query.step === '50' && active === '50') {
if (route.query.state === '0') {
showFiling.value = true
} else if (route.query.state === '3') {
showFiling.value = true
getAllInfo(active)
} else {
showFiling.value = false
getAllInfo(active)
}
} else {
getAllInfo(active)
}
} }
const setDetail = (active) => { const setDetail = (active) => {
showActive.value = active showActive.value = active
changeModel(active) getAllInfo(active)
} }
const stepChange = (data) => { const stepChange = (data) => {
showActive.value = data.active showActive.value = data.active
changeModel(data.active) getAllInfo(data.active)
} }
</script> </script>

View File

@@ -251,22 +251,22 @@ const tableConfig = reactive({
let btn = [] let btn = []
let buttons = new Set(Array.from(row.buttons)) let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) { if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'}) btn.push({label: '详情', prem: ['mosr:implementation:info'], func: () => handleDetail(row), type: 'primary'})
} }
if (buttons.has("check")) { if (buttons.has("check")) {
btn.push({label: '验收', prem: ['mosr:requirement:resubmit'], func: () => handleCheck(row), type: 'primary'}) btn.push({label: '验收', prem: ['mosr:implementation:check'], func: () => handleCheck(row), type: 'primary'})
} }
if (buttons.has("edit")) { if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'}) btn.push({label: '编辑', prem: ['mosr:implementation:resubmit'], 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'}) btn.push({label: '台账', prem: ['project:management:implementation:account'], 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'}) btn.push({label: '附件', prem: ['project:management:implementation:attachment'], func: () => handleAttachment(row), type: 'primary'})
} }
if (buttons.has("viewAllocation")) { if (buttons.has("viewAllocation")) {
btn.push({label: '查看分摊', prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'}) btn.push({label: '查看分摊', prem: ['project:management:implementation:share'], func: () => handleShare(row), type: 'primary'})
} }
if (buttons.has("phaseChange")) { if (buttons.has("phaseChange")) {
btn.push({label: '阶段变更', prem: ['mosr:phase:change'], func: () => handlePhaseChange(row), type: 'primary'}) btn.push({label: '阶段变更', prem: ['mosr:phase:change'], func: () => handlePhaseChange(row), type: 'primary'})

View File

@@ -1,5 +1,7 @@
<template> <template>
<div class="apply-block"> <div class="apply-block">
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<el-form :model="formData" label-width="auto"> <el-form :model="formData" label-width="auto">
<el-form-item label="抄送人员"> <el-form-item label="抄送人员">
<Ttsup :modelValue="chooseUserInfo()" @click="chooseUser"/> <Ttsup :modelValue="chooseUserInfo()" @click="chooseUser"/>
@@ -29,6 +31,8 @@ import {getPhaseProcess, submitPhaseChange, getPhaseForm, resubmitPhaseForm} fro
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
const router = useRouter() const router = useRouter()
@@ -46,6 +50,34 @@ const processInstanceData = ref()
const processDiagramViewer = ref(true) const processDiagramViewer = ref(true)
const userList = ref([]) const userList = ref([])
const processStore = useProcessStore() const processStore = useProcessStore()
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.projectId)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const compositeParam = (item) => { const compositeParam = (item) => {
let tag = '' let tag = ''
if (name.value === 'Phase/change') { if (name.value === 'Phase/change') {

View File

@@ -1,4 +1,6 @@
<template> <template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<baseTitle title="阶段变更详情"></baseTitle> <baseTitle title="阶段变更详情"></baseTitle>
<div style="color: #606266;font-size: 14px">抄送人{{copyName}}</div> <div style="color: #606266;font-size: 14px">抄送人{{copyName}}</div>
<ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase" <ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase"
@@ -10,6 +12,8 @@
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js'; import {useProcessStore} from '@/stores/processStore.js';
import {getPhaseDetail} from "@/api/project-manage"; import {getPhaseDetail} from "@/api/project-manage";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const route = useRoute() const route = useRoute()
const summaryData = ref({}) const summaryData = ref({})
@@ -19,6 +23,34 @@ const loading = ref(false)
const auditOpinion = ref('') const auditOpinion = ref('')
const copyName = ref('') const copyName = ref('')
const fileListShow = ref('READ') const fileListShow = ref('READ')
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.projectId)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const getInfo = async () => { const getInfo = async () => {
fileListShow.value = 'READ' fileListShow.value = 'READ'
const projectId = route.query.projectId const projectId = route.query.projectId

View File

@@ -25,26 +25,12 @@ const schema = computed(() => {
span: 12 span: 12
} }
}, },
{
label: '征集类型',
prop: 'collectType',
colProps: {
span: 12
}
},
{ {
label: '项目名称', label: '项目名称',
prop: 'projectName', prop: 'projectName',
colProps: { colProps: {
span: 12 span: 12
} }
},
{
label: '所属公司',
prop: 'affiliatedCompany',
colProps: {
span: 12
}
} }
] ]
}) })

View File

@@ -1,4 +1,6 @@
<template> <template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<baseTitle title="标签名称"></baseTitle> <baseTitle title="标签名称"></baseTitle>
<el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules"> <el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
<el-form-item label="标签名称" prop="tagName"> <el-form-item label="标签名称" prop="tagName">
@@ -34,12 +36,33 @@ import {getTags} from "@/api/project-manage";
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js' import {useTagsView} from '@/stores/tagsview.js'
import {uploadFileList} from "@/api/project-manage/attachment"; import {uploadFileList} from "@/api/project-manage/attachment";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
const fileList = ref([]) const fileList = ref([])
const showInput = ref(false) const showInput = ref(false)
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
}
]
})
const baseForm = ref()
const tagsOption = ref([]) const tagsOption = ref([])
const formData = ref({ const formData = ref({
tagName: '' tagName: ''
@@ -88,6 +111,15 @@ const name = ref(router.currentRoute.value.name)
const rules = reactive({ const rules = reactive({
tagName: [{required: true, message: '请输入标签名称', trigger: ['blur', 'change']}], tagName: [{required: true, message: '请输入标签名称', trigger: ['blur', 'change']}],
}) })
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const changeInput = () => { const changeInput = () => {
showInput.value = !showInput.value; showInput.value = !showInput.value;
formData.value.tagName = ''; formData.value.tagName = '';

View File

@@ -102,26 +102,12 @@ const schema = computed(() => {
span: 12 span: 12
} }
}, },
{
label: '征集类型',
prop: 'collectType',
colProps: {
span: 12
}
},
{ {
label: '项目名称', label: '项目名称',
prop: 'projectName', prop: 'projectName',
colProps: { colProps: {
span: 12 span: 12
} }
},
{
label: '所属公司',
prop: 'affiliatedCompany',
colProps: {
span: 12
}
} }
] ]
}) })

View File

@@ -226,21 +226,22 @@ const tableConfig = reactive({
prop: 'oper', prop: 'oper',
label: '操作', label: '操作',
align: 'center', align: 'center',
fixed:'right',
showOverflowTooltip: false, showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [] let btn = []
let buttons = new Set(Array.from(row.buttons)) let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) { if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'}) btn.push({label: '详情', prem: ['mosr:approval: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'}) btn.push({label: '编辑', prem: ['mosr:approval:resubmit'], func: () => handleEdit(row), type: 'primary'})
} }
// if (buttons.has("delete")) { // if (buttons.has("delete")) {
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'}) // btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
// } // }
if (buttons.has("apply")) { if (buttons.has("apply")) {
btn.push({label: '立项',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'}) btn.push({label: '立项',prem: ['mosr:approval:apply'], func: () => handleApply(row), type: 'primary'})
} }
return ( return (
<div style={{width: '100%'}}> <div style={{width: '100%'}}>