Merge pull request 'fix : 修改征集类型为字典、直接上报时详情专项资金回显、项目归档-需求征集文件回显、重大项目前置流程必填' (#353) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/353
This commit is contained in:
2024-06-18 12:43:17 +00:00
9 changed files with 61 additions and 49 deletions

View File

@@ -40,7 +40,7 @@ export const getMenuInfo = (menuId) => {
export const getMenuOpt = (excludeId=0) => { export const getMenuOpt = (excludeId=0) => {
return request({ return request({
url: '/admin/menu/option/'+excludeId, url: '/admin/menu/option/role/'+excludeId,
method: 'get' method: 'get'
}) })
} }
@@ -50,4 +50,4 @@ export const getMenuOptRole = (roleId) => {
url: '/admin/menu/option/role/'+roleId, url: '/admin/menu/option/role/'+roleId,
method: 'get' method: 'get'
}) })
} }

View File

@@ -7,9 +7,11 @@
<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 ? singleFile?.originalFileName : formData.singleFile?.originalFileName }} {{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName }}
</el-button> </el-button>
<el-button type="danger" link @click="deleteSingleFile(singleFile?singleFile:formData.singleFile,1)">删除</el-button> <el-button type="danger" link @click="deleteSingleFile(singleFile?singleFile:formData.singleFile,1)">删除
</el-button>
</template> </template>
<template v-else-if="!preview||JSON.stringify(singleFile) == '{}'||singleFile==null||formData.singleFile==null"> <template
v-else-if="!preview||JSON.stringify(singleFile) == '{}'||singleFile==null||formData.singleFile==null">
<file-upload @getFile="getAttachment" :showFileList="showFileList" :multiple="false" :maxSize="1" <file-upload @getFile="getAttachment" :showFileList="showFileList" :multiple="false" :maxSize="1"
:disabled="isSingleFile" @delete="deleteAttachment"/> :disabled="isSingleFile" @delete="deleteAttachment"/>
</template> </template>
@@ -97,7 +99,7 @@ const tableConfig = reactive({
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
let btn = [] let btn = []
btn.push({label: '下载', func: () => handleDownload(row), type: 'primary'}) btn.push({label: '下载', func: () => handleDownload(row), type: 'primary'})
// if (row.newFile){ // if (row.newFile) {
// btn.push({label: '删除', func: () => handleDelete(row), type: 'primary'}) // btn.push({label: '删除', func: () => handleDelete(row), type: 'primary'})
// } // }
return ( return (
@@ -116,7 +118,7 @@ const tableConfig = reactive({
{ {
row.newFile || props.preview || !props.preview ? row.newFile || props.preview || !props.preview ?
<popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'} <popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'}
perm={['mosr:requirement:del']} // perm={['']}
onDelete={() => handleDelete(row)}/> onDelete={() => handleDelete(row)}/>
: '' : ''
} }
@@ -137,7 +139,7 @@ watch(() => props.showTable, (newVal) => {
props.showTable = newVal props.showTable = newVal
}, {deep: true}) }, {deep: true})
watch(() => props.formData.fileList, (newVal) => { watch(() => props.formData.fileList, (newVal) => {
console.log('newVal-fileList', newVal) // console.log('newVal-fileList', newVal)
if (props.preview) { if (props.preview) {
newVal?.forEach(item => { newVal?.forEach(item => {
allFileList.value.push(item) allFileList.value.push(item)
@@ -145,7 +147,7 @@ watch(() => props.formData.fileList, (newVal) => {
} }
}, {deep: true}) }, {deep: true})
watch(() => props.otherFileList, (newVal) => { watch(() => props.otherFileList, (newVal) => {
console.log('newotherFileList', newVal,props.formData) // console.log('newotherFileList', newVal, props.formData)
if (props.preview) { if (props.preview) {
if (props.formData.fileList === null || props.formData.fileList.length === 0) { if (props.formData.fileList === null || props.formData.fileList.length === 0) {
allFileList.value = newVal allFileList.value = newVal
@@ -159,7 +161,7 @@ watch(() => props.otherFileList, (newVal) => {
} }
}, {deep: true}) }, {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
}, {deep: true}) }, {deep: true})
watch(() => isSingleFile.value, (newVal) => { watch(() => isSingleFile.value, (newVal) => {

View File

@@ -3,7 +3,7 @@
<el-form :model="localFormData" 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="前置流程" :required="true" prop="requestName"> <el-form-item label="前置流程" :required="preProcessRequired" prop="requestName">
<a :href="localFormData.preProcess?.baseUrl" target="_blank" <a :href="localFormData.preProcess?.baseUrl" target="_blank"
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ localFormData.preProcess?.requestName }}</a> style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ localFormData.preProcess?.requestName }}</a>
<el-button color="#DED0B2" @click="handleShowPreTable"> <el-button color="#DED0B2" @click="handleShowPreTable">
@@ -147,6 +147,7 @@ const props = defineProps({
const preProcessList = ref([]) const preProcessList = ref([])
//暂存数据 //暂存数据
const currentList = ref([]) const currentList = ref([])
const preProcessRequired = ref(false)
const total = ref(0) const total = ref(0)
const preProcessForm = reactive({ const preProcessForm = reactive({
requestName: '' requestName: ''
@@ -169,6 +170,7 @@ const localFormData = ref({
} }
}) })
const attachment = ref() const attachment = ref()
const deploymentData = ref({})
const showPreTable = ref(false) const showPreTable = ref(false)
const showTable = ref(true) const showTable = ref(true)
const loading = ref(false) const loading = ref(false)
@@ -245,7 +247,7 @@ const compositeParam = (item) => {
originalFileName: item.originalFilename, originalFileName: item.originalFilename,
fileType: item.fileType, fileType: item.fileType,
url: item.url, url: item.url,
newFile: false, newFile: true,
tag: getTitleName(props.title) tag: getTitleName(props.title)
} }
} }
@@ -269,12 +271,14 @@ const getFileParam = (item) => {
} }
} }
const handleSubmit = async () => { const handleSubmit = async () => {
if (localFormData.value.preProcess === undefined) { if(deploymentData.value.deploymentName==='重大项目立项'||deploymentData.value.deploymentName==='重大项目验收'){
ElNotification({ if (localFormData.value.preProcess === undefined) {
title: '提示', ElNotification({
message: '请选择前置流程', title: '提示',
type: 'error' message: '请选择前置流程!',
}) type: 'error'
})
}
} }
let files = [] let files = []
if (props.mode === 'resubmit') { if (props.mode === 'resubmit') {
@@ -289,7 +293,7 @@ const handleSubmit = async () => {
// if (localFormData.value.singleFile !== undefined) { // if (localFormData.value.singleFile !== undefined) {
// localFormData.value.singleFile = getFileParam(localFormData.value.singleFile) // localFormData.value.singleFile = getFileParam(localFormData.value.singleFile)
// } // }
console.log('attachment.value.singleFile', attachment.value, attachment.value.singleFile) // console.log('attachment.value.singleFile', attachment.value, attachment.value.singleFile)
// if (localFormData.value.singleFile) { // if (localFormData.value.singleFile) {
// //
// } else { // } else {
@@ -372,6 +376,8 @@ const init = async () => {
if (res.code === 1000) { if (res.code === 1000) {
let data = res.data let data = res.data
deploymentId.value = data.deploymentId deploymentId.value = data.deploymentId
deploymentData.value = data
preProcessRequired.value = data.deploymentName === '重大项目立项'||data.deploymentName === '重大项目验收';
processStore.setDesign(data) processStore.setDesign(data)
processStore.runningList.value = data.runningList; processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList; processStore.endList.value = data.endList;

View File

@@ -9,7 +9,8 @@
@cancel="handleCancel" @cancel="handleCancel"
> >
<template #reference> <template #reference>
<el-button v-perm="perm" :type="btnType" size="mini" :disabled="isDisabled" :icon="btnIcon" :plain="isPlain" :link="link"> <!-- v-perm="perm"-->
<el-button :type="btnType" size="mini" :disabled="isDisabled" :icon="btnIcon" :plain="isPlain" :link="link">
{{ btnText }} {{ btnText }}
</el-button> </el-button>
</template> </template>

View File

@@ -12,7 +12,7 @@
<el-form-item label="征集类型" prop="collectType"> <el-form-item label="征集类型" prop="collectType">
<el-select v-model="formData.collectType" placeholder="征集类型" clearable filterable> <el-select v-model="formData.collectType" placeholder="征集类型" clearable filterable>
<el-option <el-option
v-for="item in typeOption" v-for="item in cacheStore.getDict('collect_type')"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@@ -35,9 +35,10 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="所属公司" prop="companyIds" class="tree-select"> <el-form-item label="所属公司" prop="companyIds" class="tree-select">
<div>{{ getName(companyList) }}</div> <div>{{ getName(companyList) }}</div>
<el-button color="#DED0B2" @click="showCompany">{{companyList.length===0?'请选择所属公司':'更改'}}</el-button> <el-button color="#DED0B2" @click="showCompany">{{ companyList.length === 0 ? '请选择所属公司' : '更改' }}
<!-- <el-tree-select v-model="formData.companyIds" :data="companyOption"--> </el-button>
<!-- filterable clearable :check-strictly="true" multiple/>--> <!-- <el-tree-select v-model="formData.companyIds" :data="companyOption"-->
<!-- filterable clearable :check-strictly="true" multiple/>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@@ -119,6 +120,8 @@ import {useTagsView} from '@/stores/tagsview.js'
import {getFundOption} from "@/api/special-fund"; import {getFundOption} from "@/api/special-fund";
import CompanyPicker from "@/components/DetailComponent/CompanyPicker.vue"; import CompanyPicker from "@/components/DetailComponent/CompanyPicker.vue";
import {useCacheStore} from '@/stores/cache.js'
const cacheStore = useCacheStore()
const companyRef = ref() const companyRef = ref()
const companyList = ref([]) const companyList = ref([])
const changeDiagram = ref(false) const changeDiagram = ref(false)
@@ -140,12 +143,6 @@ const formData = ref({
const showTinymce = ref(true) const showTinymce = ref(true)
const routerName = ref(router.currentRoute.value.name) const routerName = ref(router.currentRoute.value.name)
const processDiagramViewer = ref(false) const processDiagramViewer = ref(false)
const typeOption = ref([
{
label: "需求征集",
value: '需求征集'
}
])
const companyOption = ref([]) const companyOption = ref([])
const specialFundOption = ref([]) const specialFundOption = ref([])
const form = ref(null) const form = ref(null)
@@ -313,8 +310,8 @@ const init = async () => {
}) })
} }
const submitParam = (item) => { const submitParam = (item) => {
console.log('item..',item.companyIds) console.log('item..', item.companyIds)
if(item.companyIds.length===0){ if (item.companyIds.length === 0) {
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: '请选择所属公司', message: '请选择所属公司',

View File

@@ -482,6 +482,7 @@ const getDetailInfo = async () => {
type: res.code === 1000 ? 'success' : 'error' type: res.code === 1000 ? 'success' : 'error'
}) })
if (res.code === 1000) { if (res.code === 1000) {
res.data.formData.specialFundId= res.data.formData.specialFundId===0?null:res.data.formData.specialFundId
formData.value = res.data.formData formData.value = res.data.formData
loading.value = false loading.value = false
} }

View File

@@ -43,26 +43,26 @@ const schema = computed(() => {
] ]
}) })
const baseForm = ref() const baseForm = ref()
const paneList=ref([ const paneList = ref([
{ {
label:'需求征集', label: '需求征集',
name:'00' name: '00'
}, },
{ {
label:'需求上报', label: '需求上报',
name:'10' name: '10'
}, },
{ {
label:'项目立项', label: '项目立项',
name:'20' name: '20'
}, },
{ {
label:'项目实施', label: '项目实施',
name:'40' name: '40'
}, },
{ {
label:'项目归档', label: '项目归档',
name:'50' name: '50'
} }
]) ])
const getBaseInfo = async () => { const getBaseInfo = async () => {
@@ -75,16 +75,19 @@ const getBaseInfo = async () => {
getBaseInfo() getBaseInfo()
const handleClick = (tab) => { const handleClick = (tab) => {
activeName.value=tab.props.name activeName.value = tab.props.name
loading.value=true loading.value = true
search({}) search({})
} }
const search = async (param) => { const search = async (param) => {
param.targetState = activeName.value if (activeName.value === '00') {
param.requirementId = requirementId.value
}
param.targetId = projectId.value param.targetId = projectId.value
param.targetState = activeName.value
searchFileList(param).then(res => { searchFileList(param).then(res => {
loading.value=false loading.value = false
changeFileList(res) changeFileList(res)
}) })
} }

View File

@@ -44,6 +44,7 @@
:formData="detailData.formData"/> :formData="detailData.formData"/>
</template> </template>
</steps> </steps>
<div style="width: 100%;height: 30px"></div>
<opinion v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId" <opinion v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
</template> </template>

View File

@@ -38,7 +38,7 @@ import { useTagsView } from '@/stores/tagsview.js'
import { useAuthStore } from '@/stores/userstore.js' import { useAuthStore } from '@/stores/userstore.js'
import fvRadio from '@/fvcomponents/fvRadio/index.vue' import fvRadio from '@/fvcomponents/fvRadio/index.vue'
import { ElLoading, ElNotification } from 'element-plus'; import { ElLoading, ElNotification } from 'element-plus';
import { getMenuOpt } from '@/api/system/menuman.js' import { getMenuOptRole } from '@/api/system/menuman.js'
import { getRoleDetail, operate, getTemRoleOption } from "@/api/role/role"; import { getRoleDetail, operate, getTemRoleOption } from "@/api/role/role";
const tagsViewStore = useTagsView() const tagsViewStore = useTagsView()
@@ -143,8 +143,9 @@ const init = async () => {
form.value.setValues({state: '1', template: false}) form.value.setValues({state: '1', template: false})
const res = await getTemRoleOption() const res = await getTemRoleOption()
localData.tempRoleOpt = res.data localData.tempRoleOpt = res.data
const { data } = await getMenuOpt(0) const { data } = await getMenuOptRole()
localData.menuData = data localData.menuData = data.menuOption
// localData.checked = data.checked
} }
const getInfo = async () => { const getInfo = async () => {