Merge pull request 'master' (#967) from master into dj
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/967
This commit is contained in:
@@ -10,20 +10,13 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="title==='apply'">
|
||||
<el-col :span="6" v-if="title==='apply'&&detail">
|
||||
<!-- label-width="106"-->
|
||||
<el-form-item label="实际专项资金" prop="specialFundAmount" label-width="121" >
|
||||
<el-input v-model="localFormData.specialFundAmount" placeholder="请输入实际专项资金">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="6" v-if="title==='apply'">-->
|
||||
<!-- <!– label-width="106"–>-->
|
||||
<!-- <el-form-item label="实际专项资金" prop="budget" label-width="120">-->
|
||||
<!-- <el-input v-model="localFormData.budget" placeholder="请输入实际专项资金">-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" v-if="title==='apply'">
|
||||
@@ -180,6 +173,7 @@ import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import Paging from "@/components/pagination/index.vue";
|
||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
@@ -267,6 +261,7 @@ const selectRows = ref([])
|
||||
const projectId = ref(route.query.projectId)
|
||||
const sessionParams = ref({})
|
||||
const optionalChargeLeadershipPickerRef = ref()
|
||||
const detail = ref(false)
|
||||
const optionalChargeLeadershipList = ref([])
|
||||
const filePreviewParam = ref({
|
||||
fileUrl: '',
|
||||
@@ -274,7 +269,13 @@ const filePreviewParam = ref({
|
||||
fileType: 'pdf'
|
||||
})
|
||||
const filePreviewShow = ref(false)
|
||||
const getInfo=async ()=>{
|
||||
|
||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||
console.log('data',code,data)
|
||||
detail.value=data.isSpecialFund
|
||||
}
|
||||
getInfo()
|
||||
const getTemplateName=(type)=>{
|
||||
switch (type) {
|
||||
case 'apply':
|
||||
@@ -514,6 +515,65 @@ const getFileParam = (item) => {
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
if(props.step==50){
|
||||
let files = []
|
||||
if (props.mode === 'resubmit') {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
} else {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
// console.info("🚀 ~method:handleSubmit -----", files,attachment.value.isHaveOneFile)
|
||||
if (!attachment.value.isHaveOneFile) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let projectPersonIds = []
|
||||
for (const item of projectPersonUserList.value) {
|
||||
projectPersonIds.push(parseInt(item.id))
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
// singleFile: attachment.value.singleFile,
|
||||
projectId: projectId.value,
|
||||
actualEconomicEstimate: parseFloat(localFormData.value.actualEconomicEstimate),
|
||||
specialFundAmount: parseFloat(localFormData.value.specialFundAmount),
|
||||
preProcess: JSON.stringify(localFormData.value.preProcess)
|
||||
}
|
||||
if (sessionParams.value.preProcess && !localFormData.value.preProcess) {
|
||||
params.preProcess = JSON.stringify(sessionParams.value.preProcess)
|
||||
}
|
||||
console.log('params',params)
|
||||
let res
|
||||
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)
|
||||
await router.push({
|
||||
name: 'Filing'
|
||||
})
|
||||
}
|
||||
}else{
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) {
|
||||
@@ -597,12 +657,6 @@ const handleSubmit = async (instance) => {
|
||||
} else {
|
||||
res = await projectCheck(params)
|
||||
}
|
||||
} else if (props.step === '50') {
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitConclusion(params)
|
||||
} else {
|
||||
res = await projectConclusion(params)
|
||||
}
|
||||
}
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -619,13 +673,10 @@ const handleSubmit = async (instance) => {
|
||||
await router.push({
|
||||
name: 'Implementation'
|
||||
})
|
||||
} else if (props.step === '50') {
|
||||
await router.push({
|
||||
name: 'Filing'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
const init = async () => {
|
||||
let id = projectId.value
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
import {addTag, delTag, getTagList, getTags, updateTag} from "@/api/project-manage";
|
||||
import {ElLoading, ElMessageBox, ElNotification} from "element-plus";
|
||||
import {searchImplementationFileList, uploadFileList} from "@/api/project-manage/attachment";
|
||||
import {deleteFile} from "@/api/project-demand";
|
||||
import {deleteFile, downloadFile} from "@/api/project-demand";
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
@@ -151,6 +151,15 @@ const isCloseByList = (index) => {
|
||||
// otherAttachmentList.length>0?false:true
|
||||
return otherAttachmentList.value.length == 0;
|
||||
}
|
||||
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 deleteSingleFile = (row) => {
|
||||
deleteFile(row.fileId).then(res => {
|
||||
ElNotification({
|
||||
@@ -232,7 +241,11 @@ const handleTabClick = (item) => {
|
||||
isEdit.value = false
|
||||
}
|
||||
if (item.props.name != 'plus') {
|
||||
changeFileList(getTagName(item.props.name))
|
||||
if(item.props.name == 'all'){
|
||||
changeFileList('all')
|
||||
}else{
|
||||
changeFileList(getTagName(item.props.name))
|
||||
}
|
||||
// if (item.props.name == 'all') {
|
||||
// otherAttachmentList.value = allFiles.value
|
||||
// } else {
|
||||
@@ -252,7 +265,7 @@ const compositeParam = (item) => {
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
newFile: true,
|
||||
tag: getTagName(activeName.value),
|
||||
tag: getTagName(activeName.value) || '项目实施',
|
||||
}
|
||||
}
|
||||
const getFile = (val) => {
|
||||
@@ -291,12 +304,21 @@ const clickToPreview = (row) => {
|
||||
})
|
||||
}
|
||||
const changeFileList=(tag)=>{
|
||||
showAttachmentTable.value = false
|
||||
let params = {
|
||||
targetId: route.query.projectId,
|
||||
targetState: "30",
|
||||
tag:tag
|
||||
let params = {}
|
||||
if(tag=='all'){
|
||||
params = {
|
||||
targetId: route.query.projectId,
|
||||
targetState: "30",
|
||||
}
|
||||
}else{
|
||||
params = {
|
||||
targetId: route.query.projectId,
|
||||
targetState: "30",
|
||||
tag:tag
|
||||
}
|
||||
}
|
||||
showAttachmentTable.value = false
|
||||
|
||||
searchImplementationFileList(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
otherAttachmentList.value = res.data.fileList
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<el-form-item label="名称" prop="fileName">
|
||||
<el-input v-model="attachment.fileName" placeholder="请输入文件名查询" clearable filterable style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="targetState" v-if="allFile">
|
||||
<el-select v-model="attachment.targetState" placeholder="请选择类型" clearable filterable style="width: 300px">
|
||||
<el-form-item label="项目阶段" prop="targetState" v-if="allFile">
|
||||
<el-select v-model="attachment.targetState" placeholder="请选择项目阶段" clearable filterable style="width: 300px">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('archive_file_type')"
|
||||
:key="item.value"
|
||||
@@ -96,7 +96,7 @@ const tableConfig = reactive({
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
label:props.allFile?'项目阶段': '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -137,7 +137,8 @@
|
||||
<el-empty image-size="135" description="暂无通知公告~"/>
|
||||
</div>
|
||||
<div v-for="(item,index) in noticeList" class="notice" @click="handleGoToArticleDetail(item)">
|
||||
<span>{{ index > 8 ? '' : 0 }}{{ index + 1 }}</span>{{ item.articleTitle }}
|
||||
<span>{{ index > 8 ? '' : 0 }}{{ index + 1 }}</span>
|
||||
{{ item.articleTitle }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -48,7 +48,7 @@ const tableConfig = reactive({
|
||||
},
|
||||
{
|
||||
prop: 'processNumber',
|
||||
label: '编号',
|
||||
label: '征集编号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
<el-form-item label="需求征集" prop="" required>
|
||||
<template v-if="formData.requirementDefaultName">{{ formData.requirementDefaultName }}</template>
|
||||
<el-select v-else v-model="formData.requirementId" clearable placeholder="请选择需求征集"
|
||||
@change="changeCollectData">
|
||||
@change="changeCollectData();changeRequirement()">
|
||||
<el-option
|
||||
v-for="item in requirementList"
|
||||
:key="item.value"
|
||||
@@ -388,7 +388,7 @@ 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 {getFormInfo, getInfo} from "@/api/project-demand";
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
|
||||
@@ -473,6 +473,19 @@ if (name.value === 'Summary/edit') {
|
||||
formData.value = collectData
|
||||
}
|
||||
}
|
||||
const changeRequirement=async ()=>{
|
||||
await getInfo(formData.value.requirementId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
|
||||
console.log('formData.requirementId',formData.value.requirementId,res)
|
||||
formData.value.isSpecialFund = res.data.formData.isSpecialFund
|
||||
if ( res.data.formData.isSpecialFund) {
|
||||
formData.value.specialFundId = res.data.formData.specialFundId
|
||||
formData.value.specialFund = res.data.formData.specialFund
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const changeCollectData = () => {
|
||||
if (name.value === 'Summary/edit') {
|
||||
// params.fileList= attachment.value.allFileList
|
||||
|
||||
@@ -220,7 +220,7 @@ const tableConfig = reactive({
|
||||
},
|
||||
{
|
||||
prop: 'processNumber',
|
||||
label: '编号',
|
||||
label: '项目编号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {switchAttachmentState} from "@/api/project-manage/attachment";
|
||||
import {ElMessageBox} from "element-plus";
|
||||
import {ElMessageBox, ElNotification} from "element-plus";
|
||||
import { getSubCompOpt } from '@/api/user/user.js';
|
||||
import {filterProjectName} from "@/api/project-manage";
|
||||
import {filterRequirementName} from "@/api/project-demand";
|
||||
@@ -219,7 +219,7 @@ const tableConfig = reactive({
|
||||
|
||||
{
|
||||
prop: 'processNumber',
|
||||
label: '编号',
|
||||
label: '项目编号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
@@ -318,10 +318,18 @@ const tableConfig = reactive({
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_filing'} value={row.state}/>)
|
||||
} else {
|
||||
return '--'
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (!buttons.has("openFileSwitch")&&row.state!=1) {
|
||||
console.log('row',row)
|
||||
return (<Tag dictType={'project_filing'} value={'0'}/>)
|
||||
}else if (buttons.has("openFileSwitch")) {
|
||||
return (<Tag dictType={'project_filing'} value={'4'}/>)
|
||||
}else{
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_filing'} value={row.state}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -348,10 +356,10 @@ const tableConfig = reactive({
|
||||
btn.push({label: '编辑', prem: ['project:management:filing:conclusion'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("openFileSwitch")) {
|
||||
btn.push({label: '开启上传', prem: ['project:management:filing:conclusion'], func: () => handleOpenUpload(row,true), type: 'primary'})
|
||||
btn.push({label: '开启上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,true), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("closeFileSwitch")) {
|
||||
btn.push({label: '关闭上传', prem: ['project:management:filing:conclusion'], func: () => handleOpenUpload(row,false), type: 'primary'})
|
||||
btn.push({label: '关闭上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,false), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
@@ -426,6 +434,7 @@ const handleEdit = (row) => {
|
||||
})
|
||||
}
|
||||
const handleOpenUpload=(row,flag)=>{
|
||||
console.log('tableIns',tableIns.value)
|
||||
ElMessageBox.confirm(`是否确认${flag?'开启':'关闭'}上传文件?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -436,7 +445,15 @@ const handleOpenUpload=(row,flag)=>{
|
||||
projectId: row.projectId
|
||||
}
|
||||
switchAttachmentState(params).then(res=>{
|
||||
tableIns.value.refresh()
|
||||
if(res.code==1000){
|
||||
tableIns.value.refresh()
|
||||
}else{
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ const tableConfig = reactive({
|
||||
|
||||
{
|
||||
prop: 'processNumber',
|
||||
label: '编号',
|
||||
label: '项目编号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -216,7 +216,7 @@ const tableConfig = reactive({
|
||||
},
|
||||
{
|
||||
prop: 'processNumber',
|
||||
label: '编号',
|
||||
label: '项目编号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -76,8 +76,8 @@ export default defineConfig({
|
||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||
// },
|
||||
// '/api/admin': {
|
||||
// // 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